ObjFW  Diff

Differences From Artifact [a4fe604036]:

To Artifact [683e2810eb]:

  • File src/thread.h — part of check-in [77780c7596] at 2019-09-01 15:29:31 on branch trunk — OFThread: Allow specifying a name before starting

    This allows specifying a name before the thread gets started, so that
    the name can be decided by whoever starts the thread, rather than just
    by the thread itself once it's running.

    This is especially useful as some operating systems do not support
    changing the name of the thread once it's running. (user: js, size: 2180) [annotate] [blame] [check-ins using]


62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
extern of_thread_t of_thread_current(void);
#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







|
|






62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
extern of_thread_t of_thread_current(void);
#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, const char *name,
    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