📄 gio_dele.c
字号:
/*
* Copyright 2003 by Texas Instruments Incorporated.
* All rights reserved. Property of Texas Instruments Incorporated.
* Restricted rights to use, duplicate or disclose this code are
* granted through contract.
*
*/
/* "@(#) DDK 1.11.00.00 11-04-03 (ddk-b13)" */
/*
* ======== gio_dele.c ========
*
*/
#include <std.h>
#include <mem.h>
#include <que.h>
#include <gio.h>
#include <iom.h>
#include <_gio.h>
/*
* ======== GIO_delete ========
*/
Int GIO_delete(GIO_Handle gioChan)
{
IOM_Packet *packet;
/* flush and delete low-level device ... */
if (gioChan->fxns != NULL && gioChan->mdChan != NULL) {
GIO_flush(gioChan);
gioChan->fxns->mdDeleteChan(gioChan->mdChan);
}
/* delete semaphore or alternate sync object ... */
if (gioChan->syncObj != NULL) {
GIO->SEMDELETE(gioChan->syncObj);
}
/* free frames ... */
packet = QUE_get(&gioChan->freeList);
while (packet != (IOM_Packet *)(&gioChan->freeList)) {
_GIO_rmPacket(packet);
packet = QUE_get(&gioChan->freeList);
}
/* free GIO object. */
(Void)MEM_free(0, gioChan, sizeof(GIO_Obj));
return (IOM_COMPLETED);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -