📄 thread.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -