]> git.ipfire.org Git - thirdparty/glibc.git/blame - linuxthreads/ChangeLog
Update.
[thirdparty/glibc.git] / linuxthreads / ChangeLog
CommitLineData
98cbe360
UD
12000-08-20 Ulrich Drepper <drepper@redhat.com>
2
3 * semaphore.h: Add restrict where required by AGd4.
4 * sysdeps/pthread/pthread.h: Likewise.
5 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
6
9df76933
UD
72000-08-15 Ulrich Drepper <drepper@redhat.com>
8
9 * Makefile (tests): Add ex12. Add rule to build it.
10 * Examples/ex12.c: New file.
11
91bc38d0
UD
122000-08-13 Ulrich Drepper <drepper@redhat.com>
13
14 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
15 even though the implementation is not quite complete (but it reports
16 it). Define _POSIX_MESSAGE_PASSING to -1.
17 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
18
facd11c2
AJ
192000-08-12 Andreas Jaeger <aj@suse.de>
20
21 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
22 assembler.
23 (__compare_and_swap): Likewise.
24 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
25
3459f702
UD
262000-08-10 Ulrich Drepper <drepper@redhat.com>
27
28 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
29 p_h_errnop correctly and not to NULL.
30
c9326ed5
UD
312000-08-05 Ulrich Drepper <drepper@redhat.com>
32
33 * Banner: Bump version number to 0.9.
34
0a8d9231
UD
352000-08-04 Ulrich Drepper <drepper@redhat.com>
36
fcd31f5a
UD
37 * Makefile (tests): Add tststack. Add rule to build the program.
38 * tststack.c: New file.
39
234dd7a6
UD
40 * internals.h: Declare __pthread_max_stacksize.
41 * pthread.c (__pthread_max_stacksize): New variable.
42 (__pthread_initialize_manager): Determine __pthread_initialize_manager
43 value.
44 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
45 (pthread_allocate_stack): Allow kernel to choose stack address if
46 FLOATING_STACKS. This also handles variable-sized stacks.
c9326ed5 47 Always allocate stack and guardpage together. Use mprotect to
234dd7a6
UD
48 change guardpage access.
49 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
50 ARCH_STACK_MAX_SIZE.
51
52 * attr.c (__pthread_attr_setstacksize): Also test value against
53 upper limit.
54
0a8d9231
UD
55 * manager.c (__pthread_nonstandard_stacks): Define only if
56 THREAD_SELF is not defined.
57 (pthread_allocate_stack): Always initialize gardaddr to a correct
58 value.
59 (pthread_handle_create): Unmap thread with one call.
60 (pthread_free): Remove test for initial thread before removing stack.
61 Unmap stack with one call.
62
63 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
64 1 to avoid removing the stack.
65
0d019734
UD
662000-07-27 Jes Sorensen <jes@linuxcare.com>
67
d364e525 68 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
0d019734
UD
69 load of spin lock to prime the cache before the atomic compare and
70 exchange operation (cmpxchg4). This avoids the spinning on the
71 cmpxchg4 instruction and reduces movement of the cache line back
72 and forth between the processors (explanation by Asis K. Mallick
73 from Intel). This basically makes the implementation operate the
74 same as the Linux kernel implementation.
75
d364e525
UD
76 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
77 * sysdeps/ia64/pspinlock.c: New file.
0d019734 78
139a4d95
UD
792000-08-03 Ulrich Drepper <drepper@redhat.com>
80
81 * pthread.c: Move definition of __pthread_set_own_extricate_if...
82 * spinlock.h: ...here. Remove locking.
83 * internals.h: Remove __pthread_set_own_extricate_if prototype.
84
85 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
86 (rwlock_rd_extricate_func): Don't determine self, let
87 __pthread_lock do it.
88 (rwlock_wr_extricate_func): Likewise.
89 (rwlock_have_already): Optimize *pself handling a bit.
90
91 * mutex.c: Use __builtin_expect.
92 * pthread.c: Likewise.
93
9016e55c
AJ
942000-08-02 Andreas Jaeger <aj@suse.de>
95
d364e525
UD
96 * sysdeps/s390/pspinlock.c: New file.
97 * sysdeps/s390/pt-machine.h: New file.
9016e55c
AJ
98 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
99
fdfb2ecc
AJ
1002000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
101
102 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
103 R3K.
104 * sysdeps/mips/pt-machine.h (testandset): Likewise.
105
b98a450f
AJ
1062000-07-26 Andreas Jaeger <aj@suse.de>
107
108 * pthread.c: Initialize p_sem_avail.
109
a956d045
UD
1102000-07-25 Ulrich Drepper <drepper@redhat.com>
111
a99db924 112 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
9ec9e34e
UD
113 * semaphore.c: Handle spurious wakeups.
114
115 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
116 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
117
118 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
119 (__pthread_wait_for_restart): Likewise.
120
121 * condvar.c (pthread_cond_wait): Also check whether thread is
122 cancelable before aborting loop.
123 (pthread_cond_timedwait): Likewise.
124
a956d045
UD
125 * signals.c (pthread_sighandler): Remove special code to restrore
126 %gs on x86.
127 (pthread_sighandler_t): Likewise.
128
70e392a3
UD
1292000-07-25 Mark Kettenis <kettenis@gnu.org>
130
131 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
132 * pthread.c: Include <resolv.h>.
133 (_res): Undefine. Add extern declaration.
134
5122880a
UD
1352000-07-24 Ulrich Drepper <drepper@redhat.com>
136
f3d5834e
UD
137 * pthread.c (__pthread_initial_thread): Update initializer.
138 (__pthread_manager_thread): Likewise.
139 (pthread_initialize): Move setrlimit call to...
140 (__pthread_initialize_manager): ...here.
141 (__pthread_reset_main_thread): Reset also soft limit on stack size.
142
5122880a 143 * condvar.c: Handle spurious wakeups. [PR libc/1749].
ad0c66a0 144 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
5122880a 145
0c0c8bde
UD
1462000-07-21 Ulrich Drepper <drepper@redhat.com>
147
5122880a 148 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
0c0c8bde 149 __compare_and_swap to define testandset.
d364e525 150 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
0c0c8bde
UD
151 Define IMPLEMENT_TAS_WITH_CAS.
152
0fb7851f
UD
1532000-07-20 Ulrich Drepper <drepper@redhat.com>
154
155 * Makefile: Pass -z nodelete to linker for libpthread.so
156 generation if it understand this option.
157
4e8286ac
UD
1582000-07-18 Mark Kettenis <kettenis@gnu.org>
159
160 * manager.c (pthread_handle_create): Remove initialization of
161 new_thread->p_res._sock.
162
80ec4993
UD
1632000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
164
165 Bugfixes to the variant of the code for machines with no compare
166 and swap.
167
168 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
169 node was not being properly enqueued, due to failing to update
170 the lock->__status field.
171
172 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
173 being set inappropriately, causing the suspend function to be called
174 with a null self pointer and crash.
175
70c5b33d
UD
1762000-07-18 Ulrich Drepper <drepper@redhat.com>
177
056f707c
UD
178 * spinlock.h (__pthread_alt_trylock): Fix code used if no
179 compare&swap is available.
180
a48297fd
UD
181 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
182 compare_and_swap.
183
89bc5366 184 * pthread.c (pthread_initialize): Don't use sysconf to determine
247c8869
UD
185 whether the machine has more than one processor.
186
70c5b33d
UD
187 * spinlock.c (__pthread_alt_timedlock): Add back one of the
188 removed thread_self calls.
189
83142e8f
UD
1902000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
191
192 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
193 __compare_and_swap to compare_and_swap in code which assumes
194 compare swap is available.
195
89bc5366 1962000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
e6574c9c
UD
197
198 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
199 bug whereby thr field of waitnode structure would not be correctly
200 set unless a null self pointer is passed to the functions.
201 Eliminated redundant calls to thread_self().
202
c6df09ad
UD
2032000-07-18 Jakub Jelinek <jakub@redhat.com>
204
205 * pthread.c (__pthread_initialize_manager): Lock
206 __pthread_manager_thread.p_lock before calling clone.
207
9aae19cd
UD
2082000-05-05 H.J. Lu <hjl@gnu.org>
209
210 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
211 have acquire semantics.
212 (__compare_and_swap_with_release_semantics): New inline
213 function.
214 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
215
2162000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
217
218 * manager.c: Fix the problem with signals at startup.
219 Change the way that thread stacks are allocated on IA64.
220 Clean up some of the guard page allocation stuff.
221
2221999-12-19 H.J. Lu <hjl@gnu.org>
223
224 * internals.h (page_roundup): New.
225 * attr.c (__pthread_attr_setguardsize); Use page_roundup
226 instead of roundup.
227 * manager.c (pthread_allocate_stack): Make sure guardaddr is
228 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
229 is define.
230
2311999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
232
233 * manager.c (pthread_allocate_stack): Unmap the stack top
234 if failed to map the stack bottom.
235 Fix the guard page.
236 (pthread_free): Fix the guard page.
237
238 * pthread.c (pthread_initialize): Set rlimit correctly for
239 NEED_SEPARATE_REGISTER_STACK.
240
2411999-12-16 H.J. Lu <hjl@gnu.org>
242
243 * pthread.c (__pthread_initialize_manager): Pass
244 __pthread_manager_thread_bos instead of
245 __pthread_manager_thread_tos to __clone2.
246
2471999-12-16 H.J. Lu <hjl@gnu.org>
248
249 * manager.c (pthread_allocate_stack): Correct the calculation
250 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
251 stack bottom.
252
2531999-12-13 H.J. Lu <hjl@gnu.org>
254
255 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
256 bit after setting ar.ccv.
257
2581999-12-12 H.J. Lu <hjl@gnu.org>
259
260 * manager.c (pthread_allocate_stack): Make the starting
261 address of the stack bottom page aligned. FIXME: it may
262 need changes in other places.
263 (pthread_handle_create): Likewise.
264
2651999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
266
267 * manager.c (pthread_allocate_stack): Handle
268 NEED_SEPARATE_REGISTER_STACK.
269 (pthread_handle_create): Likewise.
270 * pthread.c (__pthread_initialize_manager): Likewise.
271
272 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
273
2741999-12-02 H.J. Lu <hjl@gnu.org>
275
276 * sysdeps/ia64/pt-machine.h: New.
277
f218b5f5
UD
2782000-07-13 Ulrich Drepper <drepper@redhat.com>
279
280 * wrapsyscall.c: Mark non-__ protected names as weak.
281 PR libc/1466.
282
0d655550
UD
2832000-07-12 Bruno Haible <haible@clisp.cons.org>
284
285 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
286
9f835f5f
UD
2872000-07-12 Ulrich Drepper <drepper@redhat.com>
288
289 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
290 Add tests also to new alternative spinlock implementation.
291 * spinlock.h: Likewise.
292 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
293
a85d5c80
UD
2942000-07-06 Ulrich Drepper <drepper@redhat.com>
295
c0f53cdd
UD
296 * Version: Export __sigaction.
297 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
298 of __sigaction.
299 * pthread.c: Use __libc_sigaction instead of __sigaction.
300
a85d5c80
UD
301 * condvar.c: Implement pthread_condattr_getpshared and
302 pthread_condattr_setpshared.
303 * mutex.c: Implement pthread_mutexattr_getpshared and
304 pthread_mutexattr_setpshared.
305 * Versions: Export new functions.
306 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
307
308 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
309 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
310 is not selected.
311
66c5b9aa
GM
3122000-07-04 Greg McGary <greg@mcgary.org>
313
314 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
315 pragmas. Include bp-sym.h only if _LIBC.
316
83b1b6d8
UD
3172000-07-04 Ulrich Drepper <drepper@redhat.com>
318
319 * spinlock.c (__pthread_unlock): Properly place write barrier.
320 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
321
a88b96f4
UD
3222000-07-03 Ulrich Drepper <drepper@redhat.com>
323
324 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
325 faster on SMP systems. No more emulation of compare&swap for adaptive
326 spinlocks.
327 * spinlock.h: Likewise.
328 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
329 Replace fast with adaptive mutex.
330 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
331 * condvar.c: Likewise.
332 * pthread.c: Define and initialize __pthread_smp_kernel variable.
333 * internals.h: Declare __pthread_smp_kernel.
334 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
335 _pthread_fastlock structure.
336 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
337
338 * pthread.c: Remove initialization to zero from global variables.
339
1a6d7967
UD
3402000-06-29 Jakub Jelinek <jakub@redhat.com>
341
342 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
343
1efd15e3
GM
3442000-06-28 Greg McGary <greg@mcgary.org>
345
346 * weaks.c: Wrap BP_SYM () around weak extern declarations of
347 pthread functions that have pointers in their return+arg signatures.
348
3210bef0
GM
3492000-06-27 Greg McGary <greg@mcgary.org>
350
1efd15e3
GM
351 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
352 extern declarations of pthread functions that have pointers in
353 their return+arg signatures.
3210bef0 354
c49ebf76
UD
3552000-06-26 Ulrich Drepper <drepper@redhat.com>
356
357 * Makefile (tests): Add ex11. Add rules to build it.
358 * Examples/ex11.c: New file.
359 * rwlock.c: Fix complete braindamaged previous try to implement
360 timedout functions.
361
362 * spinlock.c: Pretty print.
363
d82e4c7b
UD
3642000-06-25 Ulrich Drepper <drepper@redhat.com>
365
366 * Makefile (tests): Add ex10. Add rules to build it.
367 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
368 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
369 * condvar.c (pthread_cond_wait): Allow mutex of kind
370 PTHREAD_MUTEX_TIMED_NP.
371 (pthread_cond_timedwait_relative): Likewise.
372 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
373 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
374 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
375 (__pthread_mutex_lock): Use __pthread_alt_lock for
376 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
377 (__pthread_mutex_timedlock): New function.
378 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
379 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
380 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
381 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
382 * spinlock.c: Implement alternate fastlocks.
383 * spinlock.h: Add prototypes.
384 * Examples/ex10.c: New file.
385 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
386 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
387
388 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
389 (__pthread_rwlock_timedrdlock): New function.
390 (__pthread_rwlock_timedwrlock): New function.
391 Use laternate fastlock function everywhere.
392
3d8e9510
AJ
3932000-06-21 Andreas Jaeger <aj@suse.de>
394
efa24b51 395 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
3d8e9510
AJ
396 prototype.
397
398 * join.c: Include <stdlib.h> for exit prototype.
399
697568d1
UD
4002000-06-20 Ulrich Drepper <drepper@redhat.com>
401
bdf09fab
UD
402 * sysdeps/i386/useldt.h: Include <stdlib.h>.
403
697568d1
UD
404 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
405 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
406
407 * Makefile (libpthread-routines): Add barrier.
408 (tests): Add ex9. Add rule to build ex9.
409 * Versions: Export barrier functions.
410 * barrier.c: New file.
411 * Examples/ex9.c: New file.
412 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
413 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
bdf09fab 414 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
697568d1 415
ba80a015
UD
4162000-06-19 H.J. Lu <hjl@gnu.org>
417
418 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
419 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
420 (compare_and_swap_with_release_semantics): New. Default to
421 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
422 is not defined.
423
424 * spinlock.c (__pthread_unlock): Call
425 compare_and_swap_with_release_semantics () instead of
426 compare_and_swap ().
427
d2dfc5de
UD
4282000-06-19 Ulrich Drepper <drepper@redhat.com>
429
430 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
431 to errno directly.
432 * sysdeps/pthread/timer_delete.c: Likewise.
433 * sysdeps/pthread/timer_getoverr.c: Likewise.
434 * sysdeps/pthread/timer_gettime.c: Likewise.
435 * sysdeps/pthread/timer_settime.c: Likewise.
436
4372000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
438
439 Timer nodes are now reference counted, and can be marked
440 as deleted. This allows for the safe release of the global mutex
441 in the middle without losing the timer being operated on.
442
443 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
444 member is now an enum with three values, so that an intermediate
445 state can be represented (deleted but not free for reuse yet).
446 New refcount member added.
447 * sysdeps/pthread/timer_routines.c: Likewise.
448
449 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
450 timer_valid): New inline functions added.
451
452 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
453 restructured, recursive deadlock bug fixed.
454
455 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
456 timer_addref to ensure that timer won't be deleted while mutex is not
457 held. Also uses timer_invalid to perform validation of timer handle.
458 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
459 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
460
e26dd47f
UD
4612000-06-14 Ulrich Drepper <drepper@redhat.com>
462
463 * shlib-versions: Add entry for SH.
464 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
465
38161ac7
UD
4662000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
467
468 A few optimizations. Got rid of unnecessary wakeups of timer threads,
469 tightened up some critical regions and micro-optimized some list
470 manipulation code.
471
472 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
473 Returns int value now to indicate whether timer was queued at head.
474 * sysdeps/pthread/posix-timer.h: Likewise.
475 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
476 new return value from __timer_thread_queue_timer to avoid waking
477 up timer thread unnecessarily.
478
479 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
480 inuse flag, because this requires mutex to be held. Callers updated
481 to do the check when they have the mutex.
482 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
483
484 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
485 regions: avoids making system calls while holding timer mutex, and
486 a few computations were moved outside of the mutex as well.
487 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
488
489 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
490 to list_unlink_ip, meaning idempotent. Pointer manipulation
491 changed to get better better code out of gcc.
492 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
493 version of list_unlink added here.
494 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
495 function in all places: idempotent one for timers, non-idempotent
496 one for thread nodes.
497 * sysdeps/pthread/timer_settime: Likewise.
498 * sysdeps/pthread/timer_routines.c: Likewise.
499
7ae1fe4d
UD
5002000-06-13 Ulrich Drepper <drepper@redhat.com>
501
490dc9aa
UD
502 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
503 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
504
7ae1fe4d
UD
505 * sysdeps/pthread/Makefile: Remove tests definition.
506
3846ef75
UD
5072000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
508 Yutaka Niibe <gniibe@chroot.org>
509
510 * sysdeps/sh/pspinlock.c: New file.
511 * sysdeps/sh/pt-machine.h: New file.
512
a5b97402
UD
5132000-06-12 Ulrich Drepper <drepper@redhat.com>
514
55985355
UD
515 * Makefile (tests): Add joinrace.
516
a5b97402
UD
517 * Examples/ex6.c: Test return value of pthread_join.
518
2b72ebac
GK
5192000-06-11 Geoff Keating <geoffk@cygnus.com>
520
521 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
522 (__pthread_spin_trylock): Implement.
523 (__pthread_spin_unlock): Implement.
524 (__pthread_spin_init): Implement.
525 (__pthread_spin_destroy): Implement.
526
425638fb
UD
5272000-06-10 Ulrich Drepper <drepper@redhat.com>
528
529 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
2b72ebac 530 really append the entry.
425638fb 531
6948d763
AJ
5322000-06-10 Andreas Jaeger <aj@suse.de>
533
534 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
535
45dc1187
UD
5362000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
537
538 * sysdeps/pthread/timer_create.c: Thread matching now done on
539 clock type as well as thread attributes.
540 There are individual global signal-delivering threads for
541 different clock types.
542 * sysdeps/pthread/posix-timer.h: Likewise.
543 * sysdeps/pthread/timer_routines.c: Likewise.
544
545 * sysdeps/pthread/timer_routines.c: Thread allocation and
546 deallocation function now remembers to put thread on active
425638fb 547 list and remove from active list.
45dc1187
UD
548 Thus now the feature of binding multiple timers
549 to a single thread actually works.
550
ee5d4855
UD
5512000-06-10 Ulrich Drepper <drepper@redhat.com>
552
553 * pthread.c (__pthread_create_2_1): Optimize a bit.
554
555 * internals.h (invalid_handle): Also test for p_terminated != 0.
556 (nonexisting_handle): New function. Same as old invalid_handle.
557 * join.c (pthread_join): Use nonexisting_handle instead of
558 invalid_handle to test for acceptable thread handle.
41b37cb5 559 * manager.c (pthread_handle_free): Likewise.
15109bd4 560 * joinrace.c: New file.
ee5d4855
UD
561 Reported by Permaine Cheung <pcheung@cygnus.com>.
562
2715f28a
UD
5632000-06-08 Ulrich Drepper <drepper@redhat.com>
564
8aa8fc7f
UD
565 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
566 Correct handling of matching variable.
567
480a06df
UD
568 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
569 avoid warnings.
570
18e4e446
UD
571 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
572 Be prepared for empty timer list.
573
165ab1d7
UD
574 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
575 CPUTIME clock ID. Add support for thread clocks.
576
f2a5974b
UD
577 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
578 subtraction were switched.
579
c0f79a04
UD
580 * sysdeps/pthread/timer_routines.c (init_module): Use
581 THREAD_MAXNODES threads.
582
55938273
UD
583 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
584 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
585 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
586 with sigqueueinfo is this system call is available.
587
588 * sysdeps/pthread/timer_create.c (timer_create): Allow
589 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
590
2715f28a
UD
591 * sysdeps/pthread/Makefile: New file. Add rules to build timer
592 functionality.
593 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
594
5952000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
596
597 * sysdeps/pthread/posix-timer.h: New file.
598 * sysdeps/pthread/timer_create.c: New file.
599 * sysdeps/pthread/timer_delete.c: New file.
600 * sysdeps/pthread/timer_getoverr.c: New file.
601 * sysdeps/pthread/timer_gettime.c: New file.
602 * sysdeps/pthread/timer_routines.c: New file.
603 * sysdeps/pthread/timer_settime.c: New file.
604 * sysdeps/pthread/tst-timer.c: New file.
605
1b579f91
UD
6062000-06-08 Ulrich Drepper <drepper@redhat.com>
607
608 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
609 LINK_MAX definitions if necessary.
610
dc3b5786
UD
6112000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
612
613 Added missing fork time handling of global libio lock.
614
615 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
616 not just the individual stream locks. Rewritten to use new
617 iterator interface provided by libio rather than accessing
618 global variable.
619
620 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
621 which lock and unlock the stream list using the new interface
622 provied by libio.
623 * internals.h: Likewise.
624
625 * ptfork.c (__fork): Now calls __flockfilelist before fork,
626 and __funlockfilelist in the parent after the fork.
627 Child still calls __fresetlockfiles as before.
628
629 * linuxthreads.texi: Now explains what happens to streams at
630 fork time. Also whole new section on forking and thread added.
631 Definition of pthread_atfork moved out of Miscellaneous Functions
632 to this new section.
633
1dd54850
UD
6342000-06-04 Jakub Jelinek <jakub@redhat.com>
635
636 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
637 Add missing register.
638 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
639
554eca5c
AJ
6402000-06-02 Jakub Jelinek <jakub@redhat.com>
641
642 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
643 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
644 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
645
a3a99e01
AJ
6462000-05-31 Andreas Jaeger <aj@suse.de>
647
648 * sysdeps/mips/pspinlock.c: Implement spinlocks.
649
c0f3519d
UD
6502000-05-28 Ulrich Drepper <drepper@redhat.com>
651
84838b8f
UD
652 * spinlock.c (__pthread_lock): Remove ASSERT.
653
c0f3519d
UD
654 * Makefile (tests): Add ex8.
655 * Examples/ex8.c: New file.
656
6572000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
658
659 Bugfix: The pthread_atfork mechanism now takes care of its
660 own internal mutex at fork time.
661
662 * ptfork.c (__fork): Revised so that the mutex is held across
663 the fork operation and while the handlers are called, and so that
664 the child resets the mutex.
c0f3519d
UD
665
666 * linuxthreads.texi: Updated pthread_atfork documentation to make
667 it clear that fork and pthread_atfork can't be reentered from
668 atfork handlers, that pthread_atfork and fork are mutually atomic,
669 and that the handlers are inherited by the child process.
670
378fbeb4
UD
6712000-05-24 Ulrich Drepper <drepper@redhat.com>
672
673 * Makefile (libpthread-routines): Add pspinlock.
674 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
675 Use struct _pthread_fastlock instead of pthread_spinlock_t.
676 * condvar.c: Likewise.
677 * internals.h: Likewise.
678 * join.c: Likewise.
679 * manager.c: Likewise.
680 * mutex.c: Likewise.
681 * pthread.c: Likewise.
682 * rwlock.c: Likewise.
683 * semaphore.c: Likewise.
684 * signals.c: Likewise.
685 * spinlock.h: Likewise.
686 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
687 * sysdeps/alpha/pspinlock.c: New file.
688 * sysdeps/arm/pspinlock.c: New file.
689 * sysdeps/i386/pspinlock.c: New file.
690 * sysdeps/m68k/pspinlock.c: New file.
691 * sysdeps/mips/pspinlock.c: New file.
692 * sysdeps/powerpc/pspinlock.c: New file.
693 * sysdeps/sparc/sparc32/pspinlock.c: New file.
694 * sysdeps/sparc/sparc64/pspinlock.c: New file.
695 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
696 back to _pthread_fastlock. Define new pthread_spinlock_t.
697
fff82885
AJ
6982000-05-24 Andreas Jaeger <aj@suse.de>
699
700 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
701
5d1fba6d
AJ
7022000-05-21 Jakub Jelinek <jakub@redhat.com>
703
704 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
705
f14273c5
AJ
7062000-05-13 Jakub Jelinek <jakub@redhat.com>
707
708 * internals.h (__RES_PTHREAD_INTERNAL): Define.
709
93414bb9
UD
7102000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
711
712 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
713 object state is represented with additional bits which distinguish
714 whether that state was set up in the current process, or
715 in an ancestor process. If that state was set in an ancestor,
716 it means that a fork happened while thread was executing the init
717 function. In that case, the state is reset to NEVER.
718 * mutex.c (__pthread_once_fork_prepare): New function.
719 (__pthread_once_fork_child): Likewise
720 (__pthread_once_fork_parent): Likewise
721 (__pthread_reset_pthread_once): Removed.
722 * ptfork.c (__fork): Call new handlers in mutex.c.
723 * internals.h: Declarations of new mutex.c functions added.
724 Declaration of removed function deleted.
725 * linuxthreads.texi: Updated documentation about pthread_once
726 to clarify what happens under cancellation and forking.
727
fc08075d
UD
7282000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
729
730 * internals.h: New thread manager request type, REQ_KICK.
731 * join.c (pthread_exit): main thread now calls exit() instead
732 of _exit() in order to proper process cleanup.
733 * manager.c (__pthread_manager): Do not terminate manager
734 after unblocking main thread; wait for main thread's
735 REQ_PROCESS_EXIT request instead.
736 Also, added REQ_KICK case to handle new request; this just does
737 nothing.
738 * manager.c (pthread_exited): Do not terminate manager after
739 unblocking main thread.
740 * manager.c (__pthread_manager_sighandler): If the main thread
741 is waiting for all other threads to die, send a REQ_KICK into
742 the thread manager request pipe to get it to clean out the threads
743 and unblock the main thread as soon as possible. This fixes
744 the 2000 millisecond hang on shutdown bug.
745 * Examples/ex7.c: New file, tests shutdown behavior when all threads
746 including the main one call pthread_exit(), or implicitly do so.
747 * Makefile (tests): Add ex7.
748
b19b7383
AJ
7492000-05-05 Andreas Jaeger <aj@suse.de>
750
751 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
752 (pthread_getcpuclockid): Correct test for ourselves.
753
c77ec56d
UD
7542000-05-05 Ulrich Drepper <drepper@redhat.com>
755
756 * internals.h (struct _pthread_descr_struct): Reorganization.
757 Allocate room for 16 pointers at head of the structure for future
758 thread-local data handling. Move p_self member in this area.
759 * manager.c (pthread_handle_create): Adjust use of p_self.
760 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
761 * pthread.c (__pthread_initial_thread): Adjust initialization.
762 (__pthread_manager_thread): Likewise.
763
7642000-04-29 Bruno Haible <haible@clisp.cons.org>
160016c9
UD
765
766 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
767 for eventmask larger than 1 word.
768
3300816c
UD
7692000-04-27 Ulrich Drepper <drepper@redhat.com>
770
771 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
772 * pthread.c (__pthread_initialize_minimal): New function. Perform
773 minimal initialization.
774 (pthread_initialize): Remove this code here.
775 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
776 are working around the problem in glibc.
777
d472655c
UD
7782000-04-25 Ulrich Drepper <drepper@redhat.com>
779
780 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
781 now. First gcc must be fixed (more concrete: libgcc).
782
9bf4d640
UD
7832000-04-24 Ulrich Drepper <drepper@redhat.com>
784
e19ae111 785 * pthread.c: Remove special treatement for interrupt handlers on x86.
9bf4d640
UD
786 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
787 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
788 necessary.
789 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
790
9682a871
UD
7912000-04-24 Mark Kettenis <kettenis@gnu.org>
792
793 * join.c (pthread_exit): Set p_terminated after reporting the
794 termination event instead of before.
795
d879eb85
UD
7962000-04-20 Jakub Jelinek <jakub@redhat.com>
797
798 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
799 if __USE_UNIX98.
800
8012000-04-18 Andreas Jaeger <aj@suse.de>
802
803 * Versions: Use ld instead of ld.so.
804
318c80d4
UD
8052000-04-18 Jakub Jelinek <jakub@redhat.com>
806
807 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
808 Remove the typedef keyword.
809
cd43f797
UD
8102000-04-18 Jakub Jelinek <jakub@redhat.com>
811
812 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
813 not stbar.
814 (READ_MEMORY_BARRIER): Define.
815 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
816 MEMORY_BARRIER.
817 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
818 headers.
819
dbacafe5
UD
8202000-04-17 Ulrich Drepper <drepper@redhat.com>
821
822 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
823 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
824 use thread_handle().
825
e2947c42
UD
8262000-04-16 Ulrich Drepper <drepper@redhat.com>
827
e3265f5b
UD
828 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
829 if fast mutex is used. Don't initialize `already_canceled' twice.
830 Correctly test for return value of timedsuspend.
831
e2947c42
UD
832 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
833 therefore don't need the _rt versions of the signal handlers.
834
150f740a
UD
8352000-04-15 Ulrich Drepper <drepper@redhat.com>
836
c269fdb4
UD
837 * pthread.c (pthread_yield): New function.
838 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
839 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
e2947c42 840 * internals.h: Declare __pthread_yield.
c269fdb4 841
145b8413
UD
842 * pthread.c (pthread_initialize): Avoid a bit more code if
843 realtime signals are known to exist.
844
150f740a
UD
845 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
846 to dynamically detect RT signals and avoid generating compatibility
847 functions with old kernel.
848 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
849 __pthread_restart_new directly.
850 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
851 __pthread_wait_for_restart_signal directly.
852 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
853 __pthread_timedsuspend_new directly.
854
b2d4446f
UD
8552000-04-15 Ulrich Drepper <drepper@redhat.com>
856
ef187474
UD
857 * condvar.c: Remove all the special code to handle cond_timedwait.
858 Use timedsuspend instead.
859 * internals.h: Declare __pthread_timedsuspend_old,
860 __pthread_timedsuspend_new, and __pthread_timedsuspend.
861 Remove declaration of __pthread_init_condvar.
862 * pthread.c: Define __pthread_timedsuspend variable.
863 (__pthread_timedsuspend_old): New function. Timed suspension
864 implementation for old Linux kernels.
865 (__pthread_timedsuspend_new): New function. Timed suspension
866 implementation for new Linux kernels.
867 * restart.h (timedsuspend): New function. Call appropriate
868 suspension function through __pthread_timedsuspend.
869 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
870 the code.
871 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
872
a5a6f926
UD
873 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
874 undefined.
875 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
876 where possible.
877 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
878 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
879
b2d4446f
UD
880 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
881 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
882
b82f6af2
AJ
8832000-04-14 Andreas Jaeger <aj@suse.de>
884
885 * weaks.c: Fix typo.
886
43c36f63
AJ
887 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
888 2.2 for linuxthreads.
889
547ff462
UD
8902000-04-13 Ulrich Drepper <drepper@redhat.com>
891
892 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
893 (pthread_getcpuclockid): Fix typo.
894
b3ae0650
UD
8952000-04-12 Ulrich Drepper <drepper@redhat.com>
896
3737ff12
UD
897 * Makefile (libpthread-routines): Add getcpuclockid.
898 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
899 * sysdeps/pthread/getcpuclockid.c: New file.
900 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
901 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
902
07d641eb
UD
903 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
904 Defined.
905 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
906
d8d914df
UD
907 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
908 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
909 and pthread_spin_unlock.
910 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
911 into pthread_spinlock_t. Change all uses.
912 * spinlock.c: Implement pthread_spin_lock.
913 Rename __pthread_unlock to __pthread_spin_unlock and define weak
914 alias for real name.
915 Define pthread_spin_trylock, pthread_spin_init, and
916 pthread_spin_destroy.
917 Change all uses of _pthread_fastlock to pthread_spinlock_t.
918 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
919 Change all uses of _pthread_fastlock to pthread_spinlock_t.
920 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
921 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
922 and pthread_spin_unlock.
923 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
924 Change all uses of _pthread_fastlock to pthread_spinlock_t.
925 * condvar.c: Likewise.
926 * internals.h: Likewise.
927 * join.c: Likewise.
928 * manager.c: Likewise.
929 * mutex.c: Likewise.
930 * pthread.c: Likewise.
931 * rwlock.c: Likewise.
932 * semaphore.c: Likewise.
933 * signals.c: Likewise.
934
b3ae0650
UD
935 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
936 macros.
937 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
938
8a31d742
UD
9392000-04-11 Ulrich Drepper <drepper@redhat.com>
940
941 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
942 _POSIX_SHARED_MEMORY_OBJECTS.
943
2a086df9
AJ
9442000-04-11 Andreas Jaeger <aj@suse.de>
945
946 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
947 (__compare_and_swap): Mark as modifying memory.
948
4a1a3c21
GK
9492000-04-11 Geoff Keating <geoffk@cygnus.com>
950
951 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
952 __volatile__.
953 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
954 Don't have the 'asm' __volatile__.
955
de262537
UD
9562000-04-11 Ulrich Drepper <drepper@redhat.com>
957
958 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
959 * spinlock.c (__pthread_lock): Add memory barriers.
960 (__pthread_unlock): Likewise.
961 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
962 instruction.
963 (RELEASE): Not needed anymore.
964 (__compare_and_swap): Mark asm as modifying memory.
965 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
966 of MEMORY_BARRIER.
967 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
968 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
969 (MEMORY_BARRIER): Define using stbar.
970 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
971 stbar.
972 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
973 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
974 Mike Burrows <m3b@pa.dec.com>.
975
4186c9f4
UD
9762000-04-09 Ulrich Drepper <drepper@redhat.com>
977
978 * signals.c (sigaction): Fix return value for the case SIG is one
979 of the signals the implementation uses.
980 Patch by Xavier.Leroy@inria.fr.
981
bd457114
UD
9822000-04-01 Andreas Jaeger <aj@suse.de>
983
984 * attr.c: Use shlib-compat macros.
985 * oldsemaphore.c: Likewise.
986 * pthread.c: Likewise.
987 * weaks.c: Likewise.
988
1edf26ff
UD
9892000-03-26 Ulrich Drepper <drepper@redhat.com>
990
991 * semaphore.c (sem_timedwait): New function.
992 Patch by Carl Mailloux <carlm@oricom.ca>.
993 * semaphore.h: Declare sem_timedwait.
8e605e78 994 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1edf26ff 995
54f6cbb3
RM
9962000-03-26 Roland McGrath <roland@baalperazim.frob.com>
997
998 * sysdeps/pthread/Makefile: File removed.
999
c0bc5f7b
UD
10002000-03-23 Ulrich Drepper <drepper@redhat.com>
1001
383052e9
UD
1002 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1003 * internals.h (__pthread_reset_pthread_once): Add prototype.
1004 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1005
c0bc5f7b
UD
1006 * manager.c (pthread_handle_create): Store ID of new thread before
1007 clone call.
1008
0bf98029
UD
10092000-03-21 Ulrich Drepper <drepper@redhat.com>
1010
ef7dddd0
UD
1011 * attr.c: Use new macros from shlib-compat.h to define versions.
1012 * oldsemaphore.c: Likewise.
1013 * semaphore.c: Likewise.
1014 * weaks.c: Likewise.
1015
1ab1ea76
UD
1016 * pthread.c: Update for new SHLIB_COMPAT definition.
1017
101edd3f
UD
1018 * manager.c (__pthread_manager): Unmask debug signal.
1019
0bf98029
UD
1020 * pthread.c (pthread_initialize): Test for address of __dso_handle
1021 being NULL, not value. Use __on_exit, not on_exit.
e063cef8 1022 Patch by Andreas Jaeger <aj@suse.de>.
0bf98029 1023
75836bc8
UD
1024 * pthread.c: Use new macros from shlib-compat.h to define versions.
1025
a6a478e9
UD
10262000-03-19 Ulrich Drepper <drepper@redhat.com>
1027
1028 * pthread.c (pthread_initialize): Instead of on_exit use
1029 __cxa_atexit if __dso_label is available to allow unloading the
1030 libpthread shared library.
1031
13a83604
UD
10322000-03-16 Ulrich Drepper <drepper@redhat.com>
1033
1034 * condvar.c: Make tests for ownership of mutex less strict.
1035
30b416ea
UD
10362000-03-14 Ulrich Drepper <drepper@redhat.com>
1037
5d141597
UD
1038 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1039 current thread and return error if not.
04366d5f
UD
1040 (pthread_cond_timedwait_relative_old): Likewise.
1041 (pthread_cond_timedwait_relative_new): Likewise.
5d141597 1042
30b416ea
UD
1043 * mutex.c (__pthread_once): Handle cancelled init function correctly.
1044 (pthread_once_cancelhandler): New function.
1045 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1046
56eea8d1
UD
10472000-03-14 Andreas Jaeger <aj@suse.de>
1048
1049 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1050 REG_GS.
1051 (pthread_handle_sigrestart_rt): Likewise.
1052 * signals.c (pthread_sighandler_rt): Likewise.
1053
3d9ebedb
AJ
10542000-03-02 Andreas Jaeger <aj@suse.de>
1055
1056 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1057 Reported by Sean Chen <sean.chen@turbolinux.com>.
1058
b041ebc2
UD
10592000-02-28 Andreas Jaeger <aj@suse.de>
1060
1061 * rwlock.c: Fix typo.
1062
0ed99ce4
UD
10632000-02-27 Ulrich Drepper <drepper@redhat.com>
1064
1065 * rwlock.c: Define __* variants of the functions and make old names
1066 aliases.
1067 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1068 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1069
d66732e0
UD
10702000-02-25 Andreas Jaeger <aj@suse.de>
1071
1072 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
0ed99ce4
UD
1073 pwrite64, lseek64, open64, and __open64 with version 2.2.
1074
93a19c64
UD
10752000-02-22 Ulrich Drepper <drepper@redhat.com>
1076
1077 * semaphore.h (SEM_FAILED): Use 0 not NULL.
1078
ec91ea7c
UD
10792000-02-14 Ulrich Drepper <drepper@redhat.com>
1080
1081 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1082 nanosleep does not work either. Get absolute time inside the
1083 loop.
1084 (pthread_cond_timedwait_relative_new): Likewise.
1085 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1086
f5ff12d8
UD
10872000-02-13 Andreas Jaeger <aj@suse.de>
1088
1089 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1090 (pthread_cond_timedwait_relative_old): Likewise.
1091
46661856
UD
10922000-02-13 Ulrich Drepper <drepper@redhat.com>
1093
1094 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1095 but keep the code around. A bug in the kernel prevent us from
1096 using the code.
1097 (pthread_cond_timedwait_relative_new): Likewise.
1098 (PR libc/1597 and libc/1598).
1099
b168cff2
UD
11002000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
1101
1102 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1103 loop around nanosleep calls instead of around most of the function
1104 (pthread_cond_timedwait_relative_new): Likewise.
1105 body. Got rid of backwards goto and one local.
1106
8a94dfe4
UD
11072000-01-31 Ulrich Drepper <drepper@redhat.com>
1108
1109 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1110 before every nanosleep call to account for time spent in the rest
1111 of the function.
1112 (pthread_cond_timedwait_relative_new): Likewise.
1113 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1114
b6aa34eb
UD
11152000-01-29 Ulrich Drepper <drepper@redhat.com>
1116
1117 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1118 from nanosleep call so that in case we restart we only wait for the
1119 remaining time.
1120 (pthread_cond_timedwait_relative_new): Likewise.
1121 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1122
0af4c646
UD
11232000-01-18 Ulrich Drepper <drepper@cygnus.com>
1124
1125 * manager.c (pthread_allocate_stack): Compute guard page address
1126 correctly. Patch by HJ Lu.
1127
1128 * sysdeps/pthread/pthread.h: Define
1129 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1130
2449110a
UD
11312000-01-16 Ulrich Drepper <drepper@cygnus.com>
1132
1133 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1134 preference handling.
1135 (pthread_rwlockattr_setkind_np): Allow
1136 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1137 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1138
03c0d6ef
UD
11392000-01-12 Ulrich Drepper <drepper@cygnus.com>
1140
1141 * internals.h (pthread_readlock_info): New structure.
1142 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1143 p_untracked_readlock_count.
1144 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1145 Add initializers for new fields.
1146 * manager.c (pthread_free): Free read/write lock lists.
1147 * queue.h (queue_is_empty): New function.
1148 * rwlock.c: Implement requirements about when readers should get
1149 locks assigned.
1150 * sysdeps/pthread/pthread.h
1151 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1152 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1153 Define this name as well.
1154 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1155
d569d333
UD
11562000-01-05 Ulrich Drepper <drepper@cygnus.com>
1157
2ba3c836
UD
1158 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1159 Adjust initializers for struct _pthread_descr_struct change.
d569d333
UD
1160 * internals.h (struct _pthread_descr_struct): Move new elements to
1161 the end.
1162
1d2fc9b3
UD
11632000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
1164
1165 Redesigned how cancellation unblocks a thread from internal
1166 cancellation points (sem_wait, pthread_join,
1167 pthread_cond_{wait,timedwait}).
1168 Cancellation won't eat a signal in any of these functions
1169 (*required* by POSIX and Single Unix Spec!).
a3bfd999 1170 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1d2fc9b3
UD
1171 simultaneous condition variable signal (not required by POSIX
1172 or Single Unix Spec, but nice).
1173 * spinlock.c: __pthread_lock queues back any received restarts
1174 that don't belong to it instead of assuming ownership of lock
1175 upon any restart; fastlock can no longer be acquired by two threads
1176 simultaneously.
a3bfd999 1177 * restart.h: Restarts queue even on kernels that don't have
1d2fc9b3
UD
1178 queued real time signals (2.0, early 2.1), thanks to atomic counter,
1179 avoiding a rare race condition in pthread_cond_timedwait.
1180
1c5d4617
UD
11811999-12-31 Andreas Jaeger <aj@suse.de>
1182
1183 * internals.h: Remove duplicate prototype declarations.
1184
1185 * weaks.c: Remove __THROW from prototypes since the file is not
1186 compiled by a C++ compiler.
1187 * internals.h: Likewise.
1188
11891999-12-30 Andreas Jaeger <aj@suse.de>
1190
1191 * sysdeps/pthread/pthread.h: Move internal functions to...
1192 * sysdeps/pthread/bits/libc-lock.h: ...here.
1193
d876f532
UD
11941999-12-29 Andreas Jaeger <aj@suse.de>
1195
1196 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1197
056e0358
UD
11981999-12-28 Ulrich Drepper <drepper@cygnus.com>
1199
1200 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1201 beginning.
1202
1203 * manager.c (__pthread_start): Add one more cast to prevent
1204 warning on 64bit machines.
1205
46fd4f67
UD
12061999-12-21 Ulrich Drepper <drepper@cygnus.com>
1207
1208 * manager.c (pthread_handle_create): Set p_pid of new thread
1209 before calling the callback function to report a new thread.
1210
c63598bf
UD
12111999-12-20 Andreas Jaeger <aj@suse.de>
1212
1213 * pthread.c (pthread_initialize): Move getrlimit call after
1214 setting of errno.
1215
b85697f6
UD
12161999-12-18 Ulrich Drepper <drepper@cygnus.com>
1217
778c59c8
UD
1218 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1219 pwrite64, lseek64, open64, and __open64.
1220 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1221 pwrite64, lseek64, open64, and __open64.
1222
b85697f6
UD
1223 * manager.c (pthread_allocate_stack): Correct computation of
1224 new_thread_bottom. Correct handling of stack size and when the
1225 rlimit method to guard for stack growth is used.
1226 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1227 minus one pagesize (not two).
1228
b43b13ac
UD
12291999-12-03 Andreas Jaeger <aj@suse.de>
1230
1231 * Versions: Add __res_state with version GLIBC_2.2.
1232
1233 * errno.c (__res_state): New function to return thread specific
1234 resolver state.
1235
1236 * pthread.c (pthread_initialize): Initialize p_resp.
1237 (__pthread_reset_main_thread): Also set p_resp.
1238
1239 * manager.c (pthread_handle_create): Initialize p_resp.
1240
1241 * internals.h: Add thread specific resolver state.
1242 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1243
d7a4856e
UD
12441999-12-01 Ulrich Drepper <drepper@cygnus.com>
1245
1246 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1247 beginning.
1248 * sysdeps/i386/i686/pt-machine.h: Likewise.
1249 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1250
ffd35632
UD
12511999-11-23 Ulrich Drepper <drepper@cygnus.com>
1252
1253 * manager.c (pthread_start_thread_event): Initialize p_pid already
1254 here.
1255
20bdb31b
UD
12561999-11-22 Ulrich Drepper <drepper@cygnus.com>
1257
1258 * internals.h: Add prototype for __pthread_manager_event.
1259 * manager.c (__pthread_manager_event): New function.
1260 (pthread_start_thread_event): Correct computation of self.
1261 Use INIT_THREAD_SELF.
1262 * pthread.c (__pthread_manager_thread): Initialize p_lock.
1263 (__pthread_initialize_manager): Respect event flags also for creation
1264 of the manager thread.
1265
178a145a
UD
12661999-11-08 Ulrich Drepper <drepper@cygnus.com>
1267
1268 * pthread.c (__pthread_initialize_manager): Initialize
1269 __pthread_manager_thread.p_tid.
1270
a9cb398f
UD
12711999-11-02 Ulrich Drepper <drepper@cygnus.com>
1272
ab86fbb1
UD
1273 * internals.h: Declare __pthread_last_event.
1274 * manager.c: Define __pthread_last_event.
1275 (pthread_handle_create): Set __pthread_last_event.
1276 (pthread_exited): Likewise.
1277 * join.c (pthread_exit): Likewise.
1278
a9cb398f
UD
1279 * Makefile (libpthread-routines): Add events.
1280 * events.c: New file.
1281 * internals.h: Protect against multiple inclusion.
1282 Include thread_dbP.h header.
1283 (struct _pthread_descr_struct): Add new fields p_report_events and
1284 p_eventbuf.
1285 Declare event reporting functions.
1286 * join.c (pthread_exit): Signal event if this is wanted.
1287 * manager.c (__pthread_threads_events): New variable.
1288 (pthread_handle_create): Take new parameters with event information.
1289 Signal TD_CREATE event if wanted.
1290 (__pthread_manager): Adjust pthread_handle_create call.
1291 (pthread_start_thread_event): New function. Block until manager is
1292 finished and then call pthread_start_thread.
1293 (pthread_exited): Signal TD_REAP event if wanted.
1294
8dd1e494
UD
12951999-10-26 Ulrich Drepper <drepper@cygnus.com>
1296
1297 * restart.h (suspend_with_cancellation): Rewrite as a macro.
1298
1299 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1300
86cfe82d
UD
13011999-10-25 Andreas Jaeger <aj@suse.de>
1302
1303 * internals.h: Remove K&R compatibility.
1304 * no-tsd.c: Likewise.
1305 * semaphore.h: Likewise.
1306 * signals.c: Likewise.
1307 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1308 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1309 * weaks.c: Likewise.
1310
15daa639
UD
13111999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
1312
d364e525
UD
1313 * pthread.c: For i386, wrap pthread_handle_sigrestart and
1314 pthread_handle_sigcancel with functions that restore %gs from the
1315 signal context. For each signal handling function, two wrappers
1316 are required, one for a non-RT signal and one for a RT signal.
1317 * signal.c: For i386, add code to restore %gs from the signal
1318 context in pthread_sighandler and pthread_sighandler_rt.
15daa639 1319
ef5d6645
UD
13201999-10-17 Ulrich Drepper <drepper@cygnus.com>
1321
1322 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1323
f6367df2
UD
13241999-10-14 Ulrich Drepper <drepper@cygnus.com>
1325
4a379216
UD
1326 * pthread.c (__pthread_initial_thread): Pass argument to
1327 PTHREAD_START_ARGS_INITIALIZER.
1328 (__pthread_manager_thread): Likewise.
1329
1330 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1331 initialize function.
1332
f6367df2
UD
1333 * manager.c (pthread_handle_create): Remove p_startfct initialization.
1334
1335 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1336
d4c5cf80
UD
13371999-10-12 Ulrich Drepper <drepper@cygnus.com>
1338
1339 * internals.h: Correct return types for __libc_read and __libc_write.
1340
883c331a
UD
13411999-10-09 Andreas Jaeger <aj@suse.de>
1342
1343 * internals.h: Add __new_sem_post to get prototype in
1344 manager.c; include semaphore.h for needed types.
1345
c813f986
UD
13461999-10-08 Ulrich Drepper <drepper@cygnus.com>
1347
1348 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1349 directly instead of calling sem_post which should not be necessary
1350 but is faster and might help in some case to work around problems.
c1422e5b 1351 Patch by khendricks@ivey.uwo.ca [libc/1382].
c813f986 1352
0f5219d4
UD
13531999-10-08 Andreas Schwab <schwab@suse.de>
1354
1355 * sysdeps/pthread/Subdirs: New file.
1356 * Implies: Removed.
1357
9640bbe1
UD
13581999-10-07 Ulrich Drepper <drepper@cygnus.com>
1359
1360 * Implies: New file.
1361 * internals.h (struct _pthread_descr_struct): Add p_startfct.
1362 * manager.c (pthread_handle_create): Initialize p_startfct.
1363 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
1364
079c00e6
UD
13651999-09-25 Ulrich Drepper <drepper@cygnus.com>
1366
d790bc34
UD
1367 * manager.c (__linuxthreads_pthread_threads_max): New variable.
1368 * specific.c (__linuxthreads_pthread_keys_max): New variable.
6e42b0f1 1369 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
d790bc34 1370
079c00e6
UD
1371 * condvar.c (pthread_cond_timedwait_relative): Never return with
1372 EINTR. Patch by Andreas Schwab.
1373
b5c69d99
UD
13741999-09-19 Ulrich Drepper <drepper@cygnus.com>
1375
1376 * signals.c (sigaction): Correct last patch. Don't select
1377 pthread_sighandler_rt based on the signal number but instead of
1378 the SA_SIGINFO flag.
1379
d790bc34
UD
13801999-09-23 Ulrich Drepper <drepper@cygnus.com>
1381
1382 * specific.c: Move definitions of struct pthread_key_struct and
1383 destr_function to ...
1384 * internals.h: ...here.
1385
9cf44e65
UD
13861999-09-18 Ulrich Drepper <drepper@cygnus.com>
1387
1388 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
1389 this instead of pthread_handle_sigrestart if the signal is an RT
1390 signal.
1391
1392 * signals.c: Handle passing through of sighandler arguments also
1393 for real-time signals.
1394
4fe53b3a
UD
13951999-09-03 Andreas Schwab <schwab@suse.de>
1396
1397 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
1398 fork as weak alias.
1399 (__vfork): New function, alias vfork.
1400 * Versions: Export __fork, vfork, and __vfork in libpthread.
1401
1d0b89a4
UD
14021999-08-23 Andreas Schwab <schwab@suse.de>
1403
1404 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
1405 call to signal handler.
1406
6570e194
UD
14071999-08-20 Ulrich Drepper <drepper@cygnus.com>
1408
1409 * pthread.c (__pthread_reset_main_thread): Undo last change.
1410 (__pthread_kill_other_threads_np): Reset signal handlers for the
1411 signals we used in the thread implementation here.
1412
70aea399
UD
14131999-08-19 Ulrich Drepper <drepper@cygnus.com>
1414
2b638910 1415 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
68ea6c18 1416 for the signals we used in the thread implementation [PR libc/1234].
2b638910 1417
264ec183
UD
1418 * Versions: Export __pthread_kill_other_threads_np from libpthread
1419 for GLIBC_2.1.2.
1420
70aea399
UD
1421 * signals.c: Pass sigcontext through wrapper to the user function.
1422
ff5fad16
UD
14231999-08-01 Ulrich Drepper <drepper@cygnus.com>
1424
1425 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
1426 __libc_internal_tsd_set.
1427
6b798621
UD
14281999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1429
1430 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
1431 needed anymore.
1432
76a16b8f
UD
14331999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1434
4bf307e3 1435 * internals.h: Align _pthread_descr_struct to 32 bytes.
76a16b8f
UD
1436 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
1437 libc/1206.
1438
5ef2d37b
UD
14391999-07-09 Ulrich Drepper <drepper@cygnus.com>
1440
1441 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
1442 swap function.
1443
c2fa5b5a
UD
14441999-07-09 Cristian Gafton <gafton@redhat.com>
1445
1446 * Makefile (libpthread-routines): Add oldsemaphore routine.
ae3c1571
UD
1447 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
1448 sem_trywait, and sem_wait to GLIBC_2.1.
c2fa5b5a
UD
1449 * oldsemaphore.c: New file.
1450 * semaphore.c: Add default_symbol_versions for the changed functions.
1451 (__new_sem_init): Rename from sem_init.
1452 (__new_sem_post): Rename from sem_post.
1453 (__new_sem_wait): Rename from sem_wait.
1454 (__new_sem_trywait): Rename from sem_trywait.
1455 (__new_sem_getvalue): Rename from sem_getvalue.
1456 (__new_sem_destroy): Rename from sem_destroy.
1457
6a1db4ff
UD
14581999-06-23 Robey Pointer <robey@netscape.com>
1459
1460 * internals.h: Added p_nextlock entry to separate queueing for a
1461 lock from queueing for a CV (sometimes a thread queues on a lock
1462 to serialize removing itself from a CV queue).
1463 * pthread.c: Added p_nextlock to initializers.
1464 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
1465
019e7a64
UD
14661999-07-09 Ulrich Drepper <drepper@cygnus.com>
1467
1468 * manager.c (pthread_handle_create): Free mmap region after stack
1469 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
1470
33d1a2c5
UD
14711999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1472
1473 * man/pthread_cond_init.man: Correct example.
1474 Reported by Tomas Berndtsson <tomas@nocrew.org>.
1475
1476 * linuxthreads.texi (Condition Variables): Likewise.
1477
407d26b7
UD
14781999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
1479
1480 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
1481 casx not cas, also successful casx returns the old value in rd
1482 and not the new value.
1483
431c33c0
UD
14841999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
1485
1486 * manager.c: If pthread_create() is given a NULL attribute
1487 and the thread manager runs with a realtime policy, set the
1488 scheduling policy of the newly created thread back to SCHED_OTHER.
1489 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
1490 initialize the schedpolicy field of new_thread->p_start_args
1491 to that of the calling thread.
1492
2c68584c
UD
14931999-04-29 Ulrich Drepper <drepper@cygnus.com>
1494
1495 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
1496 instruction does not allow memory element to use offset.
1497
390500b1
UD
14981999-04-28 Ulrich Drepper <drepper@cygnus.com>
1499
1500 * manager.c (pthread_allocate_stack): Optimize initialization of new
1501 thread descriptor.
1502
89afc233
UD
1503 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
1504 Don't use initializer since it is all zeroes.
1505 (__libc_once_define): Likewise.
1506
1e76ce9c
UD
15071999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1508
1509 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
1510 doesn't exist anymore.
1511 * sysdeps/i386/Implies: Likewise.
1512 * sysdeps/m68k/Implies: Likewise.
1513 * sysdeps/mips/Implies: Likewise.
1514 * sysdeps/powerpc/Implies: Likewise.
1515 * sysdeps/sparc/sparc32/Implies: Likewise.
1516 * sysdeps/sparc/sparc64/Implies: Likewise.
1517
46a4682d
UD
15181999-04-15 Ulrich Drepper <drepper@cygnus.com>
1519
1520 * sysdeps/alpha/bits/semaphore.h: Removed.
1521 * sysdeps/powerpc/bits/semaphore.h: Removed.
1522 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1523 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1524 * Makefile (headers): Remove bits/semaphore.h.
1525
1526 * semaphore.h: Define _pthread_descr if necessary.
1527 Don't include limits.h. Define SEM_VALUE_MAX directly.
1528 Define SEM_FAILED.
1529 (sem_t): Protect element names with leading __.
1530 Add declarations for sem_close, sem_open, and sem_unlink.
1531 * semaphore.c: Adjust all functions for new element names.
1532 Define sem_close, sem_open, and sem_unlink.
1533 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
1534 GLIBC_2.1.1.
1535 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
1536 necessary.
1537
ea48e2c4
UD
15381999-03-16 H.J. Lu <hjl@gnu.org>
1539
1540 * specific.c (pthread_key_delete): Check th->p_terminated to see
1541 if the thread is running.
1542
670af0d9
UD
1543 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
1544 Added to GLIBC_2.0 for libc.so.
1545
0543cd26
UD
15461999-02-12 H.J. Lu <hjl@gnu.org>
1547
1548 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
1549 __libc_allocate_rtsig): Added to GLIBC_2.1.
1550
1551 * internals.h (DEFAULT_SIG_RESTART): Removed.
1552 (DEFAULT_SIG_CANCEL): Removed.
1553
1554 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
1555 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
1556 (__pthread_sig_restart, __pthread_sig_cancel,
1557 __pthread_sig_debug): Initialized.
1558 (pthread_initialize): Call init_rtsigs () to initialize
1559 real-time signals.
1560
f5492334
UD
15611999-02-03 H.J. Lu <hjl@gnu.org>
1562
1563 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
1564 Don't restart the thread which sent REQ_DEBUG.
1565 (pthread_start_thread): Check if __pthread_sig_debug > 0
1566 before debugging.
1567
1568 * pthread.c (__pthread_initialize_manager): Suspend ourself
1569 after sending __pthread_sig_debug to gdb instead of
1570 __pthread_sig_cancel.
1571
8f0302ee
UD
15721999-01-24 H.J. Lu <hjl@gnu.org>
1573
1574 * manager.c (__pthread_manager): Delete __pthread_sig_debug
1575 from mask if __pthread_sig_debug > 0.
1576 (pthread_handle_create): Increment __pthread_handles_num.
1577
1578 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
1579 * pthread.c (__pthread_initialize_manager): Likewise.
1580
1581 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
1582 instead of __libc_allocate_rtsig (2).
1583 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
1584 instead of __pthread_sig_cancel.
1585 (pthread_handle_sigdebug): Fix comments.
1586
82df2969
UD
15871999-01-21 Ulrich Drepper <drepper@cygnus.com>
1588
1589 * manager.c (pthread_allocate_stack): Set
1590 __pthread_nonstandard_stacks if user-specified stack is used.
1591
482eec0d
UD
15921999-01-16 Ulrich Drepper <drepper@cygnus.com>
1593
1594 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1595 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1596
b92ad8d6
UD
15971999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
1598
1599 * pthread.c: Use a third signal __pthread_sig_debug distinct
1600 from __pthread_sig_cancel to notify gdb when a thread is
1601 created
1602 * manager.c: Likewise.
1603 * internals.h: Likewise.
1604 * signals.c: The implementation of sigwait(s) assumed that
1605 all signals in s have signal handlers already attached.
1606 This is not required by the standard, so make it work
1607 also if some of the signals have no handlers.
1608
34992338
UD
16091999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1610
1611 * linuxthreads.texi: Remove pointers from first @node. Move old
1612 @node spec inside comment.
1613
118bad87
UD
16141998-12-31 Ulrich Drepper <drepper@cygnus.com>
1615
1616 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1617 _IO_lock_unlock.
1618
c046e7a5
UD
16191998-12-29 Ulrich Drepper <drepper@cygnus.com>
1620
1621 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1622 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1623
361d49e6
UD
16241998-12-21 Ulrich Drepper <drepper@cygnus.com>
1625
1626 * manager.c: Threads now send __pthread_sig_cancel on termination.
1627 Change clone call and signal masks.
1628 * thread.c (pthread_handle_sigrestart): Remove special code for
1629 manager.
1630 (pthread_handle_sigcancel): In manager thread call
1631 __pthread_manager_sighandler.
1632 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1633 * sysdeps/i386/i686/pt-machine.h: Likewise.
1634 Patches by Xavier Leroy.
1635
4260bc74
UD
16361998-12-14 Ulrich Drepper <drepper@cygnus.com>
1637
361d49e6 1638 * spinlock.c (__pthread_unlock): Don't crash if called for an
fbaf6e72
UD
1639 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1640
4260bc74
UD
1641 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1642 overall runtime.
1643
e3743e2f
UD
16441998-12-13 Ulrich Drepper <drepper@cygnus.com>
1645
1646 * Examples/ex3.c: Wait until all threads are started before
1647 searching for the number to avoid race condition on very fast
1648 systems.
1649
8632b240
UD
16501998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1651
1652 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2eda5d9b 1653 declaration since it's not needed.
8632b240
UD
1654
1655 * sysdeps/pthread/pthread.h: Move internal functions to ...
1656 * internals.h: ...here.
1657
a6ff34d7
UD
16581998-12-02 H.J. Lu <hjl@gnu.org>
1659
1660 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1661 SIGRTMIN is defined.
1662 (__pthread_sig_cancel): Likewise.
1663
628a0aa1
UD
16641998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1665
1666 * wrapsyscall.c: Include <sys/mman.h> for msync,
1667 <stdlib.h> for system and <termios.h> for tcdrain prototype.
1668 Correct msync declaration.
1669
348ed515
UD
16701998-11-29 Roland McGrath <roland@baalperazim.frob.com>
1671
1672 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1673 __libc_tsd_set): New macros for new interface.
1674 * no-tsd.c: New file, provide uninitialized defns of
1675 __libc_internal_tsd_get and __libc_internal_tsd_set.
1676 * Makefile (routines): Add no-tsd.
1677
16781998-10-12 Roland McGrath <roland@baalperazim.frob.com>
1679
1680 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1681 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1682 __libc_internal_tsd_set): Move decls to ...
1683 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1684 declarations.
1685
1686 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1687 __libc_internal_tsd_set): Make these pointers to functions, not
1688 functions; remove #pragma weak decls for them.
1689 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1690 Define static functions and initialized pointers to them.
1691
97dac76c
UD
16921998-11-18 Ulrich Drepper <drepper@cygnus.com>
1693
1694 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1695 (CFLAGS-specific.c): Likewise.
1696 (CFLAGS-pthread.c): Likewise.
1697 (CFLAGS-ptfork.c): Likewise.
1698 (CFLAGS-cancel.c): Likewise.
1699 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1700 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1701
1702 * mutex.c (pthread_mutex_init): Define as strong symbol.
1703 (pthread_mutex_destroy): Likewise.
1704 (pthread_mutex_trylock): Likewise.
1705 (pthread_mutex_lock): Likewise.
1706 (pthread_mutex_unlock): Likewise.
1707 (pthread_mutexattr_init): Likewise.
1708 (pthread_mutexattr_destroy): Likewise.
1709 (pthread_once): Likewise.
1710 * ptfork.c (pthread_atfork): Likewise.
1711 * specific.c (pthread_key_create): Likewise.
1712 (pthread_setspecific): Likewise.
1713 (pthread_getspecific): Likewise.
1714
8b7fb588
UD
17151998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1716
1717 * linuxthreads.texi: Fix punctuation after xref.
1718
d2537a47
UD
17191998-11-10 H.J. Lu <hjl@gnu.org>
1720
1721 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1722 if it is defined in <linux/limits.h>.
1723
d5cabaa4
UD
17241998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
1725
1726 * spinlock.h (__pthread_trylock): Define inline.
1727 (__pthread_lock): Add extra parameter to declaration. Declare
1728 using internal_function.
1729 (__pthread_unlock): Declare using internal_function.
1730 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
1731 of local variable self. Avoid recomputing self. Define using
1732 internal_function.
1733 (__pthread_trylock): Remove.
1734 (__pthread_unlock): Define using internal_function.
1735 * cancel.c: Adjust for __pthread_lock interface change. Use already
1736 computed self value is possible.
1737 * condvar.c: Likewise.
1738 * join.c: Likewise.
1739 * manager.c: Likewise.
1740 * mutex.c: Likewise.
1741 * pthread.c: Likewise.
1742 * rwlock.c: Likewise.
1743 * semaphore.c: Likewise.
1744 * signals.c: Likewise.
1745
c70ca1fa
UD
17461998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
1747
1748 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1749 __ to field names of the struct.
1750 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1751 Likewise.
1752 (pthread_attr_t): Likewise.
1753 (pthread_cond_t): Likewise.
1754 (pthread_condattr_t): Likewise.
1755 (pthread_mutex_t): Likewise.
1756 (pthread_mutexattr_t): Likewise.
1757 (pthread_rwlock_t): Likewise.
1758 (pthread_rwlockattr_t): Likewise.
1759 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1760 * cancel.c: Likewise.
1761 * condvar.c: Likewise.
1762 * manager.c: Likewise.
1763 * mutex.c: Likewise.
1764 * pthread.c: Likewise.
1765 * ptlongjmp.c: Likewise.
1766 * rwlock.c: Likewise.
1767 * spinlock.c: Likewise.
1768
a5d1d726
UD
17691998-10-09 Ulrich Drepper <drepper@cygnus.com>
1770
7ccc548b
UD
1771 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1772 also with PT_EI.
1773
a5d1d726
UD
1774 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1775 definitions.
1776
9a29bc37
UD
1777 * Makefile (libpthread-routines): Add pt-machine.
1778 * pt-machine.c: New file.
1779 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1780 yet defined. Use PT_EI in extern inline definitions.
1781 * sysdeps/arm/pt-machine.h: Likewise.
1782 * sysdeps/i386/pt-machine.h: Likewise.
1783 * sysdeps/i386/i686/pt-machine.h: Likewise.
1784 * sysdeps/m68k/pt-machine.h: Likewise.
1785 * sysdeps/mips/pt-machine.h: Likewise.
1786 * sysdeps/powerpc/pt-machine.h: Likewise.
1787 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1788 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1789
c10bb795
UD
17901998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1791
1792 * semaphore.h: Include <sys/types.h> so that _pthread_descr
1793 is declared.
1794
17951998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
1796
1797 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1798 argument.
1799 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1800
18011998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1802
d364e525
UD
1803 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
1804 guard.
c10bb795 1805
5e0889da
UD
18061998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1807
1808 * signals.c (sigaction): Check that sig is less than NSIG to avoid
1809 array index overflow.
1810
6796bc80
UD
18111998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
1812
1813 * sysdeps/pthread/semaphore.h: New file.
1814
be935610
UD
18151998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
1816
1817 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1818 _LIBC_TSD_KEY_DL_ERROR.
1819
bfce746a
UD
18201998-08-31 Ulrich Drepper <drepper@cygnus.com>
1821
7afab53d 1822 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
6a805a0b 1823 * sysdeps/i386/pt-machine.h: Likewise.
bfce746a
UD
1824 Suggested by Roland McGrath.
1825
75311719
UD
18261998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
1827
1828 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1829 access thread data with non-constant offsets.
1830 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1831 necessary.
1832
1833 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
1834 THREAD_SETMEM_NC definitions.
1835
1836 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1837 THREAD_SETMEM_NC.
1838 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1839
00a2f9aa
UD
18401998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
1841
1842 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1843 not already defined.
1844 (struct _pthread_descr_struct): Add p_self and p_nr field.
1845 * manager.c (__pthread_handles): Define second element to point
1846 to manager thread.
1847 (__pthread_handles_num): Initialize to 2.
1848 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1849 (pthread_start_thread): Likewise.
1850 (pthread_handle_create): Start search for free slot at entry 2.
1851 Initialize new fields p_self and p_nr.
1852 Call __clone with CLONE_PTRACE if available.
1853 (pthread_free): Call FREE_THREAD_SELF if available.
1854 * pthread.c (__pthread_initial_thread): Initialize new fields.
1855 (__pthread_manager_thread): Likewise.
1856 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1857
1858 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1859 elements of the thread descriptor.
1860 * condvar.c: Likewise.
1861 * errno.c: Likewise.
1862 * join.c: Likewise.
1863 * manager.c: Likewise.
1864 * pthread.c: Likewise.
1865 * ptlongjmp.c: Likewise.
1866 * semaphore.c: Likewise.
1867 * signals.c: Likewise.
1868 * specific.c: Likewise.
1869 * spinlock.c: Likewise.
1870
1871 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1872
1873 * sysdeps/i386/useldt.h: New file.
1874 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1875
1876 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1877 THREAD_SETMEM using __thread_self.
1878 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1879
ed1ac6a2
UD
18801998-08-24 Geoff Keating <geoffk@ozemail.com.au>
1881
1882 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1883 turned out that we didn't need to queue after all.
1884
18851998-08-22 Geoff Keating <geoffk@ozemail.com.au>
1886
1887 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1888 and wastes space; correct types.
1889
cf0fd016
UD
18901998-08-08 11:18 H.J. Lu <hjl@gnu.org>
1891
1892 * signals.c (sigaction): Handle NULL argument.
1893
d358336f
UD
18941998-08-04 Ulrich Drepper <drepper@cygnus.com>
1895
1896 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1897 of sigset_t.
1898
7cabd57c
UD
18991998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1900
1901 * Makefile (linuxthreads-version): Extract correct number from
1902 Banner.
1903
ddbf7fef
UD
19041998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
1905
1906 * Banner: Bump version number to 0.8
1907 * FAQ.html: Many updates, in particular w.r.t. debugging.
1908 * manager.c: Support for non-default stacksize for
1909 LinuxThreads-allocated stacks;
1910 don't use guard pages for stacks with default size, rely on
1911 rlimit(RLIMIT_STACK) instead (it's cheaper).
1912 * attr.c: Likewise.
1913 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1914 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1915 * condvar.c: Likewise.
1916 * internals.h: Likewise.
1917 * restart.h: Likewise.
1918 * signals.c: Likewise.
1919 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1920
6c202c68
UD
19211998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1922
1923 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1924 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
1925 * Versions: Put __pthread_mutexattr_settype under version
1926 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
1927 __pthread_mutexattr_gettype.
1928
19291998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1930
1931 * sysdeps/pthread/bits/libc-lock.h: Make
1932 __pthread_mutexattr_settype weak. Don't make
1933 __pthread_mutexattr_setkind_np weak.
1934
50304ef0
UD
19351998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
1936
1937 * manager.c (pthread_handle_create): Check whether sched_setscheduler
1938 call can succeed here.
1939
1940 * mutex.c: Define __pthread_mutexattr_settype and make
1941 __pthread_mutexattr_setkind_np an alias.
1942 Likewise for __pthread_mutexattr_gettype.
1943
19441998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1945
1946 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
1947 is root.
1948
c764b9a7
UD
19491998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
1950
1951 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
1952
ceb27555
UD
19531998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1954
1955 * Examples/ex6.c: Include <unistd.h> for usleep.
1956
b1209f90
UD
19571998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1958
1959 * Examples/ex4.c (main): Use exit, not pthread_exit.
1960
6077fe6e
UD
19611998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
1962
1963 * Versions: Add __pthread_mutexattr_gettype and
1964 __pthread_mutexattr_settype.
1965 * lockfile.c: Use __pthread_mutexattr_settype instead of
1966 __pthread_mutexattr_setkind_np.
1967 * mutex.c: Define __pthread_mutexattr_gettype and
1968 __pthread_mutexattr_settype.
1969 * weak.c: Likewise.
e918a7fe
UD
1970 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
1971 __pthread_mutexattr_settype.
1972 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
1973 Use __pthread_mutexattr_settype.
6077fe6e 1974
4bae5567
UD
19751998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
1976
1977 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
1978 * mutex.c: Define weak alias pthread_mutexattr_gettype and
1979 pthread_mutexattr_settype.
1980 * sysdeps/pthread/pthread.h: Declare these functions.
1981 Move pthread_sigmask and pthread_kill declaration in separate header.
1982 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
1983
0302fece
UD
19841998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
1985
1986 * Makefile: Add rules to compile and run tests.
1987 * Examples/ex1.c: Little changes to fix warnings.
1988 * Examples/ex2.c: Likewise.
1989 * Examples/ex3.c: Likewise.
1990 * Examples/ex4.c: Likewise.
1991 * Examples/ex5.c: Likewise.
1992 * Examples/ex6.c: New file.
1993
77ccaba1
UD
19941998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
1995
6777b467 1996 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
77ccaba1 1997
ba9234d9
UD
19981998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1999
2000 * attr.c: Include <string.h>.
2001
d64fae6a
UD
20021998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
2003
2004 * attr.c: Include errno.h. Use memcpy to copy sched_param.
2005 * internals.h: Include limits.h.
2006 * manager.c: Use memcpy to copy sched_param.
2007 * ptfork.c: Include errno.h.
2008 * pthread.c: Likewise.
2009 * semaphore.c: Likewise.
2010 * specific.c: Likewise.
2011 * spinlock.h: Likewise.
2012 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
2013 type definition to ...
2014 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
2015
fdacb17d
UD
20161998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
2017
2018 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2019
2020 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2021 as macros as demanded in POSIX.1, Annex C.
2022
20231998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
2024
2025 * internals.h (struct pthread_request): For free use pthread_t
2026 instead of pthread_descr.
2027 * join.c (pthread_join): Pass thread_id, not th to manager.
2028 (pthread_detach): Likewise.
2029 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2030 (pthread_exited): Remove detached queue code.
2031 (pthread_handle_free): Expect thread ID parameter and use it to
2032 validate the thread decsriptor. Don't use detached queue.
2033 Patches by Xavier Leroy.
2034
20351998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2036
2037 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2038 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2039 __pthread_atfork, __pthread_key_create, __pthread_once.
2040 * internals.h: Doc fix.
2041 * pthread.c (__pthread_initialize): Define again.
2042
e138a800
UD
20431998-06-26 Ulrich Drepper <drepper@cygnus.com>
2044
026d5011
UD
2045 * manager.c (pthread_exited): If thread is not detached put it on
2046 special list.
2047 (pthread_handle_free): If thread is not on list with living threads
2048 search on list with detached threads.
2049
b195f6bc
UD
2050 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2051 for new definition of pthread_rwlock_t.
2052
e138a800
UD
2053 * spinlock.c: Correct test whether to compile
2054 __pthread_compare_and_swap or not.
2055
3387a425
UD
20561998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
2057
2058 * attr.c: Finish user stack support. Change locking code to be safe
2059 in situations with different priorities.
2060 * cancel.c: Likewise.
2061 * condvar.c: Likewise.
2062 * internals.h: Likewise.
2063 * join.c: Likewise.
2064 * manager.c: Likewise.
2065 * mutex.c: Likewise.
2066 * pthread.c: Likewise.
2067 * ptlongjmp.c: Likewise.
2068 * queue.h: Likewise.
2069 * rwlock.c: Likewise.
2070 * semaphore.c: Likewise.
2071 * semaphore.h: Likewise.
2072 * signals.c: Likewise.
2073 * spinlock.c: Likewise.
2074 * spinlock.h: Likewise.
75c3a84f 2075 * sysdeps/pthread/pthread.h: Likewise.
df4099e8 2076 Patches by Xavier Leroy.
3387a425 2077
0ca7e46e 2078 * sysdeps/i386/i686/pt-machine.h: New file.
75c3a84f 2079
3387a425
UD
20801998-06-25 Ulrich Drepper <drepper@cygnus.com>
2081
2082 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2083 [sg]et_stackaddr prototypes always available.
2084
2085 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2086 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2087
d47aac39
UD
20881998-06-24 Ulrich Drepper <drepper@cygnus.com>
2089
2090 * manager.c (pthread_free): Undo patch from 980430.
2091 Reported by David Wragg <dpw@doc.ic.ac.uk>.
2092
69f234e8
UD
20931998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
2094
2095 * manager.c: Define __pthread_manager_adjust_prio and use it to
2096 increase priority when needed.
2097 * internals.h: Add prototype for __pthread_manager_adjust_prio.
2098 * mutex.c: Optimize mutexes to wake up only one thread.
768cbca8 2099 * pthread.c: Move PID of manager for global variable in structure
69f234e8
UD
2100 element.
2101 Patches by Xavier Leroy.
2102
c0fb8a56
UD
21031998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
2104
2105 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2106
c6bd526f
UD
21071998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2108
2109 * attr.c: Correct typo.
2110
f9119f49
UD
21111998-05-01 Ulrich Drepper <drepper@cygnus.com>
2112
2113 * manager.c (pthread_free): Unmap guard before the stack.
2114 Patch by Matthias Urlichs.
2115
3dd2c3e2
UD
21161998-04-30 Ulrich Drepper <drepper@cygnus.com>
2117
2118 * manager.c (pthread_free): Detect already free child.
2119 Patch by Xavier Leroy, reported by Matthias Urlichs.
2120
0111b224
UD
21211998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2122
2123 * Makefile (linuxthreads-version): Renamed back from
2124 libpthread-version.
2125
f12944ec
UD
21261998-04-21 Ulrich Drepper <drepper@cygnus.com>
2127
26e119f1 2128 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
f12944ec
UD
2129 __libc_longjmp.
2130
8619129f
UD
21311998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
2132
2133 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2134 * internals.h: Add definitions for new spinlock implementation.
2135 * ptlongjmp.c: New file.
2136 * spinlock.c: New file.
2137 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2138 new function __pthread_acquire to prevent deadlocks with thread
2139 with different priorities.
2140 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2141
52cda958
UD
21421998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2143
2144 * manager.c (__pthread_manager): Reduce first argument to select
2145 to include just the needed file descriptor.
2146
48fc3dd2
UD
21471998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
2148
2149 * manager.c: Fix last patch which caused core dumps.
2150
2151 * pthread.c: Correctly handle missing SIGRTMIN.
2152
f649c201
UD
21531998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2154
2155 * libpthread.map: Add __libc_internal_tsd_get and
2156 __libc_internal_tsd_set. Add missing cancelable functions. Export
2157 libc internal versions of the cancelable functions.
2158
14c44e2e
UD
21591998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
2160
2161 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2162
5d409851
UD
21631998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
2164
2165 * attr.c: Implement pthread_attr_[gs]etguardsize,
2166 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2167 Change pthread_attr_init to have two interfaces.
2168 * internals.h (struct _pthread_descr_struct): Add new fields for
2169 above functions.
2170 * libpthread.map: Add names in GLIBC_2.1 section.
2171 * manager.c (pthread_handle_create): Implement guardsize and
2172 user stack.
2173 (pthread_free): Likewise.
2174 * pthread.c (pthread_create): Add new interface for changed
2175 pthread_attr_t.
2176 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2177 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2178 PTHREAD_STACK_MIN.
2179
5afdca00
UD
21801998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
2181
5d409851
UD
2182 * manager.c: Enable resetting of the thread scheduling policy
2183 to SCHED_OTHER when the parent thread has a different one.
5afdca00
UD
2184
21851998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
2186
2187 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2188 _POSIX_ASYNCHRONOUS_IO.
2189
2190 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2191 mutexes.
2192 * mutex.c: Implement new mutex types.
2193
2194 * internals.h: Include <signal.h>.
2195
2196 * libpthread.map: Add __erno_location and __h_errno_location.
2197
2198 * errno.c: Return pointer to variable actually in use. This might
2199 not be the one in the thread structure.
2200 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2201 and p_h_errnop.
2202 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2203 of manager thread structure.
2204 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2205 thread.
2206 * pthread.c: Adapt initializer for thread structures.
2207 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2208 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2209 current thread to global variables.
2210
22111998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
2212
2213 * rwlock.c: New file.
2214 * Makefile (libpthread-routines): Add rwlock.
2215 * sysdeps/pthread/pthread.h: Define data structures and declare
2216 functions.
2217 * libpthread.map: Add new functions.
2218
22191997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
2220
2221 * sysdeps/arm/pt-machine.h: New file; add ARM support.
2222 * sysdeps/arm/Implies: likewise.
2223 * README: Document it.
2224
22251997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2226
2227 * signals.c: Remove unneeded initializer for sigwaited, saving a
2228 warning.
2229
22301997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2231
2232 * semaphore.c (sem_init): Set sem_spinlock only if available.
2233
22341997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
2235
2236 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2237 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2238
2239 * Makefile: Update from LinuxThreads 0.7.
2240 * internals.h. Likewise.
2241 * manager.c: Likewise.
2242 * mutex.c: Likewise.
2243 * pthread.c: Likewise.
2244 * signals.c: Likewise.
2245 * specific.c: Likewise.
2246 * Examples/ex3.c: Likewise.
2247
22481997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
2249
2250 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2251 open.
2252
22531997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
2254
2255 * wrapsyscall.c: Add socket functions which are also cancelation
2256 points.
2257
22581997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
2259
2260 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2261 New functions for fast thread specific data within libc.
2262
2263 * internals.h: Add new array p_libc_specific to struct
2264 _pthread_descr_struct.
2265
2266 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2267
22681997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
2269
2270 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2271 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2272
22731997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
2274
2275 * internals.h (struct _pthread_descr_struct): Add definitions for
2276 two-level specific key handling.
2277 * manager.c (pthread_handle_create): Initialize specific memory array.
2278 * specific.c: Implement two-level key handling.
2279 * weaks.c: Don't provide dummy key handling.
2280 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2281 Add definition of __libc_key_t.
2282 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2283 as 1024.
2284 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2285 PTHREAD_DESTRUCTOR_ITERATIONS.
2286
2287 * manager.c (pthread_handle_create): Compare mmap result with
2288 MAP_FAILED.
2289
2290 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2291 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2292
22931997-08-22 19:04 Richard Henderson <rth@cygnus.com>
2294
2295 sysdeps/sparc -> sysdeps/sparc/sparc32
2296 sysdeps/sparc64 -> sysdeps/sparc/sparc64
2297
2298 * internals.h: Change definition of THREAD_SELF to be an expression,
2299 not a statement that did a return.
2300 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2301 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2302 Follow Solaris and use a "system reserved" register (%g6) to hold
2303 the thread descriptor.
2304 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2305
23061997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
2307
2308 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
2309 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2310 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2311
2312 * semaphore.c: Include spinlock.h only when needed.
2313
2314 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2315 keys for entries not in use.
2316
2317 * weaks.c: Implement key handling functions for real.
2318
23191997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
2320
2321 Initial sparc64-linux support:
d364e525
UD
2322 * sysdeps/sparc64/Implies: New file.
2323 * sysdeps/sparc64/pt-machine.h: Likewise.
5afdca00
UD
2324
23251997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
2326
2327 * semaphore.c: Include spinlock.h at correct place.
2328 Patch by HJ Lu.
2329
23301997-06-13 10:06 Richard Henderson <rth@tamu.edu>
2331
2332 The Great Bit File Move:
2333 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2334 * sysdeps/powerpc/semaphorebits.h: Likewise.
2335 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2336 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2337 * sysdeps/pthread/libc-lock.h: -> bits/
2338 * sysdeps/pthread/stdio-lock.h: Likewise.
2339 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2340 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2341 * semaphore.h: Likewise.
2342 * sysdeps/pthread/pthread.h: Likewise.
2343
2344 * lockfile.c: <foo.h> -> <bits/foo.h>.
2345 * semaphore.h: Likewise.
2346
2347 * Makefile: (headers): foo.h -> bits/foo.h.
2348 * sysdeps/pthread/Makefile: Likewise.
2349
23501997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2351
2352 * semaphore.c (sem_init): Set sem_spinlock only if available.
2353
2354 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
2355 asm constraints.
2356
23571997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
2358
2359 Update from LinuxThreads 0.6.
2360
2361 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
2362 and __sched_get_priority_min instead of names without `__'.
2363
2364 * manager.c: Rewrite large parts to implement opaque pthread_t.
2365
2366 * cancel.c: Adapt for opaque pthread_t type.
2367 * condvar.c: Likewise.
2368 * errno.c: Likewise.
2369 * join.c: Likewise.
2370 * mutex.c: Likewise.
2371 * pthread.c: Likewise.
2372 * signals.c: Likewise.
2373 * specific.c: Likewise.
2374 * restart.h: Likewise.
2375 * queue.h: Likewise.
2376 * Examples/ex3.c: Likewise.
2377 * Examples/ex4.c: Likewise.
2378 * sysdeps/pthread/pthread.h: Likewise.
2379
2380 * pthread.c: Accumulate time for all threads in thread manager.
2381
2382 * semaphore.c: Implement fallback implementation for architectures
2383 sometimes missing compare-exchange operations.
2384
2385 * cancel.c (pthread_cancel): Validate handle argument.
2386 * join.c (pthread_join): Likewise.
2387 (pthread_detach): Likewise.
2388 * signals.c (pthread_kill): Likewise.
2389
2390 * spinlock.h (acquire): Use __sched_yield not sched_yield.
2391
2392 * queue.h (enqueue): Enqueue thread according to priority.
2393
2394 * internals.c (struct pthread_start_args): New struct for passing
2395 args to cloning function.
2396 (struct _pthread): Rename to _pthread_descr_struct and adapt for
2397 opaque pthread_t.
2398
2399 * Examples/Makefile (clean): Pass -f option to rm.
2400
2401 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
2402 and define TEST_FOR_COMPARE_AND_SWAP.
2403 * sysdeps/i386/i486/pt-machine.h: Removed.
2404
2405 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
2406 to 1024.
2407
24081997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
2409
2410 * restart.h (suspend): Clear p_signal before suspending.
2411 (suspend_with_cancellation): Likewise.
2412 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
2413
2414 * weaks.c: Make __pthread_key_create return 1.
2415 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
2416 __libc_getspecific, __libc_setspecific, and __libc_key_t.
2417 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
2418 using libio.
2419
24201997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
2421
2422 * sysdeps/sparc/pt-machine (RELEASE): Fix.
2423
24241997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
2425
2426 * sysdeps/powerpc/Implies: Added.
2427 * sysdeps/powerpc/pt-machine.h: Added.
2428 * sysdeps/powerpc/semaphorebits.h: Added.
2429
24301997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
2431
d364e525 2432 * pthread.c (__pthread_initial_thread): Correct
5afdca00
UD
2433 initializer.
2434 (__pthread_manager_thread): Likewise.
2435 Reported by Andreas Jaeger.
2436
24371997-01-18 22:15 Richard Henderson <rth@tamu.edu>
2438
2439 Since sigset_t no longer fits in a register, we can't pass in the
2440 thread's initial mask so easily. Take this opportunity to simplify
2441 the clone implementation by only accepting a single void* argument.
2442
d364e525
UD
2443 * manager.c (__pthread_manager): Put thread vitals in the thread
2444 struct instead of as arguments through clone.
5afdca00 2445 (pthread_start_thread): Look for them there.
d364e525 2446 * internals.h (struct _pthread): Add p_initial_fn,
5afdca00 2447 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
d364e525 2448 * pthread.c (pthread_initialize_manager): Revise clone invocation.