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>
This commit is contained in:
Chris Friedt 2025-04-23 05:12:54 -04:00 committed by Benjamin Cabé
commit f208e3b02a

View file

@ -66,6 +66,20 @@ struct posix_thread {
uint8_t qid; uint8_t qid;
}; };
struct posix_condattr {
/* leaves room for CLOCK_REALTIME (1, default) and CLOCK_MONOTONIC (4) */
unsigned int clock: 3;
bool initialized: 1;
#ifdef _POSIX_THREAD_PROCESS_SHARED
unsigned int pshared: 1;
#endif
};
struct posix_cond {
struct k_condvar condvar;
struct posix_condattr attr;
};
typedef struct pthread_key_obj { typedef struct pthread_key_obj {
/* List of pthread_key_data objects that contain thread /* List of pthread_key_data objects that contain thread
* specific data for the key * specific data for the key