posix: Use 'char' for posix_condattr bitfields
Ensure that posix_condattr is smaller than pthread_condattr by keeping it under one byte. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
32452dfb05
commit
34a03fb436
1 changed files with 3 additions and 3 deletions
|
@ -68,10 +68,10 @@ struct posix_thread {
|
|||
|
||||
struct posix_condattr {
|
||||
/* leaves room for CLOCK_REALTIME (1, default) and CLOCK_MONOTONIC (4) */
|
||||
unsigned int clock: 3;
|
||||
bool initialized: 1;
|
||||
unsigned char clock: 3;
|
||||
char initialized: 1;
|
||||
#ifdef _POSIX_THREAD_PROCESS_SHARED
|
||||
unsigned int pshared: 1;
|
||||
unsigned char pshared: 1;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue