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