1 2000-06-12 Ulrich Drepper <drepper@redhat.com>
3 * Examples/ex6.c: Test return value of pthread_join.
5 2000-06-11 Geoff Keating <geoffk@cygnus.com>
7 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
8 (__pthread_spin_trylock): Implement.
9 (__pthread_spin_unlock): Implement.
10 (__pthread_spin_init): Implement.
11 (__pthread_spin_destroy): Implement.
13 2000-06-10 Ulrich Drepper <drepper@redhat.com>
15 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
16 really append the entry.
18 2000-06-10 Andreas Jaeger <aj@suse.de>
20 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
22 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
24 * sysdeps/pthread/timer_create.c: Thread matching now done on
25 clock type as well as thread attributes.
26 There are individual global signal-delivering threads for
27 different clock types.
28 * sysdeps/pthread/posix-timer.h: Likewise.
29 * sysdeps/pthread/timer_routines.c: Likewise.
31 * sysdeps/pthread/timer_routines.c: Thread allocation and
32 deallocation function now remembers to put thread on active
33 list and remove from active list.
34 Thus now the feature of binding multiple timers
35 to a single thread actually works.
37 2000-06-10 Ulrich Drepper <drepper@redhat.com>
39 * pthread.c (__pthread_create_2_1): Optimize a bit.
41 * internals.h (invalid_handle): Also test for p_terminated != 0.
42 (nonexisting_handle): New function. Same as old invalid_handle.
43 * join.c (pthread_join): Use nonexisting_handle instead of
44 invalid_handle to test for acceptable thread handle.
45 * manager.c (pthread_handle_free): Likewise.
46 * joinrace.c: New file.
47 Reported by Permaine Cheung <pcheung@cygnus.com>.
49 2000-06-08 Ulrich Drepper <drepper@redhat.com>
51 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
52 Correct handling of matching variable.
54 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
57 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
58 Be prepared for empty timer list.
60 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
61 CPUTIME clock ID. Add support for thread clocks.
63 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
64 subtraction were switched.
66 * sysdeps/pthread/timer_routines.c (init_module): Use
67 THREAD_MAXNODES threads.
69 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
70 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
71 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
72 with sigqueueinfo is this system call is available.
74 * sysdeps/pthread/timer_create.c (timer_create): Allow
75 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
77 * sysdeps/pthread/Makefile: New file. Add rules to build timer
79 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
81 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
83 * sysdeps/pthread/posix-timer.h: New file.
84 * sysdeps/pthread/timer_create.c: New file.
85 * sysdeps/pthread/timer_delete.c: New file.
86 * sysdeps/pthread/timer_getoverr.c: New file.
87 * sysdeps/pthread/timer_gettime.c: New file.
88 * sysdeps/pthread/timer_routines.c: New file.
89 * sysdeps/pthread/timer_settime.c: New file.
90 * sysdeps/pthread/tst-timer.c: New file.
92 2000-06-08 Ulrich Drepper <drepper@redhat.com>
94 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
95 LINK_MAX definitions if necessary.
97 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
99 Added missing fork time handling of global libio lock.
101 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
102 not just the individual stream locks. Rewritten to use new
103 iterator interface provided by libio rather than accessing
106 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
107 which lock and unlock the stream list using the new interface
109 * internals.h: Likewise.
111 * ptfork.c (__fork): Now calls __flockfilelist before fork,
112 and __funlockfilelist in the parent after the fork.
113 Child still calls __fresetlockfiles as before.
115 * linuxthreads.texi: Now explains what happens to streams at
116 fork time. Also whole new section on forking and thread added.
117 Definition of pthread_atfork moved out of Miscellaneous Functions
120 2000-06-04 Jakub Jelinek <jakub@redhat.com>
122 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
123 Add missing register.
124 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
126 2000-06-02 Jakub Jelinek <jakub@redhat.com>
128 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
129 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
130 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
132 2000-05-31 Andreas Jaeger <aj@suse.de>
134 * sysdeps/mips/pspinlock.c: Implement spinlocks.
136 2000-05-28 Ulrich Drepper <drepper@redhat.com>
138 * spinlock.c (__pthread_lock): Remove ASSERT.
140 * Makefile (tests): Add ex8.
141 * Examples/ex8.c: New file.
143 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
145 Bugfix: The pthread_atfork mechanism now takes care of its
146 own internal mutex at fork time.
148 * ptfork.c (__fork): Revised so that the mutex is held across
149 the fork operation and while the handlers are called, and so that
150 the child resets the mutex.
152 * linuxthreads.texi: Updated pthread_atfork documentation to make
153 it clear that fork and pthread_atfork can't be reentered from
154 atfork handlers, that pthread_atfork and fork are mutually atomic,
155 and that the handlers are inherited by the child process.
157 2000-05-24 Ulrich Drepper <drepper@redhat.com>
159 * Makefile (libpthread-routines): Add pspinlock.
160 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
161 Use struct _pthread_fastlock instead of pthread_spinlock_t.
162 * condvar.c: Likewise.
163 * internals.h: Likewise.
165 * manager.c: Likewise.
167 * pthread.c: Likewise.
168 * rwlock.c: Likewise.
169 * semaphore.c: Likewise.
170 * signals.c: Likewise.
171 * spinlock.h: Likewise.
172 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
173 * sysdeps/alpha/pspinlock.c: New file.
174 * sysdeps/arm/pspinlock.c: New file.
175 * sysdeps/i386/pspinlock.c: New file.
176 * sysdeps/m68k/pspinlock.c: New file.
177 * sysdeps/mips/pspinlock.c: New file.
178 * sysdeps/powerpc/pspinlock.c: New file.
179 * sysdeps/sparc/sparc32/pspinlock.c: New file.
180 * sysdeps/sparc/sparc64/pspinlock.c: New file.
181 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
182 back to _pthread_fastlock. Define new pthread_spinlock_t.
184 2000-05-24 Andreas Jaeger <aj@suse.de>
186 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
188 2000-05-21 Jakub Jelinek <jakub@redhat.com>
190 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
192 2000-05-13 Jakub Jelinek <jakub@redhat.com>
194 * internals.h (__RES_PTHREAD_INTERNAL): Define.
196 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
198 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
199 object state is represented with additional bits which distinguish
200 whether that state was set up in the current process, or
201 in an ancestor process. If that state was set in an ancestor,
202 it means that a fork happened while thread was executing the init
203 function. In that case, the state is reset to NEVER.
204 * mutex.c (__pthread_once_fork_prepare): New function.
205 (__pthread_once_fork_child): Likewise
206 (__pthread_once_fork_parent): Likewise
207 (__pthread_reset_pthread_once): Removed.
208 * ptfork.c (__fork): Call new handlers in mutex.c.
209 * internals.h: Declarations of new mutex.c functions added.
210 Declaration of removed function deleted.
211 * linuxthreads.texi: Updated documentation about pthread_once
212 to clarify what happens under cancellation and forking.
214 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
216 * internals.h: New thread manager request type, REQ_KICK.
217 * join.c (pthread_exit): main thread now calls exit() instead
218 of _exit() in order to proper process cleanup.
219 * manager.c (__pthread_manager): Do not terminate manager
220 after unblocking main thread; wait for main thread's
221 REQ_PROCESS_EXIT request instead.
222 Also, added REQ_KICK case to handle new request; this just does
224 * manager.c (pthread_exited): Do not terminate manager after
225 unblocking main thread.
226 * manager.c (__pthread_manager_sighandler): If the main thread
227 is waiting for all other threads to die, send a REQ_KICK into
228 the thread manager request pipe to get it to clean out the threads
229 and unblock the main thread as soon as possible. This fixes
230 the 2000 millisecond hang on shutdown bug.
231 * Examples/ex7.c: New file, tests shutdown behavior when all threads
232 including the main one call pthread_exit(), or implicitly do so.
233 * Makefile (tests): Add ex7.
235 2000-05-05 Andreas Jaeger <aj@suse.de>
237 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
238 (pthread_getcpuclockid): Correct test for ourselves.
240 2000-05-05 Ulrich Drepper <drepper@redhat.com>
242 * internals.h (struct _pthread_descr_struct): Reorganization.
243 Allocate room for 16 pointers at head of the structure for future
244 thread-local data handling. Move p_self member in this area.
245 * manager.c (pthread_handle_create): Adjust use of p_self.
246 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
247 * pthread.c (__pthread_initial_thread): Adjust initialization.
248 (__pthread_manager_thread): Likewise.
250 2000-04-29 Bruno Haible <haible@clisp.cons.org>
252 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
253 for eventmask larger than 1 word.
255 2000-04-27 Ulrich Drepper <drepper@redhat.com>
257 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
258 * pthread.c (__pthread_initialize_minimal): New function. Perform
259 minimal initialization.
260 (pthread_initialize): Remove this code here.
261 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
262 are working around the problem in glibc.
264 2000-04-25 Ulrich Drepper <drepper@redhat.com>
266 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
267 now. First gcc must be fixed (more concrete: libgcc).
269 2000-04-24 Ulrich Drepper <drepper@redhat.com>
271 * pthread.c: Remove special treatement for interrupt handlers on x86.
272 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
273 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
275 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
277 2000-04-24 Mark Kettenis <kettenis@gnu.org>
279 * join.c (pthread_exit): Set p_terminated after reporting the
280 termination event instead of before.
282 2000-04-20 Jakub Jelinek <jakub@redhat.com>
284 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
287 2000-04-18 Andreas Jaeger <aj@suse.de>
289 * Versions: Use ld instead of ld.so.
291 2000-04-18 Jakub Jelinek <jakub@redhat.com>
293 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
294 Remove the typedef keyword.
296 2000-04-18 Jakub Jelinek <jakub@redhat.com>
298 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
300 (READ_MEMORY_BARRIER): Define.
301 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
303 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
306 2000-04-17 Ulrich Drepper <drepper@redhat.com>
308 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
309 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
312 2000-04-16 Ulrich Drepper <drepper@redhat.com>
314 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
315 if fast mutex is used. Don't initialize `already_canceled' twice.
316 Correctly test for return value of timedsuspend.
318 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
319 therefore don't need the _rt versions of the signal handlers.
321 2000-04-15 Ulrich Drepper <drepper@redhat.com>
323 * pthread.c (pthread_yield): New function.
324 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
325 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
326 * internals.h: Declare __pthread_yield.
328 * pthread.c (pthread_initialize): Avoid a bit more code if
329 realtime signals are known to exist.
331 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
332 to dynamically detect RT signals and avoid generating compatibility
333 functions with old kernel.
334 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
335 __pthread_restart_new directly.
336 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
337 __pthread_wait_for_restart_signal directly.
338 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
339 __pthread_timedsuspend_new directly.
341 2000-04-15 Ulrich Drepper <drepper@redhat.com>
343 * condvar.c: Remove all the special code to handle cond_timedwait.
344 Use timedsuspend instead.
345 * internals.h: Declare __pthread_timedsuspend_old,
346 __pthread_timedsuspend_new, and __pthread_timedsuspend.
347 Remove declaration of __pthread_init_condvar.
348 * pthread.c: Define __pthread_timedsuspend variable.
349 (__pthread_timedsuspend_old): New function. Timed suspension
350 implementation for old Linux kernels.
351 (__pthread_timedsuspend_new): New function. Timed suspension
352 implementation for new Linux kernels.
353 * restart.h (timedsuspend): New function. Call appropriate
354 suspension function through __pthread_timedsuspend.
355 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
357 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
359 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
361 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
363 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
364 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
366 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
367 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
369 2000-04-14 Andreas Jaeger <aj@suse.de>
373 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
374 2.2 for linuxthreads.
376 2000-04-13 Ulrich Drepper <drepper@redhat.com>
378 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
379 (pthread_getcpuclockid): Fix typo.
381 2000-04-12 Ulrich Drepper <drepper@redhat.com>
383 * Makefile (libpthread-routines): Add getcpuclockid.
384 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
385 * sysdeps/pthread/getcpuclockid.c: New file.
386 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
387 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
389 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
391 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
393 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
394 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
395 and pthread_spin_unlock.
396 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
397 into pthread_spinlock_t. Change all uses.
398 * spinlock.c: Implement pthread_spin_lock.
399 Rename __pthread_unlock to __pthread_spin_unlock and define weak
401 Define pthread_spin_trylock, pthread_spin_init, and
402 pthread_spin_destroy.
403 Change all uses of _pthread_fastlock to pthread_spinlock_t.
404 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
405 Change all uses of _pthread_fastlock to pthread_spinlock_t.
406 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
407 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
408 and pthread_spin_unlock.
409 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
410 Change all uses of _pthread_fastlock to pthread_spinlock_t.
411 * condvar.c: Likewise.
412 * internals.h: Likewise.
414 * manager.c: Likewise.
416 * pthread.c: Likewise.
417 * rwlock.c: Likewise.
418 * semaphore.c: Likewise.
419 * signals.c: Likewise.
421 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
423 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
425 2000-04-11 Ulrich Drepper <drepper@redhat.com>
427 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
428 _POSIX_SHARED_MEMORY_OBJECTS.
430 2000-04-11 Andreas Jaeger <aj@suse.de>
432 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
433 (__compare_and_swap): Mark as modifying memory.
435 2000-04-11 Geoff Keating <geoffk@cygnus.com>
437 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
439 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
440 Don't have the 'asm' __volatile__.
442 2000-04-11 Ulrich Drepper <drepper@redhat.com>
444 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
445 * spinlock.c (__pthread_lock): Add memory barriers.
446 (__pthread_unlock): Likewise.
447 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
449 (RELEASE): Not needed anymore.
450 (__compare_and_swap): Mark asm as modifying memory.
451 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
453 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
454 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
455 (MEMORY_BARRIER): Define using stbar.
456 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
458 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
459 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
460 Mike Burrows <m3b@pa.dec.com>.
462 2000-04-09 Ulrich Drepper <drepper@redhat.com>
464 * signals.c (sigaction): Fix return value for the case SIG is one
465 of the signals the implementation uses.
466 Patch by Xavier.Leroy@inria.fr.
468 2000-04-01 Andreas Jaeger <aj@suse.de>
470 * attr.c: Use shlib-compat macros.
471 * oldsemaphore.c: Likewise.
472 * pthread.c: Likewise.
475 2000-03-26 Ulrich Drepper <drepper@redhat.com>
477 * semaphore.c (sem_timedwait): New function.
478 Patch by Carl Mailloux <carlm@oricom.ca>.
479 * semaphore.h: Declare sem_timedwait.
480 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
482 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
484 * sysdeps/pthread/Makefile: File removed.
486 2000-03-23 Ulrich Drepper <drepper@redhat.com>
488 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
489 * internals.h (__pthread_reset_pthread_once): Add prototype.
490 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
492 * manager.c (pthread_handle_create): Store ID of new thread before
495 2000-03-21 Ulrich Drepper <drepper@redhat.com>
497 * attr.c: Use new macros from shlib-compat.h to define versions.
498 * oldsemaphore.c: Likewise.
499 * semaphore.c: Likewise.
502 * pthread.c: Update for new SHLIB_COMPAT definition.
504 * manager.c (__pthread_manager): Unmask debug signal.
506 * pthread.c (pthread_initialize): Test for address of __dso_handle
507 being NULL, not value. Use __on_exit, not on_exit.
508 Patch by Andreas Jaeger <aj@suse.de>.
510 * pthread.c: Use new macros from shlib-compat.h to define versions.
512 2000-03-19 Ulrich Drepper <drepper@redhat.com>
514 * pthread.c (pthread_initialize): Instead of on_exit use
515 __cxa_atexit if __dso_label is available to allow unloading the
516 libpthread shared library.
518 2000-03-16 Ulrich Drepper <drepper@redhat.com>
520 * condvar.c: Make tests for ownership of mutex less strict.
522 2000-03-14 Ulrich Drepper <drepper@redhat.com>
524 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
525 current thread and return error if not.
526 (pthread_cond_timedwait_relative_old): Likewise.
527 (pthread_cond_timedwait_relative_new): Likewise.
529 * mutex.c (__pthread_once): Handle cancelled init function correctly.
530 (pthread_once_cancelhandler): New function.
531 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
533 2000-03-14 Andreas Jaeger <aj@suse.de>
535 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
537 (pthread_handle_sigrestart_rt): Likewise.
538 * signals.c (pthread_sighandler_rt): Likewise.
540 2000-03-02 Andreas Jaeger <aj@suse.de>
542 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
543 Reported by Sean Chen <sean.chen@turbolinux.com>.
545 2000-02-28 Andreas Jaeger <aj@suse.de>
547 * rwlock.c: Fix typo.
549 2000-02-27 Ulrich Drepper <drepper@redhat.com>
551 * rwlock.c: Define __* variants of the functions and make old names
553 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
554 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
556 2000-02-25 Andreas Jaeger <aj@suse.de>
558 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
559 pwrite64, lseek64, open64, and __open64 with version 2.2.
561 2000-02-22 Ulrich Drepper <drepper@redhat.com>
563 * semaphore.h (SEM_FAILED): Use 0 not NULL.
565 2000-02-14 Ulrich Drepper <drepper@redhat.com>
567 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
568 nanosleep does not work either. Get absolute time inside the
570 (pthread_cond_timedwait_relative_new): Likewise.
571 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
573 2000-02-13 Andreas Jaeger <aj@suse.de>
575 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
576 (pthread_cond_timedwait_relative_old): Likewise.
578 2000-02-13 Ulrich Drepper <drepper@redhat.com>
580 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
581 but keep the code around. A bug in the kernel prevent us from
583 (pthread_cond_timedwait_relative_new): Likewise.
584 (PR libc/1597 and libc/1598).
586 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
588 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
589 loop around nanosleep calls instead of around most of the function
590 (pthread_cond_timedwait_relative_new): Likewise.
591 body. Got rid of backwards goto and one local.
593 2000-01-31 Ulrich Drepper <drepper@redhat.com>
595 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
596 before every nanosleep call to account for time spent in the rest
598 (pthread_cond_timedwait_relative_new): Likewise.
599 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
601 2000-01-29 Ulrich Drepper <drepper@redhat.com>
603 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
604 from nanosleep call so that in case we restart we only wait for the
606 (pthread_cond_timedwait_relative_new): Likewise.
607 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
609 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
611 * manager.c (pthread_allocate_stack): Compute guard page address
612 correctly. Patch by HJ Lu.
614 * sysdeps/pthread/pthread.h: Define
615 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
617 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
619 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
621 (pthread_rwlockattr_setkind_np): Allow
622 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
623 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
625 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
627 * internals.h (pthread_readlock_info): New structure.
628 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
629 p_untracked_readlock_count.
630 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
631 Add initializers for new fields.
632 * manager.c (pthread_free): Free read/write lock lists.
633 * queue.h (queue_is_empty): New function.
634 * rwlock.c: Implement requirements about when readers should get
636 * sysdeps/pthread/pthread.h
637 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
638 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
639 Define this name as well.
640 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
642 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
644 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
645 Adjust initializers for struct _pthread_descr_struct change.
646 * internals.h (struct _pthread_descr_struct): Move new elements to
649 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
651 Redesigned how cancellation unblocks a thread from internal
652 cancellation points (sem_wait, pthread_join,
653 pthread_cond_{wait,timedwait}).
654 Cancellation won't eat a signal in any of these functions
655 (*required* by POSIX and Single Unix Spec!).
656 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
657 simultaneous condition variable signal (not required by POSIX
658 or Single Unix Spec, but nice).
659 * spinlock.c: __pthread_lock queues back any received restarts
660 that don't belong to it instead of assuming ownership of lock
661 upon any restart; fastlock can no longer be acquired by two threads
663 * restart.h: Restarts queue even on kernels that don't have
664 queued real time signals (2.0, early 2.1), thanks to atomic counter,
665 avoiding a rare race condition in pthread_cond_timedwait.
667 1999-12-31 Andreas Jaeger <aj@suse.de>
669 * internals.h: Remove duplicate prototype declarations.
671 * weaks.c: Remove __THROW from prototypes since the file is not
672 compiled by a C++ compiler.
673 * internals.h: Likewise.
675 1999-12-30 Andreas Jaeger <aj@suse.de>
677 * sysdeps/pthread/pthread.h: Move internal functions to...
678 * sysdeps/pthread/bits/libc-lock.h: ...here.
680 1999-12-29 Andreas Jaeger <aj@suse.de>
682 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
684 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
686 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
689 * manager.c (__pthread_start): Add one more cast to prevent
690 warning on 64bit machines.
692 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
694 * manager.c (pthread_handle_create): Set p_pid of new thread
695 before calling the callback function to report a new thread.
697 1999-12-20 Andreas Jaeger <aj@suse.de>
699 * pthread.c (pthread_initialize): Move getrlimit call after
702 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
704 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
705 pwrite64, lseek64, open64, and __open64.
706 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
707 pwrite64, lseek64, open64, and __open64.
709 * manager.c (pthread_allocate_stack): Correct computation of
710 new_thread_bottom. Correct handling of stack size and when the
711 rlimit method to guard for stack growth is used.
712 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
713 minus one pagesize (not two).
715 1999-12-03 Andreas Jaeger <aj@suse.de>
717 * Versions: Add __res_state with version GLIBC_2.2.
719 * errno.c (__res_state): New function to return thread specific
722 * pthread.c (pthread_initialize): Initialize p_resp.
723 (__pthread_reset_main_thread): Also set p_resp.
725 * manager.c (pthread_handle_create): Initialize p_resp.
727 * internals.h: Add thread specific resolver state.
728 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
730 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
732 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
734 * sysdeps/i386/i686/pt-machine.h: Likewise.
735 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
737 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
739 * manager.c (pthread_start_thread_event): Initialize p_pid already
742 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
744 * internals.h: Add prototype for __pthread_manager_event.
745 * manager.c (__pthread_manager_event): New function.
746 (pthread_start_thread_event): Correct computation of self.
747 Use INIT_THREAD_SELF.
748 * pthread.c (__pthread_manager_thread): Initialize p_lock.
749 (__pthread_initialize_manager): Respect event flags also for creation
750 of the manager thread.
752 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
754 * pthread.c (__pthread_initialize_manager): Initialize
755 __pthread_manager_thread.p_tid.
757 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
759 * internals.h: Declare __pthread_last_event.
760 * manager.c: Define __pthread_last_event.
761 (pthread_handle_create): Set __pthread_last_event.
762 (pthread_exited): Likewise.
763 * join.c (pthread_exit): Likewise.
765 * Makefile (libpthread-routines): Add events.
766 * events.c: New file.
767 * internals.h: Protect against multiple inclusion.
768 Include thread_dbP.h header.
769 (struct _pthread_descr_struct): Add new fields p_report_events and
771 Declare event reporting functions.
772 * join.c (pthread_exit): Signal event if this is wanted.
773 * manager.c (__pthread_threads_events): New variable.
774 (pthread_handle_create): Take new parameters with event information.
775 Signal TD_CREATE event if wanted.
776 (__pthread_manager): Adjust pthread_handle_create call.
777 (pthread_start_thread_event): New function. Block until manager is
778 finished and then call pthread_start_thread.
779 (pthread_exited): Signal TD_REAP event if wanted.
781 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
783 * restart.h (suspend_with_cancellation): Rewrite as a macro.
785 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
787 1999-10-25 Andreas Jaeger <aj@suse.de>
789 * internals.h: Remove K&R compatibility.
790 * no-tsd.c: Likewise.
791 * semaphore.h: Likewise.
792 * signals.c: Likewise.
793 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
794 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
797 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
799 * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
800 and pthread_handle_sigcancel with functions that restore
801 %gs from the signal context. For each signal handling function,
802 two wrappers are required, one for a non-RT signal and one for
804 * linuxthreads/signal.c: For i386, add code to restore %gs
805 from the signal context in pthread_sighandler and
806 pthread_sighandler_rt.
808 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
810 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
812 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
814 * pthread.c (__pthread_initial_thread): Pass argument to
815 PTHREAD_START_ARGS_INITIALIZER.
816 (__pthread_manager_thread): Likewise.
818 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
821 * manager.c (pthread_handle_create): Remove p_startfct initialization.
823 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
825 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
827 * internals.h: Correct return types for __libc_read and __libc_write.
829 1999-10-09 Andreas Jaeger <aj@suse.de>
831 * internals.h: Add __new_sem_post to get prototype in
832 manager.c; include semaphore.h for needed types.
834 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
836 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
837 directly instead of calling sem_post which should not be necessary
838 but is faster and might help in some case to work around problems.
839 Patch by khendricks@ivey.uwo.ca [libc/1382].
841 1999-10-08 Andreas Schwab <schwab@suse.de>
843 * sysdeps/pthread/Subdirs: New file.
846 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
849 * internals.h (struct _pthread_descr_struct): Add p_startfct.
850 * manager.c (pthread_handle_create): Initialize p_startfct.
851 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
853 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
855 * manager.c (__linuxthreads_pthread_threads_max): New variable.
856 * specific.c (__linuxthreads_pthread_keys_max): New variable.
857 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
859 * condvar.c (pthread_cond_timedwait_relative): Never return with
860 EINTR. Patch by Andreas Schwab.
862 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
864 * signals.c (sigaction): Correct last patch. Don't select
865 pthread_sighandler_rt based on the signal number but instead of
868 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
870 * specific.c: Move definitions of struct pthread_key_struct and
871 destr_function to ...
872 * internals.h: ...here.
874 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
876 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
877 this instead of pthread_handle_sigrestart if the signal is an RT
880 * signals.c: Handle passing through of sighandler arguments also
881 for real-time signals.
883 1999-09-03 Andreas Schwab <schwab@suse.de>
885 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
887 (__vfork): New function, alias vfork.
888 * Versions: Export __fork, vfork, and __vfork in libpthread.
890 1999-08-23 Andreas Schwab <schwab@suse.de>
892 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
893 call to signal handler.
895 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
897 * pthread.c (__pthread_reset_main_thread): Undo last change.
898 (__pthread_kill_other_threads_np): Reset signal handlers for the
899 signals we used in the thread implementation here.
901 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
903 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
904 for the signals we used in the thread implementation [PR libc/1234].
906 * Versions: Export __pthread_kill_other_threads_np from libpthread
909 * signals.c: Pass sigcontext through wrapper to the user function.
911 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
913 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
914 __libc_internal_tsd_set.
916 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
918 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
921 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
923 * internals.h: Align _pthread_descr_struct to 32 bytes.
924 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
927 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
929 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
932 1999-07-09 Cristian Gafton <gafton@redhat.com>
934 * Makefile (libpthread-routines): Add oldsemaphore routine.
935 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
936 sem_trywait, and sem_wait to GLIBC_2.1.
937 * oldsemaphore.c: New file.
938 * semaphore.c: Add default_symbol_versions for the changed functions.
939 (__new_sem_init): Rename from sem_init.
940 (__new_sem_post): Rename from sem_post.
941 (__new_sem_wait): Rename from sem_wait.
942 (__new_sem_trywait): Rename from sem_trywait.
943 (__new_sem_getvalue): Rename from sem_getvalue.
944 (__new_sem_destroy): Rename from sem_destroy.
946 1999-06-23 Robey Pointer <robey@netscape.com>
948 * internals.h: Added p_nextlock entry to separate queueing for a
949 lock from queueing for a CV (sometimes a thread queues on a lock
950 to serialize removing itself from a CV queue).
951 * pthread.c: Added p_nextlock to initializers.
952 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
954 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
956 * manager.c (pthread_handle_create): Free mmap region after stack
957 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
959 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
961 * man/pthread_cond_init.man: Correct example.
962 Reported by Tomas Berndtsson <tomas@nocrew.org>.
964 * linuxthreads.texi (Condition Variables): Likewise.
966 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
968 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
969 casx not cas, also successful casx returns the old value in rd
970 and not the new value.
972 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
974 * manager.c: If pthread_create() is given a NULL attribute
975 and the thread manager runs with a realtime policy, set the
976 scheduling policy of the newly created thread back to SCHED_OTHER.
977 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
978 initialize the schedpolicy field of new_thread->p_start_args
979 to that of the calling thread.
981 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
983 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
984 instruction does not allow memory element to use offset.
986 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
988 * manager.c (pthread_allocate_stack): Optimize initialization of new
991 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
992 Don't use initializer since it is all zeroes.
993 (__libc_once_define): Likewise.
995 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
997 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
998 doesn't exist anymore.
999 * sysdeps/i386/Implies: Likewise.
1000 * sysdeps/m68k/Implies: Likewise.
1001 * sysdeps/mips/Implies: Likewise.
1002 * sysdeps/powerpc/Implies: Likewise.
1003 * sysdeps/sparc/sparc32/Implies: Likewise.
1004 * sysdeps/sparc/sparc64/Implies: Likewise.
1006 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
1008 * sysdeps/alpha/bits/semaphore.h: Removed.
1009 * sysdeps/powerpc/bits/semaphore.h: Removed.
1010 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1011 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1012 * Makefile (headers): Remove bits/semaphore.h.
1014 * semaphore.h: Define _pthread_descr if necessary.
1015 Don't include limits.h. Define SEM_VALUE_MAX directly.
1017 (sem_t): Protect element names with leading __.
1018 Add declarations for sem_close, sem_open, and sem_unlink.
1019 * semaphore.c: Adjust all functions for new element names.
1020 Define sem_close, sem_open, and sem_unlink.
1021 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
1023 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
1026 1999-03-16 H.J. Lu <hjl@gnu.org>
1028 * specific.c (pthread_key_delete): Check th->p_terminated to see
1029 if the thread is running.
1031 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
1032 Added to GLIBC_2.0 for libc.so.
1034 1999-02-12 H.J. Lu <hjl@gnu.org>
1036 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
1037 __libc_allocate_rtsig): Added to GLIBC_2.1.
1039 * internals.h (DEFAULT_SIG_RESTART): Removed.
1040 (DEFAULT_SIG_CANCEL): Removed.
1042 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
1043 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
1044 (__pthread_sig_restart, __pthread_sig_cancel,
1045 __pthread_sig_debug): Initialized.
1046 (pthread_initialize): Call init_rtsigs () to initialize
1049 1999-02-03 H.J. Lu <hjl@gnu.org>
1051 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
1052 Don't restart the thread which sent REQ_DEBUG.
1053 (pthread_start_thread): Check if __pthread_sig_debug > 0
1056 * pthread.c (__pthread_initialize_manager): Suspend ourself
1057 after sending __pthread_sig_debug to gdb instead of
1058 __pthread_sig_cancel.
1060 1999-01-24 H.J. Lu <hjl@gnu.org>
1062 * manager.c (__pthread_manager): Delete __pthread_sig_debug
1063 from mask if __pthread_sig_debug > 0.
1064 (pthread_handle_create): Increment __pthread_handles_num.
1066 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
1067 * pthread.c (__pthread_initialize_manager): Likewise.
1069 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
1070 instead of __libc_allocate_rtsig (2).
1071 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
1072 instead of __pthread_sig_cancel.
1073 (pthread_handle_sigdebug): Fix comments.
1075 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
1077 * manager.c (pthread_allocate_stack): Set
1078 __pthread_nonstandard_stacks if user-specified stack is used.
1080 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
1082 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1083 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1085 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
1087 * pthread.c: Use a third signal __pthread_sig_debug distinct
1088 from __pthread_sig_cancel to notify gdb when a thread is
1090 * manager.c: Likewise.
1091 * internals.h: Likewise.
1092 * signals.c: The implementation of sigwait(s) assumed that
1093 all signals in s have signal handlers already attached.
1094 This is not required by the standard, so make it work
1095 also if some of the signals have no handlers.
1097 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1099 * linuxthreads.texi: Remove pointers from first @node. Move old
1100 @node spec inside comment.
1102 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
1104 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1107 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
1109 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1110 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1112 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
1114 * manager.c: Threads now send __pthread_sig_cancel on termination.
1115 Change clone call and signal masks.
1116 * thread.c (pthread_handle_sigrestart): Remove special code for
1118 (pthread_handle_sigcancel): In manager thread call
1119 __pthread_manager_sighandler.
1120 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1121 * sysdeps/i386/i686/pt-machine.h: Likewise.
1122 Patches by Xavier Leroy.
1124 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
1126 * spinlock.c (__pthread_unlock): Don't crash if called for an
1127 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1129 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1132 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
1134 * Examples/ex3.c: Wait until all threads are started before
1135 searching for the number to avoid race condition on very fast
1138 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1140 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
1141 declaration since it's not needed.
1143 * sysdeps/pthread/pthread.h: Move internal functions to ...
1144 * internals.h: ...here.
1146 1998-12-02 H.J. Lu <hjl@gnu.org>
1148 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1149 SIGRTMIN is defined.
1150 (__pthread_sig_cancel): Likewise.
1152 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1154 * wrapsyscall.c: Include <sys/mman.h> for msync,
1155 <stdlib.h> for system and <termios.h> for tcdrain prototype.
1156 Correct msync declaration.
1158 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
1160 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1161 __libc_tsd_set): New macros for new interface.
1162 * no-tsd.c: New file, provide uninitialized defns of
1163 __libc_internal_tsd_get and __libc_internal_tsd_set.
1164 * Makefile (routines): Add no-tsd.
1166 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
1168 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1169 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1170 __libc_internal_tsd_set): Move decls to ...
1171 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1174 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1175 __libc_internal_tsd_set): Make these pointers to functions, not
1176 functions; remove #pragma weak decls for them.
1177 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1178 Define static functions and initialized pointers to them.
1180 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
1182 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1183 (CFLAGS-specific.c): Likewise.
1184 (CFLAGS-pthread.c): Likewise.
1185 (CFLAGS-ptfork.c): Likewise.
1186 (CFLAGS-cancel.c): Likewise.
1187 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1188 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1190 * mutex.c (pthread_mutex_init): Define as strong symbol.
1191 (pthread_mutex_destroy): Likewise.
1192 (pthread_mutex_trylock): Likewise.
1193 (pthread_mutex_lock): Likewise.
1194 (pthread_mutex_unlock): Likewise.
1195 (pthread_mutexattr_init): Likewise.
1196 (pthread_mutexattr_destroy): Likewise.
1197 (pthread_once): Likewise.
1198 * ptfork.c (pthread_atfork): Likewise.
1199 * specific.c (pthread_key_create): Likewise.
1200 (pthread_setspecific): Likewise.
1201 (pthread_getspecific): Likewise.
1203 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1205 * linuxthreads.texi: Fix punctuation after xref.
1207 1998-11-10 H.J. Lu <hjl@gnu.org>
1209 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1210 if it is defined in <linux/limits.h>.
1212 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
1214 * spinlock.h (__pthread_trylock): Define inline.
1215 (__pthread_lock): Add extra parameter to declaration. Declare
1216 using internal_function.
1217 (__pthread_unlock): Declare using internal_function.
1218 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
1219 of local variable self. Avoid recomputing self. Define using
1221 (__pthread_trylock): Remove.
1222 (__pthread_unlock): Define using internal_function.
1223 * cancel.c: Adjust for __pthread_lock interface change. Use already
1224 computed self value is possible.
1225 * condvar.c: Likewise.
1227 * manager.c: Likewise.
1228 * mutex.c: Likewise.
1229 * pthread.c: Likewise.
1230 * rwlock.c: Likewise.
1231 * semaphore.c: Likewise.
1232 * signals.c: Likewise.
1234 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
1236 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1237 __ to field names of the struct.
1238 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1240 (pthread_attr_t): Likewise.
1241 (pthread_cond_t): Likewise.
1242 (pthread_condattr_t): Likewise.
1243 (pthread_mutex_t): Likewise.
1244 (pthread_mutexattr_t): Likewise.
1245 (pthread_rwlock_t): Likewise.
1246 (pthread_rwlockattr_t): Likewise.
1247 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1248 * cancel.c: Likewise.
1249 * condvar.c: Likewise.
1250 * manager.c: Likewise.
1251 * mutex.c: Likewise.
1252 * pthread.c: Likewise.
1253 * ptlongjmp.c: Likewise.
1254 * rwlock.c: Likewise.
1255 * spinlock.c: Likewise.
1257 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
1259 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1262 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1265 * Makefile (libpthread-routines): Add pt-machine.
1266 * pt-machine.c: New file.
1267 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1268 yet defined. Use PT_EI in extern inline definitions.
1269 * sysdeps/arm/pt-machine.h: Likewise.
1270 * sysdeps/i386/pt-machine.h: Likewise.
1271 * sysdeps/i386/i686/pt-machine.h: Likewise.
1272 * sysdeps/m68k/pt-machine.h: Likewise.
1273 * sysdeps/mips/pt-machine.h: Likewise.
1274 * sysdeps/powerpc/pt-machine.h: Likewise.
1275 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1276 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1278 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1280 * semaphore.h: Include <sys/types.h> so that _pthread_descr
1283 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
1285 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1287 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1289 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1291 * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
1292 multiple inclusion guard.
1294 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1296 * signals.c (sigaction): Check that sig is less than NSIG to avoid
1297 array index overflow.
1299 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
1301 * sysdeps/pthread/semaphore.h: New file.
1303 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
1305 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1306 _LIBC_TSD_KEY_DL_ERROR.
1308 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
1310 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1311 * sysdeps/i386/pt-machine.h: Likewise.
1312 Suggested by Roland McGrath.
1314 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
1316 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1317 access thread data with non-constant offsets.
1318 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1321 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
1322 THREAD_SETMEM_NC definitions.
1324 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1326 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1328 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
1330 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1331 not already defined.
1332 (struct _pthread_descr_struct): Add p_self and p_nr field.
1333 * manager.c (__pthread_handles): Define second element to point
1335 (__pthread_handles_num): Initialize to 2.
1336 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1337 (pthread_start_thread): Likewise.
1338 (pthread_handle_create): Start search for free slot at entry 2.
1339 Initialize new fields p_self and p_nr.
1340 Call __clone with CLONE_PTRACE if available.
1341 (pthread_free): Call FREE_THREAD_SELF if available.
1342 * pthread.c (__pthread_initial_thread): Initialize new fields.
1343 (__pthread_manager_thread): Likewise.
1344 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1346 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1347 elements of the thread descriptor.
1348 * condvar.c: Likewise.
1349 * errno.c: Likewise.
1351 * manager.c: Likewise.
1352 * pthread.c: Likewise.
1353 * ptlongjmp.c: Likewise.
1354 * semaphore.c: Likewise.
1355 * signals.c: Likewise.
1356 * specific.c: Likewise.
1357 * spinlock.c: Likewise.
1359 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1361 * sysdeps/i386/useldt.h: New file.
1362 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1364 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1365 THREAD_SETMEM using __thread_self.
1366 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1368 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
1370 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1371 turned out that we didn't need to queue after all.
1373 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
1375 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1376 and wastes space; correct types.
1378 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
1380 * signals.c (sigaction): Handle NULL argument.
1382 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
1384 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1387 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1389 * Makefile (linuxthreads-version): Extract correct number from
1392 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
1394 * Banner: Bump version number to 0.8
1395 * FAQ.html: Many updates, in particular w.r.t. debugging.
1396 * manager.c: Support for non-default stacksize for
1397 LinuxThreads-allocated stacks;
1398 don't use guard pages for stacks with default size, rely on
1399 rlimit(RLIMIT_STACK) instead (it's cheaper).
1401 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1402 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1403 * condvar.c: Likewise.
1404 * internals.h: Likewise.
1405 * restart.h: Likewise.
1406 * signals.c: Likewise.
1407 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1409 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1411 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1412 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
1413 * Versions: Put __pthread_mutexattr_settype under version
1414 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
1415 __pthread_mutexattr_gettype.
1417 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1419 * sysdeps/pthread/bits/libc-lock.h: Make
1420 __pthread_mutexattr_settype weak. Don't make
1421 __pthread_mutexattr_setkind_np weak.
1423 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
1425 * manager.c (pthread_handle_create): Check whether sched_setscheduler
1426 call can succeed here.
1428 * mutex.c: Define __pthread_mutexattr_settype and make
1429 __pthread_mutexattr_setkind_np an alias.
1430 Likewise for __pthread_mutexattr_gettype.
1432 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1434 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1437 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
1439 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1441 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1443 * Examples/ex6.c: Include <unistd.h> for usleep.
1445 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1447 * Examples/ex4.c (main): Use exit, not pthread_exit.
1449 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
1451 * Versions: Add __pthread_mutexattr_gettype and
1452 __pthread_mutexattr_settype.
1453 * lockfile.c: Use __pthread_mutexattr_settype instead of
1454 __pthread_mutexattr_setkind_np.
1455 * mutex.c: Define __pthread_mutexattr_gettype and
1456 __pthread_mutexattr_settype.
1458 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1459 __pthread_mutexattr_settype.
1460 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1461 Use __pthread_mutexattr_settype.
1463 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
1465 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1466 * mutex.c: Define weak alias pthread_mutexattr_gettype and
1467 pthread_mutexattr_settype.
1468 * sysdeps/pthread/pthread.h: Declare these functions.
1469 Move pthread_sigmask and pthread_kill declaration in separate header.
1470 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1472 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
1474 * Makefile: Add rules to compile and run tests.
1475 * Examples/ex1.c: Little changes to fix warnings.
1476 * Examples/ex2.c: Likewise.
1477 * Examples/ex3.c: Likewise.
1478 * Examples/ex4.c: Likewise.
1479 * Examples/ex5.c: Likewise.
1480 * Examples/ex6.c: New file.
1482 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
1484 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1486 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1488 * attr.c: Include <string.h>.
1490 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
1492 * attr.c: Include errno.h. Use memcpy to copy sched_param.
1493 * internals.h: Include limits.h.
1494 * manager.c: Use memcpy to copy sched_param.
1495 * ptfork.c: Include errno.h.
1496 * pthread.c: Likewise.
1497 * semaphore.c: Likewise.
1498 * specific.c: Likewise.
1499 * spinlock.h: Likewise.
1500 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
1501 type definition to ...
1502 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
1504 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
1506 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1508 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1509 as macros as demanded in POSIX.1, Annex C.
1511 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
1513 * internals.h (struct pthread_request): For free use pthread_t
1514 instead of pthread_descr.
1515 * join.c (pthread_join): Pass thread_id, not th to manager.
1516 (pthread_detach): Likewise.
1517 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1518 (pthread_exited): Remove detached queue code.
1519 (pthread_handle_free): Expect thread ID parameter and use it to
1520 validate the thread decsriptor. Don't use detached queue.
1521 Patches by Xavier Leroy.
1523 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1525 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1526 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1527 __pthread_atfork, __pthread_key_create, __pthread_once.
1528 * internals.h: Doc fix.
1529 * pthread.c (__pthread_initialize): Define again.
1531 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
1533 * manager.c (pthread_exited): If thread is not detached put it on
1535 (pthread_handle_free): If thread is not on list with living threads
1536 search on list with detached threads.
1538 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1539 for new definition of pthread_rwlock_t.
1541 * spinlock.c: Correct test whether to compile
1542 __pthread_compare_and_swap or not.
1544 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
1546 * attr.c: Finish user stack support. Change locking code to be safe
1547 in situations with different priorities.
1548 * cancel.c: Likewise.
1549 * condvar.c: Likewise.
1550 * internals.h: Likewise.
1552 * manager.c: Likewise.
1553 * mutex.c: Likewise.
1554 * pthread.c: Likewise.
1555 * ptlongjmp.c: Likewise.
1556 * queue.h: Likewise.
1557 * rwlock.c: Likewise.
1558 * semaphore.c: Likewise.
1559 * semaphore.h: Likewise.
1560 * signals.c: Likewise.
1561 * spinlock.c: Likewise.
1562 * spinlock.h: Likewise.
1563 * sysdeps/pthread/pthread.h: Likewise.
1564 Patches by Xavier Leroy.
1566 * sysdeps/i386/i686/pt-machine.h: New file.
1568 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
1570 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1571 [sg]et_stackaddr prototypes always available.
1573 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1574 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1576 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
1578 * manager.c (pthread_free): Undo patch from 980430.
1579 Reported by David Wragg <dpw@doc.ic.ac.uk>.
1581 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
1583 * manager.c: Define __pthread_manager_adjust_prio and use it to
1584 increase priority when needed.
1585 * internals.h: Add prototype for __pthread_manager_adjust_prio.
1586 * mutex.c: Optimize mutexes to wake up only one thread.
1587 * pthread.c: Move PID of manager for global variable in structure
1589 Patches by Xavier Leroy.
1591 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
1593 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1595 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1597 * attr.c: Correct typo.
1599 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
1601 * manager.c (pthread_free): Unmap guard before the stack.
1602 Patch by Matthias Urlichs.
1604 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
1606 * manager.c (pthread_free): Detect already free child.
1607 Patch by Xavier Leroy, reported by Matthias Urlichs.
1609 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1611 * Makefile (linuxthreads-version): Renamed back from
1614 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
1616 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
1619 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
1621 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
1622 * internals.h: Add definitions for new spinlock implementation.
1623 * ptlongjmp.c: New file.
1624 * spinlock.c: New file.
1625 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
1626 new function __pthread_acquire to prevent deadlocks with thread
1627 with different priorities.
1628 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
1630 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1632 * manager.c (__pthread_manager): Reduce first argument to select
1633 to include just the needed file descriptor.
1635 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
1637 * manager.c: Fix last patch which caused core dumps.
1639 * pthread.c: Correctly handle missing SIGRTMIN.
1641 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1643 * libpthread.map: Add __libc_internal_tsd_get and
1644 __libc_internal_tsd_set. Add missing cancelable functions. Export
1645 libc internal versions of the cancelable functions.
1647 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
1649 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
1651 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
1653 * attr.c: Implement pthread_attr_[gs]etguardsize,
1654 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
1655 Change pthread_attr_init to have two interfaces.
1656 * internals.h (struct _pthread_descr_struct): Add new fields for
1658 * libpthread.map: Add names in GLIBC_2.1 section.
1659 * manager.c (pthread_handle_create): Implement guardsize and
1661 (pthread_free): Likewise.
1662 * pthread.c (pthread_create): Add new interface for changed
1664 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1665 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
1668 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
1670 * manager.c: Enable resetting of the thread scheduling policy
1671 to SCHED_OTHER when the parent thread has a different one.
1673 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
1675 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1676 _POSIX_ASYNCHRONOUS_IO.
1678 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
1680 * mutex.c: Implement new mutex types.
1682 * internals.h: Include <signal.h>.
1684 * libpthread.map: Add __erno_location and __h_errno_location.
1686 * errno.c: Return pointer to variable actually in use. This might
1687 not be the one in the thread structure.
1688 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
1690 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1691 of manager thread structure.
1692 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1694 * pthread.c: Adapt initializer for thread structures.
1695 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1696 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1697 current thread to global variables.
1699 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
1701 * rwlock.c: New file.
1702 * Makefile (libpthread-routines): Add rwlock.
1703 * sysdeps/pthread/pthread.h: Define data structures and declare
1705 * libpthread.map: Add new functions.
1707 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
1709 * sysdeps/arm/pt-machine.h: New file; add ARM support.
1710 * sysdeps/arm/Implies: likewise.
1711 * README: Document it.
1713 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1715 * signals.c: Remove unneeded initializer for sigwaited, saving a
1718 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1720 * semaphore.c (sem_init): Set sem_spinlock only if available.
1722 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
1724 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1725 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1727 * Makefile: Update from LinuxThreads 0.7.
1728 * internals.h. Likewise.
1729 * manager.c: Likewise.
1730 * mutex.c: Likewise.
1731 * pthread.c: Likewise.
1732 * signals.c: Likewise.
1733 * specific.c: Likewise.
1734 * Examples/ex3.c: Likewise.
1736 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
1738 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1741 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
1743 * wrapsyscall.c: Add socket functions which are also cancelation
1746 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
1748 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1749 New functions for fast thread specific data within libc.
1751 * internals.h: Add new array p_libc_specific to struct
1752 _pthread_descr_struct.
1754 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1756 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
1758 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1759 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1761 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
1763 * internals.h (struct _pthread_descr_struct): Add definitions for
1764 two-level specific key handling.
1765 * manager.c (pthread_handle_create): Initialize specific memory array.
1766 * specific.c: Implement two-level key handling.
1767 * weaks.c: Don't provide dummy key handling.
1768 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1769 Add definition of __libc_key_t.
1770 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1772 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1773 PTHREAD_DESTRUCTOR_ITERATIONS.
1775 * manager.c (pthread_handle_create): Compare mmap result with
1778 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1779 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1781 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
1783 sysdeps/sparc -> sysdeps/sparc/sparc32
1784 sysdeps/sparc64 -> sysdeps/sparc/sparc64
1786 * internals.h: Change definition of THREAD_SELF to be an expression,
1787 not a statement that did a return.
1788 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1789 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1790 Follow Solaris and use a "system reserved" register (%g6) to hold
1791 the thread descriptor.
1792 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1794 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
1796 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
1797 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1798 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1800 * semaphore.c: Include spinlock.h only when needed.
1802 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1803 keys for entries not in use.
1805 * weaks.c: Implement key handling functions for real.
1807 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
1809 Initial sparc64-linux support:
1810 * linuxthreads/sysdeps/sparc64/Implies: New file.
1811 * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1813 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
1815 * semaphore.c: Include spinlock.h at correct place.
1818 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
1820 The Great Bit File Move:
1821 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1822 * sysdeps/powerpc/semaphorebits.h: Likewise.
1823 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1824 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1825 * sysdeps/pthread/libc-lock.h: -> bits/
1826 * sysdeps/pthread/stdio-lock.h: Likewise.
1827 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1828 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1829 * semaphore.h: Likewise.
1830 * sysdeps/pthread/pthread.h: Likewise.
1832 * lockfile.c: <foo.h> -> <bits/foo.h>.
1833 * semaphore.h: Likewise.
1835 * Makefile: (headers): foo.h -> bits/foo.h.
1836 * sysdeps/pthread/Makefile: Likewise.
1838 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1840 * semaphore.c (sem_init): Set sem_spinlock only if available.
1842 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1845 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
1847 Update from LinuxThreads 0.6.
1849 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1850 and __sched_get_priority_min instead of names without `__'.
1852 * manager.c: Rewrite large parts to implement opaque pthread_t.
1854 * cancel.c: Adapt for opaque pthread_t type.
1855 * condvar.c: Likewise.
1856 * errno.c: Likewise.
1858 * mutex.c: Likewise.
1859 * pthread.c: Likewise.
1860 * signals.c: Likewise.
1861 * specific.c: Likewise.
1862 * restart.h: Likewise.
1863 * queue.h: Likewise.
1864 * Examples/ex3.c: Likewise.
1865 * Examples/ex4.c: Likewise.
1866 * sysdeps/pthread/pthread.h: Likewise.
1868 * pthread.c: Accumulate time for all threads in thread manager.
1870 * semaphore.c: Implement fallback implementation for architectures
1871 sometimes missing compare-exchange operations.
1873 * cancel.c (pthread_cancel): Validate handle argument.
1874 * join.c (pthread_join): Likewise.
1875 (pthread_detach): Likewise.
1876 * signals.c (pthread_kill): Likewise.
1878 * spinlock.h (acquire): Use __sched_yield not sched_yield.
1880 * queue.h (enqueue): Enqueue thread according to priority.
1882 * internals.c (struct pthread_start_args): New struct for passing
1883 args to cloning function.
1884 (struct _pthread): Rename to _pthread_descr_struct and adapt for
1887 * Examples/Makefile (clean): Pass -f option to rm.
1889 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
1890 and define TEST_FOR_COMPARE_AND_SWAP.
1891 * sysdeps/i386/i486/pt-machine.h: Removed.
1893 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
1896 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
1898 * restart.h (suspend): Clear p_signal before suspending.
1899 (suspend_with_cancellation): Likewise.
1900 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
1902 * weaks.c: Make __pthread_key_create return 1.
1903 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
1904 __libc_getspecific, __libc_setspecific, and __libc_key_t.
1905 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
1908 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
1910 * sysdeps/sparc/pt-machine (RELEASE): Fix.
1912 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
1914 * sysdeps/powerpc/Implies: Added.
1915 * sysdeps/powerpc/pt-machine.h: Added.
1916 * sysdeps/powerpc/semaphorebits.h: Added.
1918 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
1920 * linuxtheads/pthread.c (__pthread_initial_thread): Correct
1922 (__pthread_manager_thread): Likewise.
1923 Reported by Andreas Jaeger.
1925 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
1927 Since sigset_t no longer fits in a register, we can't pass in the
1928 thread's initial mask so easily. Take this opportunity to simplify
1929 the clone implementation by only accepting a single void* argument.
1931 * linuxthreads/manager.c (__pthread_manager): Put thread vitals
1932 in the thread struct instead of as arguments through clone.
1933 (pthread_start_thread): Look for them there.
1934 * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
1935 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
1936 * linuxthreads/pthread.c (pthread_initialize_manager): Revise