ae2f_docs
Loading...
Searching...
No Matches
Ftx-POSIX.auto.h
1#undef __ae2f_MACRO_GENERATED
2#define __ae2f_MACRO_GENERATED 1
3#ifndef ae2f_Sys_Ftx_POSIX_auto_h
4
5#include <ae2f/Keys.h>
6#undef __ae2f_MACRO_GENERATED
7#define __ae2f_MACRO_GENERATED 1
8#include <ae2f/Macro.h>
9#undef __ae2f_MACRO_GENERATED
10#define __ae2f_MACRO_GENERATED 1
12#else
13#include <ae2f/Sys/Ftx.h>
14#undef __ae2f_MACRO_GENERATED
15#define __ae2f_MACRO_GENERATED 1
16#endif
17
18#define ae2f_Sys_Ftx_POSIX_auto_h
19#if ae2f_SysFtx_POSIX(!)0
20
21#if __ae2f_MACRO_GENERATED
22#else
23ae2f_SysFtxLibDeclare_POSIX(static);
24ae2f_SysFtxLibDefine_POSIX(static);
25#endif
26
27#define _ae2f_SysFtxWait_imp_POSIX(
28 /** tparam */
29 UNUSED,
30
31 /** param */
32 /* , ae2f_eSysFtxWait */ ret_err,
33 /* ae2f_SysFtxEl_t* const */ prm_uaddr,
34 /* const int */ prm_val,
35 /* const structtimespec* const */ pprm_timeout \
36)\
37{
38 if((ret_err) = pthread_mutex_lock(&__ae2f_gSysFtxMtx));
39 else do {
40 while(*(prm_uaddr) == (v))
41 {
42 if((ret_err) = (pprm_timeout)
43 ? pthread_cond_timedwait(&__ae2f_gSysFtxCnd, &__ae2f_gSysFtxCnd, pprm_timeout)
44 : pthread_cond_wait(&__ae2f_gSysFtxCnd, &__ae2f_gSysFtxMtx))
45 {
46 break;
47 }
48 }
49
50 if((ret_err)) break;
51
52 if((ret_err) = pthread_mutex_unlock(&__ae2f_gSysFtxMtx))
53 {
54 break;
55 }
56
57 (ret_err) = ae2f_SysFtxWait_GOOD;
58 } while(0); \
59}
60
61#define _ae2f_SysFtxWakeOne(
62 /** tparam */
63
64
65 /** param */
66 /* , ae2f_eSysFtxWake */ ret_err,
67 /* ae2f_SysFtxEl_t* const */ prm_uaddr \
68)\
69{
70 if((ret_err) = pthread_mutex_lock(&__ae2f_gSysFtxMtx))
71 else do {
72 if((ret_err) = pthread_cond_signal(&(__ae2f_gSysFtxMtx))) {
73 break;
74 }
75
76 if((ret_err) = pthread_mutex_unlock(&(__ae2f_gSysFtxMtx))) {
77 break;
78 }
79
80 (ret_err) = ae2f_SysFtxWake_GOOD;
81 } while(0); \
82}
83
84
85#endif
86#endif
87
88#undef __ae2f_MACRO_GENERATED
89
90#define __ae2f_MACRO_GENERATED 0
#define __ae2f_MACRO_GENERATED
Definition Macro.h:4