File tree 2 files changed +33
-33
lines changed
2 files changed +33
-33
lines changed Original file line number Diff line number Diff line change 21
21
extern "C" {
22
22
#endif
23
23
24
- enum pthread_state {
25
- /* The thread structure is unallocated and available for reuse. */
26
- PTHREAD_TERMINATED = 0 ,
27
- /* The thread is running and joinable. */
28
- PTHREAD_JOINABLE ,
29
- /* The thread is running and detached. */
30
- PTHREAD_DETACHED ,
31
- /* A joinable thread exited and its return code is available. */
32
- PTHREAD_EXITED
33
- };
34
-
35
- struct posix_thread {
36
- struct k_thread thread ;
37
-
38
- /* List of keys that thread has called pthread_setspecific() on */
39
- sys_slist_t key_list ;
40
-
41
- /* Exit status */
42
- void * retval ;
43
-
44
- /* Pthread cancellation */
45
- int cancel_state ;
46
- int cancel_pending ;
47
- pthread_mutex_t cancel_lock ;
48
-
49
- /* Pthread State */
50
- enum pthread_state state ;
51
- pthread_mutex_t state_lock ;
52
- pthread_cond_t state_cond ;
53
- };
54
-
55
24
/* Pthread detach/joinable */
56
- #define PTHREAD_CREATE_JOINABLE PTHREAD_JOINABLE
57
- #define PTHREAD_CREATE_DETACHED PTHREAD_DETACHED
25
+ #define PTHREAD_CREATE_JOINABLE 1
26
+ #define PTHREAD_CREATE_DETACHED 2
58
27
59
28
/* Pthread cancellation */
60
29
#define _PTHREAD_CANCEL_POS 0
Original file line number Diff line number Diff line change 7
7
#ifndef ZEPHYR_LIB_POSIX_POSIX_INTERNAL_H_
8
8
#define ZEPHYR_LIB_POSIX_POSIX_INTERNAL_H_
9
9
10
+ enum pthread_state {
11
+ /* The thread structure is unallocated and available for reuse. */
12
+ PTHREAD_TERMINATED = 0 ,
13
+ /* The thread is running and joinable. */
14
+ PTHREAD_JOINABLE = PTHREAD_CREATE_JOINABLE ,
15
+ /* The thread is running and detached. */
16
+ PTHREAD_DETACHED = PTHREAD_CREATE_DETACHED ,
17
+ /* A joinable thread exited and its return code is available. */
18
+ PTHREAD_EXITED
19
+ };
20
+
21
+ struct posix_thread {
22
+ struct k_thread thread ;
23
+
24
+ /* List of keys that thread has called pthread_setspecific() on */
25
+ sys_slist_t key_list ;
26
+
27
+ /* Exit status */
28
+ void * retval ;
29
+
30
+ /* Pthread cancellation */
31
+ int cancel_state ;
32
+ int cancel_pending ;
33
+ pthread_mutex_t cancel_lock ;
34
+
35
+ /* Pthread State */
36
+ enum pthread_state state ;
37
+ pthread_mutex_t state_lock ;
38
+ pthread_cond_t state_cond ;
39
+ };
40
+
10
41
struct posix_thread * to_posix_thread (pthread_t pthread );
11
42
12
43
#endif
You can’t perform that action at this time.
0 commit comments