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

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

#1 fix dependencies for thread/mutex

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