source:
libcf/trunk/include/cf_thread.h@
126
Last change on this file since 126 was 126, checked in by , 11 years ago | |
---|---|
File size: 761 bytes |
Rev | Line | |
---|---|---|
[4] | 1 | /** |
[119] | 2 | * \file cf_thread.h |
3 | * \author myusgun <myusgun@gmail.com> | |
[26] | 4 | * |
[126] | 5 | * \brief 멀티스레드 지원 |
[26] | 6 | * |
[119] | 7 | * \example thread.c |
[26] | 8 | */ |
[34] | 9 | #ifndef __CF_THREAD_H__ |
10 | #define __CF_THREAD_H__ | |
11 | ||
12 | #include "cf_base.h" | |
13 | ||
[126] | 14 | #include "cf_mutex.h" |
15 | ||
[59] | 16 | /** 스레드 워커 함수 프로토타입 */ |
[57] | 17 | typedef int (* CF_Thread_Function) (void *); |
[34] | 18 | |
[122] | 19 | /** 스레드 컨텍스트 */ |
[109] | 20 | typedef void * CF_Thread_Ctx; |
[34] | 21 | |
22 | #ifdef __cplusplus | |
23 | extern "C" { | |
24 | #endif | |
25 | ||
[4] | 26 | CF_EXPORT int |
[122] | 27 | CF_Thread_CreateCtx (CF_Thread_Ctx * ctx, |
[109] | 28 | CF_Thread_Function callback, |
29 | void * arg); | |
[4] | 30 | |
31 | CF_EXPORT int | |
[122] | 32 | CF_Thread_Start (CF_Thread_Ctx ctx); |
[4] | 33 | |
34 | CF_EXPORT int | |
[122] | 35 | CF_Thread_DestroyCtx (CF_Thread_Ctx ctx); |
[4] | 36 | |
37 | CF_EXPORT int | |
[122] | 38 | CF_Thread_Join (CF_Thread_Ctx ctx); |
[4] | 39 | |
40 | #ifdef __cplusplus | |
41 | } | |
42 | #endif | |
43 | ||
44 | #endif // #ifndef __CF_THREAD_H__ |
Note:
See TracBrowser
for help on using the repository browser.