Index: ChangeLog
===================================================================
RCS file: /home/cvs/l4hurd/libpthread/ChangeLog,v
retrieving revision 1.93
retrieving revision 1.97
diff -u -p -r1.93 -r1.97
--- ChangeLog	28 Sep 2002 03:03:40 -0000	1.93
+++ ChangeLog	29 Sep 2002 03:41:45 -0000	1.97
@@ -1,3 +1,31 @@
+2002-09-28  Neal H. Walfield  <neal@cs.uml.edu>
+
+	* sysdeps/generic/pt-cond-timedwait.c
+	(__pthread_cond_timedwait_internal): Add definition.
+	* sysdeps/generic/pt-rwlock-rdlock.c
+	(__pthread_rwlock_timedrdlock_internal): Define this ...
+	(__pthread_mutex_timedlock_internal): ... not this.
+	* sysdeps/generic/pt-rwlock-wrlock.c
+	(__pthread_rwlock_timedwrlock_internal): Add an extern.
+
+2002-09-28  Neal H. Walfield  <neal@cs.uml.edu>
+
+	* sysdeps/mach/hurd/pt-sysdep.h (_pthread_self): Assert that
+	__pthread_threads is initialized.
+	
+	(__pthread_self): Beautify.
+
+2002-09-28  Neal H. Walfield  <neal@cs.uml.edu>
+
+	* sysdeps/mach/hurd/pt-sysdep.c (init_routine): Only call
+	__pthread_initialize once.
+
+2002-09-28  Neal H. Walfield  <neal@cs.uml.edu>
+
+	* sysdeps/generic/pt-cond-init.c (pthread_cond_init): Only assert
+	that ATTR->pshared is PTHREAD_PROCESS_PRIVATE if ATTR is not NULL.
+	Reported by Manuel Menal <mmenal@netcourrier.com>.
+
 2002-09-27  Neal H. Walfield  <neal@cs.uml.edu>
 
 	* sysdeps/generic/bits/mutex.h (__PTHREAD_MUTEX_INITIALIZER):
@@ -9,8 +37,8 @@
 	* sysdeps/generic/bits/mutex.h (struct __pthread_mutex): New
 	field, cthreadcompat1: cthreads does not initialize the third
 	field of a mutex and as a result, neither does glibc.  Avoid
-	this pit.  (__PTHREAD_MUTEX_INITIALIZER): Initialize
-	cthreadcompat1 to 0.
+	this pit.
+	(__PTHREAD_MUTEX_INITIALIZER): Initialize cthreadcompat1 to 0.
 
 2002-09-27  Neal H. Walfield  <neal@cs.uml.edu>
 
Index: sysdeps/mach/hurd/pt-sysdep.h
===================================================================
RCS file: /home/cvs/l4hurd/libpthread/sysdeps/mach/hurd/pt-sysdep.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- sysdeps/mach/hurd/pt-sysdep.h	22 Sep 2002 01:29:29 -0000	1.5
+++ sysdeps/mach/hurd/pt-sysdep.h	29 Sep 2002 03:34:43 -0000	1.6
@@ -49,15 +49,18 @@ __pthread_self (void)
      hurd thread variables by one pointer and use the exposed location
      to store the self pointer.  */
 
-  unsigned long int stack_base = ((unsigned long int) __thread_stack_pointer ()
-				  & __hurd_threadvar_stack_mask);
+  unsigned long int stack_base;
+  stack_base = ((unsigned long int) __thread_stack_pointer ()
+		& __hurd_threadvar_stack_mask);
 
   return ((struct __pthread **)
 	  (stack_base + __hurd_threadvar_stack_offset))[_HURD_THREADVAR_MAX];
 }
 
 #define _pthread_self() \
