summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>1999-12-18 01:00:42 +0000
committerjasone <jasone@FreeBSD.org>1999-12-18 01:00:42 +0000
commit432d84cbec46976aaa56dc8fff7958fc57a5384b (patch)
treeaaa82c490b7778c83d64448bcac161c04cf828f6
parentabf915c20a0ccad3a3a7e4fd02885c9febb7d107 (diff)
downloadFreeBSD-src-432d84cbec46976aaa56dc8fff7958fc57a5384b.zip
FreeBSD-src-432d84cbec46976aaa56dc8fff7958fc57a5384b.tar.gz
Fix some minor POSIX/SUSv2 compliance nits.
PR: kern/11982
-rw-r--r--include/pthread.h6
-rw-r--r--lib/libc_r/Makefile1
-rw-r--r--lib/libc_r/uthread/uthread_rwlockattr.c11
-rw-r--r--lib/libkse/Makefile1
-rw-r--r--lib/libkse/thread/thr_rwlockattr.c11
-rw-r--r--lib/libpthread/Makefile1
-rw-r--r--lib/libpthread/thread/thr_rwlockattr.c11
7 files changed, 17 insertions, 25 deletions
diff --git a/include/pthread.h b/include/pthread.h
index f67720d..8f62025 100644
--- a/include/pthread.h
+++ b/include/pthread.h
@@ -228,7 +228,7 @@ int pthread_join __P((pthread_t, void **));
int pthread_key_create __P((pthread_key_t *,
void (*) (void *)));
int pthread_key_delete __P((pthread_key_t));
-int pthread_kill __P((struct pthread *, int));
+int pthread_kill __P((pthread_t, int));
int pthread_mutexattr_init __P((pthread_mutexattr_t *));
int pthread_mutexattr_destroy __P((pthread_mutexattr_t *));
int pthread_mutexattr_settype __P((pthread_mutexattr_t *, int));
@@ -252,7 +252,7 @@ int pthread_rwlockattr_init __P((pthread_rwlockattr_t *));
int pthread_rwlockattr_getpshared __P((const pthread_rwlockattr_t *,
int *));
int pthread_rwlockattr_setpshared __P((pthread_rwlockattr_t *,
- int *));
+ int));
int pthread_rwlockattr_destroy __P((pthread_rwlockattr_t *));
pthread_t pthread_self __P((void));
int pthread_setspecific __P((pthread_key_t, const void *));
@@ -309,8 +309,6 @@ int pthread_setschedparam __P((pthread_t, int,
int pthread_attr_setfloatstate __P((pthread_attr_t *, int));
int pthread_attr_getfloatstate __P((pthread_attr_t *, int *));
-int pthread_attr_setcleanup __P((pthread_attr_t *,
- void (*) (void *), void *));
__END_DECLS
#endif
diff --git a/lib/libc_r/Makefile b/lib/libc_r/Makefile
index 87110f0..e79d5c5 100644
--- a/lib/libc_r/Makefile
+++ b/lib/libc_r/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/libc_r/uthread/uthread_rwlockattr.c b/lib/libc_r/uthread/uthread_rwlockattr.c
index 3330ba1..7a56bca 100644
--- a/lib/libc_r/uthread/uthread_rwlockattr.c
+++ b/lib/libc_r/uthread/uthread_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);
}
diff --git a/lib/libkse/Makefile b/lib/libkse/Makefile
index 87110f0..e79d5c5 100644
--- a/lib/libkse/Makefile
+++ b/lib/libkse/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/libkse/thread/thr_rwlockattr.c b/lib/libkse/thread/thr_rwlockattr.c
index 3330ba1..7a56bca 100644
--- a/lib/libkse/thread/thr_rwlockattr.c
+++ b/lib/libkse/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);
}
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