74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
CloseHandle(thread);
return YES;
#endif
}
static OF_INLINE BOOL
of_thread_cancel(of_thread_t thread)
{
#if defined(OF_HAVE_PTHREADS)
return (pthread_cancel(thread) ? NO : YES);
#elif defined(_WIN32)
if (thread != INVALID_HANDLE_VALUE) {
TerminateThread(thread, 1);
CloseHandle(thread);
}
return YES;
#endif
}
static OF_INLINE BOOL
of_mutex_new(of_mutex_t *mutex)
{
#if defined(OF_HAVE_PTHREADS)
|
|
|
|
<
|
<
<
<
<
|
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
CloseHandle(thread);
return YES;
#endif
}
static OF_INLINE void
of_thread_exit()
{
#if defined(OF_HAVE_PTHREADS)
pthread_exit(NULL);
#elif defined(_WIN32)
ExitThread(0);
#endif
}
static OF_INLINE BOOL
of_mutex_new(of_mutex_t *mutex)
{
#if defined(OF_HAVE_PTHREADS)
|