📄 mk_sem.h
字号:
/**********************************************************************************
* mk_sem.h
* coded by hspark@ce.cnu.ac.kr
* date : 2002/06/23
**********************************************************************************/
#ifndef __MK_SEM_H__
#define __MK_SEM_H__
#include "kernel\\mk_defs.h"
#include "kernel\\mk_task.h"
#define MK_SEMAPHORE_MAGIC 0xF3CD03E3L /* Magic Value of Semaphore */
#pragma packed on
typedef struct mk_semaphore_struct {
ULONG s_Magic;
LONG s_Count;
struct mk_pending_list_struct s_PendingList;
struct mk_semaphore_struct *s_Prev;
struct mk_semaphore_struct *s_Next;
char *s_pName;
} MK_SEMAPHORE;
#pragma packed off
extern struct mk_semaphore_struct *MK_pSemaphoreListHead;
extern struct mk_semaphore_struct *MK_pSemaphoreListTail;
/*-----------------------------------------------------------------
* Internal Function
*-----------------------------------------------------------------*/
void MK_SemaphoreInitialize(void);
MK_TASK *MK_GetSemaphorePendingTask(MK_SEMAPHORE *pSemaphore);
STATUS MK_SemaphoreInformation(struct mk_ddi_struct *pDDI);
/*-----------------------------------------------------------------
* API Function
*-----------------------------------------------------------------*/
STATUS MK_CreateSemaphore(MK_SEMAPHORE *pSemaphore, char *pName, int Count,
BOOLEAN Options);
int MK_GetSemaphoreCount(MK_SEMAPHORE *pSemaphore);
int MK_DeleteSemaphore(MK_SEMAPHORE *pSemaphore);
STATUS MK_SemaphorePend(MK_SEMAPHORE *pSemaphore, long Ticks);
STATUS MK_SemaphorePost(MK_SEMAPHORE *pSemaphore);
STATUS MK_SemaphoreReset(MK_SEMAPHORE *pSemaphore, LONG Count);
#endif /* __MK_SEM_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -