1 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
3 A few optimizations. Got rid of unnecessary wakeups of timer threads,
4 tightened up some critical regions and micro-optimized some list
7 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
8 Returns int value now to indicate whether timer was queued at head.
9 * sysdeps/pthread/posix-timer.h: Likewise.
10 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
11 new return value from __timer_thread_queue_timer to avoid waking
12 up timer thread unnecessarily.
14 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
15 inuse flag, because this requires mutex to be held. Callers updated
16 to do the check when they have the mutex.
17 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
19 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
20 regions: avoids making system calls while holding timer mutex, and
21 a few computations were moved outside of the mutex as well.
22 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
24 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
25 to list_unlink_ip, meaning idempotent. Pointer manipulation
26 changed to get better better code out of gcc.
27 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
28 version of list_unlink added here.
29 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
30 function in all places: idempotent one for timers, non-idempotent
32 * sysdeps/pthread/timer_settime: Likewise.
33 * sysdeps/pthread/timer_routines.c: Likewise.
35 2000-06-13 Ulrich Drepper <drepper@redhat.com>
37 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
38 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
40 * sysdeps/pthread/Makefile: Remove tests definition.
42 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
43 Yutaka Niibe <gniibe@chroot.org>
45 * sysdeps/sh/pspinlock.c: New file.
46 * sysdeps/sh/pt-machine.h: New file.
48 2000-06-12 Ulrich Drepper <drepper@redhat.com>
50 * Makefile (tests): Add joinrace.
52 * Examples/ex6.c: Test return value of pthread_join.
54 2000-06-11 Geoff Keating <geoffk@cygnus.com>
56 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
57 (__pthread_spin_trylock): Implement.
58 (__pthread_spin_unlock): Implement.
59 (__pthread_spin_init): Implement.
60 (__pthread_spin_destroy): Implement.
62 2000-06-10 Ulrich Drepper <drepper@redhat.com>
64 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
65 really append the entry.
67 2000-06-10 Andreas Jaeger <aj@suse.de>
69 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
71 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
73 * sysdeps/pthread/timer_create.c: Thread matching now done on
74 clock type as well as thread attributes.
75 There are individual global signal-delivering threads for
76 different clock types.
77 * sysdeps/pthread/posix-timer.h: Likewise.
78 * sysdeps/pthread/timer_routines.c: Likewise.
80 * sysdeps/pthread/timer_routines.c: Thread allocation and
81 deallocation function now remembers to put thread on active
82 list and remove from active list.
83 Thus now the feature of binding multiple timers
84 to a single thread actually works.
86 2000-06-10 Ulrich Drepper <drepper@redhat.com>
88 * pthread.c (__pthread_create_2_1): Optimize a bit.
90 * internals.h (invalid_handle): Also test for p_terminated != 0.
91 (nonexisting_handle): New function. Same as old invalid_handle.
92 * join.c (pthread_join): Use nonexisting_handle instead of
93 invalid_handle to test for acceptable thread handle.
94 * manager.c (pthread_handle_free): Likewise.
95 * joinrace.c: New file.
96 Reported by Permaine Cheung <pcheung@cygnus.com>.
98 2000-06-08 Ulrich Drepper <drepper@redhat.com>
100 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
101 Correct handling of matching variable.
103 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
106 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
107 Be prepared for empty timer list.
109 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
110 CPUTIME clock ID. Add support for thread clocks.
112 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
113 subtraction were switched.
115 * sysdeps/pthread/timer_routines.c (init_module): Use
116 THREAD_MAXNODES threads.
118 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
119 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
120 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
121 with sigqueueinfo is this system call is available.
123 * sysdeps/pthread/timer_create.c (timer_create): Allow
124 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
126 * sysdeps/pthread/Makefile: New file. Add rules to build timer
128 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
130 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
132 * sysdeps/pthread/posix-timer.h: New file.
133 * sysdeps/pthread/timer_create.c: New file.
134 * sysdeps/pthread/timer_delete.c: New file.
135 * sysdeps/pthread/timer_getoverr.c: New file.
136 * sysdeps/pthread/timer_gettime.c: New file.
137 * sysdeps/pthread/timer_routines.c: New file.
138 * sysdeps/pthread/timer_settime.c: New file.
139 * sysdeps/pthread/tst-timer.c: New file.
141 2000-06-08 Ulrich Drepper <drepper@redhat.com>
143 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
144 LINK_MAX definitions if necessary.
146 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
148 Added missing fork time handling of global libio lock.
150 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
151 not just the individual stream locks. Rewritten to use new
152 iterator interface provided by libio rather than accessing
155 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
156 which lock and unlock the stream list using the new interface
158 * internals.h: Likewise.
160 * ptfork.c (__fork): Now calls __flockfilelist before fork,
161 and __funlockfilelist in the parent after the fork.
162 Child still calls __fresetlockfiles as before.
164 * linuxthreads.texi: Now explains what happens to streams at
165 fork time. Also whole new section on forking and thread added.
166 Definition of pthread_atfork moved out of Miscellaneous Functions
169 2000-06-04 Jakub Jelinek <jakub@redhat.com>
171 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
172 Add missing register.
173 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
175 2000-06-02 Jakub Jelinek <jakub@redhat.com>
177 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
178 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
179 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
181 2000-05-31 Andreas Jaeger <aj@suse.de>
183 * sysdeps/mips/pspinlock.c: Implement spinlocks.
185 2000-05-28 Ulrich Drepper <drepper@redhat.com>
187 * spinlock.c (__pthread_lock): Remove ASSERT.
189 * Makefile (tests): Add ex8.
190 * Examples/ex8.c: New file.
192 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
194 Bugfix: The pthread_atfork mechanism now takes care of its
195 own internal mutex at fork time.
197 * ptfork.c (__fork): Revised so that the mutex is held across
198 the fork operation and while the handlers are called, and so that
199 the child resets the mutex.
201 * linuxthreads.texi: Updated pthread_atfork documentation to make
202 it clear that fork and pthread_atfork can't be reentered from
203 atfork handlers, that pthread_atfork and fork are mutually atomic,
204 and that the handlers are inherited by the child process.
206 2000-05-24 Ulrich Drepper <drepper@redhat.com>
208 * Makefile (libpthread-routines): Add pspinlock.
209 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
210 Use struct _pthread_fastlock instead of pthread_spinlock_t.
211 * condvar.c: Likewise.
212 * internals.h: Likewise.
214 * manager.c: Likewise.
216 * pthread.c: Likewise.
217 * rwlock.c: Likewise.
218 * semaphore.c: Likewise.
219 * signals.c: Likewise.
220 * spinlock.h: Likewise.
221 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
222 * sysdeps/alpha/pspinlock.c: New file.
223 * sysdeps/arm/pspinlock.c: New file.
224 * sysdeps/i386/pspinlock.c: New file.
225 * sysdeps/m68k/pspinlock.c: New file.
226 * sysdeps/mips/pspinlock.c: New file.
227 * sysdeps/powerpc/pspinlock.c: New file.
228 * sysdeps/sparc/sparc32/pspinlock.c: New file.
229 * sysdeps/sparc/sparc64/pspinlock.c: New file.
230 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
231 back to _pthread_fastlock. Define new pthread_spinlock_t.
233 2000-05-24 Andreas Jaeger <aj@suse.de>
235 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
237 2000-05-21 Jakub Jelinek <jakub@redhat.com>
239 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
241 2000-05-13 Jakub Jelinek <jakub@redhat.com>
243 * internals.h (__RES_PTHREAD_INTERNAL): Define.
245 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
247 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
248 object state is represented with additional bits which distinguish
249 whether that state was set up in the current process, or
250 in an ancestor process. If that state was set in an ancestor,
251 it means that a fork happened while thread was executing the init
252 function. In that case, the state is reset to NEVER.
253 * mutex.c (__pthread_once_fork_prepare): New function.
254 (__pthread_once_fork_child): Likewise
255 (__pthread_once_fork_parent): Likewise
256 (__pthread_reset_pthread_once): Removed.
257 * ptfork.c (__fork): Call new handlers in mutex.c.
258 * internals.h: Declarations of new mutex.c functions added.
259 Declaration of removed function deleted.
260 * linuxthreads.texi: Updated documentation about pthread_once
261 to clarify what happens under cancellation and forking.
263 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
265 * internals.h: New thread manager request type, REQ_KICK.
266 * join.c (pthread_exit): main thread now calls exit() instead
267 of _exit() in order to proper process cleanup.
268 * manager.c (__pthread_manager): Do not terminate manager
269 after unblocking main thread; wait for main thread's
270 REQ_PROCESS_EXIT request instead.
271 Also, added REQ_KICK case to handle new request; this just does
273 * manager.c (pthread_exited): Do not terminate manager after
274 unblocking main thread.
275 * manager.c (__pthread_manager_sighandler): If the main thread
276 is waiting for all other threads to die, send a REQ_KICK into
277 the thread manager request pipe to get it to clean out the threads
278 and unblock the main thread as soon as possible. This fixes
279 the 2000 millisecond hang on shutdown bug.
280 * Examples/ex7.c: New file, tests shutdown behavior when all threads
281 including the main one call pthread_exit(), or implicitly do so.
282 * Makefile (tests): Add ex7.
284 2000-05-05 Andreas Jaeger <aj@suse.de>
286 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
287 (pthread_getcpuclockid): Correct test for ourselves.
289 2000-05-05 Ulrich Drepper <drepper@redhat.com>
291 * internals.h (struct _pthread_descr_struct): Reorganization.
292 Allocate room for 16 pointers at head of the structure for future
293 thread-local data handling. Move p_self member in this area.
294 * manager.c (pthread_handle_create): Adjust use of p_self.
295 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
296 * pthread.c (__pthread_initial_thread): Adjust initialization.
297 (__pthread_manager_thread): Likewise.
299 2000-04-29 Bruno Haible <haible@clisp.cons.org>
301 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
302 for eventmask larger than 1 word.
304 2000-04-27 Ulrich Drepper <drepper@redhat.com>
306 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
307 * pthread.c (__pthread_initialize_minimal): New function. Perform
308 minimal initialization.
309 (pthread_initialize): Remove this code here.
310 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
311 are working around the problem in glibc.
313 2000-04-25 Ulrich Drepper <drepper@redhat.com>
315 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
316 now. First gcc must be fixed (more concrete: libgcc).
318 2000-04-24 Ulrich Drepper <drepper@redhat.com>
320 * pthread.c: Remove special treatement for interrupt handlers on x86.
321 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
322 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
324 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
326 2000-04-24 Mark Kettenis <kettenis@gnu.org>
328 * join.c (pthread_exit): Set p_terminated after reporting the
329 termination event instead of before.
331 2000-04-20 Jakub Jelinek <jakub@redhat.com>
333 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
336 2000-04-18 Andreas Jaeger <aj@suse.de>
338 * Versions: Use ld instead of ld.so.
340 2000-04-18 Jakub Jelinek <jakub@redhat.com>
342 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
343 Remove the typedef keyword.
345 2000-04-18 Jakub Jelinek <jakub@redhat.com>
347 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
349 (READ_MEMORY_BARRIER): Define.
350 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
352 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
355 2000-04-17 Ulrich Drepper <drepper@redhat.com>
357 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
358 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
361 2000-04-16 Ulrich Drepper <drepper@redhat.com>
363 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
364 if fast mutex is used. Don't initialize `already_canceled' twice.
365 Correctly test for return value of timedsuspend.
367 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
368 therefore don't need the _rt versions of the signal handlers.
370 2000-04-15 Ulrich Drepper <drepper@redhat.com>
372 * pthread.c (pthread_yield): New function.
373 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
374 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
375 * internals.h: Declare __pthread_yield.
377 * pthread.c (pthread_initialize): Avoid a bit more code if
378 realtime signals are known to exist.
380 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
381 to dynamically detect RT signals and avoid generating compatibility
382 functions with old kernel.
383 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
384 __pthread_restart_new directly.
385 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
386 __pthread_wait_for_restart_signal directly.
387 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
388 __pthread_timedsuspend_new directly.
390 2000-04-15 Ulrich Drepper <drepper@redhat.com>
392 * condvar.c: Remove all the special code to handle cond_timedwait.
393 Use timedsuspend instead.
394 * internals.h: Declare __pthread_timedsuspend_old,
395 __pthread_timedsuspend_new, and __pthread_timedsuspend.
396 Remove declaration of __pthread_init_condvar.
397 * pthread.c: Define __pthread_timedsuspend variable.
398 (__pthread_timedsuspend_old): New function. Timed suspension
399 implementation for old Linux kernels.
400 (__pthread_timedsuspend_new): New function. Timed suspension
401 implementation for new Linux kernels.
402 * restart.h (timedsuspend): New function. Call appropriate
403 suspension function through __pthread_timedsuspend.
404 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
406 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
408 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
410 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
412 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
413 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
415 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
416 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
418 2000-04-14 Andreas Jaeger <aj@suse.de>
422 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
423 2.2 for linuxthreads.
425 2000-04-13 Ulrich Drepper <drepper@redhat.com>
427 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
428 (pthread_getcpuclockid): Fix typo.
430 2000-04-12 Ulrich Drepper <drepper@redhat.com>
432 * Makefile (libpthread-routines): Add getcpuclockid.
433 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
434 * sysdeps/pthread/getcpuclockid.c: New file.
435 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
436 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
438 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
440 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
442 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
443 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
444 and pthread_spin_unlock.
445 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
446 into pthread_spinlock_t. Change all uses.
447 * spinlock.c: Implement pthread_spin_lock.
448 Rename __pthread_unlock to __pthread_spin_unlock and define weak
450 Define pthread_spin_trylock, pthread_spin_init, and
451 pthread_spin_destroy.
452 Change all uses of _pthread_fastlock to pthread_spinlock_t.
453 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
454 Change all uses of _pthread_fastlock to pthread_spinlock_t.
455 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
456 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
457 and pthread_spin_unlock.
458 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
459 Change all uses of _pthread_fastlock to pthread_spinlock_t.
460 * condvar.c: Likewise.
461 * internals.h: Likewise.
463 * manager.c: Likewise.
465 * pthread.c: Likewise.
466 * rwlock.c: Likewise.
467 * semaphore.c: Likewise.
468 * signals.c: Likewise.
470 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
472 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
474 2000-04-11 Ulrich Drepper <drepper@redhat.com>
476 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
477 _POSIX_SHARED_MEMORY_OBJECTS.
479 2000-04-11 Andreas Jaeger <aj@suse.de>
481 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
482 (__compare_and_swap): Mark as modifying memory.
484 2000-04-11 Geoff Keating <geoffk@cygnus.com>
486 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
488 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
489 Don't have the 'asm' __volatile__.
491 2000-04-11 Ulrich Drepper <drepper@redhat.com>
493 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
494 * spinlock.c (__pthread_lock): Add memory barriers.
495 (__pthread_unlock): Likewise.
496 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
498 (RELEASE): Not needed anymore.
499 (__compare_and_swap): Mark asm as modifying memory.
500 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
502 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
503 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
504 (MEMORY_BARRIER): Define using stbar.
505 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
507 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
508 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
509 Mike Burrows <m3b@pa.dec.com>.
511 2000-04-09 Ulrich Drepper <drepper@redhat.com>
513 * signals.c (sigaction): Fix return value for the case SIG is one
514 of the signals the implementation uses.
515 Patch by Xavier.Leroy@inria.fr.
517 2000-04-01 Andreas Jaeger <aj@suse.de>
519 * attr.c: Use shlib-compat macros.
520 * oldsemaphore.c: Likewise.
521 * pthread.c: Likewise.
524 2000-03-26 Ulrich Drepper <drepper@redhat.com>
526 * semaphore.c (sem_timedwait): New function.
527 Patch by Carl Mailloux <carlm@oricom.ca>.
528 * semaphore.h: Declare sem_timedwait.
529 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
531 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
533 * sysdeps/pthread/Makefile: File removed.
535 2000-03-23 Ulrich Drepper <drepper@redhat.com>
537 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
538 * internals.h (__pthread_reset_pthread_once): Add prototype.
539 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
541 * manager.c (pthread_handle_create): Store ID of new thread before
544 2000-03-21 Ulrich Drepper <drepper@redhat.com>
546 * attr.c: Use new macros from shlib-compat.h to define versions.
547 * oldsemaphore.c: Likewise.
548 * semaphore.c: Likewise.
551 * pthread.c: Update for new SHLIB_COMPAT definition.
553 * manager.c (__pthread_manager): Unmask debug signal.
555 * pthread.c (pthread_initialize): Test for address of __dso_handle
556 being NULL, not value. Use __on_exit, not on_exit.
557 Patch by Andreas Jaeger <aj@suse.de>.
559 * pthread.c: Use new macros from shlib-compat.h to define versions.
561 2000-03-19 Ulrich Drepper <drepper@redhat.com>
563 * pthread.c (pthread_initialize): Instead of on_exit use
564 __cxa_atexit if __dso_label is available to allow unloading the
565 libpthread shared library.
567 2000-03-16 Ulrich Drepper <drepper@redhat.com>
569 * condvar.c: Make tests for ownership of mutex less strict.
571 2000-03-14 Ulrich Drepper <drepper@redhat.com>
573 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
574 current thread and return error if not.
575 (pthread_cond_timedwait_relative_old): Likewise.
576 (pthread_cond_timedwait_relative_new): Likewise.
578 * mutex.c (__pthread_once): Handle cancelled init function correctly.
579 (pthread_once_cancelhandler): New function.
580 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
582 2000-03-14 Andreas Jaeger <aj@suse.de>
584 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
586 (pthread_handle_sigrestart_rt): Likewise.
587 * signals.c (pthread_sighandler_rt): Likewise.
589 2000-03-02 Andreas Jaeger <aj@suse.de>
591 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
592 Reported by Sean Chen <sean.chen@turbolinux.com>.
594 2000-02-28 Andreas Jaeger <aj@suse.de>
596 * rwlock.c: Fix typo.
598 2000-02-27 Ulrich Drepper <drepper@redhat.com>
600 * rwlock.c: Define __* variants of the functions and make old names
602 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
603 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
605 2000-02-25 Andreas Jaeger <aj@suse.de>
607 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
608 pwrite64, lseek64, open64, and __open64 with version 2.2.
610 2000-02-22 Ulrich Drepper <drepper@redhat.com>
612 * semaphore.h (SEM_FAILED): Use 0 not NULL.
614 2000-02-14 Ulrich Drepper <drepper@redhat.com>
616 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
617 nanosleep does not work either. Get absolute time inside the
619 (pthread_cond_timedwait_relative_new): Likewise.
620 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
622 2000-02-13 Andreas Jaeger <aj@suse.de>
624 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
625 (pthread_cond_timedwait_relative_old): Likewise.
627 2000-02-13 Ulrich Drepper <drepper@redhat.com>
629 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
630 but keep the code around. A bug in the kernel prevent us from
632 (pthread_cond_timedwait_relative_new): Likewise.
633 (PR libc/1597 and libc/1598).
635 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
637 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
638 loop around nanosleep calls instead of around most of the function
639 (pthread_cond_timedwait_relative_new): Likewise.
640 body. Got rid of backwards goto and one local.
642 2000-01-31 Ulrich Drepper <drepper@redhat.com>
644 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
645 before every nanosleep call to account for time spent in the rest
647 (pthread_cond_timedwait_relative_new): Likewise.
648 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
650 2000-01-29 Ulrich Drepper <drepper@redhat.com>
652 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
653 from nanosleep call so that in case we restart we only wait for the
655 (pthread_cond_timedwait_relative_new): Likewise.
656 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
658 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
660 * manager.c (pthread_allocate_stack): Compute guard page address
661 correctly. Patch by HJ Lu.
663 * sysdeps/pthread/pthread.h: Define
664 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
666 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
668 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
670 (pthread_rwlockattr_setkind_np): Allow
671 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
672 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
674 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
676 * internals.h (pthread_readlock_info): New structure.
677 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
678 p_untracked_readlock_count.
679 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
680 Add initializers for new fields.
681 * manager.c (pthread_free): Free read/write lock lists.
682 * queue.h (queue_is_empty): New function.
683 * rwlock.c: Implement requirements about when readers should get
685 * sysdeps/pthread/pthread.h
686 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
687 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
688 Define this name as well.
689 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
691 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
693 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
694 Adjust initializers for struct _pthread_descr_struct change.
695 * internals.h (struct _pthread_descr_struct): Move new elements to
698 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
700 Redesigned how cancellation unblocks a thread from internal
701 cancellation points (sem_wait, pthread_join,
702 pthread_cond_{wait,timedwait}).
703 Cancellation won't eat a signal in any of these functions
704 (*required* by POSIX and Single Unix Spec!).
705 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
706 simultaneous condition variable signal (not required by POSIX
707 or Single Unix Spec, but nice).
708 * spinlock.c: __pthread_lock queues back any received restarts
709 that don't belong to it instead of assuming ownership of lock
710 upon any restart; fastlock can no longer be acquired by two threads
712 * restart.h: Restarts queue even on kernels that don't have
713 queued real time signals (2.0, early 2.1), thanks to atomic counter,
714 avoiding a rare race condition in pthread_cond_timedwait.
716 1999-12-31 Andreas Jaeger <aj@suse.de>
718 * internals.h: Remove duplicate prototype declarations.
720 * weaks.c: Remove __THROW from prototypes since the file is not
721 compiled by a C++ compiler.
722 * internals.h: Likewise.
724 1999-12-30 Andreas Jaeger <aj@suse.de>
726 * sysdeps/pthread/pthread.h: Move internal functions to...
727 * sysdeps/pthread/bits/libc-lock.h: ...here.
729 1999-12-29 Andreas Jaeger <aj@suse.de>
731 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
733 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
735 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
738 * manager.c (__pthread_start): Add one more cast to prevent
739 warning on 64bit machines.
741 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
743 * manager.c (pthread_handle_create): Set p_pid of new thread
744 before calling the callback function to report a new thread.
746 1999-12-20 Andreas Jaeger <aj@suse.de>
748 * pthread.c (pthread_initialize): Move getrlimit call after
751 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
753 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
754 pwrite64, lseek64, open64, and __open64.
755 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
756 pwrite64, lseek64, open64, and __open64.
758 * manager.c (pthread_allocate_stack): Correct computation of
759 new_thread_bottom. Correct handling of stack size and when the
760 rlimit method to guard for stack growth is used.
761 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
762 minus one pagesize (not two).
764 1999-12-03 Andreas Jaeger <aj@suse.de>
766 * Versions: Add __res_state with version GLIBC_2.2.
768 * errno.c (__res_state): New function to return thread specific
771 * pthread.c (pthread_initialize): Initialize p_resp.
772 (__pthread_reset_main_thread): Also set p_resp.
774 * manager.c (pthread_handle_create): Initialize p_resp.
776 * internals.h: Add thread specific resolver state.
777 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
779 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
781 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
783 * sysdeps/i386/i686/pt-machine.h: Likewise.
784 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
786 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
788 * manager.c (pthread_start_thread_event): Initialize p_pid already
791 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
793 * internals.h: Add prototype for __pthread_manager_event.
794 * manager.c (__pthread_manager_event): New function.
795 (pthread_start_thread_event): Correct computation of self.
796 Use INIT_THREAD_SELF.
797 * pthread.c (__pthread_manager_thread): Initialize p_lock.
798 (__pthread_initialize_manager): Respect event flags also for creation
799 of the manager thread.
801 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
803 * pthread.c (__pthread_initialize_manager): Initialize
804 __pthread_manager_thread.p_tid.
806 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
808 * internals.h: Declare __pthread_last_event.
809 * manager.c: Define __pthread_last_event.
810 (pthread_handle_create): Set __pthread_last_event.
811 (pthread_exited): Likewise.
812 * join.c (pthread_exit): Likewise.
814 * Makefile (libpthread-routines): Add events.
815 * events.c: New file.
816 * internals.h: Protect against multiple inclusion.
817 Include thread_dbP.h header.
818 (struct _pthread_descr_struct): Add new fields p_report_events and
820 Declare event reporting functions.
821 * join.c (pthread_exit): Signal event if this is wanted.
822 * manager.c (__pthread_threads_events): New variable.
823 (pthread_handle_create): Take new parameters with event information.
824 Signal TD_CREATE event if wanted.
825 (__pthread_manager): Adjust pthread_handle_create call.
826 (pthread_start_thread_event): New function. Block until manager is
827 finished and then call pthread_start_thread.
828 (pthread_exited): Signal TD_REAP event if wanted.
830 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
832 * restart.h (suspend_with_cancellation): Rewrite as a macro.
834 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
836 1999-10-25 Andreas Jaeger <aj@suse.de>
838 * internals.h: Remove K&R compatibility.
839 * no-tsd.c: Likewise.
840 * semaphore.h: Likewise.
841 * signals.c: Likewise.
842 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
843 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
846 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
848 * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
849 and pthread_handle_sigcancel with functions that restore
850 %gs from the signal context. For each signal handling function,
851 two wrappers are required, one for a non-RT signal and one for
853 * linuxthreads/signal.c: For i386, add code to restore %gs
854 from the signal context in pthread_sighandler and
855 pthread_sighandler_rt.
857 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
859 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
861 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
863 * pthread.c (__pthread_initial_thread): Pass argument to
864 PTHREAD_START_ARGS_INITIALIZER.
865 (__pthread_manager_thread): Likewise.
867 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
870 * manager.c (pthread_handle_create): Remove p_startfct initialization.
872 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
874 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
876 * internals.h: Correct return types for __libc_read and __libc_write.
878 1999-10-09 Andreas Jaeger <aj@suse.de>
880 * internals.h: Add __new_sem_post to get prototype in
881 manager.c; include semaphore.h for needed types.
883 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
885 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
886 directly instead of calling sem_post which should not be necessary
887 but is faster and might help in some case to work around problems.
888 Patch by khendricks@ivey.uwo.ca [libc/1382].
890 1999-10-08 Andreas Schwab <schwab@suse.de>
892 * sysdeps/pthread/Subdirs: New file.
895 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
898 * internals.h (struct _pthread_descr_struct): Add p_startfct.
899 * manager.c (pthread_handle_create): Initialize p_startfct.
900 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
902 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
904 * manager.c (__linuxthreads_pthread_threads_max): New variable.
905 * specific.c (__linuxthreads_pthread_keys_max): New variable.
906 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
908 * condvar.c (pthread_cond_timedwait_relative): Never return with
909 EINTR. Patch by Andreas Schwab.
911 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
913 * signals.c (sigaction): Correct last patch. Don't select
914 pthread_sighandler_rt based on the signal number but instead of
917 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
919 * specific.c: Move definitions of struct pthread_key_struct and
920 destr_function to ...
921 * internals.h: ...here.
923 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
925 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
926 this instead of pthread_handle_sigrestart if the signal is an RT
929 * signals.c: Handle passing through of sighandler arguments also
930 for real-time signals.
932 1999-09-03 Andreas Schwab <schwab@suse.de>
934 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
936 (__vfork): New function, alias vfork.
937 * Versions: Export __fork, vfork, and __vfork in libpthread.
939 1999-08-23 Andreas Schwab <schwab@suse.de>
941 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
942 call to signal handler.
944 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
946 * pthread.c (__pthread_reset_main_thread): Undo last change.
947 (__pthread_kill_other_threads_np): Reset signal handlers for the
948 signals we used in the thread implementation here.
950 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
952 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
953 for the signals we used in the thread implementation [PR libc/1234].
955 * Versions: Export __pthread_kill_other_threads_np from libpthread
958 * signals.c: Pass sigcontext through wrapper to the user function.
960 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
962 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
963 __libc_internal_tsd_set.
965 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
967 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
970 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
972 * internals.h: Align _pthread_descr_struct to 32 bytes.
973 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
976 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
978 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
981 1999-07-09 Cristian Gafton <gafton@redhat.com>
983 * Makefile (libpthread-routines): Add oldsemaphore routine.
984 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
985 sem_trywait, and sem_wait to GLIBC_2.1.
986 * oldsemaphore.c: New file.
987 * semaphore.c: Add default_symbol_versions for the changed functions.
988 (__new_sem_init): Rename from sem_init.
989 (__new_sem_post): Rename from sem_post.
990 (__new_sem_wait): Rename from sem_wait.
991 (__new_sem_trywait): Rename from sem_trywait.
992 (__new_sem_getvalue): Rename from sem_getvalue.
993 (__new_sem_destroy): Rename from sem_destroy.
995 1999-06-23 Robey Pointer <robey@netscape.com>
997 * internals.h: Added p_nextlock entry to separate queueing for a
998 lock from queueing for a CV (sometimes a thread queues on a lock
999 to serialize removing itself from a CV queue).
1000 * pthread.c: Added p_nextlock to initializers.
1001 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
1003 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
1005 * manager.c (pthread_handle_create): Free mmap region after stack
1006 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
1008 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1010 * man/pthread_cond_init.man: Correct example.
1011 Reported by Tomas Berndtsson <tomas@nocrew.org>.
1013 * linuxthreads.texi (Condition Variables): Likewise.
1015 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
1017 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
1018 casx not cas, also successful casx returns the old value in rd
1019 and not the new value.
1021 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
1023 * manager.c: If pthread_create() is given a NULL attribute
1024 and the thread manager runs with a realtime policy, set the
1025 scheduling policy of the newly created thread back to SCHED_OTHER.
1026 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
1027 initialize the schedpolicy field of new_thread->p_start_args
1028 to that of the calling thread.
1030 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
1032 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
1033 instruction does not allow memory element to use offset.
1035 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
1037 * manager.c (pthread_allocate_stack): Optimize initialization of new
1040 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
1041 Don't use initializer since it is all zeroes.
1042 (__libc_once_define): Likewise.
1044 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1046 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
1047 doesn't exist anymore.
1048 * sysdeps/i386/Implies: Likewise.
1049 * sysdeps/m68k/Implies: Likewise.
1050 * sysdeps/mips/Implies: Likewise.
1051 * sysdeps/powerpc/Implies: Likewise.
1052 * sysdeps/sparc/sparc32/Implies: Likewise.
1053 * sysdeps/sparc/sparc64/Implies: Likewise.
1055 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
1057 * sysdeps/alpha/bits/semaphore.h: Removed.
1058 * sysdeps/powerpc/bits/semaphore.h: Removed.
1059 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1060 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1061 * Makefile (headers): Remove bits/semaphore.h.
1063 * semaphore.h: Define _pthread_descr if necessary.
1064 Don't include limits.h. Define SEM_VALUE_MAX directly.
1066 (sem_t): Protect element names with leading __.
1067 Add declarations for sem_close, sem_open, and sem_unlink.
1068 * semaphore.c: Adjust all functions for new element names.
1069 Define sem_close, sem_open, and sem_unlink.
1070 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
1072 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
1075 1999-03-16 H.J. Lu <hjl@gnu.org>
1077 * specific.c (pthread_key_delete): Check th->p_terminated to see
1078 if the thread is running.
1080 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
1081 Added to GLIBC_2.0 for libc.so.
1083 1999-02-12 H.J. Lu <hjl@gnu.org>
1085 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
1086 __libc_allocate_rtsig): Added to GLIBC_2.1.
1088 * internals.h (DEFAULT_SIG_RESTART): Removed.
1089 (DEFAULT_SIG_CANCEL): Removed.
1091 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
1092 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
1093 (__pthread_sig_restart, __pthread_sig_cancel,
1094 __pthread_sig_debug): Initialized.
1095 (pthread_initialize): Call init_rtsigs () to initialize
1098 1999-02-03 H.J. Lu <hjl@gnu.org>
1100 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
1101 Don't restart the thread which sent REQ_DEBUG.
1102 (pthread_start_thread): Check if __pthread_sig_debug > 0
1105 * pthread.c (__pthread_initialize_manager): Suspend ourself
1106 after sending __pthread_sig_debug to gdb instead of
1107 __pthread_sig_cancel.
1109 1999-01-24 H.J. Lu <hjl@gnu.org>
1111 * manager.c (__pthread_manager): Delete __pthread_sig_debug
1112 from mask if __pthread_sig_debug > 0.
1113 (pthread_handle_create): Increment __pthread_handles_num.
1115 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
1116 * pthread.c (__pthread_initialize_manager): Likewise.
1118 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
1119 instead of __libc_allocate_rtsig (2).
1120 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
1121 instead of __pthread_sig_cancel.
1122 (pthread_handle_sigdebug): Fix comments.
1124 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
1126 * manager.c (pthread_allocate_stack): Set
1127 __pthread_nonstandard_stacks if user-specified stack is used.
1129 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
1131 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1132 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1134 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
1136 * pthread.c: Use a third signal __pthread_sig_debug distinct
1137 from __pthread_sig_cancel to notify gdb when a thread is
1139 * manager.c: Likewise.
1140 * internals.h: Likewise.
1141 * signals.c: The implementation of sigwait(s) assumed that
1142 all signals in s have signal handlers already attached.
1143 This is not required by the standard, so make it work
1144 also if some of the signals have no handlers.
1146 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1148 * linuxthreads.texi: Remove pointers from first @node. Move old
1149 @node spec inside comment.
1151 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
1153 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1156 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
1158 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1159 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1161 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
1163 * manager.c: Threads now send __pthread_sig_cancel on termination.
1164 Change clone call and signal masks.
1165 * thread.c (pthread_handle_sigrestart): Remove special code for
1167 (pthread_handle_sigcancel): In manager thread call
1168 __pthread_manager_sighandler.
1169 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1170 * sysdeps/i386/i686/pt-machine.h: Likewise.
1171 Patches by Xavier Leroy.
1173 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
1175 * spinlock.c (__pthread_unlock): Don't crash if called for an
1176 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1178 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1181 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
1183 * Examples/ex3.c: Wait until all threads are started before
1184 searching for the number to avoid race condition on very fast
1187 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1189 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
1190 declaration since it's not needed.
1192 * sysdeps/pthread/pthread.h: Move internal functions to ...
1193 * internals.h: ...here.
1195 1998-12-02 H.J. Lu <hjl@gnu.org>
1197 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1198 SIGRTMIN is defined.
1199 (__pthread_sig_cancel): Likewise.
1201 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1203 * wrapsyscall.c: Include <sys/mman.h> for msync,
1204 <stdlib.h> for system and <termios.h> for tcdrain prototype.
1205 Correct msync declaration.
1207 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
1209 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1210 __libc_tsd_set): New macros for new interface.
1211 * no-tsd.c: New file, provide uninitialized defns of
1212 __libc_internal_tsd_get and __libc_internal_tsd_set.
1213 * Makefile (routines): Add no-tsd.
1215 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
1217 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1218 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1219 __libc_internal_tsd_set): Move decls to ...
1220 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1223 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1224 __libc_internal_tsd_set): Make these pointers to functions, not
1225 functions; remove #pragma weak decls for them.
1226 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1227 Define static functions and initialized pointers to them.
1229 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
1231 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1232 (CFLAGS-specific.c): Likewise.
1233 (CFLAGS-pthread.c): Likewise.
1234 (CFLAGS-ptfork.c): Likewise.
1235 (CFLAGS-cancel.c): Likewise.
1236 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1237 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1239 * mutex.c (pthread_mutex_init): Define as strong symbol.
1240 (pthread_mutex_destroy): Likewise.
1241 (pthread_mutex_trylock): Likewise.
1242 (pthread_mutex_lock): Likewise.
1243 (pthread_mutex_unlock): Likewise.
1244 (pthread_mutexattr_init): Likewise.
1245 (pthread_mutexattr_destroy): Likewise.
1246 (pthread_once): Likewise.
1247 * ptfork.c (pthread_atfork): Likewise.
1248 * specific.c (pthread_key_create): Likewise.
1249 (pthread_setspecific): Likewise.
1250 (pthread_getspecific): Likewise.
1252 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1254 * linuxthreads.texi: Fix punctuation after xref.
1256 1998-11-10 H.J. Lu <hjl@gnu.org>
1258 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1259 if it is defined in <linux/limits.h>.
1261 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
1263 * spinlock.h (__pthread_trylock): Define inline.
1264 (__pthread_lock): Add extra parameter to declaration. Declare
1265 using internal_function.
1266 (__pthread_unlock): Declare using internal_function.
1267 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
1268 of local variable self. Avoid recomputing self. Define using
1270 (__pthread_trylock): Remove.
1271 (__pthread_unlock): Define using internal_function.
1272 * cancel.c: Adjust for __pthread_lock interface change. Use already
1273 computed self value is possible.
1274 * condvar.c: Likewise.
1276 * manager.c: Likewise.
1277 * mutex.c: Likewise.
1278 * pthread.c: Likewise.
1279 * rwlock.c: Likewise.
1280 * semaphore.c: Likewise.
1281 * signals.c: Likewise.
1283 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
1285 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1286 __ to field names of the struct.
1287 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1289 (pthread_attr_t): Likewise.
1290 (pthread_cond_t): Likewise.
1291 (pthread_condattr_t): Likewise.
1292 (pthread_mutex_t): Likewise.
1293 (pthread_mutexattr_t): Likewise.
1294 (pthread_rwlock_t): Likewise.
1295 (pthread_rwlockattr_t): Likewise.
1296 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1297 * cancel.c: Likewise.
1298 * condvar.c: Likewise.
1299 * manager.c: Likewise.
1300 * mutex.c: Likewise.
1301 * pthread.c: Likewise.
1302 * ptlongjmp.c: Likewise.
1303 * rwlock.c: Likewise.
1304 * spinlock.c: Likewise.
1306 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
1308 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1311 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1314 * Makefile (libpthread-routines): Add pt-machine.
1315 * pt-machine.c: New file.
1316 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1317 yet defined. Use PT_EI in extern inline definitions.
1318 * sysdeps/arm/pt-machine.h: Likewise.
1319 * sysdeps/i386/pt-machine.h: Likewise.
1320 * sysdeps/i386/i686/pt-machine.h: Likewise.
1321 * sysdeps/m68k/pt-machine.h: Likewise.
1322 * sysdeps/mips/pt-machine.h: Likewise.
1323 * sysdeps/powerpc/pt-machine.h: Likewise.
1324 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1325 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1327 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1329 * semaphore.h: Include <sys/types.h> so that _pthread_descr
1332 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
1334 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1336 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1338 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1340 * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
1341 multiple inclusion guard.
1343 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1345 * signals.c (sigaction): Check that sig is less than NSIG to avoid
1346 array index overflow.
1348 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
1350 * sysdeps/pthread/semaphore.h: New file.
1352 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
1354 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1355 _LIBC_TSD_KEY_DL_ERROR.
1357 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
1359 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1360 * sysdeps/i386/pt-machine.h: Likewise.
1361 Suggested by Roland McGrath.
1363 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
1365 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1366 access thread data with non-constant offsets.
1367 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1370 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
1371 THREAD_SETMEM_NC definitions.
1373 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1375 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1377 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
1379 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1380 not already defined.
1381 (struct _pthread_descr_struct): Add p_self and p_nr field.
1382 * manager.c (__pthread_handles): Define second element to point
1384 (__pthread_handles_num): Initialize to 2.
1385 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1386 (pthread_start_thread): Likewise.
1387 (pthread_handle_create): Start search for free slot at entry 2.
1388 Initialize new fields p_self and p_nr.
1389 Call __clone with CLONE_PTRACE if available.
1390 (pthread_free): Call FREE_THREAD_SELF if available.
1391 * pthread.c (__pthread_initial_thread): Initialize new fields.
1392 (__pthread_manager_thread): Likewise.
1393 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1395 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1396 elements of the thread descriptor.
1397 * condvar.c: Likewise.
1398 * errno.c: Likewise.
1400 * manager.c: Likewise.
1401 * pthread.c: Likewise.
1402 * ptlongjmp.c: Likewise.
1403 * semaphore.c: Likewise.
1404 * signals.c: Likewise.
1405 * specific.c: Likewise.
1406 * spinlock.c: Likewise.
1408 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1410 * sysdeps/i386/useldt.h: New file.
1411 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1413 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1414 THREAD_SETMEM using __thread_self.
1415 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1417 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
1419 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1420 turned out that we didn't need to queue after all.
1422 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
1424 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1425 and wastes space; correct types.
1427 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
1429 * signals.c (sigaction): Handle NULL argument.
1431 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
1433 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1436 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1438 * Makefile (linuxthreads-version): Extract correct number from
1441 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
1443 * Banner: Bump version number to 0.8
1444 * FAQ.html: Many updates, in particular w.r.t. debugging.
1445 * manager.c: Support for non-default stacksize for
1446 LinuxThreads-allocated stacks;
1447 don't use guard pages for stacks with default size, rely on
1448 rlimit(RLIMIT_STACK) instead (it's cheaper).
1450 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1451 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1452 * condvar.c: Likewise.
1453 * internals.h: Likewise.
1454 * restart.h: Likewise.
1455 * signals.c: Likewise.
1456 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1458 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1460 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1461 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
1462 * Versions: Put __pthread_mutexattr_settype under version
1463 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
1464 __pthread_mutexattr_gettype.
1466 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1468 * sysdeps/pthread/bits/libc-lock.h: Make
1469 __pthread_mutexattr_settype weak. Don't make
1470 __pthread_mutexattr_setkind_np weak.
1472 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
1474 * manager.c (pthread_handle_create): Check whether sched_setscheduler
1475 call can succeed here.
1477 * mutex.c: Define __pthread_mutexattr_settype and make
1478 __pthread_mutexattr_setkind_np an alias.
1479 Likewise for __pthread_mutexattr_gettype.
1481 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1483 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1486 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
1488 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1490 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1492 * Examples/ex6.c: Include <unistd.h> for usleep.
1494 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1496 * Examples/ex4.c (main): Use exit, not pthread_exit.
1498 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
1500 * Versions: Add __pthread_mutexattr_gettype and
1501 __pthread_mutexattr_settype.
1502 * lockfile.c: Use __pthread_mutexattr_settype instead of
1503 __pthread_mutexattr_setkind_np.
1504 * mutex.c: Define __pthread_mutexattr_gettype and
1505 __pthread_mutexattr_settype.
1507 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1508 __pthread_mutexattr_settype.
1509 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1510 Use __pthread_mutexattr_settype.
1512 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
1514 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1515 * mutex.c: Define weak alias pthread_mutexattr_gettype and
1516 pthread_mutexattr_settype.
1517 * sysdeps/pthread/pthread.h: Declare these functions.
1518 Move pthread_sigmask and pthread_kill declaration in separate header.
1519 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1521 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
1523 * Makefile: Add rules to compile and run tests.
1524 * Examples/ex1.c: Little changes to fix warnings.
1525 * Examples/ex2.c: Likewise.
1526 * Examples/ex3.c: Likewise.
1527 * Examples/ex4.c: Likewise.
1528 * Examples/ex5.c: Likewise.
1529 * Examples/ex6.c: New file.
1531 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
1533 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1535 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1537 * attr.c: Include <string.h>.
1539 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
1541 * attr.c: Include errno.h. Use memcpy to copy sched_param.
1542 * internals.h: Include limits.h.
1543 * manager.c: Use memcpy to copy sched_param.
1544 * ptfork.c: Include errno.h.
1545 * pthread.c: Likewise.
1546 * semaphore.c: Likewise.
1547 * specific.c: Likewise.
1548 * spinlock.h: Likewise.
1549 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
1550 type definition to ...
1551 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
1553 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
1555 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1557 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1558 as macros as demanded in POSIX.1, Annex C.
1560 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
1562 * internals.h (struct pthread_request): For free use pthread_t
1563 instead of pthread_descr.
1564 * join.c (pthread_join): Pass thread_id, not th to manager.
1565 (pthread_detach): Likewise.
1566 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1567 (pthread_exited): Remove detached queue code.
1568 (pthread_handle_free): Expect thread ID parameter and use it to
1569 validate the thread decsriptor. Don't use detached queue.
1570 Patches by Xavier Leroy.
1572 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1574 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1575 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1576 __pthread_atfork, __pthread_key_create, __pthread_once.
1577 * internals.h: Doc fix.
1578 * pthread.c (__pthread_initialize): Define again.
1580 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
1582 * manager.c (pthread_exited): If thread is not detached put it on
1584 (pthread_handle_free): If thread is not on list with living threads
1585 search on list with detached threads.
1587 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1588 for new definition of pthread_rwlock_t.
1590 * spinlock.c: Correct test whether to compile
1591 __pthread_compare_and_swap or not.
1593 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
1595 * attr.c: Finish user stack support. Change locking code to be safe
1596 in situations with different priorities.
1597 * cancel.c: Likewise.
1598 * condvar.c: Likewise.
1599 * internals.h: Likewise.
1601 * manager.c: Likewise.
1602 * mutex.c: Likewise.
1603 * pthread.c: Likewise.
1604 * ptlongjmp.c: Likewise.
1605 * queue.h: Likewise.
1606 * rwlock.c: Likewise.
1607 * semaphore.c: Likewise.
1608 * semaphore.h: Likewise.
1609 * signals.c: Likewise.
1610 * spinlock.c: Likewise.
1611 * spinlock.h: Likewise.
1612 * sysdeps/pthread/pthread.h: Likewise.
1613 Patches by Xavier Leroy.
1615 * sysdeps/i386/i686/pt-machine.h: New file.
1617 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
1619 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1620 [sg]et_stackaddr prototypes always available.
1622 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1623 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1625 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
1627 * manager.c (pthread_free): Undo patch from 980430.
1628 Reported by David Wragg <dpw@doc.ic.ac.uk>.
1630 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
1632 * manager.c: Define __pthread_manager_adjust_prio and use it to
1633 increase priority when needed.
1634 * internals.h: Add prototype for __pthread_manager_adjust_prio.
1635 * mutex.c: Optimize mutexes to wake up only one thread.
1636 * pthread.c: Move PID of manager for global variable in structure
1638 Patches by Xavier Leroy.
1640 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
1642 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1644 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1646 * attr.c: Correct typo.
1648 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
1650 * manager.c (pthread_free): Unmap guard before the stack.
1651 Patch by Matthias Urlichs.
1653 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
1655 * manager.c (pthread_free): Detect already free child.
1656 Patch by Xavier Leroy, reported by Matthias Urlichs.
1658 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1660 * Makefile (linuxthreads-version): Renamed back from
1663 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
1665 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
1668 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
1670 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
1671 * internals.h: Add definitions for new spinlock implementation.
1672 * ptlongjmp.c: New file.
1673 * spinlock.c: New file.
1674 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
1675 new function __pthread_acquire to prevent deadlocks with thread
1676 with different priorities.
1677 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
1679 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1681 * manager.c (__pthread_manager): Reduce first argument to select
1682 to include just the needed file descriptor.
1684 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
1686 * manager.c: Fix last patch which caused core dumps.
1688 * pthread.c: Correctly handle missing SIGRTMIN.
1690 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1692 * libpthread.map: Add __libc_internal_tsd_get and
1693 __libc_internal_tsd_set. Add missing cancelable functions. Export
1694 libc internal versions of the cancelable functions.
1696 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
1698 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
1700 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
1702 * attr.c: Implement pthread_attr_[gs]etguardsize,
1703 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
1704 Change pthread_attr_init to have two interfaces.
1705 * internals.h (struct _pthread_descr_struct): Add new fields for
1707 * libpthread.map: Add names in GLIBC_2.1 section.
1708 * manager.c (pthread_handle_create): Implement guardsize and
1710 (pthread_free): Likewise.
1711 * pthread.c (pthread_create): Add new interface for changed
1713 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1714 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
1717 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
1719 * manager.c: Enable resetting of the thread scheduling policy
1720 to SCHED_OTHER when the parent thread has a different one.
1722 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
1724 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1725 _POSIX_ASYNCHRONOUS_IO.
1727 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
1729 * mutex.c: Implement new mutex types.
1731 * internals.h: Include <signal.h>.
1733 * libpthread.map: Add __erno_location and __h_errno_location.
1735 * errno.c: Return pointer to variable actually in use. This might
1736 not be the one in the thread structure.
1737 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
1739 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1740 of manager thread structure.
1741 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1743 * pthread.c: Adapt initializer for thread structures.
1744 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1745 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1746 current thread to global variables.
1748 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
1750 * rwlock.c: New file.
1751 * Makefile (libpthread-routines): Add rwlock.
1752 * sysdeps/pthread/pthread.h: Define data structures and declare
1754 * libpthread.map: Add new functions.
1756 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
1758 * sysdeps/arm/pt-machine.h: New file; add ARM support.
1759 * sysdeps/arm/Implies: likewise.
1760 * README: Document it.
1762 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1764 * signals.c: Remove unneeded initializer for sigwaited, saving a
1767 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1769 * semaphore.c (sem_init): Set sem_spinlock only if available.
1771 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
1773 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1774 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1776 * Makefile: Update from LinuxThreads 0.7.
1777 * internals.h. Likewise.
1778 * manager.c: Likewise.
1779 * mutex.c: Likewise.
1780 * pthread.c: Likewise.
1781 * signals.c: Likewise.
1782 * specific.c: Likewise.
1783 * Examples/ex3.c: Likewise.
1785 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
1787 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1790 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
1792 * wrapsyscall.c: Add socket functions which are also cancelation
1795 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
1797 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1798 New functions for fast thread specific data within libc.
1800 * internals.h: Add new array p_libc_specific to struct
1801 _pthread_descr_struct.
1803 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1805 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
1807 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1808 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1810 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
1812 * internals.h (struct _pthread_descr_struct): Add definitions for
1813 two-level specific key handling.
1814 * manager.c (pthread_handle_create): Initialize specific memory array.
1815 * specific.c: Implement two-level key handling.
1816 * weaks.c: Don't provide dummy key handling.
1817 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1818 Add definition of __libc_key_t.
1819 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1821 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1822 PTHREAD_DESTRUCTOR_ITERATIONS.
1824 * manager.c (pthread_handle_create): Compare mmap result with
1827 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1828 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1830 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
1832 sysdeps/sparc -> sysdeps/sparc/sparc32
1833 sysdeps/sparc64 -> sysdeps/sparc/sparc64
1835 * internals.h: Change definition of THREAD_SELF to be an expression,
1836 not a statement that did a return.
1837 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1838 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1839 Follow Solaris and use a "system reserved" register (%g6) to hold
1840 the thread descriptor.
1841 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1843 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
1845 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
1846 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1847 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1849 * semaphore.c: Include spinlock.h only when needed.
1851 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1852 keys for entries not in use.
1854 * weaks.c: Implement key handling functions for real.
1856 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
1858 Initial sparc64-linux support:
1859 * linuxthreads/sysdeps/sparc64/Implies: New file.
1860 * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1862 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
1864 * semaphore.c: Include spinlock.h at correct place.
1867 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
1869 The Great Bit File Move:
1870 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1871 * sysdeps/powerpc/semaphorebits.h: Likewise.
1872 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1873 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1874 * sysdeps/pthread/libc-lock.h: -> bits/
1875 * sysdeps/pthread/stdio-lock.h: Likewise.
1876 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1877 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1878 * semaphore.h: Likewise.
1879 * sysdeps/pthread/pthread.h: Likewise.
1881 * lockfile.c: <foo.h> -> <bits/foo.h>.
1882 * semaphore.h: Likewise.
1884 * Makefile: (headers): foo.h -> bits/foo.h.
1885 * sysdeps/pthread/Makefile: Likewise.
1887 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1889 * semaphore.c (sem_init): Set sem_spinlock only if available.
1891 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1894 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
1896 Update from LinuxThreads 0.6.
1898 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1899 and __sched_get_priority_min instead of names without `__'.
1901 * manager.c: Rewrite large parts to implement opaque pthread_t.
1903 * cancel.c: Adapt for opaque pthread_t type.
1904 * condvar.c: Likewise.
1905 * errno.c: Likewise.
1907 * mutex.c: Likewise.
1908 * pthread.c: Likewise.
1909 * signals.c: Likewise.
1910 * specific.c: Likewise.
1911 * restart.h: Likewise.
1912 * queue.h: Likewise.
1913 * Examples/ex3.c: Likewise.
1914 * Examples/ex4.c: Likewise.
1915 * sysdeps/pthread/pthread.h: Likewise.
1917 * pthread.c: Accumulate time for all threads in thread manager.
1919 * semaphore.c: Implement fallback implementation for architectures
1920 sometimes missing compare-exchange operations.
1922 * cancel.c (pthread_cancel): Validate handle argument.
1923 * join.c (pthread_join): Likewise.
1924 (pthread_detach): Likewise.
1925 * signals.c (pthread_kill): Likewise.
1927 * spinlock.h (acquire): Use __sched_yield not sched_yield.
1929 * queue.h (enqueue): Enqueue thread according to priority.
1931 * internals.c (struct pthread_start_args): New struct for passing
1932 args to cloning function.
1933 (struct _pthread): Rename to _pthread_descr_struct and adapt for
1936 * Examples/Makefile (clean): Pass -f option to rm.
1938 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1939 and define TEST_FOR_COMPARE_AND_SWAP.
1940 * sysdeps/i386/i486/pt-machine.h: Removed.
1942 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1945 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
1947 * restart.h (suspend): Clear p_signal before suspending.
1948 (suspend_with_cancellation): Likewise.
1949 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1951 * weaks.c: Make __pthread_key_create return 1.
1952 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1953 __libc_getspecific, __libc_setspecific, and __libc_key_t.
1954 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1957 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
1959 * sysdeps/sparc/pt-machine (RELEASE): Fix.
1961 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
1963 * sysdeps/powerpc/Implies: Added.
1964 * sysdeps/powerpc/pt-machine.h: Added.
1965 * sysdeps/powerpc/semaphorebits.h: Added.
1967 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
1969 * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1971 (__pthread_manager_thread): Likewise.
1972 Reported by Andreas Jaeger.
1974 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
1976 Since sigset_t no longer fits in a register, we can't pass in the
1977 thread's initial mask so easily. Take this opportunity to simplify
1978 the clone implementation by only accepting a single void* argument.
1980 * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1981 in the thread struct instead of as arguments through clone.
1982 (pthread_start_thread): Look for them there.
1983 * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1984 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
1985 * linuxthreads/pthread.c (pthread_initialize_manager): Revise