-	({ struct __pthread *t = __pthread_self (); \
+	({ struct __pthread *t; \
+	   assert (__pthread_threads); \
+	   t = __pthread_self (); \
 	   assert (t->kernel_thread == __mach_thread_self ()); \
 	   t; })
 
Index: sysdeps/mach/hurd/pt-sysdep.c
===================================================================
RCS file: /home/cvs/l4hurd/libpthread/sysdeps/mach/hurd/pt-sysdep.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- sysdeps/mach/hurd/pt-sysdep.c	27 Sep 2002 17:35:14 -0000	1.5
+++ sysdeps/mach/hurd/pt-sysdep.c	29 Sep 2002 03:30:08 -0000	1.6
@@ -51,8 +51,6 @@ init_routine (void)
   err = __pthread_create_internal (&thread, 0, 0, 0);
   assert_perror (err);
 
-  __pthread_initialize ();
-
   /* Decrease the number of threads, to take into account that the
      signal thread (which will be created by the glibc startup code
      when we return from here) shouldn't be seen as a user thread.  */
Index: sysdeps/generic/pt-cond-init.c
===================================================================
RCS file: /home/cvs/l4hurd/libpthread/sysdeps/generic/pt-cond-init.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sysdeps/generic/pt-cond-init.c	25 Sep 2002 20:48:58 -0000	1.1
+++ sysdeps/generic/pt-cond-init.c	28 Sep 2002 17:45:18 -0000	1.2
@@ -26,7 +26,8 @@ int
 pthread_cond_init (pthread_cond_t *cond,
 		   const pthread_condattr_t *attr)
 {
-  assert (attr->pshared == PTHREAD_PROCESS_PRIVATE);
+  if (attr)
+    assert (attr->pshared == PTHREAD_PROCESS_PRIVATE);
 
   *cond = __PTHREAD_COND_INITIALIZER;
   return 0;
Index: sysdeps/generic/pt-cond-timedwait.c
===================================================================
RCS file: /home/cvs/l4hurd/libpthread/sysdeps/generic/pt-cond-timedwait.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- sysdeps/generic/pt-cond-timedwait.c	28 Sep 2002 02:27:21 -0000	1.4
+++ sysdeps/generic/pt-cond-timedwait.c	29 Sep 2002 03:41:45 -0000	1.5
@@ -21,6 +21,10 @@
 
 #include <pt-internal.h>
 
+extern int __pthread_cond_timedwait_internal (pthread_cond_t *cond,
+					      pthread_mutex_t *mutex,
+					      const struct timespec *abstime);
+
 int
 pthread_cond_timedwait (pthread_cond_t *cond,
 			pthread_mutex_t *mutex,
Index: sysdeps/generic/pt-rwlock-rdlock.c
===================================================================
RCS file: /home/cvs/l4hurd/libpthread/sysdeps/generic/pt-rwlock-rdlock.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- sysdeps/generic/pt-rwlock-rdlock.c	27 Sep 2002 18:33:03 -0000	1.3
+++ sysdeps/generic/pt-rwlock-rdlock.c	29 Sep 2002 03:41:45 -0000	1.4
@@ -21,8 +21,8 @@
 #include <pt-internal.h>
 
 /* Implemented in pt-rwlock-timedrdlock.c.  */
-extern int __pthread_mutex_timedlock_internal (struct __pthread_mutex *mutex,
-					       const struct timespec *abstime);
+extern int __pthread_rwlock_timedrdlock_internal (struct __pthread_mutex *mutex,
+						  const struct timespec *abstime);
 
 /* Acquire RWLOCK for reading, block if we can't get it.  */
 int
Index: sysdeps/generic/pt-rwlock-wrlock.c
===================================================================
RCS file: /home/cvs/l4hurd/libpthread/sysdeps/generic/pt-rwlock-wrlock.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- sysdeps/generic/pt-rwlock-wrlock.c	27 Sep 2002 18:33:02 -0000	1.3
+++ sysdeps/generic/pt-rwlock-wrlock.c	29 Sep 2002 03:41:45 -0000	1.4
@@ -23,9 +23,8 @@
 #include <pt-internal.h>
 
 /* Implemented in pt-rwlock-timedwrlock.c.  */
-int
-__pthread_rwlock_timedwrlock_internal (struct __pthread_rwlock *rwlock,
-				       const struct timespec *abstime);
+extern int __pthread_rwlock_timedwrlock_internal (struct __pthread_rwlock *rwlock,
+						  const struct timespec *abstime);
 
 /* Acquire RWLOCK for writing.  */
 int
