Last change
on this file since 119 was 119, checked in by cheese, 11 years ago |
#1 fix and arrange doxygen configuration file and doxygen comments
|
File size:
1002 bytes
|
Rev | Line | |
---|
[4] | 1 | /**
|
---|
[119] | 2 | * \file cf_thread.h
|
---|
| 3 | * \author myusgun <myusgun@gmail.com>
|
---|
[26] | 4 | *
|
---|
[119] | 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 |
|
---|
[59] | 14 | /** 스레드 워커 함수 프로토타입 */
|
---|
[57] | 15 | typedef int (* CF_Thread_Function) (void *);
|
---|
[34] | 16 |
|
---|
| 17 | /** 스레드 아이디 */
|
---|
[109] | 18 | typedef void * CF_Thread_Ctx;
|
---|
[34] | 19 |
|
---|
| 20 | /** 뮤텍스 아이디 */
|
---|
[109] | 21 | typedef void * CF_Mutex_Ctx;
|
---|
[34] | 22 |
|
---|
| 23 | #ifdef __cplusplus
|
---|
| 24 | extern "C" {
|
---|
| 25 | #endif
|
---|
| 26 |
|
---|
[4] | 27 | CF_EXPORT int
|
---|
[109] | 28 | CF_Thread_CreateCtx (CF_Thread_Ctx * threadID,
|
---|
| 29 | CF_Thread_Function callback,
|
---|
| 30 | void * arg);
|
---|
[4] | 31 |
|
---|
| 32 | CF_EXPORT int
|
---|
[109] | 33 | CF_Thread_DestroyCtx (CF_Thread_Ctx * threadID);
|
---|
[4] | 34 |
|
---|
| 35 | CF_EXPORT int
|
---|
[109] | 36 | CF_Thread_Join (CF_Thread_Ctx * threadID);
|
---|
[4] | 37 |
|
---|
| 38 | CF_EXPORT int
|
---|
[109] | 39 | CF_Mutex_CreateCtx (CF_Mutex_Ctx * mutex);
|
---|
[4] | 40 |
|
---|
| 41 | CF_EXPORT int
|
---|
[109] | 42 | CF_Mutex_DestoryCtx (CF_Mutex_Ctx * mutex);
|
---|
[4] | 43 |
|
---|
| 44 | CF_EXPORT int
|
---|
[109] | 45 | CF_Mutex_Lock (CF_Mutex_Ctx * mutex);
|
---|
[4] | 46 |
|
---|
| 47 | CF_EXPORT int
|
---|
[109] | 48 | CF_Mutex_Unlock (CF_Mutex_Ctx * mutex);
|
---|
[4] | 49 |
|
---|
| 50 | #ifdef __cplusplus
|
---|
| 51 | }
|
---|
| 52 | #endif
|
---|
| 53 |
|
---|
| 54 | #endif // #ifndef __CF_THREAD_H__
|
---|
Note:
See
TracBrowser
for help on using the repository browser.