1- /* $NetBSD: reentrant.h,v 1.17 2013/04/12 18:12:58 joerg Exp $ */
1+ /* $NetBSD: reentrant.h,v 1.18 2015/01/20 18:31:25 christos Exp $ */
22
33/*-
44 * Copyright (c) 1997, 1998, 2003 The NetBSD Foundation, Inc.
@@ -278,31 +278,38 @@ __END_DECLS
278278
279279#else /* _REENTRANT */
280280
281- #define mutex_init (m , a )
282- #define mutex_lock (m )
283- #define mutex_trylock (m )
284- #define mutex_unlock (m )
285- #define mutex_destroy (m )
286-
287- #define cond_init (c , t , a )
288- #define cond_signal (c )
289- #define cond_broadcast (c )
290- #define cond_wait (c , m )
291- #define cond_timedwait (c , m , t )
292- #define cond_destroy (c )
293-
294- #define rwlock_init (l , a )
295- #define rwlock_rdlock (l )
296- #define rwlock_wrlock (l )
297- #define rwlock_tryrdlock (l )
298- #define rwlock_trywrlock (l )
299- #define rwlock_unlock (l )
300- #define rwlock_destroy (l )
301-
302- #define thr_keycreate (k , d )
303- #define thr_setspecific (k , p )
304- #define thr_getspecific (k )
305- #define thr_keydelete (k )
281+ #ifndef __empty
282+ #define __empty do {} while (/*CONSTCOND*/ 0 )
283+ #endif
284+ #define mutex_init (m , a ) __empty
285+ #define mutex_lock (m ) __empty
286+ #define mutex_trylock (m ) __empty
287+ #define mutex_unlock (m ) __empty
288+ #define mutex_destroy (m ) __empty
289+
290+ #define cond_init (c , t , a ) __empty
291+ #define cond_signal (c ) __empty
292+ #define cond_broadcast (c ) __empty
293+ #define cond_wait (c , m ) __empty
294+ #define cond_timedwait (c , m , t ) __empty
295+ #define cond_destroy (c ) __empty
296+
297+ #define rwlock_init (l , a ) __empty
298+ #define rwlock_rdlock (l ) __empty
299+ #define rwlock_wrlock (l ) __empty
300+ #define rwlock_tryrdlock (l ) __empty
301+ #define rwlock_trywrlock (l ) __empty
302+ #define rwlock_unlock (l ) __empty
303+ #define rwlock_destroy (l ) __empty
304+
305+ #define thr_keycreate (k , d ) /*LINTED*/ 0
306+ #define thr_setspecific (k , p ) __empty
307+ #define thr_getspecific (k ) /*LINTED*/ 0
308+ #define thr_keydelete (k ) __empty
309+
310+ #define mutexattr_init (ma ) __empty
311+ #define mutexattr_settype (ma , t ) __empty
312+ #define mutexattr_destroy (ma ) __empty
306313
307314static inline int
308315thr_once (once_t * once_control , void (* routine )(void ))
@@ -313,12 +320,12 @@ thr_once(once_t *once_control, void (*routine)(void))
313320 }
314321 return 0 ;
315322}
316- #define thr_sigsetmask (f , n , o )
317- #define thr_self ()
318- #define thr_errno ()
323+ #define thr_sigsetmask (f , n , o ) __empty
324+ #define thr_self () __empty
325+ #define thr_errno () __empty
319326#define thr_curcpu () ((unsigned int)0)
320327
321- #define FLOCKFILE (fp )
322- #define FUNLOCKFILE(fp)
328+ #define FLOCKFILE (fp ) __empty
329+ #define FUNLOCKFILE (fp ) __empty
323330
324331#endif /* _REENTRANT */
0 commit comments