⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 winsync.c

📁 MinGUI 可视化程序代码
💻 C
字号:
 /******************************************************************************** Copyright  2006 National ASIC Center, All right Reserved** FILE NAME:			winsync.c* PROGRAMMER:			ming.c* Date of Creation:		2006/08/8** DESCRIPTION: 								*			Semaphore			* NOTE:						 		** FUNCTIONS LIST:* -----------------------------------------------------------------------------** -----------------------------------------------------------------------------** MODIFICATION HISTORY*     LastModify  2006/09/18******************************************************************************/#include "wingal.h"/*###########################################################################*/#if BASE_OS_TYPE==2        /*NUCLEUS OS操作系统下*//*###########################################################################*/#include "nucleus.h"//---------------------------------------------------------------------------DWORD Semaphore_Create(){ NU_SEMAPHORE  *MsgTskSemaphore=(NU_SEMAPHORE  *)GetMem(sizeof(NU_SEMAPHORE));   /*定义NUCLEUS下信号量*/  if(MsgTskSemaphore)  { NU_Create_Semaphore(MsgTskSemaphore,"MsgTskSemaphore", 0, NU_FIFO);  }  return (DWORD)MsgTskSemaphore;}//---------------------------------------------------------------------------void Semaphore_Destroy(DWORD Semaphore){ NU_Delete_Semaphore((NU_SEMAPHORE *)Semaphore);  FreeMem((NU_SEMAPHORE *)Semaphore);}//---------------------------------------------------------------------------void Semaphore_Obtain(DWORD Semaphore){ NU_Obtain_Semaphore((NU_SEMAPHORE *)Semaphore, NU_SUSPEND);}//---------------------------------------------------------------------------void Semaphore_Release(DWORD Semaphore){ NU_Release_Semaphore((NU_SEMAPHORE *)Semaphore);}/*###########################################################################*/#elif BASE_OS_TYPE==3   /*Asix OS操作系统下*//*###########################################################################*///---------------------------------------------------------------------------DWORD Semaphore_Create(){  /*待实现*/}//---------------------------------------------------------------------------void Semaphore_Destroy(DWORD Semaphore){   /*待实现*/}//---------------------------------------------------------------------------void Semaphore_Obtain(DWORD Semaphore){   /*待实现*/}//---------------------------------------------------------------------------void Semaphore_Release(DWORD Semaphore){   /*待实现*/}/*###########################################################################*/#endif/*###########################################################################*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -