glibc compatibile PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, requested by

rafal@.
This commit is contained in:
ad 2008-06-05 21:40:17 +00:00
parent 1f3c2824c9
commit b4ad7b01a5
2 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pthread.h,v 1.29 2008/04/28 20:23:01 martin Exp $ */
/* $NetBSD: pthread.h,v 1.30 2008/06/05 21:40:17 ad Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -245,6 +245,9 @@ __END_DECLS
#define PTHREAD_RWLOCK_INITIALIZER _PTHREAD_RWLOCK_INITIALIZER
#define PTHREAD_SPINLOCK_INITIALIZER _PTHREAD_SPINLOCK_INITIALIZER
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
_PTHREAD_MUTEX_RECURSIVE_INITIALIZER_NP
/*
* Use macros to rename many pthread functions to the corresponding
* libc symbols which are either trivial/no-op stubs or the real

View File

@ -1,4 +1,4 @@
/* $NetBSD: pthread_types.h,v 1.10 2008/04/28 20:23:02 martin Exp $ */
/* $NetBSD: pthread_types.h,v 1.11 2008/06/05 21:40:17 ad Exp $ */
/*-
* Copyright (c) 2001, 2008 The NetBSD Foundation, Inc.
@ -98,7 +98,10 @@ struct __pthread_mutex_st {
#define _PT_MUTEX_MAGIC 0x33330003
#define _PT_MUTEX_DEAD 0xDEAD0003
#define _PTHREAD_MUTEX_INITIALIZER { _PT_MUTEX_MAGIC, 0, 0, NULL, NULL }
#define _PTHREAD_MUTEX_INITIALIZER \
{ _PT_MUTEX_MAGIC, 0, 0, NULL, NULL }
#define _PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
{ _PT_MUTEX_MAGIC, 0, 0, NULL, (void *)2L }
struct __pthread_mutexattr_st {
unsigned int ptma_magic;