/** * @file cf_thread.h * @author myusgun * @version 0.1 * * @remark 멀티스레드 및 뮤텍스 지원 * * @example thread.c */ #ifndef __CF_THREAD_H__ #define __CF_THREAD_H__ #include "cf_base.h" /** 스레드 워커 함수 형태이며, CF_Thread_Function 형식 */ typedef int (* CF_Thread_Function) (void *); /** 스레드 아이디 */ typedef void * CF_Thread; /** 뮤텍스 아이디 */ typedef void * CF_Mutex; #ifdef __cplusplus extern "C" { #endif CF_EXPORT int CF_Thread_Create (CF_Thread * threadID, CF_Thread_Function callback, void * arg); CF_EXPORT int CF_Thread_Release (CF_Thread * threadID); CF_EXPORT int CF_Thread_Join (CF_Thread * threadID); CF_EXPORT int CF_Mutex_Create (CF_Mutex * mutex); CF_EXPORT int CF_Mutex_Destory (CF_Mutex * mutex); CF_EXPORT int CF_Mutex_Lock (CF_Mutex * mutex); CF_EXPORT int CF_Mutex_Unlock (CF_Mutex * mutex); #ifdef __cplusplus } #endif #endif // #ifndef __CF_THREAD_H__