summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/Makefile1
-rw-r--r--lib/libpthread/thread/thr_rwlockattr.c11
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/libpthread/Makefile b/lib/libpthread/Makefile
index 87110f0..e79d5c5 100644
--- a/lib/libpthread/Makefile
+++ b/lib/libpthread/Makefile
@@ -10,6 +10,7 @@ SHLIB_MAJOR= 4
SHLIB_MINOR= 0
CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS -I${.CURDIR}/../libc/include
CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE -I${.CURDIR}/uthread
+CFLAGS+=-I${.CURDIR}/../../include
# Uncomment this if you want libc_r to contain debug information for
# thread locking.
diff --git a/lib/libpthread/thread/thr_rwlockattr.c b/lib/libpthread/thread/thr_rwlockattr.c
index 3330ba1..7a56bca 100644
--- a/lib/libpthread/thread/thr_rwlockattr.c
+++ b/lib/libpthread/thread/thr_rwlockattr.c
@@ -81,16 +81,13 @@ pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr)
}
int
-pthread_rwlockattr_setpshared (pthread_rwlockattr_t *rwlockattr,
- int *pshared)
+pthread_rwlockattr_setpshared (pthread_rwlockattr_t *rwlockattr, int pshared)
{
- int ps = *pshared;
-
- /* only PTHREAD_PROCESS_PRIVATE is supported */
- if (ps != PTHREAD_PROCESS_PRIVATE)
+ /* Only PTHREAD_PROCESS_PRIVATE is supported. */
+ if (pshared != PTHREAD_PROCESS_PRIVATE)
return(EINVAL);
- (*rwlockattr)->pshared = ps;
+ (*rwlockattr)->pshared = pshared;
return(0);
}
OpenPOWER on IntegriCloud