1 2000-06-21 Andreas Jaeger <aj@suse.de>
3 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
6 * join.c: Include <stdlib.h> for exit prototype.
8 2000-06-20 Ulrich Drepper <drepper@redhat.com>
10 * sysdeps/i386/useldt.h: Include <stdlib.h>.
12 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
13 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
15 * Makefile (libpthread-routines): Add barrier.
16 (tests): Add ex9. Add rule to build ex9.
17 * Versions: Export barrier functions.
18 * barrier.c: New file.
19 * Examples/ex9.c: New file.
20 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
21 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
22 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
24 2000-06-19 H.J. Lu <hjl@gnu.org>
26 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
27 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
28 (compare_and_swap_with_release_semantics): New. Default to
29 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
32 * spinlock.c (__pthread_unlock): Call
33 compare_and_swap_with_release_semantics () instead of
36 2000-06-19 Ulrich Drepper <drepper@redhat.com>
38 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
40 * sysdeps/pthread/timer_delete.c: Likewise.
41 * sysdeps/pthread/timer_getoverr.c: Likewise.
42 * sysdeps/pthread/timer_gettime.c: Likewise.
43 * sysdeps/pthread/timer_settime.c: Likewise.
45 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
47 Timer nodes are now reference counted, and can be marked
48 as deleted. This allows for the safe release of the global mutex
49 in the middle without losing the timer being operated on.
51 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
52 member is now an enum with three values, so that an intermediate
53 state can be represented (deleted but not free for reuse yet).
54 New refcount member added.
55 * sysdeps/pthread/timer_routines.c: Likewise.
57 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
58 timer_valid): New inline functions added.
60 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
61 restructured, recursive deadlock bug fixed.
63 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
64 timer_addref to ensure that timer won't be deleted while mutex is not
65 held. Also uses timer_invalid to perform validation of timer handle.
66 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
67 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
69 2000-06-14 Ulrich Drepper <drepper@redhat.com>
71 * shlib-versions: Add entry for SH.
72 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
74 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
76 A few optimizations. Got rid of unnecessary wakeups of timer threads,
77 tightened up some critical regions and micro-optimized some list
80 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
81 Returns int value now to indicate whether timer was queued at head.
82 * sysdeps/pthread/posix-timer.h: Likewise.
83 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
84 new return value from __timer_thread_queue_timer to avoid waking
85 up timer thread unnecessarily.
87 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
88 inuse flag, because this requires mutex to be held. Callers updated
89 to do the check when they have the mutex.
90 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
92 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
93 regions: avoids making system calls while holding timer mutex, and
94 a few computations were moved outside of the mutex as well.
95 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
97 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
98 to list_unlink_ip, meaning idempotent. Pointer manipulation
99 changed to get better better code out of gcc.
100 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
101 version of list_unlink added here.
102 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
103 function in all places: idempotent one for timers, non-idempotent
104 one for thread nodes.
105 * sysdeps/pthread/timer_settime: Likewise.
106 * sysdeps/pthread/timer_routines.c: Likewise.
108 2000-06-13 Ulrich Drepper <drepper@redhat.com>
110 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
111 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
113 * sysdeps/pthread/Makefile: Remove tests definition.
115 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
116 Yutaka Niibe <gniibe@chroot.org>
118 * sysdeps/sh/pspinlock.c: New file.
119 * sysdeps/sh/pt-machine.h: New file.
121 2000-06-12 Ulrich Drepper <drepper@redhat.com>
123 * Makefile (tests): Add joinrace.
125 * Examples/ex6.c: Test return value of pthread_join.
127 2000-06-11 Geoff Keating <geoffk@cygnus.com>
129 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
130 (__pthread_spin_trylock): Implement.
131 (__pthread_spin_unlock): Implement.
132 (__pthread_spin_init): Implement.
133 (__pthread_spin_destroy): Implement.
135 2000-06-10 Ulrich Drepper <drepper@redhat.com>
137 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
138 really append the entry.
140 2000-06-10 Andreas Jaeger <aj@suse.de>
142 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
144 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
146 * sysdeps/pthread/timer_create.c: Thread matching now done on
147 clock type as well as thread attributes.
148 There are individual global signal-delivering threads for
149 different clock types.
150 * sysdeps/pthread/posix-timer.h: Likewise.
151 * sysdeps/pthread/timer_routines.c: Likewise.
153 * sysdeps/pthread/timer_routines.c: Thread allocation and
154 deallocation function now remembers to put thread on active
155 list and remove from active list.
156 Thus now the feature of binding multiple timers
157 to a single thread actually works.
159 2000-06-10 Ulrich Drepper <drepper@redhat.com>
161 * pthread.c (__pthread_create_2_1): Optimize a bit.
163 * internals.h (invalid_handle): Also test for p_terminated != 0.
164 (nonexisting_handle): New function. Same as old invalid_handle.
165 * join.c (pthread_join): Use nonexisting_handle instead of
166 invalid_handle to test for acceptable thread handle.
167 * manager.c (pthread_handle_free): Likewise.
168 * joinrace.c: New file.
169 Reported by Permaine Cheung <pcheung@cygnus.com>.
171 2000-06-08 Ulrich Drepper <drepper@redhat.com>
173 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
174 Correct handling of matching variable.
176 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
179 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
180 Be prepared for empty timer list.
182 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
183 CPUTIME clock ID. Add support for thread clocks.
185 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
186 subtraction were switched.
188 * sysdeps/pthread/timer_routines.c (init_module): Use
189 THREAD_MAXNODES threads.
191 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
192 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
193 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
194 with sigqueueinfo is this system call is available.
196 * sysdeps/pthread/timer_create.c (timer_create): Allow
197 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
199 * sysdeps/pthread/Makefile: New file. Add rules to build timer
201 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
203 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
205 * sysdeps/pthread/posix-timer.h: New file.
206 * sysdeps/pthread/timer_create.c: New file.
207 * sysdeps/pthread/timer_delete.c: New file.
208 * sysdeps/pthread/timer_getoverr.c: New file.
209 * sysdeps/pthread/timer_gettime.c: New file.
210 * sysdeps/pthread/timer_routines.c: New file.
211 * sysdeps/pthread/timer_settime.c: New file.
212 * sysdeps/pthread/tst-timer.c: New file.
214 2000-06-08 Ulrich Drepper <drepper@redhat.com>
216 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
217 LINK_MAX definitions if necessary.
219 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
221 Added missing fork time handling of global libio lock.
223 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
224 not just the individual stream locks. Rewritten to use new
225 iterator interface provided by libio rather than accessing
228 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
229 which lock and unlock the stream list using the new interface
231 * internals.h: Likewise.
233 * ptfork.c (__fork): Now calls __flockfilelist before fork,
234 and __funlockfilelist in the parent after the fork.
235 Child still calls __fresetlockfiles as before.
237 * linuxthreads.texi: Now explains what happens to streams at
238 fork time. Also whole new section on forking and thread added.
239 Definition of pthread_atfork moved out of Miscellaneous Functions
242 2000-06-04 Jakub Jelinek <jakub@redhat.com>
244 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
245 Add missing register.
246 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
248 2000-06-02 Jakub Jelinek <jakub@redhat.com>
250 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
251 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
252 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
254 2000-05-31 Andreas Jaeger <aj@suse.de>
256 * sysdeps/mips/pspinlock.c: Implement spinlocks.
258 2000-05-28 Ulrich Drepper <drepper@redhat.com>
260 * spinlock.c (__pthread_lock): Remove ASSERT.
262 * Makefile (tests): Add ex8.
263 * Examples/ex8.c: New file.
265 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
267 Bugfix: The pthread_atfork mechanism now takes care of its
268 own internal mutex at fork time.
270 * ptfork.c (__fork): Revised so that the mutex is held across
271 the fork operation and while the handlers are called, and so that
272 the child resets the mutex.
274 * linuxthreads.texi: Updated pthread_atfork documentation to make
275 it clear that fork and pthread_atfork can't be reentered from
276 atfork handlers, that pthread_atfork and fork are mutually atomic,
277 and that the handlers are inherited by the child process.
279 2000-05-24 Ulrich Drepper <drepper@redhat.com>
281 * Makefile (libpthread-routines): Add pspinlock.
282 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
283 Use struct _pthread_fastlock instead of pthread_spinlock_t.
284 * condvar.c: Likewise.
285 * internals.h: Likewise.
287 * manager.c: Likewise.
289 * pthread.c: Likewise.
290 * rwlock.c: Likewise.
291 * semaphore.c: Likewise.
292 * signals.c: Likewise.
293 * spinlock.h: Likewise.
294 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
295 * sysdeps/alpha/pspinlock.c: New file.
296 * sysdeps/arm/pspinlock.c: New file.
297 * sysdeps/i386/pspinlock.c: New file.
298 * sysdeps/m68k/pspinlock.c: New file.
299 * sysdeps/mips/pspinlock.c: New file.
300 * sysdeps/powerpc/pspinlock.c: New file.
301 * sysdeps/sparc/sparc32/pspinlock.c: New file.
302 * sysdeps/sparc/sparc64/pspinlock.c: New file.
303 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
304 back to _pthread_fastlock. Define new pthread_spinlock_t.
306 2000-05-24 Andreas Jaeger <aj@suse.de>
308 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
310 2000-05-21 Jakub Jelinek <jakub@redhat.com>
312 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
314 2000-05-13 Jakub Jelinek <jakub@redhat.com>
316 * internals.h (__RES_PTHREAD_INTERNAL): Define.
318 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
320 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
321 object state is represented with additional bits which distinguish
322 whether that state was set up in the current process, or
323 in an ancestor process. If that state was set in an ancestor,
324 it means that a fork happened while thread was executing the init
325 function. In that case, the state is reset to NEVER.
326 * mutex.c (__pthread_once_fork_prepare): New function.
327 (__pthread_once_fork_child): Likewise
328 (__pthread_once_fork_parent): Likewise
329 (__pthread_reset_pthread_once): Removed.
330 * ptfork.c (__fork): Call new handlers in mutex.c.
331 * internals.h: Declarations of new mutex.c functions added.
332 Declaration of removed function deleted.
333 * linuxthreads.texi: Updated documentation about pthread_once
334 to clarify what happens under cancellation and forking.
336 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
338 * internals.h: New thread manager request type, REQ_KICK.
339 * join.c (pthread_exit): main thread now calls exit() instead
340 of _exit() in order to proper process cleanup.
341 * manager.c (__pthread_manager): Do not terminate manager
342 after unblocking main thread; wait for main thread's
343 REQ_PROCESS_EXIT request instead.
344 Also, added REQ_KICK case to handle new request; this just does
346 * manager.c (pthread_exited): Do not terminate manager after
347 unblocking main thread.
348 * manager.c (__pthread_manager_sighandler): If the main thread
349 is waiting for all other threads to die, send a REQ_KICK into
350 the thread manager request pipe to get it to clean out the threads
351 and unblock the main thread as soon as possible. This fixes
352 the 2000 millisecond hang on shutdown bug.
353 * Examples/ex7.c: New file, tests shutdown behavior when all threads
354 including the main one call pthread_exit(), or implicitly do so.
355 * Makefile (tests): Add ex7.
357 2000-05-05 Andreas Jaeger <aj@suse.de>
359 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
360 (pthread_getcpuclockid): Correct test for ourselves.
362 2000-05-05 Ulrich Drepper <drepper@redhat.com>
364 * internals.h (struct _pthread_descr_struct): Reorganization.
365 Allocate room for 16 pointers at head of the structure for future
366 thread-local data handling. Move p_self member in this area.
367 * manager.c (pthread_handle_create): Adjust use of p_self.
368 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
369 * pthread.c (__pthread_initial_thread): Adjust initialization.
370 (__pthread_manager_thread): Likewise.
372 2000-04-29 Bruno Haible <haible@clisp.cons.org>
374 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
375 for eventmask larger than 1 word.
377 2000-04-27 Ulrich Drepper <drepper@redhat.com>
379 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
380 * pthread.c (__pthread_initialize_minimal): New function. Perform
381 minimal initialization.
382 (pthread_initialize): Remove this code here.
383 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
384 are working around the problem in glibc.
386 2000-04-25 Ulrich Drepper <drepper@redhat.com>
388 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
389 now. First gcc must be fixed (more concrete: libgcc).
391 2000-04-24 Ulrich Drepper <drepper@redhat.com>
393 * pthread.c: Remove special treatement for interrupt handlers on x86.
394 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
395 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
397 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
399 2000-04-24 Mark Kettenis <kettenis@gnu.org>
401 * join.c (pthread_exit): Set p_terminated after reporting the
402 termination event instead of before.
404 2000-04-20 Jakub Jelinek <jakub@redhat.com>
406 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
409 2000-04-18 Andreas Jaeger <aj@suse.de>
411 * Versions: Use ld instead of ld.so.
413 2000-04-18 Jakub Jelinek <jakub@redhat.com>
415 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
416 Remove the typedef keyword.
418 2000-04-18 Jakub Jelinek <jakub@redhat.com>
420 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
422 (READ_MEMORY_BARRIER): Define.
423 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
425 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
428 2000-04-17 Ulrich Drepper <drepper@redhat.com>
430 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
431 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
434 2000-04-16 Ulrich Drepper <drepper@redhat.com>
436 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
437 if fast mutex is used. Don't initialize `already_canceled' twice.
438 Correctly test for return value of timedsuspend.
440 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
441 therefore don't need the _rt versions of the signal handlers.
443 2000-04-15 Ulrich Drepper <drepper@redhat.com>
445 * pthread.c (pthread_yield): New function.
446 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
447 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
448 * internals.h: Declare __pthread_yield.
450 * pthread.c (pthread_initialize): Avoid a bit more code if
451 realtime signals are known to exist.
453 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
454 to dynamically detect RT signals and avoid generating compatibility
455 functions with old kernel.
456 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
457 __pthread_restart_new directly.
458 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
459 __pthread_wait_for_restart_signal directly.
460 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
461 __pthread_timedsuspend_new directly.
463 2000-04-15 Ulrich Drepper <drepper@redhat.com>
465 * condvar.c: Remove all the special code to handle cond_timedwait.
466 Use timedsuspend instead.
467 * internals.h: Declare __pthread_timedsuspend_old,
468 __pthread_timedsuspend_new, and __pthread_timedsuspend.
469 Remove declaration of __pthread_init_condvar.
470 * pthread.c: Define __pthread_timedsuspend variable.
471 (__pthread_timedsuspend_old): New function. Timed suspension
472 implementation for old Linux kernels.
473 (__pthread_timedsuspend_new): New function. Timed suspension
474 implementation for new Linux kernels.
475 * restart.h (timedsuspend): New function. Call appropriate
476 suspension function through __pthread_timedsuspend.
477 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
479 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
481 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
483 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
485 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
486 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
488 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
489 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
491 2000-04-14 Andreas Jaeger <aj@suse.de>
495 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
496 2.2 for linuxthreads.
498 2000-04-13 Ulrich Drepper <drepper@redhat.com>
500 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
501 (pthread_getcpuclockid): Fix typo.
503 2000-04-12 Ulrich Drepper <drepper@redhat.com>
505 * Makefile (libpthread-routines): Add getcpuclockid.
506 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
507 * sysdeps/pthread/getcpuclockid.c: New file.
508 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
509 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
511 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
513 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
515 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
516 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
517 and pthread_spin_unlock.
518 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
519 into pthread_spinlock_t. Change all uses.
520 * spinlock.c: Implement pthread_spin_lock.
521 Rename __pthread_unlock to __pthread_spin_unlock and define weak
523 Define pthread_spin_trylock, pthread_spin_init, and
524 pthread_spin_destroy.
525 Change all uses of _pthread_fastlock to pthread_spinlock_t.
526 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
527 Change all uses of _pthread_fastlock to pthread_spinlock_t.
528 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
529 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
530 and pthread_spin_unlock.
531 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
532 Change all uses of _pthread_fastlock to pthread_spinlock_t.
533 * condvar.c: Likewise.
534 * internals.h: Likewise.
536 * manager.c: Likewise.
538 * pthread.c: Likewise.
539 * rwlock.c: Likewise.
540 * semaphore.c: Likewise.
541 * signals.c: Likewise.
543 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
545 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
547 2000-04-11 Ulrich Drepper <drepper@redhat.com>
549 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
550 _POSIX_SHARED_MEMORY_OBJECTS.
552 2000-04-11 Andreas Jaeger <aj@suse.de>
554 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
555 (__compare_and_swap): Mark as modifying memory.
557 2000-04-11 Geoff Keating <geoffk@cygnus.com>
559 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
561 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
562 Don't have the 'asm' __volatile__.
564 2000-04-11 Ulrich Drepper <drepper@redhat.com>
566 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
567 * spinlock.c (__pthread_lock): Add memory barriers.
568 (__pthread_unlock): Likewise.
569 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
571 (RELEASE): Not needed anymore.
572 (__compare_and_swap): Mark asm as modifying memory.
573 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
575 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
576 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
577 (MEMORY_BARRIER): Define using stbar.
578 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
580 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
581 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
582 Mike Burrows <m3b@pa.dec.com>.
584 2000-04-09 Ulrich Drepper <drepper@redhat.com>
586 * signals.c (sigaction): Fix return value for the case SIG is one
587 of the signals the implementation uses.
588 Patch by Xavier.Leroy@inria.fr.
590 2000-04-01 Andreas Jaeger <aj@suse.de>
592 * attr.c: Use shlib-compat macros.
593 * oldsemaphore.c: Likewise.
594 * pthread.c: Likewise.
597 2000-03-26 Ulrich Drepper <drepper@redhat.com>
599 * semaphore.c (sem_timedwait): New function.
600 Patch by Carl Mailloux <carlm@oricom.ca>.
601 * semaphore.h: Declare sem_timedwait.
602 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
604 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
606 * sysdeps/pthread/Makefile: File removed.
608 2000-03-23 Ulrich Drepper <drepper@redhat.com>
610 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
611 * internals.h (__pthread_reset_pthread_once): Add prototype.
612 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
614 * manager.c (pthread_handle_create): Store ID of new thread before
617 2000-03-21 Ulrich Drepper <drepper@redhat.com>
619 * attr.c: Use new macros from shlib-compat.h to define versions.
620 * oldsemaphore.c: Likewise.
621 * semaphore.c: Likewise.
624 * pthread.c: Update for new SHLIB_COMPAT definition.
626 * manager.c (__pthread_manager): Unmask debug signal.
628 * pthread.c (pthread_initialize): Test for address of __dso_handle
629 being NULL, not value. Use __on_exit, not on_exit.
630 Patch by Andreas Jaeger <aj@suse.de>.
632 * pthread.c: Use new macros from shlib-compat.h to define versions.
634 2000-03-19 Ulrich Drepper <drepper@redhat.com>
636 * pthread.c (pthread_initialize): Instead of on_exit use
637 __cxa_atexit if __dso_label is available to allow unloading the
638 libpthread shared library.
640 2000-03-16 Ulrich Drepper <drepper@redhat.com>
642 * condvar.c: Make tests for ownership of mutex less strict.
644 2000-03-14 Ulrich Drepper <drepper@redhat.com>
646 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
647 current thread and return error if not.
648 (pthread_cond_timedwait_relative_old): Likewise.
649 (pthread_cond_timedwait_relative_new): Likewise.
651 * mutex.c (__pthread_once): Handle cancelled init function correctly.
652 (pthread_once_cancelhandler): New function.
653 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
655 2000-03-14 Andreas Jaeger <aj@suse.de>
657 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
659 (pthread_handle_sigrestart_rt): Likewise.
660 * signals.c (pthread_sighandler_rt): Likewise.
662 2000-03-02 Andreas Jaeger <aj@suse.de>
664 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
665 Reported by Sean Chen <sean.chen@turbolinux.com>.
667 2000-02-28 Andreas Jaeger <aj@suse.de>
669 * rwlock.c: Fix typo.
671 2000-02-27 Ulrich Drepper <drepper@redhat.com>
673 * rwlock.c: Define __* variants of the functions and make old names
675 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
676 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
678 2000-02-25 Andreas Jaeger <aj@suse.de>
680 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
681 pwrite64, lseek64, open64, and __open64 with version 2.2.
683 2000-02-22 Ulrich Drepper <drepper@redhat.com>
685 * semaphore.h (SEM_FAILED): Use 0 not NULL.
687 2000-02-14 Ulrich Drepper <drepper@redhat.com>
689 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
690 nanosleep does not work either. Get absolute time inside the
692 (pthread_cond_timedwait_relative_new): Likewise.
693 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
695 2000-02-13 Andreas Jaeger <aj@suse.de>
697 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
698 (pthread_cond_timedwait_relative_old): Likewise.
700 2000-02-13 Ulrich Drepper <drepper@redhat.com>
702 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
703 but keep the code around. A bug in the kernel prevent us from
705 (pthread_cond_timedwait_relative_new): Likewise.
706 (PR libc/1597 and libc/1598).
708 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
710 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
711 loop around nanosleep calls instead of around most of the function
712 (pthread_cond_timedwait_relative_new): Likewise.
713 body. Got rid of backwards goto and one local.
715 2000-01-31 Ulrich Drepper <drepper@redhat.com>
717 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
718 before every nanosleep call to account for time spent in the rest
720 (pthread_cond_timedwait_relative_new): Likewise.
721 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
723 2000-01-29 Ulrich Drepper <drepper@redhat.com>
725 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
726 from nanosleep call so that in case we restart we only wait for the
728 (pthread_cond_timedwait_relative_new): Likewise.
729 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
731 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
733 * manager.c (pthread_allocate_stack): Compute guard page address
734 correctly. Patch by HJ Lu.
736 * sysdeps/pthread/pthread.h: Define
737 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
739 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
741 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
743 (pthread_rwlockattr_setkind_np): Allow
744 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
745 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
747 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
749 * internals.h (pthread_readlock_info): New structure.
750 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
751 p_untracked_readlock_count.
752 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
753 Add initializers for new fields.
754 * manager.c (pthread_free): Free read/write lock lists.
755 * queue.h (queue_is_empty): New function.
756 * rwlock.c: Implement requirements about when readers should get
758 * sysdeps/pthread/pthread.h
759 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
760 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
761 Define this name as well.
762 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
764 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
766 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
767 Adjust initializers for struct _pthread_descr_struct change.
768 * internals.h (struct _pthread_descr_struct): Move new elements to
771 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
773 Redesigned how cancellation unblocks a thread from internal
774 cancellation points (sem_wait, pthread_join,
775 pthread_cond_{wait,timedwait}).
776 Cancellation won't eat a signal in any of these functions
777 (*required* by POSIX and Single Unix Spec!).
778 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
779 simultaneous condition variable signal (not required by POSIX
780 or Single Unix Spec, but nice).
781 * spinlock.c: __pthread_lock queues back any received restarts
782 that don't belong to it instead of assuming ownership of lock
783 upon any restart; fastlock can no longer be acquired by two threads
785 * restart.h: Restarts queue even on kernels that don't have
786 queued real time signals (2.0, early 2.1), thanks to atomic counter,
787 avoiding a rare race condition in pthread_cond_timedwait.
789 1999-12-31 Andreas Jaeger <aj@suse.de>
791 * internals.h: Remove duplicate prototype declarations.
793 * weaks.c: Remove __THROW from prototypes since the file is not
794 compiled by a C++ compiler.
795 * internals.h: Likewise.
797 1999-12-30 Andreas Jaeger <aj@suse.de>
799 * sysdeps/pthread/pthread.h: Move internal functions to...
800 * sysdeps/pthread/bits/libc-lock.h: ...here.
802 1999-12-29 Andreas Jaeger <aj@suse.de>
804 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
806 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
808 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
811 * manager.c (__pthread_start): Add one more cast to prevent
812 warning on 64bit machines.
814 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
816 * manager.c (pthread_handle_create): Set p_pid of new thread
817 before calling the callback function to report a new thread.
819 1999-12-20 Andreas Jaeger <aj@suse.de>
821 * pthread.c (pthread_initialize): Move getrlimit call after
824 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
826 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
827 pwrite64, lseek64, open64, and __open64.
828 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
829 pwrite64, lseek64, open64, and __open64.
831 * manager.c (pthread_allocate_stack): Correct computation of
832 new_thread_bottom. Correct handling of stack size and when the
833 rlimit method to guard for stack growth is used.
834 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
835 minus one pagesize (not two).
837 1999-12-03 Andreas Jaeger <aj@suse.de>
839 * Versions: Add __res_state with version GLIBC_2.2.
841 * errno.c (__res_state): New function to return thread specific
844 * pthread.c (pthread_initialize): Initialize p_resp.
845 (__pthread_reset_main_thread): Also set p_resp.
847 * manager.c (pthread_handle_create): Initialize p_resp.
849 * internals.h: Add thread specific resolver state.
850 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
852 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
854 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
856 * sysdeps/i386/i686/pt-machine.h: Likewise.
857 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
859 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
861 * manager.c (pthread_start_thread_event): Initialize p_pid already
864 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
866 * internals.h: Add prototype for __pthread_manager_event.
867 * manager.c (__pthread_manager_event): New function.
868 (pthread_start_thread_event): Correct computation of self.
869 Use INIT_THREAD_SELF.
870 * pthread.c (__pthread_manager_thread): Initialize p_lock.
871 (__pthread_initialize_manager): Respect event flags also for creation
872 of the manager thread.
874 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
876 * pthread.c (__pthread_initialize_manager): Initialize
877 __pthread_manager_thread.p_tid.
879 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
881 * internals.h: Declare __pthread_last_event.
882 * manager.c: Define __pthread_last_event.
883 (pthread_handle_create): Set __pthread_last_event.
884 (pthread_exited): Likewise.
885 * join.c (pthread_exit): Likewise.
887 * Makefile (libpthread-routines): Add events.
888 * events.c: New file.
889 * internals.h: Protect against multiple inclusion.
890 Include thread_dbP.h header.
891 (struct _pthread_descr_struct): Add new fields p_report_events and
893 Declare event reporting functions.
894 * join.c (pthread_exit): Signal event if this is wanted.
895 * manager.c (__pthread_threads_events): New variable.
896 (pthread_handle_create): Take new parameters with event information.
897 Signal TD_CREATE event if wanted.
898 (__pthread_manager): Adjust pthread_handle_create call.
899 (pthread_start_thread_event): New function. Block until manager is
900 finished and then call pthread_start_thread.
901 (pthread_exited): Signal TD_REAP event if wanted.
903 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
905 * restart.h (suspend_with_cancellation): Rewrite as a macro.
907 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
909 1999-10-25 Andreas Jaeger <aj@suse.de>
911 * internals.h: Remove K&R compatibility.
912 * no-tsd.c: Likewise.
913 * semaphore.h: Likewise.
914 * signals.c: Likewise.
915 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
916 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
919 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
921 * linuxthreads/pthread.c: For i386, wrap pthread_handle_sigrestart
922 and pthread_handle_sigcancel with functions that restore
923 %gs from the signal context. For each signal handling function,
924 two wrappers are required, one for a non-RT signal and one for
926 * linuxthreads/signal.c: For i386, add code to restore %gs
927 from the signal context in pthread_sighandler and
928 pthread_sighandler_rt.
930 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
932 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
934 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
936 * pthread.c (__pthread_initial_thread): Pass argument to
937 PTHREAD_START_ARGS_INITIALIZER.
938 (__pthread_manager_thread): Likewise.
940 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
943 * manager.c (pthread_handle_create): Remove p_startfct initialization.
945 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
947 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
949 * internals.h: Correct return types for __libc_read and __libc_write.
951 1999-10-09 Andreas Jaeger <aj@suse.de>
953 * internals.h: Add __new_sem_post to get prototype in
954 manager.c; include semaphore.h for needed types.
956 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
958 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
959 directly instead of calling sem_post which should not be necessary
960 but is faster and might help in some case to work around problems.
961 Patch by khendricks@ivey.uwo.ca [libc/1382].
963 1999-10-08 Andreas Schwab <schwab@suse.de>
965 * sysdeps/pthread/Subdirs: New file.
968 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
971 * internals.h (struct _pthread_descr_struct): Add p_startfct.
972 * manager.c (pthread_handle_create): Initialize p_startfct.
973 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
975 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
977 * manager.c (__linuxthreads_pthread_threads_max): New variable.
978 * specific.c (__linuxthreads_pthread_keys_max): New variable.
979 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
981 * condvar.c (pthread_cond_timedwait_relative): Never return with
982 EINTR. Patch by Andreas Schwab.
984 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
986 * signals.c (sigaction): Correct last patch. Don't select
987 pthread_sighandler_rt based on the signal number but instead of
990 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
992 * specific.c: Move definitions of struct pthread_key_struct and
993 destr_function to ...
994 * internals.h: ...here.
996 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
998 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
999 this instead of pthread_handle_sigrestart if the signal is an RT
1002 * signals.c: Handle passing through of sighandler arguments also
1003 for real-time signals.
1005 1999-09-03 Andreas Schwab <schwab@suse.de>
1007 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
1009 (__vfork): New function, alias vfork.
1010 * Versions: Export __fork, vfork, and __vfork in libpthread.
1012 1999-08-23 Andreas Schwab <schwab@suse.de>
1014 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
1015 call to signal handler.
1017 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
1019 * pthread.c (__pthread_reset_main_thread): Undo last change.
1020 (__pthread_kill_other_threads_np): Reset signal handlers for the
1021 signals we used in the thread implementation here.
1023 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
1025 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
1026 for the signals we used in the thread implementation [PR libc/1234].
1028 * Versions: Export __pthread_kill_other_threads_np from libpthread
1031 * signals.c: Pass sigcontext through wrapper to the user function.
1033 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
1035 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
1036 __libc_internal_tsd_set.
1038 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1040 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
1043 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1045 * internals.h: Align _pthread_descr_struct to 32 bytes.
1046 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
1049 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
1051 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
1054 1999-07-09 Cristian Gafton <gafton@redhat.com>
1056 * Makefile (libpthread-routines): Add oldsemaphore routine.
1057 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
1058 sem_trywait, and sem_wait to GLIBC_2.1.
1059 * oldsemaphore.c: New file.
1060 * semaphore.c: Add default_symbol_versions for the changed functions.
1061 (__new_sem_init): Rename from sem_init.
1062 (__new_sem_post): Rename from sem_post.
1063 (__new_sem_wait): Rename from sem_wait.
1064 (__new_sem_trywait): Rename from sem_trywait.
1065 (__new_sem_getvalue): Rename from sem_getvalue.
1066 (__new_sem_destroy): Rename from sem_destroy.
1068 1999-06-23 Robey Pointer <robey@netscape.com>
1070 * internals.h: Added p_nextlock entry to separate queueing for a
1071 lock from queueing for a CV (sometimes a thread queues on a lock
1072 to serialize removing itself from a CV queue).
1073 * pthread.c: Added p_nextlock to initializers.
1074 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
1076 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
1078 * manager.c (pthread_handle_create): Free mmap region after stack
1079 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
1081 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1083 * man/pthread_cond_init.man: Correct example.
1084 Reported by Tomas Berndtsson <tomas@nocrew.org>.
1086 * linuxthreads.texi (Condition Variables): Likewise.
1088 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
1090 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
1091 casx not cas, also successful casx returns the old value in rd
1092 and not the new value.
1094 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
1096 * manager.c: If pthread_create() is given a NULL attribute
1097 and the thread manager runs with a realtime policy, set the
1098 scheduling policy of the newly created thread back to SCHED_OTHER.
1099 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
1100 initialize the schedpolicy field of new_thread->p_start_args
1101 to that of the calling thread.
1103 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
1105 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
1106 instruction does not allow memory element to use offset.
1108 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
1110 * manager.c (pthread_allocate_stack): Optimize initialization of new
1113 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
1114 Don't use initializer since it is all zeroes.
1115 (__libc_once_define): Likewise.
1117 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1119 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
1120 doesn't exist anymore.
1121 * sysdeps/i386/Implies: Likewise.
1122 * sysdeps/m68k/Implies: Likewise.
1123 * sysdeps/mips/Implies: Likewise.
1124 * sysdeps/powerpc/Implies: Likewise.
1125 * sysdeps/sparc/sparc32/Implies: Likewise.
1126 * sysdeps/sparc/sparc64/Implies: Likewise.
1128 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
1130 * sysdeps/alpha/bits/semaphore.h: Removed.
1131 * sysdeps/powerpc/bits/semaphore.h: Removed.
1132 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1133 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1134 * Makefile (headers): Remove bits/semaphore.h.
1136 * semaphore.h: Define _pthread_descr if necessary.
1137 Don't include limits.h. Define SEM_VALUE_MAX directly.
1139 (sem_t): Protect element names with leading __.
1140 Add declarations for sem_close, sem_open, and sem_unlink.
1141 * semaphore.c: Adjust all functions for new element names.
1142 Define sem_close, sem_open, and sem_unlink.
1143 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
1145 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
1148 1999-03-16 H.J. Lu <hjl@gnu.org>
1150 * specific.c (pthread_key_delete): Check th->p_terminated to see
1151 if the thread is running.
1153 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
1154 Added to GLIBC_2.0 for libc.so.
1156 1999-02-12 H.J. Lu <hjl@gnu.org>
1158 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
1159 __libc_allocate_rtsig): Added to GLIBC_2.1.
1161 * internals.h (DEFAULT_SIG_RESTART): Removed.
1162 (DEFAULT_SIG_CANCEL): Removed.
1164 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
1165 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
1166 (__pthread_sig_restart, __pthread_sig_cancel,
1167 __pthread_sig_debug): Initialized.
1168 (pthread_initialize): Call init_rtsigs () to initialize
1171 1999-02-03 H.J. Lu <hjl@gnu.org>
1173 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
1174 Don't restart the thread which sent REQ_DEBUG.
1175 (pthread_start_thread): Check if __pthread_sig_debug > 0
1178 * pthread.c (__pthread_initialize_manager): Suspend ourself
1179 after sending __pthread_sig_debug to gdb instead of
1180 __pthread_sig_cancel.
1182 1999-01-24 H.J. Lu <hjl@gnu.org>
1184 * manager.c (__pthread_manager): Delete __pthread_sig_debug
1185 from mask if __pthread_sig_debug > 0.
1186 (pthread_handle_create): Increment __pthread_handles_num.
1188 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
1189 * pthread.c (__pthread_initialize_manager): Likewise.
1191 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
1192 instead of __libc_allocate_rtsig (2).
1193 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
1194 instead of __pthread_sig_cancel.
1195 (pthread_handle_sigdebug): Fix comments.
1197 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
1199 * manager.c (pthread_allocate_stack): Set
1200 __pthread_nonstandard_stacks if user-specified stack is used.
1202 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
1204 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1205 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1207 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
1209 * pthread.c: Use a third signal __pthread_sig_debug distinct
1210 from __pthread_sig_cancel to notify gdb when a thread is
1212 * manager.c: Likewise.
1213 * internals.h: Likewise.
1214 * signals.c: The implementation of sigwait(s) assumed that
1215 all signals in s have signal handlers already attached.
1216 This is not required by the standard, so make it work
1217 also if some of the signals have no handlers.
1219 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1221 * linuxthreads.texi: Remove pointers from first @node. Move old
1222 @node spec inside comment.
1224 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
1226 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1229 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
1231 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1232 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1234 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
1236 * manager.c: Threads now send __pthread_sig_cancel on termination.
1237 Change clone call and signal masks.
1238 * thread.c (pthread_handle_sigrestart): Remove special code for
1240 (pthread_handle_sigcancel): In manager thread call
1241 __pthread_manager_sighandler.
1242 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1243 * sysdeps/i386/i686/pt-machine.h: Likewise.
1244 Patches by Xavier Leroy.
1246 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
1248 * spinlock.c (__pthread_unlock): Don't crash if called for an
1249 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1251 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1254 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
1256 * Examples/ex3.c: Wait until all threads are started before
1257 searching for the number to avoid race condition on very fast
1260 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1262 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
1263 declaration since it's not needed.
1265 * sysdeps/pthread/pthread.h: Move internal functions to ...
1266 * internals.h: ...here.
1268 1998-12-02 H.J. Lu <hjl@gnu.org>
1270 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1271 SIGRTMIN is defined.
1272 (__pthread_sig_cancel): Likewise.
1274 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1276 * wrapsyscall.c: Include <sys/mman.h> for msync,
1277 <stdlib.h> for system and <termios.h> for tcdrain prototype.
1278 Correct msync declaration.
1280 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
1282 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1283 __libc_tsd_set): New macros for new interface.
1284 * no-tsd.c: New file, provide uninitialized defns of
1285 __libc_internal_tsd_get and __libc_internal_tsd_set.
1286 * Makefile (routines): Add no-tsd.
1288 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
1290 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1291 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1292 __libc_internal_tsd_set): Move decls to ...
1293 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1296 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1297 __libc_internal_tsd_set): Make these pointers to functions, not
1298 functions; remove #pragma weak decls for them.
1299 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1300 Define static functions and initialized pointers to them.
1302 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
1304 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1305 (CFLAGS-specific.c): Likewise.
1306 (CFLAGS-pthread.c): Likewise.
1307 (CFLAGS-ptfork.c): Likewise.
1308 (CFLAGS-cancel.c): Likewise.
1309 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1310 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1312 * mutex.c (pthread_mutex_init): Define as strong symbol.
1313 (pthread_mutex_destroy): Likewise.
1314 (pthread_mutex_trylock): Likewise.
1315 (pthread_mutex_lock): Likewise.
1316 (pthread_mutex_unlock): Likewise.
1317 (pthread_mutexattr_init): Likewise.
1318 (pthread_mutexattr_destroy): Likewise.
1319 (pthread_once): Likewise.
1320 * ptfork.c (pthread_atfork): Likewise.
1321 * specific.c (pthread_key_create): Likewise.
1322 (pthread_setspecific): Likewise.
1323 (pthread_getspecific): Likewise.
1325 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1327 * linuxthreads.texi: Fix punctuation after xref.
1329 1998-11-10 H.J. Lu <hjl@gnu.org>
1331 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1332 if it is defined in <linux/limits.h>.
1334 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
1336 * spinlock.h (__pthread_trylock): Define inline.
1337 (__pthread_lock): Add extra parameter to declaration. Declare
1338 using internal_function.
1339 (__pthread_unlock): Declare using internal_function.
1340 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
1341 of local variable self. Avoid recomputing self. Define using
1343 (__pthread_trylock): Remove.
1344 (__pthread_unlock): Define using internal_function.
1345 * cancel.c: Adjust for __pthread_lock interface change. Use already
1346 computed self value is possible.
1347 * condvar.c: Likewise.
1349 * manager.c: Likewise.
1350 * mutex.c: Likewise.
1351 * pthread.c: Likewise.
1352 * rwlock.c: Likewise.
1353 * semaphore.c: Likewise.
1354 * signals.c: Likewise.
1356 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
1358 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1359 __ to field names of the struct.
1360 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1362 (pthread_attr_t): Likewise.
1363 (pthread_cond_t): Likewise.
1364 (pthread_condattr_t): Likewise.
1365 (pthread_mutex_t): Likewise.
1366 (pthread_mutexattr_t): Likewise.
1367 (pthread_rwlock_t): Likewise.
1368 (pthread_rwlockattr_t): Likewise.
1369 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1370 * cancel.c: Likewise.
1371 * condvar.c: Likewise.
1372 * manager.c: Likewise.
1373 * mutex.c: Likewise.
1374 * pthread.c: Likewise.
1375 * ptlongjmp.c: Likewise.
1376 * rwlock.c: Likewise.
1377 * spinlock.c: Likewise.
1379 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
1381 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1384 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1387 * Makefile (libpthread-routines): Add pt-machine.
1388 * pt-machine.c: New file.
1389 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1390 yet defined. Use PT_EI in extern inline definitions.
1391 * sysdeps/arm/pt-machine.h: Likewise.
1392 * sysdeps/i386/pt-machine.h: Likewise.
1393 * sysdeps/i386/i686/pt-machine.h: Likewise.
1394 * sysdeps/m68k/pt-machine.h: Likewise.
1395 * sysdeps/mips/pt-machine.h: Likewise.
1396 * sysdeps/powerpc/pt-machine.h: Likewise.
1397 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1398 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1400 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1402 * semaphore.h: Include <sys/types.h> so that _pthread_descr
1405 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
1407 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1409 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1411 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1413 * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Add
1414 multiple inclusion guard.
1416 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1418 * signals.c (sigaction): Check that sig is less than NSIG to avoid
1419 array index overflow.
1421 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
1423 * sysdeps/pthread/semaphore.h: New file.
1425 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
1427 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1428 _LIBC_TSD_KEY_DL_ERROR.
1430 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
1432 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1433 * sysdeps/i386/pt-machine.h: Likewise.
1434 Suggested by Roland McGrath.
1436 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
1438 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1439 access thread data with non-constant offsets.
1440 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1443 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
1444 THREAD_SETMEM_NC definitions.
1446 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1448 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1450 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
1452 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1453 not already defined.
1454 (struct _pthread_descr_struct): Add p_self and p_nr field.
1455 * manager.c (__pthread_handles): Define second element to point
1457 (__pthread_handles_num): Initialize to 2.
1458 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1459 (pthread_start_thread): Likewise.
1460 (pthread_handle_create): Start search for free slot at entry 2.
1461 Initialize new fields p_self and p_nr.
1462 Call __clone with CLONE_PTRACE if available.
1463 (pthread_free): Call FREE_THREAD_SELF if available.
1464 * pthread.c (__pthread_initial_thread): Initialize new fields.
1465 (__pthread_manager_thread): Likewise.
1466 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1468 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1469 elements of the thread descriptor.
1470 * condvar.c: Likewise.
1471 * errno.c: Likewise.
1473 * manager.c: Likewise.
1474 * pthread.c: Likewise.
1475 * ptlongjmp.c: Likewise.
1476 * semaphore.c: Likewise.
1477 * signals.c: Likewise.
1478 * specific.c: Likewise.
1479 * spinlock.c: Likewise.
1481 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1483 * sysdeps/i386/useldt.h: New file.
1484 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1486 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1487 THREAD_SETMEM using __thread_self.
1488 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1490 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
1492 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1493 turned out that we didn't need to queue after all.
1495 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
1497 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1498 and wastes space; correct types.
1500 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
1502 * signals.c (sigaction): Handle NULL argument.
1504 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
1506 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1509 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1511 * Makefile (linuxthreads-version): Extract correct number from
1514 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
1516 * Banner: Bump version number to 0.8
1517 * FAQ.html: Many updates, in particular w.r.t. debugging.
1518 * manager.c: Support for non-default stacksize for
1519 LinuxThreads-allocated stacks;
1520 don't use guard pages for stacks with default size, rely on
1521 rlimit(RLIMIT_STACK) instead (it's cheaper).
1523 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1524 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1525 * condvar.c: Likewise.
1526 * internals.h: Likewise.
1527 * restart.h: Likewise.
1528 * signals.c: Likewise.
1529 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1531 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1533 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1534 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
1535 * Versions: Put __pthread_mutexattr_settype under version
1536 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
1537 __pthread_mutexattr_gettype.
1539 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1541 * sysdeps/pthread/bits/libc-lock.h: Make
1542 __pthread_mutexattr_settype weak. Don't make
1543 __pthread_mutexattr_setkind_np weak.
1545 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
1547 * manager.c (pthread_handle_create): Check whether sched_setscheduler
1548 call can succeed here.
1550 * mutex.c: Define __pthread_mutexattr_settype and make
1551 __pthread_mutexattr_setkind_np an alias.
1552 Likewise for __pthread_mutexattr_gettype.
1554 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1556 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1559 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
1561 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1563 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1565 * Examples/ex6.c: Include <unistd.h> for usleep.
1567 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1569 * Examples/ex4.c (main): Use exit, not pthread_exit.
1571 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
1573 * Versions: Add __pthread_mutexattr_gettype and
1574 __pthread_mutexattr_settype.
1575 * lockfile.c: Use __pthread_mutexattr_settype instead of
1576 __pthread_mutexattr_setkind_np.
1577 * mutex.c: Define __pthread_mutexattr_gettype and
1578 __pthread_mutexattr_settype.
1580 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1581 __pthread_mutexattr_settype.
1582 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1583 Use __pthread_mutexattr_settype.
1585 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
1587 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1588 * mutex.c: Define weak alias pthread_mutexattr_gettype and
1589 pthread_mutexattr_settype.
1590 * sysdeps/pthread/pthread.h: Declare these functions.
1591 Move pthread_sigmask and pthread_kill declaration in separate header.
1592 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1594 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
1596 * Makefile: Add rules to compile and run tests.
1597 * Examples/ex1.c: Little changes to fix warnings.
1598 * Examples/ex2.c: Likewise.
1599 * Examples/ex3.c: Likewise.
1600 * Examples/ex4.c: Likewise.
1601 * Examples/ex5.c: Likewise.
1602 * Examples/ex6.c: New file.
1604 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
1606 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
1608 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1610 * attr.c: Include <string.h>.
1612 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
1614 * attr.c: Include errno.h. Use memcpy to copy sched_param.
1615 * internals.h: Include limits.h.
1616 * manager.c: Use memcpy to copy sched_param.
1617 * ptfork.c: Include errno.h.
1618 * pthread.c: Likewise.
1619 * semaphore.c: Likewise.
1620 * specific.c: Likewise.
1621 * spinlock.h: Likewise.
1622 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
1623 type definition to ...
1624 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
1626 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
1628 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
1630 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
1631 as macros as demanded in POSIX.1, Annex C.
1633 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
1635 * internals.h (struct pthread_request): For free use pthread_t
1636 instead of pthread_descr.
1637 * join.c (pthread_join): Pass thread_id, not th to manager.
1638 (pthread_detach): Likewise.
1639 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
1640 (pthread_exited): Remove detached queue code.
1641 (pthread_handle_free): Expect thread ID parameter and use it to
1642 validate the thread decsriptor. Don't use detached queue.
1643 Patches by Xavier Leroy.
1645 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1647 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
1648 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
1649 __pthread_atfork, __pthread_key_create, __pthread_once.
1650 * internals.h: Doc fix.
1651 * pthread.c (__pthread_initialize): Define again.
1653 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
1655 * manager.c (pthread_exited): If thread is not detached put it on
1657 (pthread_handle_free): If thread is not on list with living threads
1658 search on list with detached threads.
1660 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
1661 for new definition of pthread_rwlock_t.
1663 * spinlock.c: Correct test whether to compile
1664 __pthread_compare_and_swap or not.
1666 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
1668 * attr.c: Finish user stack support. Change locking code to be safe
1669 in situations with different priorities.
1670 * cancel.c: Likewise.
1671 * condvar.c: Likewise.
1672 * internals.h: Likewise.
1674 * manager.c: Likewise.
1675 * mutex.c: Likewise.
1676 * pthread.c: Likewise.
1677 * ptlongjmp.c: Likewise.
1678 * queue.h: Likewise.
1679 * rwlock.c: Likewise.
1680 * semaphore.c: Likewise.
1681 * semaphore.h: Likewise.
1682 * signals.c: Likewise.
1683 * spinlock.c: Likewise.
1684 * spinlock.h: Likewise.
1685 * sysdeps/pthread/pthread.h: Likewise.
1686 Patches by Xavier Leroy.
1688 * sysdeps/i386/i686/pt-machine.h: New file.
1690 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
1692 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
1693 [sg]et_stackaddr prototypes always available.
1695 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1696 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
1698 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
1700 * manager.c (pthread_free): Undo patch from 980430.
1701 Reported by David Wragg <dpw@doc.ic.ac.uk>.
1703 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
1705 * manager.c: Define __pthread_manager_adjust_prio and use it to
1706 increase priority when needed.
1707 * internals.h: Add prototype for __pthread_manager_adjust_prio.
1708 * mutex.c: Optimize mutexes to wake up only one thread.
1709 * pthread.c: Move PID of manager for global variable in structure
1711 Patches by Xavier Leroy.
1713 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
1715 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
1717 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1719 * attr.c: Correct typo.
1721 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
1723 * manager.c (pthread_free): Unmap guard before the stack.
1724 Patch by Matthias Urlichs.
1726 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
1728 * manager.c (pthread_free): Detect already free child.
1729 Patch by Xavier Leroy, reported by Matthias Urlichs.
1731 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1733 * Makefile (linuxthreads-version): Renamed back from
1736 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
1738 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
1741 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
1743 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
1744 * internals.h: Add definitions for new spinlock implementation.
1745 * ptlongjmp.c: New file.
1746 * spinlock.c: New file.
1747 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
1748 new function __pthread_acquire to prevent deadlocks with thread
1749 with different priorities.
1750 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
1752 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1754 * manager.c (__pthread_manager): Reduce first argument to select
1755 to include just the needed file descriptor.
1757 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
1759 * manager.c: Fix last patch which caused core dumps.
1761 * pthread.c: Correctly handle missing SIGRTMIN.
1763 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1765 * libpthread.map: Add __libc_internal_tsd_get and
1766 __libc_internal_tsd_set. Add missing cancelable functions. Export
1767 libc internal versions of the cancelable functions.
1769 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
1771 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
1773 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
1775 * attr.c: Implement pthread_attr_[gs]etguardsize,
1776 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
1777 Change pthread_attr_init to have two interfaces.
1778 * internals.h (struct _pthread_descr_struct): Add new fields for
1780 * libpthread.map: Add names in GLIBC_2.1 section.
1781 * manager.c (pthread_handle_create): Implement guardsize and
1783 (pthread_free): Likewise.
1784 * pthread.c (pthread_create): Add new interface for changed
1786 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1787 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
1790 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
1792 * manager.c: Enable resetting of the thread scheduling policy
1793 to SCHED_OTHER when the parent thread has a different one.
1795 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
1797 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1798 _POSIX_ASYNCHRONOUS_IO.
1800 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
1802 * mutex.c: Implement new mutex types.
1804 * internals.h: Include <signal.h>.
1806 * libpthread.map: Add __erno_location and __h_errno_location.
1808 * errno.c: Return pointer to variable actually in use. This might
1809 not be the one in the thread structure.
1810 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
1812 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
1813 of manager thread structure.
1814 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
1816 * pthread.c: Adapt initializer for thread structures.
1817 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
1818 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
1819 current thread to global variables.
1821 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
1823 * rwlock.c: New file.
1824 * Makefile (libpthread-routines): Add rwlock.
1825 * sysdeps/pthread/pthread.h: Define data structures and declare
1827 * libpthread.map: Add new functions.
1829 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
1831 * sysdeps/arm/pt-machine.h: New file; add ARM support.
1832 * sysdeps/arm/Implies: likewise.
1833 * README: Document it.
1835 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1837 * signals.c: Remove unneeded initializer for sigwaited, saving a
1840 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1842 * semaphore.c (sem_init): Set sem_spinlock only if available.
1844 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
1846 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
1847 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
1849 * Makefile: Update from LinuxThreads 0.7.
1850 * internals.h. Likewise.
1851 * manager.c: Likewise.
1852 * mutex.c: Likewise.
1853 * pthread.c: Likewise.
1854 * signals.c: Likewise.
1855 * specific.c: Likewise.
1856 * Examples/ex3.c: Likewise.
1858 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
1860 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
1863 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
1865 * wrapsyscall.c: Add socket functions which are also cancelation
1868 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
1870 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
1871 New functions for fast thread specific data within libc.
1873 * internals.h: Add new array p_libc_specific to struct
1874 _pthread_descr_struct.
1876 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
1878 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
1880 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
1881 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1883 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
1885 * internals.h (struct _pthread_descr_struct): Add definitions for
1886 two-level specific key handling.
1887 * manager.c (pthread_handle_create): Initialize specific memory array.
1888 * specific.c: Implement two-level key handling.
1889 * weaks.c: Don't provide dummy key handling.
1890 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
1891 Add definition of __libc_key_t.
1892 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
1894 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
1895 PTHREAD_DESTRUCTOR_ITERATIONS.
1897 * manager.c (pthread_handle_create): Compare mmap result with
1900 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
1901 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
1903 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
1905 sysdeps/sparc -> sysdeps/sparc/sparc32
1906 sysdeps/sparc64 -> sysdeps/sparc/sparc64
1908 * internals.h: Change definition of THREAD_SELF to be an expression,
1909 not a statement that did a return.
1910 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
1911 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1912 Follow Solaris and use a "system reserved" register (%g6) to hold
1913 the thread descriptor.
1914 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1916 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
1918 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
1919 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
1920 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
1922 * semaphore.c: Include spinlock.h only when needed.
1924 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
1925 keys for entries not in use.
1927 * weaks.c: Implement key handling functions for real.
1929 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
1931 Initial sparc64-linux support:
1932 * linuxthreads/sysdeps/sparc64/Implies: New file.
1933 * linuxthreads/sysdeps/sparc64/pt-machine.h: Likewise.
1935 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
1937 * semaphore.c: Include spinlock.h at correct place.
1940 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
1942 The Great Bit File Move:
1943 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
1944 * sysdeps/powerpc/semaphorebits.h: Likewise.
1945 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
1946 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
1947 * sysdeps/pthread/libc-lock.h: -> bits/
1948 * sysdeps/pthread/stdio-lock.h: Likewise.
1949 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
1950 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
1951 * semaphore.h: Likewise.
1952 * sysdeps/pthread/pthread.h: Likewise.
1954 * lockfile.c: <foo.h> -> <bits/foo.h>.
1955 * semaphore.h: Likewise.
1957 * Makefile: (headers): foo.h -> bits/foo.h.
1958 * sysdeps/pthread/Makefile: Likewise.
1960 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1962 * semaphore.c (sem_init): Set sem_spinlock only if available.
1964 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
1967 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
1969 Update from LinuxThreads 0.6.
1971 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
1972 and __sched_get_priority_min instead of names without `__'.
1974 * manager.c: Rewrite large parts to implement opaque pthread_t.
1976 * cancel.c: Adapt for opaque pthread_t type.
1977 * condvar.c: Likewise.
1978 * errno.c: Likewise.
1980 * mutex.c: Likewise.
1981 * pthread.c: Likewise.
1982 * signals.c: Likewise.
1983 * specific.c: Likewise.
1984 * restart.h: Likewise.
1985 * queue.h: Likewise.
1986 * Examples/ex3.c: Likewise.
1987 * Examples/ex4.c: Likewise.
1988 * sysdeps/pthread/pthread.h: Likewise.
1990 * pthread.c: Accumulate time for all threads in thread manager.
1992 * semaphore.c: Implement fallback implementation for architectures
1993 sometimes missing compare-exchange operations.
1995 * cancel.c (pthread_cancel): Validate handle argument.
1996 * join.c (pthread_join): Likewise.
1997 (pthread_detach): Likewise.
1998 * signals.c (pthread_kill): Likewise.
2000 * spinlock.h (acquire): Use __sched_yield not sched_yield.
2002 * queue.h (enqueue): Enqueue thread according to priority.
2004 * internals.c (struct pthread_start_args): New struct for passing
2005 args to cloning function.
2006 (struct _pthread): Rename to _pthread_descr_struct and adapt for
2009 * Examples/Makefile (clean): Pass -f option to rm.
2011 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
2012 and define TEST_FOR_COMPARE_AND_SWAP.
2013 * sysdeps/i386/i486/pt-machine.h: Removed.
2015 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
2018 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
2020 * restart.h (suspend): Clear p_signal before suspending.
2021 (suspend_with_cancellation): Likewise.
2022 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
2024 * weaks.c: Make __pthread_key_create return 1.
2025 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
2026 __libc_getspecific, __libc_setspecific, and __libc_key_t.
2027 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
2030 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
2032 * sysdeps/sparc/pt-machine (RELEASE): Fix.
2034 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
2036 * sysdeps/powerpc/Implies: Added.
2037 * sysdeps/powerpc/pt-machine.h: Added.
2038 * sysdeps/powerpc/semaphorebits.h: Added.
2040 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
2042 * linuxtheads/pthread.c (__pthread_initial_thread): Correct
2044 (__pthread_manager_thread): Likewise.
2045 Reported by Andreas Jaeger.
2047 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
2049 Since sigset_t no longer fits in a register, we can't pass in the
2050 thread's initial mask so easily. Take this opportunity to simplify
2051 the clone implementation by only accepting a single void* argument.
2053 * linuxthreads/manager.c (__pthread_manager): Put thread vitals
2054 in the thread struct instead of as arguments through clone.
2055 (pthread_start_thread): Look for them there.
2056 * linuxthreads/internals.h (struct _pthread): Add p_initial_fn,
2057 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
2058 * linuxthreads/pthread.c (pthread_initialize_manager): Revise