gwenhywfar 5.10.2
gwenthread.h
Go to the documentation of this file.
1/***************************************************************************
2 begin : Wed Feb 03 2021
3 copyright : (C) 2021 by Martin Preuss
4 email : martin@libchipcard.de
5
6 ***************************************************************************
7 * *
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21 * MA 02111-1307 USA *
22 * *
23 ***************************************************************************/
24
25
26#ifndef GWEN_THREAD_H
27#define GWEN_THREAD_H
28
29
31#include <gwenhywfar/inherit.h>
32#include <gwenhywfar/list1.h>
33
34#include <inttypes.h>
35
36
37#define GWEN_THREAD_FLAGS_DETACHED 0x00000001
38
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44
45typedef struct GWEN_THREAD GWEN_THREAD;
48
49
51
52
53
56
58
60
65
66
68
69
70
71#ifdef __cplusplus
72}
73#endif
74
75
76
77#endif
78
#define GWENHYWFAR_API
#define GWENHYWFAR_CB
GWENHYWFAR_API GWEN_THREAD * GWEN_Thread_new()
GWENHYWFAR_API GWEN_THREAD_RUN_FN GWEN_Thread_SetRunFn(GWEN_THREAD *thr, GWEN_THREAD_RUN_FN fn)
struct GWEN_THREAD GWEN_THREAD
Definition gwenthread.h:45
GWENHYWFAR_API void GWEN_Thread_SetFlags(GWEN_THREAD *thr, uint32_t flags)
GWENHYWFAR_CB void(* GWEN_THREAD_RUN_FN)(GWEN_THREAD *thr)
Definition gwenthread.h:50
GWENHYWFAR_API int GWEN_Thread_Join(GWEN_THREAD *thr)
GWENHYWFAR_API void GWEN_Thread_free(GWEN_THREAD *thr)
GWENHYWFAR_API int GWEN_Thread_Start(GWEN_THREAD *thr)
GWENHYWFAR_API void GWEN_Thread_AddFlags(GWEN_THREAD *thr, uint32_t flags)
GWENHYWFAR_API uint32_t GWEN_Thread_GetFlags(const GWEN_THREAD *thr)
GWENHYWFAR_API void GWEN_Thread_SubFlags(GWEN_THREAD *thr, uint32_t flags)
#define GWEN_INHERIT_FUNCTION_LIB_DEFS(t, decl)
Definition inherit.h:125
#define GWEN_LIST_FUNCTION_LIB_DEFS(t, pr, decl)
Definition list1.h:348