summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-03-23 21:34:58 +0000
committerUlrich Drepper <drepper@redhat.com>2000-03-23 21:34:58 +0000
commitc0bc5f7b8fd62dfa566dd3adb91f3a1ee8db6aeb (patch)
tree6dd7566ba2bd4bc27c327d0348e0309b252ed07c /linuxthreads
parent7392ce9bb41a985cf0cba52cf6b021835ae28563 (diff)
downloadglibc-c0bc5f7b8fd62dfa566dd3adb91f3a1ee8db6aeb.tar.gz
glibc-c0bc5f7b8fd62dfa566dd3adb91f3a1ee8db6aeb.tar.xz
glibc-c0bc5f7b8fd62dfa566dd3adb91f3a1ee8db6aeb.zip
Update.
2000-03-23  Bruno Haible  <haible@clisp.cons.org>

	* iconv/gconv_simple.c (internal_ucs4_loop, internal_ucs4le_loop):
	Remove no-op pointer increment.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog5
-rw-r--r--linuxthreads/manager.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 6d28f909c0..2a9683ec34 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,8 @@
+2000-03-23  Ulrich Drepper  <drepper@redhat.com>
+
+	* manager.c (pthread_handle_create): Store ID of new thread before
+	clone call.
+
 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
 
 	* attr.c: Use new macros from shlib-compat.h to define versions.
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c
index 4aa598bb9e..6e585be79c 100644
--- a/linuxthreads/manager.c
+++ b/linuxthreads/manager.c
@@ -415,6 +415,10 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
   new_thread->p_start_args.start_routine = start_routine;
   new_thread->p_start_args.arg = arg;
   new_thread->p_start_args.mask = *mask;
+  /* Make the new thread ID available already now.  If any of the later
+     functions fail we return an error value and the caller must not use
+     the stored thread ID.  */
+  *thread = new_thread_id;
   /* Raise priority of thread manager if needed */
   __pthread_manager_adjust_prio(new_thread->p_priority);
   /* Do the cloning.  We have to use two different functions depending
@@ -487,8 +491,6 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
   /* Set pid field of the new thread, in case we get there before the
      child starts. */
   new_thread->p_pid = pid;
-  /* We're all set */
-  *thread = new_thread_id;
   return 0;
 }