40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
|
struct SignalSemaphore semaphore;
struct Task *joinTask;
unsigned char joinSigBit;
bool detached, done;
} *OFPlainThread;
#endif
typedef struct OFPlainThreadAttributes {
typedef struct {
float priority;
size_t stackSize;
} OFPlainThreadAttributes;
#if defined(OF_HAVE_PTHREADS)
static OF_INLINE OFPlainThread
OFCurrentPlainThread(void)
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
-
-
-
+
-
-
-
|
static OF_INLINE bool
OFPlainThreadIsCurrent(OFPlainThread thread)
{
return (thread == GetCurrentThread());
}
#elif defined(OF_AMIGAOS)
extern OFPlainThread OFCurrentPlainThread(void);
static OF_INLINE bool
OFPlainThreadIsCurrent(OFPlainThread thread)
extern bool OFPlainThreadIsCurrent(OFPlainThread);
{
return (thread->thread == FindTask(NULL));
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern int OFPlainThreadAttributesInit(OFPlainThreadAttributes *attr);
extern int OFPlainThreadNew(OFPlainThread *thread, const char *name,
|