source: libcf/trunk/include/cf_thread.h@ 126

Last change on this file since 126 was 126, checked in by cheese, 11 years ago

#1 separate header/source files for thread and mutex

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