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
RevLine 
[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]16typedef int (* CF_Thread_Function) (void *);
[34]17
[122]18/** 스레드 컨텍스트 */
[109]19typedef void * CF_Thread_Ctx;
[34]20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
[4]25CF_EXPORT int
[122]26CF_Thread_CreateCtx (CF_Thread_Ctx * ctx,
[109]27 CF_Thread_Function callback,
28 void * arg);
[4]29
30CF_EXPORT int
[122]31CF_Thread_Start (CF_Thread_Ctx ctx);
[4]32
33CF_EXPORT int
[122]34CF_Thread_DestroyCtx (CF_Thread_Ctx ctx);
[4]35
36CF_EXPORT int
[122]37CF_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.