Update.
[platform/upstream/glibc.git] / linuxthreads / ChangeLog
1 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2
3         * manager.c (__pthread_manager_event): Use self instead of arg
4         for INIT_THREAD_SELF.
5         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
6         _pthread_descr_struct) instead of sizeof (*descr).
7
8 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
9
10         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
11         * sysdeps/alpha/pt-machine.h: Likewise.
12         * sysdeps/arm/pt-machine.h: Likewise.
13         * sysdeps/cris/pt-machine.h: Likewise.
14         * sysdeps/hppa/pt-machine.h: Likewise.
15         * sysdeps/m68k/pt-machine.h: Likewise.
16         * sysdeps/mips/pt-machine.h: Likewise.
17         * sysdeps/powerpc/pt-machine.h: Likewise.
18         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
19         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
20         * sysdeps/sh/pt-machine.h: Likewise.
21         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
22         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
23         * sysdeps/x86_64/pt-machine.h: Likewise.
24
25 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
26
27         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
28         instead of pthread_mutexattr_setkind_np.
29         (pthread_mutexattr_gettype): Similarly.
30         * man/pthread_mutexattr_setkind_np.man: New.
31         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
32
33 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
34
35         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
36
37 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
38
39         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
40
41 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
42
43         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
44
45 2002-03-17  Andreas Jaeger  <aj@suse.de>
46
47         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
48         prototpyes.
49         * sysdeps/alpha/pt-machine.h: Likewise.
50         * sysdeps/arm/pt-machine.h: Likewise.
51         * sysdeps/cris/pt-machine.h: Likewise.
52         * sysdeps/hppa/pt-machine.h: Likewise.
53         * sysdeps/i386/i686/pt-machine.h: Likewise.
54         * sysdeps/ia64/pt-machine.h: Likewise.
55         * sysdeps/m68k/pt-machine.h: Likewise.
56         * sysdeps/mips/pt-machine.h: Likewise.
57         * sysdeps/powerpc/pt-machine.h: Likewise.
58         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
59         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
60         * sysdeps/sh/pt-machine.h: Likewise.
61         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
62         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
63         * sysdeps/x86_64/pt-machine.h: Likewise.
64
65         * internals.h: Move testandset and __compare_and_swap prototypes
66         to pt-machine.h.
67
68 2002-03-03  Andreas Jaeger  <aj@suse.de>
69
70         * errno.c: Include resolv.h to avoid warning.
71
72 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
73
74         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
75         stack limit.
76
77 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
78
79         * attr.c (pthread_getattr_np): Don't take thread descriptor size
80         into account if USE_TLS.
81         * manager.c (pthread_handle_create): Free TLS data structures if call
82         failed.  Pass correct stack to clone if USE_TLS.
83         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
84         * sysdeps/i386/i686/pt-machine.h: Likewise.
85         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
86
87         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
88         Add p_stackaddr element #if USE_TLS.
89         * internals.c: Include <tls.h>.
90         * manager.c: Integrate creating and handling of thread descriptor
91         for TLS.
92         * pthread.c: Likewise.
93         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
94         Include <linuxthreads/descr.h> only if TLS is really used.
95         (GET_DTV): New macro.
96         (TLS_INIT_TP): Initialize self pointer.
97
98 2002-02-17  Andreas Schwab  <schwab@suse.de>
99
100         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
101         not NULL.
102
103 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
104
105         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
106         (INSTALL_DTV): Adjust for being passed pointer to element with length.
107
108 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
109
110         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
111
112 2002-02-08  Richard Henderson  <rth@redhat.com>
113
114         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
115
116 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
117
118         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
119         after all.
120
121 2002-02-07  H.J. Lu  <hjl@gnu.org>
122
123         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
124         gcc warning.
125         (__pthread_spin_lock): Remove ".set noreorder".
126         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
127
128 2002-02-05  H.J. Lu  <hjl@gnu.org>
129
130         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
131         branch likely.
132         * sysdeps/mips/pt-machine.h (testandset): Likewise.
133         (__compare_and_swap): Likewise.
134
135 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
136
137         * internals.h: Move declarations/definitions of
138         __pthread_initial_thread_bos, __pthread_initial_thread,
139         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
140         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
141         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
142         * descr.h: ...here.
143         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
144         Define THREAD_GETMEM accordingly.
145
146 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
147
148         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
149
150         * sysdeps/i386/tls.h: Define THREAD_DTV.
151
152 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
153
154         * internals.h: Move thread descriptor definition...
155         * descr.h.: ...here.  New file.
156         * sysdeps/i386/tls.h: New file.
157
158 2002-02-01  H.J. Lu  <hjl@gnu.org>
159
160         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
161         different register in the delayed slot.  Use branch likely.
162
163         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
164         (__compare_and_swap): Return 0 only when failed to compare. Use
165         branch likely.
166
167 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
168
169         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
170         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
171         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
172         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
173         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
174         * sysdeps/sparc/sparc64/Versions: New file.
175         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
176
177 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
178
179         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
180         in SHARED code, use GL(dl_cpuclock_offset).
181
182 2002-01-28  Andreas Jaeger  <aj@suse.de>
183
184         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
185         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
186
187 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
188
189         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
190         (CURRENT_STACK_FRAME): Remove duplicate definition.
191         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
192
193 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
194
195         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
196         automatic inline.
197
198 2002-01-12  Andreas Schwab  <schwab@suse.de>
199
200         * Makefile (test-srcs): Add tst-signal.
201         (tests): Run tst-signal.
202         (distribute): Add tst-signal.sh.
203         * tst-signal.c, tst-signal.sh: New files.
204
205 2002-01-14  Andreas Jaeger  <aj@suse.de>
206
207         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
208
209 2002-01-11  Andreas Schwab  <schwab@suse.de>
210
211         * signals.c (sighandler): Initialize all elements to SIG_ERR.
212         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
213
214 2002-01-06  Richard Henderson  <rth@redhat.com>
215
216         * sysdeps/alpha/elf/pt-initfini.c: New file.
217
218 2001-12-29  Andreas Jaeger  <aj@suse.de>
219
220         * Examples/ex9.c: Add noreturn attribute for thread.
221         * Examples/ex10.c: Likewise.
222         * Examples/ex13.c (thread_start): Likewise.
223         * Examples/ex15.c (worker): Likewise.
224
225         * Examples/ex18.c: Include unistd.h for prototype of sleep.
226
227 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
228
229         * man/pthread_atfork.man: Adjust description of mutex handling
230         after fork for current implementation.
231         * linuxthreads.texi: Likewise [PR libc/2519].
232
233 2001-12-13  Andreas Schwab  <schwab@suse.de>
234
235         * specific.c (pthread_key_delete): Don't contact the thread
236         manager if no threads have been created yet.
237
238 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
239
240         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
241         qualifier to be safe.
242
243 2001-11-30  Andreas Schwab  <schwab@suse.de>
244
245         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
246         that self is the manager thread, and initialize the thread
247         register if not.
248         (thread_self_stack) [THREAD_SELF]: New function to find self via
249         stack pointer.
250         * manager.c (pthread_handle_create): Don't block cancel signal any
251         more.
252
253 2001-11-29  Andreas Jaeger  <aj@suse.de>
254
255         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
256         (THREAD_SELF): New.
257         (INIT_THREAD_SELF): New.
258         (THREAD_GETMEM): New.
259         (THREAD_GETMEM_NC):
260         (THREAD_SETMEM): New.
261         (THREAD_SETMEM_NC): New.
262         (FLOATING_STACKS): Define.
263         (ARCH_STACK_MAX_SIZE): Define.
264
265 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
266
267         Bugfix to pthread_key_delete. It was iterating over the thread
268         manager's linked list of threads, behind the thread manager's
269         back causing a race. The fix is to have the manager iterate over
270         the threads instead, using a new request type for doing so.
271         * internals.h (struct pthread_request): New manager request type
272         REQ_FOR_EACH_THREAD.
273         * manager.c (pthread_for_each_thread): New function.
274         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
275         * specific.c (struct pthread_key_delete_helper_args): New type.
276         (pthread_key_delete_helper): New static function.
277         (pthread_key_delete): Use the new thread manager
278         REQ_FOR_EACH_THREAD function to iterate over the threads and set
279         the delete key slot to a null value in each thread.
280         * Examples/ex18.c: New test.
281         * Makefile (tests): Add ex18.
282
283 2001-11-22  Wolfram Gloger  <wg@malloc.de>
284
285         * pthread.c (pthread_onexit_process): Don't call free
286         after threads have been asynchronously terminated.
287
288         * manager.c (pthread_handle_exit): Surround cancellation
289         of threads with __flockfilelist()/__funlockfilelist().
290
291 2001-11-26  Andreas Schwab  <schwab@suse.de>
292
293         * manager.c (pthread_handle_create): Start the child thread with
294         the cancel signal blocked, so that it does not handle it before
295         the thread register is set up.  Save errno from failed clone call.
296
297 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
298
299         * sysdeps/i386/i686/Implies: Removed.
300         * sysdeps/i386/i686/Versions: New file.
301
302 2001-10-31  Andreas Jaeger  <aj@suse.de>
303
304         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
305
306 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
307
308         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
309         to __linuxthreads_pthread_sizeof_descr to match name used by
310         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
311         linuxthreads_db/td_symbol_list.c.
312
313 2001-09-22  Andreas Jaeger  <aj@suse.de>
314
315         * linuxthreads/tst-context.c: Avoid compile warning.
316
317 2001-09-20  Andreas Jaeger  <aj@suse.de>
318
319         * shlib-versions: Add x86-64.
320
321 2001-09-19  Andreas Jaeger  <aj@suse.de>
322
323         * sysdeps/x86_64/Makefile: New file.
324         * sysdeps/x86_64/pspinlock.c: New file.
325         * sysdeps/x86_64/pt-machine.h: New file.
326
327 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
328
329         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
330         for SIGEV_NONE.
331         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
332
333 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
334             Wolfram Gloger <wg@malloc.de>
335
336         * join.c: Protect all communications from and to manager with
337         TEMP_FAILURE_RETRY.
338         * manager.c: Likewise.
339         * pthread.c: Likewise.
340         * smeaphore.c: Likewise.
341
342 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
343
344         * spinlock.c (__pthread_lock): Top max_count value with
345         MAX_ADAPTIVE_SPIN_COUNT.
346         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
347
348         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
349         help P4.
350
351 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
352
353         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
354         non-opaque type if __USE_UNIX98.
355
356 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
357
358         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
359         non-opaque lock types also if _IO_MTSAFE_IO is defined.
360
361 2001-08-23  Roland McGrath  <roland@frob.com>
362
363         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
364         new first argument, skip the cleanup handler if it's zero.
365         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
366         (__libc_lock_define_initialized_recursive): Use it.
367         * sysdeps/pthread/bits/stdio-lock.h: File removed.
368         The sysdeps/generic file from the main tree now suffices.
369
370 2001-08-22  Roland McGrath  <roland@frob.com>
371
372         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
373         instead of <pthread.h>.
374         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
375         (_IO_lock_initializer): Add braces.
376         (_IO_lock_lock): Use __libc_lock_lock_recursive.
377         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
378
379         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
380         (__libc_lock_define_initialized_recursive): Use it.
381         (__libc_lock_init_recursive): Likewise.
382         (__libc_lock_fini_recursive): Likewise.
383         (__libc_lock_lock_recursive): Likewise.
384         (__libc_lock_trylock_recursive): Likewise.
385         (__libc_lock_unlock_recursive): Likewise.
386         (__libc_lock_define_recursive): New macro.
387
388 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
389
390         * lockfile.c (__pthread_provide_lockfile): New variable.
391         * pthread.c (__pthread_require_lockfile): New variable.
392         * cancel.c (__pthread_require_lockfile): New variable.
393
394 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
395
396         * tst-context.c (threadfct): Initialize context before calling
397         makecontext.
398
399         * Examples/ex17.c: Make sure test thread is around long enough.
400
401 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
402
403         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
404
405 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
406
407         * tst-context.c (main): Print explanation before bailing out
408         because context handling is not supported.
409
410 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
411
412         * Makefile (tests): Add tst-context.
413         * tst-context.c: New file.
414
415         * sysdeps/pthread/bits/stdio-lock.h: Define
416         _IO_cleanup_region_start_noarg.
417
418 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
419
420         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
421         (ARCH_STACK_MAX_SIZE): Define.
422         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
423         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
424
425 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
426
427         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
428
429         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
430         (ARCH_STACK_MAX_SIZE): Define.
431         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
432         NEED_SEPARATE_REGISTER_STACK.
433
434 2001-07-16  Andreas Schwab  <schwab@suse.de>
435
436         * Makefile (before-compile): Don't add $(objpfx)crti.o.
437         (omit-deps): Add crti.
438         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
439         it is filtered out of the link command.
440
441 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
442
443         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
444         to find the right value for __pthread_initial_thread_bos, it's not
445         used.  If not FLOATING_STACKS first run
446         __pthread_init_max_stacksize.
447
448 2001-06-16  H.J. Lu  <hjl@gnu.org>
449
450         * internals.h: Include <stackinfo.h>.
451
452         * attr.c: Don't include <stackinfo.h> here.
453         * cancel.c: Likewise.
454         * manager.c: Likewise.
455         * pthread.c: Likewise.
456         * ptlongjmp.c: Likewise.
457
458 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
459
460         * attr.c: Make _STACK_GROWS_UP work.
461         * internals.h: Likewise.
462         * manager.c: Likewise.
463         * pthread.c: Likewise.
464
465 2001-06-15  H.J. Lu  <hjl@gnu.org>
466
467         * pthread.c (__pthread_reset_main_thread): Fix a typo.
468
469 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
470
471         * semaphore.h: Use struct _pthread_fastlock as an element of
472         sem_t instead of an identical struct.
473         * rwlock.c: Remove casts.
474         * semaphore.c: Likewise.
475
476 2001-04-30  Alan Modra  <amodra@one.net.au>
477
478         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
479
480 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
481
482         * linuxthreads.texi: Spelling corrections.
483
484 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
485
486         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
487         returning successfully.
488         Patch by Gene Cooperman <gene@ccs.neu.edu>.
489
490 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
491
492         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
493         serious work try once whether the lock is uncontested.
494         Remove duplicate reading of __status before loop.
495         Change suggested by Hans Boehm <hans_boehm@hp.com>.
496
497         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
498         (__pthread_alt_trylock): Likewise.
499
500 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
501
502         Memory barrier overhaul following line by line inspection.
503         * mutex.c (pthread_once): Missing memory barriers added.
504         * pthread.c (__pthread_wait_for_restart_signal,
505         __pthread_timedsuspend_new, __pthread_restart_new): Added
506         memory barriers ``just in case'' and for documentary value.
507         * spinlock.c (__pthread_release): New inline function for releasing
508         spinlock, to complement __pthread_acquire.  Includes memory
509         barrier prior to assignment to spinlock, and __asm __volatile
510         dance to prevent reordering or optimization of the spinlock access.
511         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
512         __pthread_alt_timedlock, __pthread_alt_unlock,
513         __pthread_compare_and_swap): Updated to use new __pthread_release
514         instead of updating spinlock directly.
515         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
516         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
517         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
518         Memory barrier overhaul.  Lots of missing memory barriers added,
519         a couple needless ones removed.
520         * spinlock.c (__pthread_compare_and_swap): testandset optimization
521         removed, just calls __pthread_acquire, which has the new read
522         barrier in it before its testandset.
523
524 2001-05-20  Roland McGrath  <roland@frob.com>
525
526         * Makeconfig: New file, variables used to be in main libc Makeconfig.
527
528 2001-05-09  Geoff Keating  <geoffk@redhat.com>
529
530         * sysdeps/powerpc/pt-machine.h
531         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
532         (__compare_and_swap): Remove memory barriers.
533         (__compare_and_swap_with_release_semantics): New function.
534
535 2001-04-24  Andreas Jaeger  <aj@suse.de>
536
537         * wrapsyscall.c: send* and recv* return ssize_t.
538
539         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
540         mutex instead of double locking it.
541         Reported by Pierre Artaud <partaud@sodatec.com>.
542
543 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
544
545         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
546         using #ifdef whether the clock is available.
547         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
548
549         * sysdeps/ia64/Versions: New file.
550
551         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
552         have to call __gmon_start__ in the libpthread DSO.
553         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
554
555         * Makefile (libpthread-routines): Add ptclock_gettime and
556         ptclock_settime.
557         * internals.h: Don't use cpuclock-init.h definitions, use
558         hp-timing.h definitions.
559         * pthread.c: Likewise.
560         * manager.c: Likewise.
561         * ptclock_gettime.c: New file.
562         * ptclock_settime.c: New file.
563         * internals.h: Fix parameter type for __pthread_clock_gettime and
564         __pthread_clock_settime.
565
566         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
567         * sysdeps/i386/i586/ptclock_settime.c: Removed.
568         * sysdeps/i386/i586/Makefile: Removed.
569
570 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
571
572         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
573         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
574
575 2001-04-21  Andreas Jaeger  <aj@suse.de>
576
577         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
578         attribute, remove statements that will never be executed.
579         (thread_func): Remove mutex_unlock call since it's never executed.
580         (thread_func): Fix comment as suggested by Jakub Jelinek.
581
582         * manager.c (__pthread_manager): Add noreturn
583         attribute.
584         (pthread_start_thread): Likewise, remove return statement.
585         (pthread_start_thread_event): Likewise.
586         Add noreturn attribute for pthread_handle_exit.
587         * weaks.c: Add noreturn attribute for pthread_exit.
588
589         * internals.h: Add __pthread_clock_gettime and
590         __pthread_clock_settime prototypes.
591
592 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
593
594         * internals.h: Include <cpuclock-init.h>.
595         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
596         CPUCLOCK_VARDEF is defined.
597         * pthread.c (__pthread_initialize_minimal): Initialize
598         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
599         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
600         for new thread to current CPU clock value.
601
602         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
603
604         * sysdeps/i386/i586/Makefile: New file.
605         * sysdeps/i386/i586/Versions: New file.
606         * sysdeps/i386/i586/ptclock_gettime.c: New file.
607         * sysdeps/i386/i586/ptclock_settime.c: New file.
608         * sysdeps/i386/i686/Implies: New file.
609
610 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
611
612         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
613         $generated, not $postclean-generated.
614
615 2001-04-18  Andreas Jaeger  <aj@suse.de>
616
617         * Makefile (otherlibs): Added.
618
619 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
620
621         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
622
623 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
624
625         * signals.c (sigwait): NSIG is no signal number.  Block all
626         signals while in signal handler for signals in SET.
627         Patch by Manfred Spraul <manfred@colorfullife.com>.
628
629 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
630
631         * tst-cancel.c: Disable most tests.  Add new test where all
632         cleanup handlers must run.
633         * Makefile (tests): Add tst-cancel again.
634
635         * cancel.c (__pthread_perform_cleanup): Correct condition for
636         leaving cleanup loop early.
637
638         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
639         all the files which use CURRENT_STACK_FRAME.
640         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
641         __builtin_frame_address.
642         * sysdeps/i386/i686/pt-machine.h: Likewise.
643
644 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
645
646         * Makefile (tests): Comment out tst-cancel for now.
647
648         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
649         temporary file in object directory.
650         * Makefile: Don't allow inlining when compiling tst-cancel.c.
651         Pass $(objpfx) to tst-cancel.
652
653 2001-04-11  David S. Miller  <davem@redhat.com>
654
655         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
656         up closer to user local variables so that new cleanup heuristics work.
657         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
658
659 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
660
661         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
662         and remove it.
663         (_pthread_cleanup_push_defer): Likewise.
664
665         * tst-cancel.c (main): Fix loop printing cleanup output.
666
667 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
668
669         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
670         test.
671         (__pthread_spin_trylock): Likewise.
672         * sysdeps/sh/pt-machine.h (testandset): Likewise.
673
674 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
675
676         * join.c (pthread_exit): Move code to new function __pthread_do_exit
677         which takes an extra parameter with the current frame pointer.
678         Call new function with CURRENT_STACK_FRAME.
679         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
680         with the new parameter.
681         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
682         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
683         this parameter as the initial value the cleanup handler records are
684         compared against.  No active cleanup handler record must have an
685         address lower than the previous one and the initial record must be
686         above (below on PA) the frame address passed in.
687         (pthread_setcancelstate): Call __pthread_do_exit instead of
688         pthread_exit.
689         (pthread_setcanceltype): Likewise.
690         (pthread_testcancel): Likewise.
691         (_pthread_cleanup_pop_restore): Likewise.
692         * condvar.c (pthread_cond_wait): Likewise.
693         (pthread_cond_timedwait_relative): Likewise.
694         * manager.c (pthread_start_thread): Likewise.
695         * oldsemaphore.c (__old_sem_wait): Likewise.
696         * pthread.c (pthread_handle_sigcancel): Likewise.
697         * semaphore.c (__new_sem_wait): Likewise.
698         (sem_timedwait): Likewise.
699         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
700         to limit the cleanup handlers which get run.
701         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
702         for __pthread_perform_cleanup.
703
704         * Makefile (tests): Add tst-cancel.
705         * tst-cancel.c: New file.
706
707 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
708
709         * sysdeps/cris/pt-machine.h: New file.
710         * sysdeps/cris/pspinlock.c: New file.
711
712 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
713
714         * shlib-versions: Add case for Linux on CRIS.
715
716 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
717
718         * attr.c (pthread_getattr_np): Correct computation of stack size
719         for machiens with register stack.
720
721         * Examples/ex17.c (main): Correct detection of failed mmap call.
722
723 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
724
725         * pthread.c (__pthread_initialize_manager): Fix a typo.
726
727 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
728
729         * attr.c (__pthread_attr_setstack): Fix alignment check.
730         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
731         * Makefile (tests): Add ex17 test.
732         * Examples/ex17.c: New test.
733
734 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
735
736         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
737         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
738         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
739
740 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
741
742         * Makefile: When generating DSO link with libc_nonshared.a.
743
744 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
745
746         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
747
748 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
749
750         * internals.h (__pthread_init_max_stacksize): New prototype.
751         * attr.c (__pthread_attr_setstacksize): Call
752         __pthread_init_max_stacksize if not yet initialized.
753         * pthread.c (__pthread_init_max_stacksize): New function.
754         (__pthread_initialize_manager): Call it.
755         Patch by <dtc@cmucl.cons.org>.
756
757 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
758
759         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
760
761 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
762
763         * shlib-versions: Add rule for Linux on 64 bit S/390.
764         * sysdeps/s390/s390-64/pt-machine.h: New file.
765         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
766
767 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
768
769         * sysdeps/s390/pt-machine.h: Move to...
770         * sysdeps/s390/s390-32/pt-machine.h: ...here.
771         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
772
773 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
774
775         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
776         * attr.c: Implement pthread_getattr_np.
777         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
778         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
779         * manager.c (pthread_handle_create): Initialize p_inheritsched.
780
781 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
782
783         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
784         code alignment.
785
786 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
787
788         * manager.c (manager_mask): Removed static vesion.  Now always local
789         to __pthread_manager().
790         (manager_mask_all): Removed completely.
791         (__pthread_manager): Remove manager_mask_all initialization.
792         (pthread_handle_create): Remove code to set and reset signal mask
793         around __clone2() calls.
794
795 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
796
797         * spinlock.c (__pthread_lock): Force lock->__status to be read from
798         memory on every spin.
799
800 2001-02-10  Andreas Jaeger  <aj@suse.de>
801
802         * Makefile (extra-objs): New.
803
804 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
805
806         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
807         __pthread_initialize_minimal prototype.
808
809 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
810
811         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
812
813 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
814
815         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
816
817 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
818
819         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
820         broken code.  Patch by Jes Sorensen.
821
822 2001-02-06  Andreas Jaeger  <aj@suse.de>
823
824         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
825         to...
826         * internals.h: ...here.
827
828 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
829
830         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
831
832 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
833
834         * Versions: Remove __pthread_initialize_minimal.
835
836 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
837
838         * Makefile: Add rules to build crti.o and make it being used in
839         building libpthread.so.
840         * sysdeps/i386/Makefile: New file.
841         * sysdeps/pthread/pt-initfini.c: New file.
842
843         * pthread.c: Cleanups.
844
845 2001-01-28  Andreas Jaeger  <aj@suse.de>
846
847         * oldsemaphore.c (__old_sem_init): Adjust for last change.
848         * sysdeps/pthread/bits/libc-lock.h: Likewise.
849         * spinlock.c: Likewise.
850
851 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
852
853         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
854         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
855         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
856         * pthread.c: Likewise.
857         * spinlock.h: Likewise.
858         * sysdeps/pthread/pthread.h: Likewise.
859
860 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
861
862         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
863         as struct __pthread_attr_s.
864
865         * semaphore.h (sem_t): Cleanup namespace, rename status and
866         spinlock elements.
867
868 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
869
870         * pthread.c (pthread_onexit_process): Clear
871         __pthread_manager_thread_bos after freeing it.
872         * Makefile (tests): Add ex16.
873         * Examples/ex16.c: New file.
874
875 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
876
877         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
878         -z nodelete.
879         * pthread.c (pthread_exit_process): Rename to...
880         (pthread_onexit_process): ...this.
881         (pthread_atexit_process, pthread_atexit_retcode): New.
882         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
883         and only if HAVE_Z_NODELETE is not defined.
884         (__pthread_initialize_manager): Register pthread_atexit_retcode
885         with __cxa_atexit.
886
887 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
888
889         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
890
891 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
892
893         * Makefile (tests): Add ex15.
894         * Examples/ex15.c: New test.
895
896 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
897
898         * pthread.c (pthread_exit_process): Free memory allocated for
899         manager stack.
900
901 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
902
903         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
904         (pthread_free): Always unmap the stack.  It's safe now that we don't
905         use MAP_FIXED to allocate stacks.
906
907 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
908
909         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
910
911         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
912
913 2000-11-15  Wolfram Gloger  <wg@malloc.de>
914
915         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
916         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
917
918 2000-12-27  Andreas Jaeger  <aj@suse.de>
919
920         * Examples/ex13.c: Make local functions static.
921         * ecmutex.c: Likewise.
922         * joinrace.c: Likewise.
923         * Examples/ex14.c: Likewise.
924
925         * Examples/ex2.c: Make local functions static; reformat.
926         * Examples/ex1.c: Likewise.
927         * Examples/ex4.c: Likewise.
928         * Examples/ex5.c: Likewise.
929         * Examples/ex7.c: Likewise.
930
931         * oldsemaphore.c: Add prototypes to shut up GCC.
932         * pt-machine.c: Likewise.
933
934         * weaks.c: Add prototype for pthread_exit.
935
936         * internals.h: Add some prototypes, format prototypes and add
937         missing externs.
938         Move __libc_waitpid prototype to include/sys/wait.h.
939
940         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
941         * mutex.c: Likewise.
942         * specific.c: Likewise.
943         * ptfork.c: Likewise.
944
945         * lockfile.c: Include internals.h to get prototypes.
946         * events.c: Likewise.
947         * sysdeps/alpha/pspinlock.c: Likewise.
948         * sysdeps/arm/pspinlock.c: Likewise.
949         * sysdeps/hppa/pspinlock.c: Likewise.
950         * sysdeps/i386/pspinlock.c: Likewise.
951         * sysdeps/ia64/pspinlock.c: Likewise.
952         * sysdeps/m68k/pspinlock.c: Likewise.
953         * sysdeps/mips/pspinlock.c: Likewise.
954         * sysdeps/powerpc/pspinlock.c: Likewise.
955         * sysdeps/s390/pspinlock.c: Likewise.
956         * sysdeps/sh/pspinlock.c: Likewise.
957         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
958         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
959         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
960
961 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
962
963         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
964         (__pthread_attr_getstack): Return correct address.
965         Add warnings for using pthread_attr_getstackaddr and
966         pthread_attr_setstackaddr.
967
968 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
969
970         * Examples/ex6.c (test_thread): Make static.
971         * Examples/ex12.c (test_thread): Make static and add noreturn
972         attribute.
973
974 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
975
976         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
977         and compare_and_swap_with_release_semantics returns int not long.
978
979 2000-12-17  Andreas Jaeger  <aj@suse.de>
980
981         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
982         value.
983         * sysdeps/arm/pt-machine.h (testandset): Likewise.
984         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
985         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
986         * sysdeps/sh/pt-machine.h (testandset): Likewise.
987         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
988         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
989
990 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
991
992         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
993         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
994
995 2000-12-17  Andreas Jaeger  <aj@suse.de>
996
997         * internals.h: Add prototypes for testandset and
998         __compare_and_swap to shut up gcc warnings.
999
1000 2000-12-06  Wolfram Gloger  <wg@malloc.de>
1001
1002         * join.c (pthread_detach): Allow case where the thread has already
1003         terminated.
1004
1005 2000-12-05  Andreas Jaeger  <aj@suse.de>
1006
1007         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
1008         * sysdeps/mips/pt-machine.h (testandset): Likewise.
1009         (__compare_and_swap): Likewise.
1010         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
1011
1012 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
1013
1014         * Examples/ex3.c (main): Cast int to long before casting to void *.
1015         (search): Cast void * to long, not int.
1016         * Examples/ex8.c (main, thread): Similarly.
1017         * Examples/ex11.c (main): Similarly.
1018         * Examples/ex14.c (worker, do_test): Similarly.
1019         * ecmutex.c (worker, do_test): Similarly.
1020         (nlocks): Cast to int.
1021
1022 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
1023
1024         * linuxthreads.texi:  Add documentation for pthreads attributes
1025         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
1026         patch.  Document pthread_[sg]etconcurrency().  Mark
1027         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
1028
1029 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
1030
1031         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1032         Don't define it.
1033         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1034         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
1035
1036 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
1037
1038         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
1039         not doing it right now.
1040         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
1041
1042 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
1043
1044         * Examples/ex4.c (main): Don't use exit() to avoid warning with
1045         broken compilers.
1046
1047 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
1048
1049         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
1050         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
1051
1052         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
1053         discussing mutexes. (As per the Unix98 name for the API.)
1054         Changes documentation for pthread_mutexattr_setkind_np() and
1055         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
1056         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
1057         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
1058         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
1059         Begins to introduce discussion of the ``timed'' mutex type.  This
1060         discussion is currently incomplete.
1061         Patch by Bruce Mitchener <bruce@cubik.org>.
1062
1063 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
1064             Yutaka Niibe  <gniibe@chroot.org>
1065
1066         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
1067         has restrictions, use register.
1068
1069 2000-10-23  Andreas Schwab  <schwab@suse.de>
1070
1071         * Examples/ex14.c (TIMEOUT): Override default timeout.
1072
1073 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
1074
1075         * specific.c: Protect tsd array modification in thread data
1076         structures by getting the thread lock in pthread_key_delete and
1077         __pthread_destroy_specifics.
1078         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
1079
1080 2000-10-12  Alan Modra <alan@linuxcare.com.au>
1081
1082         * sysdeps/pthread/bits/initspin.h: New file.
1083         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
1084         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
1085         (__pthread_alt_init_lock): Likewise.
1086         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
1087
1088 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
1089
1090         * oldsemaphore.c (__old_sem_init): Release lock with
1091         LT_SPINLOCK_INIT, not zero.
1092         * spinlock.c (__pthread_unlock): Likewise.
1093         (__pthread_alt_lock): Likewise.
1094         (__pthread_alt_timedlock): Likewise.
1095         (__pthread_alt_unlock): Likewise.
1096         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
1097         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
1098         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
1099         LT_SPINLOCK_INIT do initialize spinlocks not 0.
1100
1101 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
1102
1103         * shlib-versions: Add version definitions for hppa-linux.
1104
1105 2000-10-12  Alan Modra <alan@linuxcare.com.au>
1106
1107         * sysdeps/hppa/pspinlock.c: New file.
1108         * sysdeps/hppa/pt-machine.h: New file.
1109         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
1110
1111 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
1112
1113         * mutex.c (__pthread_mutex_destroy): Correct test of
1114         busy mutex for mutexes using alternate fastlocks.
1115         Patch by dtc@cmucl.cons.org.
1116
1117 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
1118
1119         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
1120
1121 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
1122
1123         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
1124         test for owner first.
1125         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1126
1127         * cancel.c (pthread_cancel): Don't do anything if cancelation is
1128         disabled.
1129
1130 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
1131
1132         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
1133         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1134
1135         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1136         _POSIX_MONOTONIC_CLOCK.
1137
1138         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
1139         and explain why.
1140
1141 2000-09-20  Andreas Jaeger  <aj@suse.de>
1142
1143         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
1144         "testrtsig.h" conditional.
1145
1146 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
1147
1148         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
1149         pthread_attr_setstack.
1150         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
1151         pthread_attr_setstack.
1152         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
1153
1154 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
1155
1156         * Examples/ex14.c: New file.
1157         * Makefile (tests): Add ex14.
1158
1159         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
1160         mutex.  Patch by dtc@cmucl.cons.org.
1161
1162         * ecmutex.c: New file.
1163         * Makefile (tests): Add ecmutex.
1164
1165 2000-09-04  H.J. Lu  <hjl@gnu.org>
1166
1167         * attr.c (__pthread_attr_setguardsize): Use page_roundup
1168         instead of roundup to round up to the page size.
1169
1170 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
1171
1172         * manager.c (pthread_exited): Correctly report event as TD_REAP
1173         instead of TD_DEATH.  Fix comments.
1174
1175 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
1176
1177         * spinlock.h (testandset): Add cast to avoid warning.
1178         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
1179
1180 2000-09-02  Andreas Jaeger  <aj@suse.de>
1181
1182         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
1183         prototype.
1184
1185 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
1186
1187         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1188         Fix typo in last patch (_mode -> _flags).
1189
1190         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
1191         Provide definition which respects _IO_USER_LOCK flag.
1192
1193 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
1194
1195         * manager.c (pthread_allocate_stack): Clear descriptor only if not
1196         mmaped.
1197
1198 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
1199
1200         * Makefile: Add rules to build and run unload.
1201         * unload.c: New file.
1202
1203         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
1204
1205         * sysdeps/pthread/pthread.h
1206         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
1207         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
1208
1209 2000-08-24  Andreas Jaeger  <aj@suse.de>
1210
1211         * Examples/ex13.c: Include <string.h> for strerror prototype and
1212         <stdlib.h> for abort prototype.
1213         (pthr_cond_signal_mutex): Rewrite to silence GCC.
1214         (thread_start): Remove unused variable err.
1215         (main): Silence GCC warnings.
1216
1217 2000-08-22  Andreas Jaeger  <aj@suse.de>
1218
1219         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
1220
1221         * Makefile (tests): Add ex13.
1222
1223 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
1224
1225         * semaphore.h: Add restrict where required by AGd4.
1226         * sysdeps/pthread/pthread.h: Likewise.
1227         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
1228
1229 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
1230
1231         * Makefile (tests): Add ex12.  Add rule to build it.
1232         * Examples/ex12.c: New file.
1233
1234 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
1235
1236         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
1237         even though the implementation is not quite complete (but it reports
1238         it).  Define _POSIX_MESSAGE_PASSING to -1.
1239         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1240
1241 2000-08-12  Andreas Jaeger  <aj@suse.de>
1242
1243         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
1244         assembler.
1245         (__compare_and_swap): Likewise.
1246         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
1247
1248 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
1249
1250         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
1251         p_h_errnop correctly and not to NULL.
1252
1253 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
1254
1255         * Banner: Bump version number to 0.9.
1256
1257 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
1258
1259         * Makefile (tests): Add tststack.  Add rule to build the program.
1260         * tststack.c: New file.
1261
1262         * internals.h: Declare __pthread_max_stacksize.
1263         * pthread.c (__pthread_max_stacksize): New variable.
1264         (__pthread_initialize_manager): Determine __pthread_initialize_manager
1265         value.
1266         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
1267         (pthread_allocate_stack): Allow kernel to choose stack address if
1268         FLOATING_STACKS.  This also handles variable-sized stacks.
1269         Always allocate stack and guardpage together.  Use mprotect to
1270         change guardpage access.
1271         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
1272         ARCH_STACK_MAX_SIZE.
1273
1274         * attr.c (__pthread_attr_setstacksize): Also test value against
1275         upper limit.
1276
1277         * manager.c (__pthread_nonstandard_stacks): Define only if
1278         THREAD_SELF is not defined.
1279         (pthread_allocate_stack): Always initialize gardaddr to a correct
1280         value.
1281         (pthread_handle_create): Unmap thread with one call.
1282         (pthread_free): Remove test for initial thread before removing stack.
1283         Unmap stack with one call.
1284
1285         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
1286         1 to avoid removing the stack.
1287
1288 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
1289
1290         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
1291         load of spin lock to prime the cache before the atomic compare and
1292         exchange operation (cmpxchg4). This avoids the spinning on the
1293         cmpxchg4 instruction and reduces movement of the cache line back
1294         and forth between the processors (explanation by Asis K. Mallick
1295         from Intel). This basically makes the implementation operate the
1296         same as the Linux kernel implementation.
1297
1298         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
1299         * sysdeps/ia64/pspinlock.c: New file.
1300
1301 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
1302
1303         * pthread.c: Move definition of __pthread_set_own_extricate_if...
1304         * spinlock.h: ...here.  Remove locking.
1305         * internals.h: Remove __pthread_set_own_extricate_if prototype.
1306
1307         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
1308         (rwlock_rd_extricate_func): Don't determine self, let
1309         __pthread_lock do it.
1310         (rwlock_wr_extricate_func): Likewise.
1311         (rwlock_have_already): Optimize *pself handling a bit.
1312
1313         * mutex.c: Use __builtin_expect.
1314         * pthread.c: Likewise.
1315
1316 2000-08-02  Andreas Jaeger  <aj@suse.de>
1317
1318         * sysdeps/s390/pspinlock.c: New file.
1319         * sysdeps/s390/pt-machine.h: New file.
1320         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
1321
1322 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1323
1324         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
1325         R3K.
1326         * sysdeps/mips/pt-machine.h (testandset): Likewise.
1327
1328 2000-07-26  Andreas Jaeger  <aj@suse.de>
1329
1330         * pthread.c: Initialize p_sem_avail.
1331
1332 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
1333
1334         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
1335         * semaphore.c: Handle spurious wakeups.
1336
1337         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
1338         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
1339
1340         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
1341         (__pthread_wait_for_restart): Likewise.
1342
1343         * condvar.c (pthread_cond_wait): Also check whether thread is
1344         cancelable before aborting loop.
1345         (pthread_cond_timedwait): Likewise.
1346
1347         * signals.c (pthread_sighandler): Remove special code to restrore
1348         %gs on x86.
1349         (pthread_sighandler_t): Likewise.
1350
1351 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
1352
1353         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
1354         * pthread.c: Include <resolv.h>.
1355         (_res): Undefine.  Add extern declaration.
1356
1357 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
1358
1359         * pthread.c (__pthread_initial_thread): Update initializer.
1360         (__pthread_manager_thread): Likewise.
1361         (pthread_initialize): Move setrlimit call to...
1362         (__pthread_initialize_manager): ...here.
1363         (__pthread_reset_main_thread): Reset also soft limit on stack size.
1364
1365         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
1366         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
1367
1368 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
1369
1370         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
1371         __compare_and_swap to define testandset.
1372         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
1373         Define IMPLEMENT_TAS_WITH_CAS.
1374
1375 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
1376
1377         * Makefile: Pass -z nodelete to linker for libpthread.so
1378         generation if it understand this option.
1379
1380 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
1381
1382         * manager.c (pthread_handle_create): Remove initialization of
1383         new_thread->p_res._sock.
1384
1385 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
1386
1387         Bugfixes to the variant of the code for machines with no compare
1388         and swap.
1389
1390         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
1391         node was not being properly enqueued, due to failing to update
1392         the lock->__status field.
1393
1394         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
1395         being set inappropriately, causing the suspend function to be called
1396         with a null self pointer and crash.
1397
1398 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
1399
1400         * spinlock.h (__pthread_alt_trylock): Fix code used if no
1401         compare&swap is available.
1402
1403         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
1404         compare_and_swap.
1405
1406         * pthread.c (pthread_initialize): Don't use sysconf to determine
1407         whether the machine has more than one processor.
1408
1409         * spinlock.c (__pthread_alt_timedlock): Add back one of the
1410         removed thread_self calls.
1411
1412 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
1413
1414         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
1415         __compare_and_swap to compare_and_swap in code which assumes
1416         compare swap is available.
1417
1418 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
1419
1420         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
1421         bug whereby thr field of waitnode structure would not be correctly
1422         set unless a null self pointer is passed to the functions.
1423         Eliminated redundant calls to thread_self().
1424
1425 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
1426
1427         * pthread.c (__pthread_initialize_manager): Lock
1428         __pthread_manager_thread.p_lock before calling clone.
1429
1430 2000-05-05  H.J. Lu  <hjl@gnu.org>
1431
1432         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
1433         have acquire semantics.
1434         (__compare_and_swap_with_release_semantics): New inline
1435         function.
1436         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
1437
1438 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
1439
1440         * manager.c: Fix the problem with signals at startup.
1441         Change the way that thread stacks are allocated on IA64.
1442         Clean up some of the guard page allocation stuff.
1443
1444 1999-12-19  H.J. Lu  <hjl@gnu.org>
1445
1446         * internals.h (page_roundup): New.
1447         * attr.c (__pthread_attr_setguardsize); Use page_roundup
1448         instead of roundup.
1449         * manager.c (pthread_allocate_stack): Make sure guardaddr is
1450         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
1451         is define.
1452
1453 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
1454
1455         * manager.c (pthread_allocate_stack): Unmap the stack top
1456         if failed to map the stack bottom.
1457         Fix the guard page.
1458         (pthread_free): Fix the guard page.
1459
1460         * pthread.c (pthread_initialize): Set rlimit correctly for
1461         NEED_SEPARATE_REGISTER_STACK.
1462
1463 1999-12-16  H.J. Lu  <hjl@gnu.org>
1464
1465         * pthread.c (__pthread_initialize_manager): Pass
1466         __pthread_manager_thread_bos instead of
1467         __pthread_manager_thread_tos to __clone2.
1468
1469 1999-12-16  H.J. Lu  <hjl@gnu.org>
1470
1471         * manager.c (pthread_allocate_stack): Correct the calculation
1472         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
1473         stack bottom.
1474
1475 1999-12-13  H.J. Lu  <hjl@gnu.org>
1476
1477         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
1478         bit after setting ar.ccv.
1479
1480 1999-12-12  H.J. Lu  <hjl@gnu.org>
1481
1482         * manager.c (pthread_allocate_stack): Make the starting
1483         address of the stack bottom page aligned. FIXME: it may
1484         need changes in other places.
1485         (pthread_handle_create): Likewise.
1486
1487 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
1488
1489         * manager.c (pthread_allocate_stack): Handle
1490         NEED_SEPARATE_REGISTER_STACK.
1491         (pthread_handle_create): Likewise.
1492         * pthread.c (__pthread_initialize_manager): Likewise.
1493
1494         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
1495
1496 1999-12-02  H.J. Lu  <hjl@gnu.org>
1497
1498         * sysdeps/ia64/pt-machine.h: New.
1499
1500 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
1501
1502         * wrapsyscall.c: Mark non-__ protected names as weak.
1503         PR libc/1466.
1504
1505 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
1506
1507         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
1508
1509 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
1510
1511         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
1512         Add tests also to new alternative spinlock implementation.
1513         * spinlock.h: Likewise.
1514         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1515
1516 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
1517
1518         * Version: Export __sigaction.
1519         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
1520         of __sigaction.
1521         * pthread.c: Use __libc_sigaction instead of __sigaction.
1522
1523         * condvar.c: Implement pthread_condattr_getpshared and
1524         pthread_condattr_setpshared.
1525         * mutex.c: Implement pthread_mutexattr_getpshared and
1526          pthread_mutexattr_setpshared.
1527         * Versions: Export new functions.
1528         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1529
1530         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
1531         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
1532         is not selected.
1533
1534 2000-07-04  Greg McGary  <greg@mcgary.org>
1535
1536         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
1537         pragmas.  Include bp-sym.h only if _LIBC.
1538
1539 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
1540
1541         * spinlock.c (__pthread_unlock): Properly place write barrier.
1542         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1543
1544 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
1545
1546         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
1547         faster on SMP systems.  No more emulation of compare&swap for adaptive
1548         spinlocks.
1549         * spinlock.h: Likewise.
1550         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
1551         Replace fast with adaptive mutex.
1552         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
1553         * condvar.c: Likewise.
1554         * pthread.c: Define and initialize __pthread_smp_kernel variable.
1555         * internals.h: Declare __pthread_smp_kernel.
1556         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
1557         _pthread_fastlock structure.
1558         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1559
1560         * pthread.c: Remove initialization to zero from global variables.
1561
1562 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
1563
1564         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
1565
1566 2000-06-28  Greg McGary  <greg@mcgary.org>
1567
1568         * weaks.c: Wrap BP_SYM () around weak extern declarations of
1569         pthread functions that have pointers in their return+arg signatures.
1570
1571 2000-06-27  Greg McGary  <greg@mcgary.org>
1572
1573         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
1574         extern declarations of pthread functions that have pointers in
1575         their return+arg signatures.
1576
1577 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
1578
1579         * Makefile (tests): Add ex11.  Add rules to build it.
1580         * Examples/ex11.c: New file.
1581         * rwlock.c: Fix complete braindamaged previous try to implement
1582         timedout functions.
1583
1584         * spinlock.c: Pretty print.
1585
1586 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
1587
1588         * Makefile (tests): Add ex10.  Add rules to build it.
1589         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1590         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1591         * condvar.c (pthread_cond_wait): Allow mutex of kind
1592         PTHREAD_MUTEX_TIMED_NP.
1593         (pthread_cond_timedwait_relative): Likewise.
1594         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1595         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1596         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1597         (__pthread_mutex_lock): Use __pthread_alt_lock for
1598         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1599         (__pthread_mutex_timedlock): New function.
1600         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1601         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
1602         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1603         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1604         * spinlock.c: Implement alternate fastlocks.
1605         * spinlock.h: Add prototypes.
1606         * Examples/ex10.c: New file.
1607         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1608         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1609
1610         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1611         (__pthread_rwlock_timedrdlock): New function.
1612         (__pthread_rwlock_timedwrlock): New function.
1613         Use laternate fastlock function everywhere.
1614
1615 2000-06-21  Andreas Jaeger  <aj@suse.de>
1616
1617         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1618         prototype.
1619
1620         * join.c: Include <stdlib.h> for exit prototype.
1621
1622 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
1623
1624         * sysdeps/i386/useldt.h: Include <stdlib.h>.
1625
1626         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1627         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1628
1629         * Makefile (libpthread-routines): Add barrier.
1630         (tests): Add ex9.  Add rule to build ex9.
1631         * Versions: Export barrier functions.
1632         * barrier.c: New file.
1633         * Examples/ex9.c: New file.
1634         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1635         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1636         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1637
1638 2000-06-19  H.J. Lu  <hjl@gnu.org>
1639
1640         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1641         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1642         (compare_and_swap_with_release_semantics): New. Default to
1643         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1644         is not defined.
1645
1646         * spinlock.c (__pthread_unlock): Call
1647         compare_and_swap_with_release_semantics () instead of
1648         compare_and_swap ().
1649
1650 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
1651
1652         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1653         to errno directly.
1654         * sysdeps/pthread/timer_delete.c: Likewise.
1655         * sysdeps/pthread/timer_getoverr.c: Likewise.
1656         * sysdeps/pthread/timer_gettime.c: Likewise.
1657         * sysdeps/pthread/timer_settime.c: Likewise.
1658
1659 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
1660
1661         Timer nodes are now reference counted, and can be marked
1662         as deleted. This allows for the safe release of the global mutex
1663         in the middle without losing the timer being operated on.
1664
1665         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
1666         member is now an enum with three values, so that an intermediate
1667         state can be represented (deleted but not free for reuse yet).
1668         New refcount member added.
1669         * sysdeps/pthread/timer_routines.c: Likewise.
1670
1671         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1672         timer_valid): New inline functions added.
1673
1674         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1675         restructured, recursive deadlock bug fixed.
1676
1677         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1678         timer_addref to ensure that timer won't be deleted while mutex is not
1679         held. Also uses timer_invalid to perform validation of timer handle.
1680         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1681         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1682
1683 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
1684
1685         * shlib-versions: Add entry for SH.
1686         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1687
1688 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
1689
1690         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
1691         tightened up some critical regions and micro-optimized some list
1692         manipulation code.
1693
1694         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1695         Returns int value now to indicate whether timer was queued at head.
1696         * sysdeps/pthread/posix-timer.h: Likewise.
1697         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1698         new return value from __timer_thread_queue_timer to avoid waking
1699         up timer thread unnecessarily.
1700
1701         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1702         inuse flag, because this requires mutex to be held.  Callers updated
1703         to do the check when they have the mutex.
1704         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1705
1706         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1707         regions: avoids making system calls while holding timer mutex, and
1708         a few computations were moved outside of the mutex as well.
1709         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1710
1711         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1712         to list_unlink_ip, meaning idempotent.  Pointer manipulation
1713         changed to get better better code out of gcc.
1714         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1715         version of list_unlink added here.
1716         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1717         function in all places: idempotent one for timers, non-idempotent
1718         one for thread nodes.
1719         * sysdeps/pthread/timer_settime: Likewise.
1720         * sysdeps/pthread/timer_routines.c: Likewise.
1721
1722 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
1723
1724         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1725         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1726
1727         * sysdeps/pthread/Makefile: Remove tests definition.
1728
1729 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
1730             Yutaka Niibe  <gniibe@chroot.org>
1731
1732         * sysdeps/sh/pspinlock.c: New file.
1733         * sysdeps/sh/pt-machine.h: New file.
1734
1735 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
1736
1737         * Makefile (tests): Add joinrace.
1738
1739         * Examples/ex6.c: Test return value of pthread_join.
1740
1741 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
1742
1743         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1744         (__pthread_spin_trylock): Implement.
1745         (__pthread_spin_unlock): Implement.
1746         (__pthread_spin_init): Implement.
1747         (__pthread_spin_destroy): Implement.
1748
1749 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1750
1751         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1752         really append the entry.
1753
1754 2000-06-10  Andreas Jaeger  <aj@suse.de>
1755
1756         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1757
1758 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
1759
1760         * sysdeps/pthread/timer_create.c: Thread matching now done on
1761         clock type as well as thread attributes.
1762         There are individual global signal-delivering threads for
1763         different clock types.
1764         * sysdeps/pthread/posix-timer.h: Likewise.
1765         * sysdeps/pthread/timer_routines.c: Likewise.
1766
1767         * sysdeps/pthread/timer_routines.c: Thread allocation and
1768         deallocation function now remembers to put thread on active
1769         list and remove from active list.
1770         Thus now the feature of binding multiple timers
1771         to a single thread actually works.
1772
1773 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
1774
1775         * pthread.c (__pthread_create_2_1): Optimize a bit.
1776
1777         * internals.h (invalid_handle): Also test for p_terminated != 0.
1778         (nonexisting_handle): New function.  Same as old invalid_handle.
1779         * join.c (pthread_join): Use nonexisting_handle instead of
1780         invalid_handle to test for acceptable thread handle.
1781         * manager.c (pthread_handle_free): Likewise.
1782         * joinrace.c: New file.
1783         Reported by Permaine Cheung <pcheung@cygnus.com>.
1784
1785 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1786
1787         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1788         Correct handling of matching variable.
1789
1790         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1791         avoid warnings.
1792
1793         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1794         Be prepared for empty timer list.
1795
1796         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1797         CPUTIME clock ID.  Add support for thread clocks.
1798
1799         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1800         subtraction were switched.
1801
1802         * sysdeps/pthread/timer_routines.c (init_module): Use
1803         THREAD_MAXNODES threads.
1804
1805         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1806         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1807         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1808         with sigqueueinfo is this system call is available.
1809
1810         * sysdeps/pthread/timer_create.c (timer_create): Allow
1811         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1812
1813         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
1814         functionality.
1815         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1816
1817 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1818
1819         * sysdeps/pthread/posix-timer.h: New file.
1820         * sysdeps/pthread/timer_create.c: New file.
1821         * sysdeps/pthread/timer_delete.c: New file.
1822         * sysdeps/pthread/timer_getoverr.c: New file.
1823         * sysdeps/pthread/timer_gettime.c: New file.
1824         * sysdeps/pthread/timer_routines.c: New file.
1825         * sysdeps/pthread/timer_settime.c: New file.
1826         * sysdeps/pthread/tst-timer.c: New file.
1827
1828 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
1829
1830         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1831         LINK_MAX definitions if necessary.
1832
1833 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
1834
1835         Added missing fork time handling of global libio lock.
1836
1837         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1838         not just the individual stream locks. Rewritten to use new
1839         iterator interface provided by libio rather than accessing
1840         global variable.
1841
1842         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1843         which lock and unlock the stream list using the new interface
1844         provied by libio.
1845         * internals.h: Likewise.
1846
1847         * ptfork.c (__fork): Now calls __flockfilelist before fork,
1848         and __funlockfilelist in the parent after the fork.
1849         Child still calls __fresetlockfiles as before.
1850
1851         * linuxthreads.texi: Now explains what happens to streams at
1852         fork time. Also whole new section on forking and thread added.
1853         Definition of pthread_atfork moved out of Miscellaneous Functions
1854         to this new section.
1855
1856 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
1857
1858         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1859         Add missing register.
1860         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1861
1862 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
1863
1864         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1865         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1866         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1867
1868 2000-05-31  Andreas Jaeger  <aj@suse.de>
1869
1870         * sysdeps/mips/pspinlock.c: Implement spinlocks.
1871
1872 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
1873
1874         * spinlock.c (__pthread_lock): Remove ASSERT.
1875
1876         * Makefile (tests): Add ex8.
1877         * Examples/ex8.c: New file.
1878
1879 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
1880
1881         Bugfix: The pthread_atfork mechanism now takes care of its
1882         own internal mutex at fork time.
1883
1884         * ptfork.c (__fork): Revised so that the mutex is held across
1885         the fork operation and while the handlers are called, and so that
1886         the child resets the mutex.
1887
1888         * linuxthreads.texi: Updated pthread_atfork documentation to make
1889         it clear that fork and pthread_atfork can't be reentered from
1890         atfork handlers, that pthread_atfork and fork are mutually atomic,
1891         and that the handlers are inherited by the child process.
1892
1893 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
1894
1895         * Makefile (libpthread-routines): Add pspinlock.
1896         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1897         Use struct _pthread_fastlock instead of pthread_spinlock_t.
1898         * condvar.c: Likewise.
1899         * internals.h: Likewise.
1900         * join.c: Likewise.
1901         * manager.c: Likewise.
1902         * mutex.c: Likewise.
1903         * pthread.c: Likewise.
1904         * rwlock.c: Likewise.
1905         * semaphore.c: Likewise.
1906         * signals.c: Likewise.
1907         * spinlock.h: Likewise.
1908         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
1909         * sysdeps/alpha/pspinlock.c: New file.
1910         * sysdeps/arm/pspinlock.c: New file.
1911         * sysdeps/i386/pspinlock.c: New file.
1912         * sysdeps/m68k/pspinlock.c: New file.
1913         * sysdeps/mips/pspinlock.c: New file.
1914         * sysdeps/powerpc/pspinlock.c: New file.
1915         * sysdeps/sparc/sparc32/pspinlock.c: New file.
1916         * sysdeps/sparc/sparc64/pspinlock.c: New file.
1917         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1918         back to _pthread_fastlock.  Define new pthread_spinlock_t.
1919
1920 2000-05-24  Andreas Jaeger  <aj@suse.de>
1921
1922         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1923
1924 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
1925
1926         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1927
1928 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
1929
1930         * internals.h (__RES_PTHREAD_INTERNAL): Define.
1931
1932 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1933
1934         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1935         object state is represented with additional bits which distinguish
1936         whether that state was set up in the current process, or
1937         in an ancestor process. If that state was set in an ancestor,
1938         it means that a fork happened while thread was executing the init
1939         function. In that case, the state is reset to NEVER.
1940         * mutex.c (__pthread_once_fork_prepare): New function.
1941         (__pthread_once_fork_child): Likewise
1942         (__pthread_once_fork_parent): Likewise
1943         (__pthread_reset_pthread_once): Removed.
1944         * ptfork.c (__fork): Call new handlers in mutex.c.
1945         * internals.h: Declarations of new mutex.c functions added.
1946         Declaration of removed function deleted.
1947         * linuxthreads.texi: Updated documentation about pthread_once
1948         to clarify what happens under cancellation and forking.
1949
1950 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
1951
1952         * internals.h: New thread manager request type, REQ_KICK.
1953         * join.c (pthread_exit): main thread now calls exit() instead
1954         of _exit() in order to proper process cleanup.
1955         * manager.c (__pthread_manager): Do not terminate manager
1956         after unblocking main thread; wait for main thread's
1957         REQ_PROCESS_EXIT request instead.
1958         Also, added REQ_KICK case to handle new request; this just does
1959         nothing.
1960         * manager.c (pthread_exited): Do not terminate manager after
1961         unblocking main thread.
1962         * manager.c (__pthread_manager_sighandler): If the main thread
1963         is waiting for all other threads to die, send a REQ_KICK into
1964         the thread manager request pipe to get it to clean out the threads
1965         and unblock the main thread as soon as possible. This fixes
1966         the 2000 millisecond hang on shutdown bug.
1967         * Examples/ex7.c: New file, tests shutdown behavior when all threads
1968         including the main one call pthread_exit(), or implicitly do so.
1969         * Makefile (tests): Add ex7.
1970
1971 2000-05-05  Andreas Jaeger  <aj@suse.de>
1972
1973         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1974         (pthread_getcpuclockid): Correct test for ourselves.
1975
1976 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
1977
1978         * internals.h (struct _pthread_descr_struct): Reorganization.
1979         Allocate room for 16 pointers at head of the structure for future
1980         thread-local data handling.  Move p_self member in this area.
1981         * manager.c (pthread_handle_create): Adjust use of p_self.
1982         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1983         * pthread.c (__pthread_initial_thread): Adjust initialization.
1984         (__pthread_manager_thread): Likewise.
1985
1986 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
1987
1988         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1989         for eventmask larger than 1 word.
1990
1991 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
1992
1993         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1994         * pthread.c (__pthread_initialize_minimal): New function.  Perform
1995         minimal initialization.
1996         (pthread_initialize): Remove this code here.
1997         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
1998         are working around the problem in glibc.
1999
2000 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
2001
2002         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
2003         now.  First gcc must be fixed (more concrete: libgcc).
2004
2005 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
2006
2007         * pthread.c: Remove special treatement for interrupt handlers on x86.
2008         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
2009         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
2010         necessary.
2011         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
2012
2013 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
2014
2015         * join.c (pthread_exit): Set p_terminated after reporting the
2016         termination event instead of before.
2017
2018 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
2019
2020         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
2021         if __USE_UNIX98.
2022
2023 2000-04-18  Andreas Jaeger  <aj@suse.de>
2024
2025         * Versions: Use ld instead of ld.so.
2026
2027 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
2028
2029         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
2030         Remove the typedef keyword.
2031
2032 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
2033
2034         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
2035         not stbar.
2036         (READ_MEMORY_BARRIER): Define.
2037         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
2038         MEMORY_BARRIER.
2039         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
2040         headers.
2041
2042 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
2043
2044         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2045         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
2046         use thread_handle().
2047
2048 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
2049
2050         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
2051         if fast mutex is used.  Don't initialize `already_canceled' twice.
2052         Correctly test for return value of timedsuspend.
2053
2054         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
2055         therefore don't need the _rt versions of the signal handlers.
2056
2057 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
2058
2059         * pthread.c (pthread_yield): New function.
2060         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
2061         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
2062         * internals.h: Declare __pthread_yield.
2063
2064         * pthread.c (pthread_initialize): Avoid a bit more code if
2065         realtime signals are known to exist.
2066
2067         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
2068         to dynamically detect RT signals and avoid generating compatibility
2069         functions with old kernel.
2070         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
2071         __pthread_restart_new directly.
2072         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
2073         __pthread_wait_for_restart_signal directly.
2074         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
2075         __pthread_timedsuspend_new directly.
2076
2077 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
2078
2079         * condvar.c: Remove all the special code to handle cond_timedwait.
2080         Use timedsuspend instead.
2081         * internals.h: Declare __pthread_timedsuspend_old,
2082         __pthread_timedsuspend_new, and __pthread_timedsuspend.
2083         Remove declaration of __pthread_init_condvar.
2084         * pthread.c: Define __pthread_timedsuspend variable.
2085         (__pthread_timedsuspend_old): New function.  Timed suspension
2086         implementation for old Linux kernels.
2087         (__pthread_timedsuspend_new): New function.  Timed suspension
2088         implementation for new Linux kernels.
2089         * restart.h (timedsuspend): New function.  Call appropriate
2090         suspension function through __pthread_timedsuspend.
2091         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
2092         the code.
2093         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2094
2095         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
2096         undefined.
2097         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
2098         where possible.
2099         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
2100         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2101
2102         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
2103         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2104
2105 2000-04-14  Andreas Jaeger  <aj@suse.de>
2106
2107         * weaks.c: Fix typo.
2108
2109         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
2110         2.2 for linuxthreads.
2111
2112 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
2113
2114         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
2115         (pthread_getcpuclockid): Fix typo.
2116
2117 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
2118
2119         * Makefile (libpthread-routines): Add getcpuclockid.
2120         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
2121         * sysdeps/pthread/getcpuclockid.c: New file.
2122         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
2123         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
2124
2125         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
2126         Defined.
2127         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2128
2129         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
2130         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2131         and pthread_spin_unlock.
2132         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
2133         into pthread_spinlock_t.  Change all uses.
2134         * spinlock.c: Implement pthread_spin_lock.
2135         Rename __pthread_unlock to __pthread_spin_unlock and define weak
2136         alias for real name.
2137         Define pthread_spin_trylock, pthread_spin_init, and
2138         pthread_spin_destroy.
2139         Change all uses of _pthread_fastlock to pthread_spinlock_t.
2140         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
2141         Change all uses of _pthread_fastlock to pthread_spinlock_t.
2142         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
2143         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
2144         and pthread_spin_unlock.
2145         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
2146         Change all uses of _pthread_fastlock to pthread_spinlock_t.
2147         * condvar.c: Likewise.
2148         * internals.h: Likewise.
2149         * join.c: Likewise.
2150         * manager.c: Likewise.
2151         * mutex.c: Likewise.
2152         * pthread.c: Likewise.
2153         * rwlock.c: Likewise.
2154         * semaphore.c: Likewise.
2155         * signals.c: Likewise.
2156
2157         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
2158         macros.
2159         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2160
2161 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
2162
2163         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
2164         _POSIX_SHARED_MEMORY_OBJECTS.
2165
2166 2000-04-11  Andreas Jaeger  <aj@suse.de>
2167
2168         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
2169         (__compare_and_swap): Mark as modifying memory.
2170
2171 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
2172
2173         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
2174         __volatile__.
2175         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
2176         Don't have the 'asm' __volatile__.
2177
2178 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
2179
2180         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
2181         * spinlock.c (__pthread_lock): Add memory barriers.
2182         (__pthread_unlock): Likewise.
2183         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
2184         instruction.
2185         (RELEASE): Not needed anymore.
2186         (__compare_and_swap): Mark asm as modifying memory.
2187         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
2188         of MEMORY_BARRIER.
2189         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
2190         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
2191         (MEMORY_BARRIER): Define using stbar.
2192         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
2193         stbar.
2194         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
2195         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
2196         Mike Burrows <m3b@pa.dec.com>.
2197
2198 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
2199
2200         * signals.c (sigaction): Fix return value for the case SIG is one
2201         of the signals the implementation uses.
2202         Patch by Xavier.Leroy@inria.fr.
2203
2204 2000-04-01  Andreas Jaeger  <aj@suse.de>
2205
2206         * attr.c: Use shlib-compat macros.
2207         * oldsemaphore.c: Likewise.
2208         * pthread.c: Likewise.
2209         * weaks.c: Likewise.
2210
2211 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
2212
2213         * semaphore.c (sem_timedwait): New function.
2214         Patch by Carl Mailloux <carlm@oricom.ca>.
2215         * semaphore.h: Declare sem_timedwait.
2216         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
2217
2218 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
2219
2220         * sysdeps/pthread/Makefile: File removed.
2221
2222 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
2223
2224         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
2225         * internals.h (__pthread_reset_pthread_once): Add prototype.
2226         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
2227
2228         * manager.c (pthread_handle_create): Store ID of new thread before
2229         clone call.
2230
2231 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
2232
2233         * attr.c: Use new macros from shlib-compat.h to define versions.
2234         * oldsemaphore.c: Likewise.
2235         * semaphore.c: Likewise.
2236         * weaks.c: Likewise.
2237
2238         * pthread.c: Update for new SHLIB_COMPAT definition.
2239
2240         * manager.c (__pthread_manager): Unmask debug signal.
2241
2242         * pthread.c (pthread_initialize): Test for address of __dso_handle
2243         being NULL, not value.  Use __on_exit, not on_exit.
2244         Patch by Andreas Jaeger <aj@suse.de>.
2245
2246         * pthread.c: Use new macros from shlib-compat.h to define versions.
2247
2248 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
2249
2250         * pthread.c (pthread_initialize): Instead of on_exit use
2251         __cxa_atexit if __dso_label is available to allow unloading the
2252         libpthread shared library.
2253
2254 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
2255
2256         * condvar.c: Make tests for ownership of mutex less strict.
2257
2258 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
2259
2260         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
2261         current thread and return error if not.
2262         (pthread_cond_timedwait_relative_old): Likewise.
2263         (pthread_cond_timedwait_relative_new): Likewise.
2264
2265         * mutex.c (__pthread_once): Handle cancelled init function correctly.
2266         (pthread_once_cancelhandler): New function.
2267         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2268
2269 2000-03-14  Andreas Jaeger  <aj@suse.de>
2270
2271         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
2272         REG_GS.
2273         (pthread_handle_sigrestart_rt): Likewise.
2274         * signals.c (pthread_sighandler_rt): Likewise.
2275
2276 2000-03-02  Andreas Jaeger  <aj@suse.de>
2277
2278         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
2279         Reported by Sean Chen <sean.chen@turbolinux.com>.
2280
2281 2000-02-28  Andreas Jaeger  <aj@suse.de>
2282
2283         * rwlock.c: Fix typo.
2284
2285 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
2286
2287         * rwlock.c: Define __* variants of the functions and make old names
2288         aliases.
2289         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
2290         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
2291
2292 2000-02-25  Andreas Jaeger  <aj@suse.de>
2293
2294         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2295         pwrite64, lseek64, open64, and __open64 with version 2.2.
2296
2297 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
2298
2299         * semaphore.h (SEM_FAILED): Use 0 not NULL.
2300
2301 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
2302
2303         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
2304         nanosleep does not work either.  Get absolute time inside the
2305         loop.
2306         (pthread_cond_timedwait_relative_new): Likewise.
2307         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2308
2309 2000-02-13  Andreas Jaeger  <aj@suse.de>
2310
2311         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
2312         (pthread_cond_timedwait_relative_old): Likewise.
2313
2314 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
2315
2316         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
2317         but keep the code around.  A bug in the kernel prevent us from
2318         using the code.
2319         (pthread_cond_timedwait_relative_new): Likewise.
2320         (PR libc/1597 and libc/1598).
2321
2322 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
2323
2324         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
2325         loop around nanosleep calls instead of around most of the function
2326         (pthread_cond_timedwait_relative_new): Likewise.
2327         body.  Got rid of backwards goto and one local.
2328
2329 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
2330
2331         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
2332         before every nanosleep call to account for time spent in the rest
2333         of the function.
2334         (pthread_cond_timedwait_relative_new): Likewise.
2335         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
2336
2337 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
2338
2339         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
2340         from nanosleep call so that in case we restart we only wait for the
2341         remaining time.
2342         (pthread_cond_timedwait_relative_new): Likewise.
2343         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
2344
2345 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
2346
2347         * manager.c (pthread_allocate_stack): Compute guard page address
2348         correctly.  Patch by HJ Lu.
2349
2350         * sysdeps/pthread/pthread.h: Define
2351         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
2352
2353 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
2354
2355         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
2356         preference handling.
2357         (pthread_rwlockattr_setkind_np): Allow
2358         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
2359         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2360
2361 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
2362
2363         * internals.h (pthread_readlock_info): New structure.
2364         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
2365         p_untracked_readlock_count.
2366         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2367         Add initializers for new fields.
2368         * manager.c (pthread_free): Free read/write lock lists.
2369         * queue.h (queue_is_empty): New function.
2370         * rwlock.c: Implement requirements about when readers should get
2371         locks assigned.
2372         * sysdeps/pthread/pthread.h
2373         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
2374         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
2375         Define this name as well.
2376         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
2377
2378 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
2379
2380         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
2381         Adjust initializers for struct _pthread_descr_struct change.
2382         * internals.h (struct _pthread_descr_struct): Move new elements to
2383         the end.
2384
2385 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
2386
2387         Redesigned how cancellation unblocks a thread from internal
2388         cancellation points (sem_wait, pthread_join,
2389         pthread_cond_{wait,timedwait}).
2390         Cancellation won't eat a signal in any of these functions
2391         (*required* by POSIX and Single Unix Spec!).
2392         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
2393         simultaneous condition variable signal (not required by POSIX
2394         or Single Unix Spec, but nice).
2395         * spinlock.c: __pthread_lock queues back any received restarts
2396         that don't belong to it instead of assuming ownership of lock
2397         upon any restart; fastlock can no longer be acquired by two threads
2398         simultaneously.
2399         * restart.h: Restarts queue even on kernels that don't have
2400         queued real time signals (2.0, early 2.1), thanks to atomic counter,
2401         avoiding a rare race condition in pthread_cond_timedwait.
2402
2403 1999-12-31  Andreas Jaeger  <aj@suse.de>
2404
2405         * internals.h: Remove duplicate prototype declarations.
2406
2407         * weaks.c: Remove __THROW from prototypes since the file is not
2408         compiled by a C++ compiler.
2409         * internals.h: Likewise.
2410
2411 1999-12-30  Andreas Jaeger  <aj@suse.de>
2412
2413         * sysdeps/pthread/pthread.h: Move internal functions to...
2414         * sysdeps/pthread/bits/libc-lock.h: ...here.
2415
2416 1999-12-29  Andreas Jaeger  <aj@suse.de>
2417
2418         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
2419
2420 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
2421
2422         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
2423         beginning.
2424
2425         * manager.c (__pthread_start): Add one more cast to prevent
2426         warning on 64bit machines.
2427
2428 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
2429
2430         * manager.c (pthread_handle_create): Set p_pid of new thread
2431         before calling the callback function to report a new thread.
2432
2433 1999-12-20  Andreas Jaeger  <aj@suse.de>
2434
2435         * pthread.c (pthread_initialize): Move getrlimit call after
2436         setting of errno.
2437
2438 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
2439
2440         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
2441         pwrite64, lseek64, open64, and __open64.
2442         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
2443         pwrite64, lseek64, open64, and __open64.
2444
2445         * manager.c (pthread_allocate_stack): Correct computation of
2446         new_thread_bottom.  Correct handling of stack size and when the
2447         rlimit method to guard for stack growth is used.
2448         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
2449         minus one pagesize (not two).
2450
2451 1999-12-03  Andreas Jaeger  <aj@suse.de>
2452
2453         * Versions: Add __res_state with version GLIBC_2.2.
2454
2455         * errno.c (__res_state): New function to return thread specific
2456         resolver state.
2457
2458         * pthread.c (pthread_initialize): Initialize p_resp.
2459         (__pthread_reset_main_thread): Also set p_resp.
2460
2461         * manager.c (pthread_handle_create): Initialize p_resp.
2462
2463         * internals.h: Add thread specific resolver state.
2464         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
2465
2466 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
2467
2468         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
2469         beginning.
2470         * sysdeps/i386/i686/pt-machine.h: Likewise.
2471         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
2472
2473 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
2474
2475         * manager.c (pthread_start_thread_event): Initialize p_pid already
2476         here.
2477
2478 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
2479
2480         * internals.h: Add prototype for __pthread_manager_event.
2481         * manager.c (__pthread_manager_event): New function.
2482         (pthread_start_thread_event): Correct computation of self.
2483         Use INIT_THREAD_SELF.
2484         * pthread.c (__pthread_manager_thread): Initialize p_lock.
2485         (__pthread_initialize_manager): Respect event flags also for creation
2486         of the manager thread.
2487
2488 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
2489
2490         * pthread.c (__pthread_initialize_manager): Initialize
2491         __pthread_manager_thread.p_tid.
2492
2493 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
2494
2495         * internals.h: Declare __pthread_last_event.
2496         * manager.c: Define __pthread_last_event.
2497         (pthread_handle_create): Set __pthread_last_event.
2498         (pthread_exited): Likewise.
2499         * join.c (pthread_exit): Likewise.
2500
2501         * Makefile (libpthread-routines): Add events.
2502         * events.c: New file.
2503         * internals.h: Protect against multiple inclusion.
2504         Include thread_dbP.h header.
2505         (struct _pthread_descr_struct): Add new fields p_report_events and
2506         p_eventbuf.
2507         Declare event reporting functions.
2508         * join.c (pthread_exit): Signal event if this is wanted.
2509         * manager.c (__pthread_threads_events): New variable.
2510         (pthread_handle_create): Take new parameters with event information.
2511         Signal TD_CREATE event if wanted.
2512         (__pthread_manager): Adjust pthread_handle_create call.
2513         (pthread_start_thread_event): New function.  Block until manager is
2514         finished and then call pthread_start_thread.
2515         (pthread_exited): Signal TD_REAP event if wanted.
2516
2517 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
2518
2519         * restart.h (suspend_with_cancellation): Rewrite as a macro.
2520
2521         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
2522
2523 1999-10-25  Andreas Jaeger  <aj@suse.de>
2524
2525         * internals.h: Remove K&R compatibility.
2526         * no-tsd.c: Likewise.
2527         * semaphore.h: Likewise.
2528         * signals.c: Likewise.
2529         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2530         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2531         * weaks.c: Likewise.
2532
2533 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
2534
2535         * pthread.c: For i386, wrap pthread_handle_sigrestart and
2536         pthread_handle_sigcancel with functions that restore %gs from the
2537         signal context.  For each signal handling function, two wrappers
2538         are required, one for a non-RT signal and one for a RT signal.
2539         * signal.c: For i386, add code to restore %gs from the signal
2540         context in pthread_sighandler and pthread_sighandler_rt.
2541
2542 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
2543
2544         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
2545
2546 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
2547
2548         * pthread.c (__pthread_initial_thread): Pass argument to
2549         PTHREAD_START_ARGS_INITIALIZER.
2550         (__pthread_manager_thread): Likewise.
2551
2552         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
2553         initialize function.
2554
2555         * manager.c (pthread_handle_create): Remove p_startfct initialization.
2556
2557         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
2558
2559 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
2560
2561         * internals.h: Correct return types for __libc_read and __libc_write.
2562
2563 1999-10-09  Andreas Jaeger  <aj@suse.de>
2564
2565         * internals.h: Add __new_sem_post to get prototype in
2566         manager.c; include semaphore.h for needed types.
2567
2568 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
2569
2570         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
2571         directly instead of calling sem_post which should not be necessary
2572         but is faster and might help in some case to work around problems.
2573         Patch by khendricks@ivey.uwo.ca [libc/1382].
2574
2575 1999-10-08  Andreas Schwab  <schwab@suse.de>
2576
2577         * sysdeps/pthread/Subdirs: New file.
2578         * Implies: Removed.
2579
2580 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
2581
2582         * Implies: New file.
2583         * internals.h (struct _pthread_descr_struct): Add p_startfct.
2584         * manager.c (pthread_handle_create): Initialize p_startfct.
2585         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2586
2587 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
2588
2589         * manager.c (__linuxthreads_pthread_threads_max): New variable.
2590         * specific.c (__linuxthreads_pthread_keys_max): New variable.
2591         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2592
2593         * condvar.c (pthread_cond_timedwait_relative): Never return with
2594         EINTR.  Patch by Andreas Schwab.
2595
2596 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
2597
2598         * signals.c (sigaction): Correct last patch.  Don't select
2599         pthread_sighandler_rt based on the signal number but instead of
2600         the SA_SIGINFO flag.
2601
2602 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
2603
2604         * specific.c: Move definitions of struct pthread_key_struct and
2605         destr_function to ...
2606         * internals.h: ...here.
2607
2608 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
2609
2610         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
2611         this instead of pthread_handle_sigrestart if the signal is an RT
2612         signal.
2613
2614         * signals.c: Handle passing through of sighandler arguments also
2615         for real-time signals.
2616
2617 1999-09-03  Andreas Schwab  <schwab@suse.de>
2618
2619         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
2620         fork as weak alias.
2621         (__vfork): New function, alias vfork.
2622         * Versions: Export __fork, vfork, and __vfork in libpthread.
2623
2624 1999-08-23  Andreas Schwab  <schwab@suse.de>
2625
2626         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2627         call to signal handler.
2628
2629 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
2630
2631         * pthread.c (__pthread_reset_main_thread): Undo last change.
2632         (__pthread_kill_other_threads_np): Reset signal handlers for the
2633         signals we used in the thread implementation here.
2634
2635 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
2636
2637         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2638         for the signals we used in the thread implementation [PR libc/1234].
2639
2640         * Versions: Export __pthread_kill_other_threads_np from libpthread
2641         for GLIBC_2.1.2.
2642
2643         * signals.c: Pass sigcontext through wrapper to the user function.
2644
2645 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
2646
2647         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2648         __libc_internal_tsd_set.
2649
2650 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2651
2652         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2653         needed anymore.
2654
2655 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2656
2657         * internals.h: Align _pthread_descr_struct to 32 bytes.
2658         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2659         libc/1206.
2660
2661 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
2662
2663         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2664         swap function.
2665
2666 1999-07-09  Cristian Gafton  <gafton@redhat.com>
2667
2668         * Makefile (libpthread-routines): Add oldsemaphore routine.
2669         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2670         sem_trywait, and sem_wait to GLIBC_2.1.
2671         * oldsemaphore.c: New file.
2672         * semaphore.c: Add default_symbol_versions for the changed functions.
2673         (__new_sem_init): Rename from sem_init.
2674         (__new_sem_post): Rename from sem_post.
2675         (__new_sem_wait): Rename from sem_wait.
2676         (__new_sem_trywait): Rename from sem_trywait.
2677         (__new_sem_getvalue): Rename from sem_getvalue.
2678         (__new_sem_destroy): Rename from sem_destroy.
2679
2680 1999-06-23  Robey Pointer  <robey@netscape.com>
2681
2682         * internals.h: Added p_nextlock entry to separate queueing for a
2683         lock from queueing for a CV (sometimes a thread queues on a lock
2684         to serialize removing itself from a CV queue).
2685         * pthread.c: Added p_nextlock to initializers.
2686         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2687
2688 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
2689
2690         * manager.c (pthread_handle_create): Free mmap region after stack
2691         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2692
2693 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2694
2695         * man/pthread_cond_init.man: Correct example.
2696         Reported by Tomas Berndtsson <tomas@nocrew.org>.
2697
2698         * linuxthreads.texi (Condition Variables): Likewise.
2699
2700 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
2701
2702         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2703         casx not cas, also successful casx returns the old value in rd
2704         and not the new value.
2705
2706 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
2707
2708         * manager.c: If pthread_create() is given a NULL attribute
2709         and the thread manager runs with a realtime policy, set the
2710         scheduling policy of the newly created thread back to SCHED_OTHER.
2711         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2712         initialize the schedpolicy field of new_thread->p_start_args
2713         to that of the calling thread.
2714
2715 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
2716
2717         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2718         instruction does not allow memory element to use offset.
2719
2720 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
2721
2722         * manager.c (pthread_allocate_stack): Optimize initialization of new
2723         thread descriptor.
2724
2725         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2726         Don't use initializer since it is all zeroes.
2727         (__libc_once_define): Likewise.
2728
2729 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2730
2731         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2732         doesn't exist anymore.
2733         * sysdeps/i386/Implies: Likewise.
2734         * sysdeps/m68k/Implies: Likewise.
2735         * sysdeps/mips/Implies: Likewise.
2736         * sysdeps/powerpc/Implies: Likewise.
2737         * sysdeps/sparc/sparc32/Implies: Likewise.
2738         * sysdeps/sparc/sparc64/Implies: Likewise.
2739
2740 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
2741
2742         * sysdeps/alpha/bits/semaphore.h: Removed.
2743         * sysdeps/powerpc/bits/semaphore.h: Removed.
2744         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2745         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2746         * Makefile (headers): Remove bits/semaphore.h.
2747
2748         * semaphore.h: Define _pthread_descr if necessary.
2749         Don't include limits.h.  Define SEM_VALUE_MAX directly.
2750         Define SEM_FAILED.
2751         (sem_t): Protect element names with leading __.
2752         Add declarations for sem_close, sem_open, and sem_unlink.
2753         * semaphore.c: Adjust all functions for new element names.
2754         Define sem_close, sem_open, and sem_unlink.
2755         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2756         GLIBC_2.1.1.
2757         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2758         necessary.
2759
2760 1999-03-16  H.J. Lu  <hjl@gnu.org>
2761
2762         * specific.c (pthread_key_delete): Check th->p_terminated to see
2763         if the thread is running.
2764
2765         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2766         Added to GLIBC_2.0 for libc.so.
2767
2768 1999-02-12  H.J. Lu  <hjl@gnu.org>
2769
2770         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2771         __libc_allocate_rtsig): Added to GLIBC_2.1.
2772
2773         * internals.h (DEFAULT_SIG_RESTART): Removed.
2774         (DEFAULT_SIG_CANCEL): Removed.
2775
2776         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2777         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2778         (__pthread_sig_restart, __pthread_sig_cancel,
2779         __pthread_sig_debug): Initialized.
2780         (pthread_initialize): Call init_rtsigs () to initialize
2781         real-time signals.
2782
2783 1999-02-03  H.J. Lu  <hjl@gnu.org>
2784
2785         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2786         Don't restart the thread which sent REQ_DEBUG.
2787         (pthread_start_thread): Check if __pthread_sig_debug > 0
2788         before debugging.
2789
2790         * pthread.c (__pthread_initialize_manager): Suspend ourself
2791         after sending __pthread_sig_debug to gdb instead of
2792         __pthread_sig_cancel.
2793
2794 1999-01-24  H.J. Lu  <hjl@gnu.org>
2795
2796         * manager.c (__pthread_manager): Delete __pthread_sig_debug
2797         from mask if __pthread_sig_debug > 0.
2798         (pthread_handle_create): Increment __pthread_handles_num.
2799
2800         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2801         * pthread.c (__pthread_initialize_manager): Likewise.
2802
2803         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2804         instead of __libc_allocate_rtsig (2).
2805         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2806         instead of __pthread_sig_cancel.
2807         (pthread_handle_sigdebug): Fix comments.
2808
2809 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
2810
2811         * manager.c (pthread_allocate_stack): Set
2812         __pthread_nonstandard_stacks if user-specified stack is used.
2813
2814 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
2815
2816         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2817         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2818
2819 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
2820
2821         * pthread.c: Use a third signal __pthread_sig_debug distinct
2822         from __pthread_sig_cancel to notify gdb when a thread is
2823         created
2824         * manager.c: Likewise.
2825         * internals.h: Likewise.
2826         * signals.c: The implementation of sigwait(s) assumed that
2827         all signals in s have signal handlers already attached.
2828         This is not required by the standard, so make it work
2829         also if some of the signals have no handlers.
2830
2831 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2832
2833         * linuxthreads.texi: Remove pointers from first @node.  Move old
2834         @node spec inside comment.
2835
2836 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
2837
2838         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2839         _IO_lock_unlock.
2840
2841 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
2842
2843         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2844         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2845
2846 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
2847
2848         * manager.c: Threads now send __pthread_sig_cancel on termination.
2849         Change clone call and signal masks.
2850         * thread.c (pthread_handle_sigrestart): Remove special code for
2851         manager.
2852         (pthread_handle_sigcancel): In manager thread call
2853         __pthread_manager_sighandler.
2854         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2855         * sysdeps/i386/i686/pt-machine.h: Likewise.
2856         Patches by Xavier Leroy.
2857
2858 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
2859
2860         * spinlock.c (__pthread_unlock): Don't crash if called for an
2861         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2862
2863         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2864         overall runtime.
2865
2866 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
2867
2868         * Examples/ex3.c: Wait until all threads are started before
2869         searching for the number to avoid race condition on very fast
2870         systems.
2871
2872 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2873
2874         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2875         declaration since it's not needed.
2876
2877         * sysdeps/pthread/pthread.h: Move internal functions to ...
2878         * internals.h: ...here.
2879
2880 1998-12-02  H.J. Lu  <hjl@gnu.org>
2881
2882         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2883         SIGRTMIN is defined.
2884         (__pthread_sig_cancel): Likewise.
2885
2886 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
2887
2888         * wrapsyscall.c: Include <sys/mman.h> for msync,
2889         <stdlib.h> for system and <termios.h> for tcdrain prototype.
2890         Correct msync declaration.
2891
2892 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
2893
2894         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2895         __libc_tsd_set): New macros for new interface.
2896         * no-tsd.c: New file, provide uninitialized defns of
2897         __libc_internal_tsd_get and __libc_internal_tsd_set.
2898         * Makefile (routines): Add no-tsd.
2899
2900 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
2901
2902         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2903         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2904         __libc_internal_tsd_set): Move decls to ...
2905         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2906         declarations.
2907
2908         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2909         __libc_internal_tsd_set): Make these pointers to functions, not
2910         functions; remove #pragma weak decls for them.
2911         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2912         Define static functions and initialized pointers to them.
2913
2914 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
2915
2916         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2917         (CFLAGS-specific.c): Likewise.
2918         (CFLAGS-pthread.c): Likewise.
2919         (CFLAGS-ptfork.c): Likewise.
2920         (CFLAGS-cancel.c): Likewise.
2921         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2922         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2923
2924         * mutex.c (pthread_mutex_init): Define as strong symbol.
2925         (pthread_mutex_destroy): Likewise.
2926         (pthread_mutex_trylock): Likewise.
2927         (pthread_mutex_lock): Likewise.
2928         (pthread_mutex_unlock): Likewise.
2929         (pthread_mutexattr_init): Likewise.
2930         (pthread_mutexattr_destroy): Likewise.
2931         (pthread_once): Likewise.
2932         * ptfork.c (pthread_atfork): Likewise.
2933         * specific.c (pthread_key_create): Likewise.
2934         (pthread_setspecific): Likewise.
2935         (pthread_getspecific): Likewise.
2936
2937 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
2938
2939         * linuxthreads.texi: Fix punctuation after xref.
2940
2941 1998-11-10  H.J. Lu  <hjl@gnu.org>
2942
2943         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2944         if it is defined in <linux/limits.h>.
2945
2946 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
2947
2948         * spinlock.h (__pthread_trylock): Define inline.
2949         (__pthread_lock): Add extra parameter to declaration.  Declare
2950         using internal_function.
2951         (__pthread_unlock): Declare using internal_function.
2952         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
2953         of local variable self.  Avoid recomputing self.  Define using
2954         internal_function.
2955         (__pthread_trylock): Remove.
2956         (__pthread_unlock): Define using internal_function.
2957         * cancel.c: Adjust for __pthread_lock interface change.  Use already
2958         computed self value is possible.
2959         * condvar.c: Likewise.
2960         * join.c: Likewise.
2961         * manager.c: Likewise.
2962         * mutex.c: Likewise.
2963         * pthread.c: Likewise.
2964         * rwlock.c: Likewise.
2965         * semaphore.c: Likewise.
2966         * signals.c: Likewise.
2967
2968 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
2969
2970         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2971         __ to field names of the struct.
2972         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2973         Likewise.
2974         (pthread_attr_t): Likewise.
2975         (pthread_cond_t): Likewise.
2976         (pthread_condattr_t): Likewise.
2977         (pthread_mutex_t): Likewise.
2978         (pthread_mutexattr_t): Likewise.
2979         (pthread_rwlock_t): Likewise.
2980         (pthread_rwlockattr_t): Likewise.
2981         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2982         * cancel.c: Likewise.
2983         * condvar.c: Likewise.
2984         * manager.c: Likewise.
2985         * mutex.c: Likewise.
2986         * pthread.c: Likewise.
2987         * ptlongjmp.c: Likewise.
2988         * rwlock.c: Likewise.
2989         * spinlock.c: Likewise.
2990
2991 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
2992
2993         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2994         also with PT_EI.
2995
2996         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2997         definitions.
2998
2999         * Makefile (libpthread-routines): Add pt-machine.
3000         * pt-machine.c: New file.
3001         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
3002         yet defined.  Use PT_EI in extern inline definitions.
3003         * sysdeps/arm/pt-machine.h: Likewise.
3004         * sysdeps/i386/pt-machine.h: Likewise.
3005         * sysdeps/i386/i686/pt-machine.h: Likewise.
3006         * sysdeps/m68k/pt-machine.h: Likewise.
3007         * sysdeps/mips/pt-machine.h: Likewise.
3008         * sysdeps/powerpc/pt-machine.h: Likewise.
3009         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3010         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3011
3012 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
3013
3014         * semaphore.h: Include <sys/types.h> so that _pthread_descr
3015         is declared.
3016
3017 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
3018
3019         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
3020         argument.
3021         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
3022
3023 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3024
3025         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
3026         guard.
3027
3028 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3029
3030         * signals.c (sigaction): Check that sig is less than NSIG to avoid
3031         array index overflow.
3032
3033 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
3034
3035         * sysdeps/pthread/semaphore.h: New file.
3036
3037 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
3038
3039         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
3040         _LIBC_TSD_KEY_DL_ERROR.
3041
3042 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
3043
3044         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
3045         * sysdeps/i386/pt-machine.h: Likewise.
3046         Suggested by Roland McGrath.
3047
3048 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
3049
3050         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
3051         access thread data with non-constant offsets.
3052         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
3053         necessary.
3054
3055         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
3056         THREAD_SETMEM_NC definitions.
3057
3058         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
3059         THREAD_SETMEM_NC.
3060         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3061
3062 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
3063
3064         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
3065         not already defined.
3066         (struct _pthread_descr_struct): Add p_self and p_nr field.
3067         * manager.c (__pthread_handles): Define second element to point
3068         to manager thread.
3069         (__pthread_handles_num): Initialize to 2.
3070         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
3071         (pthread_start_thread): Likewise.
3072         (pthread_handle_create): Start search for free slot at entry 2.
3073         Initialize new fields p_self and p_nr.
3074         Call __clone with CLONE_PTRACE if available.
3075         (pthread_free): Call FREE_THREAD_SELF if available.
3076         * pthread.c (__pthread_initial_thread): Initialize new fields.
3077         (__pthread_manager_thread): Likewise.
3078         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
3079
3080         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
3081         elements of the thread descriptor.
3082         * condvar.c: Likewise.
3083         * errno.c: Likewise.
3084         * join.c: Likewise.
3085         * manager.c: Likewise.
3086         * pthread.c: Likewise.
3087         * ptlongjmp.c: Likewise.
3088         * semaphore.c: Likewise.
3089         * signals.c: Likewise.
3090         * specific.c: Likewise.
3091         * spinlock.c: Likewise.
3092
3093         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
3094
3095         * sysdeps/i386/useldt.h: New file.
3096         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
3097
3098         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
3099         THREAD_SETMEM using __thread_self.
3100         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3101
3102 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
3103
3104         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
3105         turned out that we didn't need to queue after all.
3106
3107 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
3108
3109         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
3110         and wastes space; correct types.
3111
3112 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
3113
3114         * signals.c (sigaction): Handle NULL argument.
3115
3116 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
3117
3118         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
3119         of sigset_t.
3120
3121 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3122
3123         * Makefile (linuxthreads-version): Extract correct number from
3124         Banner.
3125
3126 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
3127
3128         * Banner: Bump version number to 0.8
3129         * FAQ.html: Many updates, in particular w.r.t. debugging.
3130         * manager.c: Support for non-default stacksize for
3131         LinuxThreads-allocated stacks;
3132         don't use guard pages for stacks with default size, rely on
3133         rlimit(RLIMIT_STACK) instead (it's cheaper).
3134         * attr.c: Likewise.
3135         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
3136         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
3137         * condvar.c: Likewise.
3138         * internals.h: Likewise.
3139         * restart.h: Likewise.
3140         * signals.c: Likewise.
3141         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
3142
3143 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3144
3145         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
3146         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
3147         * Versions: Put __pthread_mutexattr_settype under version
3148         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
3149         __pthread_mutexattr_gettype.
3150
3151 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3152
3153         * sysdeps/pthread/bits/libc-lock.h: Make
3154         __pthread_mutexattr_settype weak.  Don't make
3155         __pthread_mutexattr_setkind_np weak.
3156
3157 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
3158
3159         * manager.c (pthread_handle_create): Check whether sched_setscheduler
3160         call can succeed here.
3161
3162         * mutex.c: Define __pthread_mutexattr_settype and make
3163         __pthread_mutexattr_setkind_np an alias.
3164         Likewise for __pthread_mutexattr_gettype.
3165
3166 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3167
3168         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
3169         is root.
3170
3171 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
3172
3173         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
3174
3175 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
3176
3177         * Examples/ex6.c: Include <unistd.h> for usleep.
3178
3179 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3180
3181         * Examples/ex4.c (main): Use exit, not pthread_exit.
3182
3183 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
3184
3185         * Versions: Add __pthread_mutexattr_gettype and
3186         __pthread_mutexattr_settype.
3187         * lockfile.c: Use __pthread_mutexattr_settype instead of
3188         __pthread_mutexattr_setkind_np.
3189         * mutex.c: Define __pthread_mutexattr_gettype and
3190         __pthread_mutexattr_settype.
3191         * weak.c: Likewise.
3192         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
3193         __pthread_mutexattr_settype.
3194         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
3195         Use __pthread_mutexattr_settype.
3196
3197 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
3198
3199         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
3200         * mutex.c: Define weak alias pthread_mutexattr_gettype and
3201         pthread_mutexattr_settype.
3202         * sysdeps/pthread/pthread.h: Declare these functions.
3203         Move pthread_sigmask and pthread_kill declaration in separate header.
3204         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
3205
3206 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
3207
3208         * Makefile: Add rules to compile and run tests.
3209         * Examples/ex1.c: Little changes to fix warnings.
3210         * Examples/ex2.c: Likewise.
3211         * Examples/ex3.c: Likewise.
3212         * Examples/ex4.c: Likewise.
3213         * Examples/ex5.c: Likewise.
3214         * Examples/ex6.c: New file.
3215
3216 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
3217
3218         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
3219
3220 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
3221
3222         * attr.c: Include <string.h>.
3223
3224 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
3225
3226         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
3227         * internals.h: Include limits.h.
3228         * manager.c: Use memcpy to copy sched_param.
3229         * ptfork.c: Include errno.h.
3230         * pthread.c: Likewise.
3231         * semaphore.c: Likewise.
3232         * specific.c: Likewise.
3233         * spinlock.h: Likewise.
3234         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
3235         type definition to ...
3236         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
3237
3238 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
3239
3240         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
3241
3242         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
3243         as macros as demanded in POSIX.1, Annex C.
3244
3245 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
3246
3247         * internals.h (struct pthread_request): For free use pthread_t
3248         instead of pthread_descr.
3249         * join.c (pthread_join): Pass thread_id, not th to manager.
3250         (pthread_detach): Likewise.
3251         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
3252         (pthread_exited): Remove detached queue code.
3253         (pthread_handle_free): Expect thread ID parameter and use it to
3254         validate the thread decsriptor.  Don't use detached queue.
3255         Patches by Xavier Leroy.
3256
3257 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3258
3259         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
3260         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
3261         __pthread_atfork, __pthread_key_create, __pthread_once.
3262         * internals.h: Doc fix.
3263         * pthread.c (__pthread_initialize): Define again.
3264
3265 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
3266
3267         * manager.c (pthread_exited): If thread is not detached put it on
3268         special list.
3269         (pthread_handle_free): If thread is not on list with living threads
3270         search on list with detached threads.
3271
3272         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
3273         for new definition of pthread_rwlock_t.
3274
3275         * spinlock.c: Correct test whether to compile
3276         __pthread_compare_and_swap or not.
3277
3278 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
3279
3280         * attr.c: Finish user stack support.  Change locking code to be safe
3281         in situations with different priorities.
3282         * cancel.c: Likewise.
3283         * condvar.c: Likewise.
3284         * internals.h: Likewise.
3285         * join.c: Likewise.
3286         * manager.c: Likewise.
3287         * mutex.c: Likewise.
3288         * pthread.c: Likewise.
3289         * ptlongjmp.c: Likewise.
3290         * queue.h: Likewise.
3291         * rwlock.c: Likewise.
3292         * semaphore.c: Likewise.
3293         * semaphore.h: Likewise.
3294         * signals.c: Likewise.
3295         * spinlock.c: Likewise.
3296         * spinlock.h: Likewise.
3297         * sysdeps/pthread/pthread.h: Likewise.
3298         Patches by Xavier Leroy.
3299
3300         * sysdeps/i386/i686/pt-machine.h: New file.
3301
3302 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
3303
3304         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
3305         [sg]et_stackaddr prototypes always available.
3306
3307         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3308         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
3309
3310 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
3311
3312         * manager.c (pthread_free): Undo patch from 980430.
3313         Reported by David Wragg <dpw@doc.ic.ac.uk>.
3314
3315 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
3316
3317         * manager.c: Define __pthread_manager_adjust_prio and use it to
3318         increase priority when needed.
3319         * internals.h: Add prototype for __pthread_manager_adjust_prio.
3320         * mutex.c: Optimize mutexes to wake up only one thread.
3321         * pthread.c: Move PID of manager for global variable in structure
3322         element.
3323         Patches by Xavier Leroy.
3324
3325 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
3326
3327         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
3328
3329 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
3330
3331         * attr.c: Correct typo.
3332
3333 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
3334
3335         * manager.c (pthread_free): Unmap guard before the stack.
3336         Patch by Matthias Urlichs.
3337
3338 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
3339
3340         * manager.c (pthread_free): Detect already free child.
3341         Patch by Xavier Leroy, reported by Matthias Urlichs.
3342
3343 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3344
3345         * Makefile (linuxthreads-version): Renamed back from
3346         libpthread-version.
3347
3348 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
3349
3350         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
3351         __libc_longjmp.
3352
3353 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
3354
3355         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
3356         * internals.h: Add definitions for new spinlock implementation.
3357         * ptlongjmp.c: New file.
3358         * spinlock.c: New file.
3359         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
3360         new function __pthread_acquire to prevent deadlocks with thread
3361         with different priorities.
3362         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
3363
3364 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3365
3366         * manager.c (__pthread_manager): Reduce first argument to select
3367         to include just the needed file descriptor.
3368
3369 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
3370
3371         * manager.c: Fix last patch which caused core dumps.
3372
3373         * pthread.c: Correctly handle missing SIGRTMIN.
3374
3375 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3376
3377         * libpthread.map: Add __libc_internal_tsd_get and
3378         __libc_internal_tsd_set.  Add missing cancelable functions. Export
3379         libc internal versions of the cancelable functions.
3380
3381 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
3382
3383         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
3384
3385 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
3386
3387         * attr.c: Implement pthread_attr_[gs]etguardsize,
3388         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
3389         Change pthread_attr_init to have two interfaces.
3390         * internals.h (struct _pthread_descr_struct): Add new fields for
3391         above functions.
3392         * libpthread.map: Add names in GLIBC_2.1 section.
3393         * manager.c (pthread_handle_create): Implement guardsize and
3394         user stack.
3395         (pthread_free): Likewise.
3396         * pthread.c (pthread_create): Add new interface for changed
3397         pthread_attr_t.
3398         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
3399         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
3400         PTHREAD_STACK_MIN.
3401
3402 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
3403
3404         * manager.c: Enable resetting of the thread scheduling policy
3405         to SCHED_OTHER when the parent thread has a different one.
3406
3407 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
3408
3409         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3410         _POSIX_ASYNCHRONOUS_IO.
3411
3412         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
3413         mutexes.
3414         * mutex.c: Implement new mutex types.
3415
3416         * internals.h: Include <signal.h>.
3417
3418         * libpthread.map: Add __erno_location and __h_errno_location.
3419
3420         * errno.c: Return pointer to variable actually in use.  This might
3421         not be the one in the thread structure.
3422         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
3423         and p_h_errnop.
3424         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
3425         of manager thread structure.
3426         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
3427         thread.
3428         * pthread.c: Adapt initializer for thread structures.
3429         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
3430         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
3431         current thread to global variables.
3432
3433 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
3434
3435         * rwlock.c: New file.
3436         * Makefile (libpthread-routines): Add rwlock.
3437         * sysdeps/pthread/pthread.h: Define data structures and declare
3438         functions.
3439         * libpthread.map: Add new functions.
3440
3441 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
3442
3443         * sysdeps/arm/pt-machine.h: New file; add ARM support.
3444         * sysdeps/arm/Implies: likewise.
3445         * README: Document it.
3446
3447 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3448
3449         * signals.c: Remove unneeded initializer for sigwaited, saving a
3450         warning.
3451
3452 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3453
3454         * semaphore.c (sem_init): Set sem_spinlock only if available.
3455
3456 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
3457
3458         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
3459         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
3460
3461         * Makefile: Update from LinuxThreads 0.7.
3462         * internals.h. Likewise.
3463         * manager.c: Likewise.
3464         * mutex.c: Likewise.
3465         * pthread.c: Likewise.
3466         * signals.c: Likewise.
3467         * specific.c: Likewise.
3468         * Examples/ex3.c: Likewise.
3469
3470 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
3471
3472         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
3473         open.
3474
3475 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
3476
3477         * wrapsyscall.c: Add socket functions which are also cancelation
3478         points.
3479
3480 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
3481
3482         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
3483         New functions for fast thread specific data within libc.
3484
3485         * internals.h: Add new array p_libc_specific to struct
3486         _pthread_descr_struct.
3487
3488         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
3489
3490 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
3491
3492         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
3493         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
3494
3495 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
3496
3497         * internals.h (struct _pthread_descr_struct): Add definitions for
3498         two-level specific key handling.
3499         * manager.c (pthread_handle_create): Initialize specific memory array.
3500         * specific.c: Implement two-level key handling.
3501         * weaks.c: Don't provide dummy key handling.
3502         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
3503         Add definition of __libc_key_t.
3504         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
3505         as 1024.
3506         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
3507         PTHREAD_DESTRUCTOR_ITERATIONS.
3508
3509         * manager.c (pthread_handle_create): Compare mmap result with
3510         MAP_FAILED.
3511
3512         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
3513         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
3514
3515 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
3516
3517         sysdeps/sparc -> sysdeps/sparc/sparc32
3518         sysdeps/sparc64 -> sysdeps/sparc/sparc64
3519
3520         * internals.h: Change definition of THREAD_SELF to be an expression,
3521         not a statement that did a return.
3522         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
3523         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
3524         Follow Solaris and use a "system reserved" register (%g6) to hold
3525         the thread descriptor.
3526         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3527
3528 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
3529
3530         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
3531         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
3532         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
3533
3534         * semaphore.c: Include spinlock.h only when needed.
3535
3536         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
3537         keys for entries not in use.
3538
3539         * weaks.c: Implement key handling functions for real.
3540
3541 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
3542
3543         Initial sparc64-linux support:
3544         * sysdeps/sparc64/Implies: New file.
3545         * sysdeps/sparc64/pt-machine.h: Likewise.
3546
3547 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
3548
3549         * semaphore.c: Include spinlock.h at correct place.
3550         Patch by HJ Lu.
3551
3552 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
3553
3554         The Great Bit File Move:
3555         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
3556         * sysdeps/powerpc/semaphorebits.h: Likewise.
3557         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
3558         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
3559         * sysdeps/pthread/libc-lock.h: -> bits/
3560         * sysdeps/pthread/stdio-lock.h: Likewise.
3561         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
3562         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
3563         * semaphore.h: Likewise.
3564         * sysdeps/pthread/pthread.h: Likewise.
3565
3566         * lockfile.c: <foo.h> -> <bits/foo.h>.
3567         * semaphore.h: Likewise.
3568
3569         * Makefile: (headers): foo.h -> bits/foo.h.
3570         * sysdeps/pthread/Makefile: Likewise.
3571
3572 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3573
3574         * semaphore.c (sem_init): Set sem_spinlock only if available.
3575
3576         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3577         asm constraints.
3578
3579 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
3580
3581         Update from LinuxThreads 0.6.
3582
3583         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3584         and __sched_get_priority_min instead of names without `__'.
3585
3586         * manager.c: Rewrite large parts to implement opaque pthread_t.
3587
3588         * cancel.c: Adapt for opaque pthread_t type.
3589         * condvar.c: Likewise.
3590         * errno.c: Likewise.
3591         * join.c: Likewise.
3592         * mutex.c: Likewise.
3593         * pthread.c: Likewise.
3594         * signals.c: Likewise.
3595         * specific.c: Likewise.
3596         * restart.h: Likewise.
3597         * queue.h: Likewise.
3598         * Examples/ex3.c: Likewise.
3599         * Examples/ex4.c: Likewise.
3600         * sysdeps/pthread/pthread.h: Likewise.
3601
3602         * pthread.c: Accumulate time for all threads in thread manager.
3603
3604         * semaphore.c: Implement fallback implementation for architectures
3605         sometimes missing compare-exchange operations.
3606
3607         * cancel.c (pthread_cancel): Validate handle argument.
3608         * join.c (pthread_join): Likewise.
3609         (pthread_detach): Likewise.
3610         * signals.c (pthread_kill): Likewise.
3611
3612         * spinlock.h (acquire): Use __sched_yield not sched_yield.
3613
3614         * queue.h (enqueue): Enqueue thread according to priority.
3615
3616         * internals.c (struct pthread_start_args): New struct for passing
3617         args to cloning function.
3618         (struct _pthread): Rename to _pthread_descr_struct and adapt for
3619         opaque pthread_t.
3620
3621         * Examples/Makefile (clean): Pass -f option to rm.
3622
3623         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3624         and define TEST_FOR_COMPARE_AND_SWAP.
3625         * sysdeps/i386/i486/pt-machine.h: Removed.
3626
3627         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3628         to 1024.
3629
3630 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
3631
3632         * restart.h (suspend): Clear p_signal before suspending.
3633         (suspend_with_cancellation): Likewise.
3634         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3635
3636         * weaks.c: Make __pthread_key_create return 1.
3637         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3638         __libc_getspecific, __libc_setspecific, and __libc_key_t.
3639         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3640         using libio.
3641
3642 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
3643
3644         * sysdeps/sparc/pt-machine (RELEASE): Fix.
3645
3646 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
3647
3648         * sysdeps/powerpc/Implies: Added.
3649         * sysdeps/powerpc/pt-machine.h: Added.
3650         * sysdeps/powerpc/semaphorebits.h: Added.
3651
3652 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
3653
3654         * pthread.c (__pthread_initial_thread): Correct
3655         initializer.
3656         (__pthread_manager_thread): Likewise.
3657         Reported by Andreas Jaeger.
3658
3659 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
3660
3661         Since sigset_t no longer fits in a register, we can't pass in the
3662         thread's initial mask so easily.  Take this opportunity to simplify
3663         the clone implementation by only accepting a single void* argument.
3664
3665         * manager.c (__pthread_manager): Put thread vitals in the thread
3666         struct instead of as arguments through clone.
3667         (pthread_start_thread): Look for them there.
3668         * internals.h (struct _pthread): Add p_initial_fn,
3669         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
3670         * pthread.c (pthread_initialize_manager): Revise clone invocation.