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

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

#1 add bitwise util from ARIA of chevalier

File size: 764 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#include "cf_mutex.h"
16
17/** 스레드 워커 함수 프로토타입 */
18typedef int (* CF_Thread_Function) (void *);
19
20/** 스레드 컨텍스트 */
21typedef void * CF_Thread_Ctx;
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27CF_EXPORT int
28CF_Thread_CreateCtx (CF_Thread_Ctx * ctx,
29 CF_Thread_Function callback,
30 void * arg);
31
32CF_EXPORT int
33CF_Thread_Start (CF_Thread_Ctx ctx);
34
35CF_EXPORT int
36CF_Thread_DestroyCtx (CF_Thread_Ctx ctx);
37
38CF_EXPORT int
39CF_Thread_Join (CF_Thread_Ctx ctx);
40
41#ifdef __cplusplus
42}
43#endif
44
45#endif // #ifndef __CF_THREAD_H__
Note: See TracBrowser for help on using the repository browser.