thread.h
来自「一个很好用的解析」· C头文件 代码 · 共 71 行
H
71 行
#ifndef THREAD_H_INCLUDED#define THREAD_H_INCLUDED/*********************************************************************** Thread*********************************************************************/typedef struct abyss_thread TThread;voidThreadPoolInit(void);typedef void TThreadProc(void * const userHandleP);typedef void TThreadDoneFn(void * const userHandleP);voidThreadCreate(TThread ** const threadPP, void * const userHandle, TThreadProc * const func, TThreadDoneFn * const threadDone, abyss_bool const useSigchld, const char ** const errorP);abyss_boolThreadRun(TThread * const threadP);abyss_boolThreadStop(TThread * const threadP);abyss_boolThreadKill(TThread * threadP);voidThreadWaitAndRelease(TThread * const threadP);voidThreadExit(int const retValue);voidThreadRelease(TThread * const threadP);abyss_boolThreadForks(void);voidThreadUpdateStatus(TThread * const threadP);#ifndef WIN32voidThreadHandleSigchld(pid_t const pid);#endif/*********************************************************************** Mutex*********************************************************************/#ifdef WIN32typedef HANDLE TMutex;#else#include <pthread.h>typedef pthread_mutex_t TMutex;#endif /* WIN32 */abyss_bool MutexCreate(TMutex *m);abyss_bool MutexLock(TMutex *m);abyss_bool MutexUnlock(TMutex *m);abyss_bool MutexTryLock(TMutex *m);void MutexFree(TMutex *m);#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?