typedef struct
{
void(*pfInit)(void);
void(*pthread)(void);
}_WINTHREAD;//初始化进程的结构体
static _WINTHREAD srtWinthread;//定义
void WIN_Install(void(*pfInit)(void),void(*pthread)(void))//进程调度加载,并初始化
{
if(NULL!=pfInit)
{
srtWinthread.pfInit=pfInit;
(*(srtWinthread.pfInit))();
}
if(NULL!=pfthread)
{
srtWinthread.pfthread=pfthread;
}
}
void WIN_Thread_poll(void)//进程的轮询
{
if( srtWinthread.pfthread)
(*(srtWinthread.pfthread))();
}
无非就是指针函数与函数指针的东西,记录!