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