@@ -87,12 +87,10 @@ struct pthread_attr {
8787 uint32_t details [2 ];
8888};
8989
90- #if defined(CONFIG_MINIMAL_LIBC ) || defined(CONFIG_PICOLIBC ) || defined(CONFIG_ARMCLANG_STD_LIBC ) \
91- || defined(CONFIG_ARCMWDT_LIBC )
90+ #if !defined(CONFIG_NEWLIB_LIBC )
9291typedef struct pthread_attr pthread_attr_t ;
93- #endif
94-
9592BUILD_ASSERT (sizeof (pthread_attr_t ) >= sizeof (struct pthread_attr ));
93+ #endif
9694
9795typedef uint32_t pthread_t ;
9896typedef uint32_t pthread_spinlock_t ;
@@ -107,11 +105,10 @@ struct pthread_mutexattr {
107105 unsigned char type : 2 ;
108106 bool initialized : 1 ;
109107};
110- #if defined(CONFIG_MINIMAL_LIBC ) || defined(CONFIG_PICOLIBC ) || defined(CONFIG_ARMCLANG_STD_LIBC ) \
111- || defined(CONFIG_ARCMWDT_LIBC )
108+ #if !defined(CONFIG_NEWLIB_LIBC )
112109typedef struct pthread_mutexattr pthread_mutexattr_t ;
113- #endif
114110BUILD_ASSERT (sizeof (pthread_mutexattr_t ) >= sizeof (struct pthread_mutexattr ));
111+ #endif
115112
116113/* Condition variables */
117114typedef uint32_t pthread_cond_t ;
@@ -120,11 +117,10 @@ struct pthread_condattr {
120117 clockid_t clock ;
121118};
122119
123- #if defined(CONFIG_MINIMAL_LIBC ) || defined(CONFIG_PICOLIBC ) || defined(CONFIG_ARMCLANG_STD_LIBC ) \
124- || defined(CONFIG_ARCMWDT_LIBC )
120+ #if !defined(CONFIG_NEWLIB_LIBC )
125121typedef struct pthread_condattr pthread_condattr_t ;
126- #endif
127122BUILD_ASSERT (sizeof (pthread_condattr_t ) >= sizeof (struct pthread_condattr ));
123+ #endif
128124
129125/* Barrier */
130126typedef uint32_t pthread_barrier_t ;
@@ -141,14 +137,12 @@ struct pthread_once {
141137 bool flag ;
142138};
143139
144- #if defined(CONFIG_MINIMAL_LIBC ) || defined(CONFIG_PICOLIBC ) || defined(CONFIG_ARMCLANG_STD_LIBC ) \
145- || defined(CONFIG_ARCMWDT_LIBC )
140+ #if !defined(CONFIG_NEWLIB_LIBC )
146141typedef uint32_t pthread_key_t ;
147142typedef struct pthread_once pthread_once_t ;
148- #endif
149-
150143/* Newlib typedefs pthread_once_t as a struct with two ints */
151144BUILD_ASSERT (sizeof (pthread_once_t ) >= sizeof (struct pthread_once ));
145+ #endif
152146
153147#ifdef __cplusplus
154148}
0 commit comments