Skip to content

Commit a73da15

Browse files
committed
posix: posix_internal: add definitions for posix_condattr, posix_cond
Add definitions for struct posix_condattr and struct posix_cond, which are internal variants of the external pthread_condattr_t and pthread_cond_t types. Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
1 parent 3d99249 commit a73da15

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/posix/options/posix_internal.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,20 @@ struct posix_thread {
6666
uint8_t qid;
6767
};
6868

69+
struct posix_condattr {
70+
/* leaves room for CLOCK_REALTIME (1, default) and CLOCK_MONOTONIC (4) */
71+
unsigned int clock: 3;
72+
bool initialized: 1;
73+
#ifdef _POSIX_THREAD_PROCESS_SHARED
74+
unsigned int pshared: 1;
75+
#endif
76+
};
77+
78+
struct posix_cond {
79+
struct k_condvar condvar;
80+
struct posix_condattr attr;
81+
};
82+
6983
typedef struct pthread_key_obj {
7084
/* List of pthread_key_data objects that contain thread
7185
* specific data for the key

0 commit comments

Comments
 (0)