Differences From Artifact [34fb8d0893]:
- File
src/thread.h
— part of check-in
[5358e9ea6a]
at
2019-08-01 20:14:35
on branch trunk
— Split threading.[hm] into multiple files
This allows the runtime to only link against the parts it needs, without
pulling in unnecessary parts like thread spawning, TLS and conditions. (user: js, size: 1659) [annotate] [blame] [check-ins using]
To Artifact [a6bfb58593]:
- File src/thread.h — part of check-in [c26426e80f] at 2019-08-01 21:05:49 on branch trunk — Add missing extern "C" (user: js, size: 1726) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
43 44 45 46 47 48 49 50 51 52 53 54 55 | # define of_thread_is_current(t) pthread_equal(t, pthread_self()) # define of_thread_current pthread_self #elif defined(OF_WINDOWS) # define of_thread_is_current(t) (t == GetCurrentThread()) # define of_thread_current GetCurrentThread #endif extern bool of_thread_attr_init(of_thread_attr_t *attr); extern bool of_thread_new(of_thread_t *thread, void (*function)(id), id object, const of_thread_attr_t *attr); extern void of_thread_set_name(const char *name); extern bool of_thread_join(of_thread_t thread); extern bool of_thread_detach(of_thread_t thread); | > > > > > > | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | # define of_thread_is_current(t) pthread_equal(t, pthread_self()) # define of_thread_current pthread_self #elif defined(OF_WINDOWS) # define of_thread_is_current(t) (t == GetCurrentThread()) # define of_thread_current GetCurrentThread #endif #ifdef __cplusplus extern "C" { #endif extern bool of_thread_attr_init(of_thread_attr_t *attr); extern bool of_thread_new(of_thread_t *thread, void (*function)(id), id object, const of_thread_attr_t *attr); extern void of_thread_set_name(const char *name); extern bool of_thread_join(of_thread_t thread); extern bool of_thread_detach(of_thread_t thread); #ifdef __cplusplus } #endif |