about summary refs log tree commit diff
path: root/linuxthreads/manager.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-11-29 07:43:03 +0000
committerUlrich Drepper <drepper@redhat.com>2001-11-29 07:43:03 +0000
commit03a2c6475bd251773ddce5e9e5bb9b8d4c0baeab (patch)
treee3b83e302b2f166d9520df5dcfa0195fe051c2ba /linuxthreads/manager.c
parente0e86ccb1d2848678b5c32f65bf6239ba5fb9d24 (diff)
downloadglibc-03a2c6475bd251773ddce5e9e5bb9b8d4c0baeab.tar.gz
glibc-03a2c6475bd251773ddce5e9e5bb9b8d4c0baeab.tar.xz
glibc-03a2c6475bd251773ddce5e9e5bb9b8d4c0baeab.zip
Update.
	* iconvdata/ibm1163.c: New file.
	* iconvdata/ibm1163.h: New file.
	* iconvdata/ibm1164.c: New file.
	* iconvdata/ibm1164.h: New file.
	* iconvdata/TESTS: Add entries for IBM1163 and IBM1164.
	* iconvdata/Makefile: Likewise.
	* iconvdata/testdata/IBM1163: New file.
	* iconvdata/testdata/IBM1163..UTF8: New file.
	* iconvdata/testdata/IBM1164: New file.
	* iconvdata/testdata/IBM1164..UTF8: New file.
	Patch by Masahide Washizawa <WASHI@jp.ibm.com>.

	* iconvdata/ibm1046.h: Optimize.  Remove duplicate mappings.
	* iconvdata/ibm1124.h: Likewise.
	* iconvdata/ibm1132.h: Likewise.
	* iconvdata/ibm1133.h: Likewise.
	* iconvdata/ibm1160.h: Likewise.
	* iconvdata/ibm1161.h: Likewise.
	* iconvdata/ibm1162.h: Likewise.
	* iconvdata/ibm856.h: Likewise.
	* iconvdata/ibm922.h: Likewise.
	* iconvdata/ibm930.h: Likewise.
	* iconvdata/ibm932.h: Likewise.
	* iconvdata/ibm933.h: Likewise.
	* iconvdata/ibm935.h: Likewise.
	* iconvdata/ibm937.h: Likewise.
	* iconvdata/ibm939.h: Likewise.
	* iconvdata/ibm943.h: Likewise.
	* iconvdata/ibm930.c: Pretty printing.
	* iconvdata/ibm937.c: Avoid access accross array boundary.
Diffstat (limited to 'linuxthreads/manager.c')
-rw-r--r--linuxthreads/manager.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c
index 0872146e3f..b1a4542d69 100644
--- a/linuxthreads/manager.c
+++ b/linuxthreads/manager.c
@@ -100,6 +100,8 @@ static void pthread_handle_exit(pthread_descr issuing_thread, int exitcode)
      __attribute__ ((noreturn));
 static void pthread_reap_children(void);
 static void pthread_kill_all_threads(int sig, int main_thread_also);
+static void pthread_for_each_thread(void *arg, 
+    void (*fn)(void *, pthread_descr));
 
 /* The server thread managing requests for thread creation and termination */
 
@@ -211,6 +213,11 @@ __pthread_manager(void *arg)
 	/* This is just a prod to get the manager to reap some
 	   threads right away, avoiding a potential delay at shutdown. */
 	break;
+      case REQ_FOR_EACH_THREAD:
+	pthread_for_each_thread(request.req_args.for_each.arg,
+	                        request.req_args.for_each.fn);
+	restart(request.req_thread);
+	break;
       }
     }
   }
@@ -902,6 +909,20 @@ static void pthread_kill_all_threads(int sig, int main_thread_also)
   }
 }
 
+static void pthread_for_each_thread(void *arg, 
+    void (*fn)(void *, pthread_descr))
+{
+  pthread_descr th;
+
+  for (th = __pthread_main_thread->p_nextlive;
+       th != __pthread_main_thread;
+       th = th->p_nextlive) {
+    fn(arg, th);
+  }
+
+  fn(arg, __pthread_main_thread);
+}
+
 /* Process-wide exit() */
 
 static void pthread_handle_exit(pthread_descr issuing_thread, int exitcode)