c44f1f5ab3e8339588a407d94590b1b09a45f477
[kopensolaris-gnu/glibc.git] / nptl / ChangeLog
1 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
2
3         * pthread_create.c (start_thread): Set EXITING_BIT early.
4
5         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6         (THREAD_GETMEM_NC): Likewise.
7
8 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
9
10         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11         off 3 more bytes by using offset-less instructions when possible.
12
13         * Makefile: Add dependency for $(objpfx)version.d.
14
15         * eintr.c (eintr_source): Add unnecessary return but the compiler
16         insists.
17
18         * tst-kill3.c: Include <unistd.h>.
19
20 2003-02-21  Roland McGrath  <roland@redhat.com>
21
22         * pthread_create.c (start_thread): Call __libc_thread_freeres.
23
24 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
25
26         * Makefile (tests): Add tst-eintr1.
27         (distribute): Add eintr.c.
28         * tst-eintr1.c: New file.
29         * eintr.c: New file.
30
31         * pthread_cancel.c (pthread_cancel): Use tkill directly.
32
33         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
34         Disallow sending SIGCANCEL.
35
36         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
37         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
38         * tst-kill1.c: New file.
39         * tst-kill2.c: New file.
40         * tst-kill3.c: New file.
41         * tst-kill5.c: New file.
42         * tst-kill6.c: New file.
43         * tst-basic7.c: Renamed to...
44         * tst-kill4.c: ...this.
45
46 2003-02-21  Roland McGrath  <roland@redhat.com>
47
48         * Makefile (install-lib-ldscripts): New variable.
49
50 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
51
52         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
53         * pthread_cancel.c: Use INVALID_TD_P.
54         * pthread_detach.c: Likewise.
55         * pthread_getschedparam.c: Likewise.
56         * pthread_setschedparam.c: Likewise.
57         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
58         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
59         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
60         * pthread_timedjoin.c: Likewise.
61
62         * tst-basic7.c: Include <signal.h>.
63
64         * pthread_join.c (pthread_join): Limited checking for invalid
65         descriptors.
66         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
67
68 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
69
70         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
71         beginning of the loop.  Clear the entire first block of TSD.
72         * Makefile (tests): Add tst-key4.
73         * tst-key4.c: New file.
74
75 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
76
77         * Makefile (tests): Add tst-basic7.
78         * tst-basic7.c: New file.
79
80         * pthread_create.c (deallocate_tsd): Mark as internal_function.
81         Add some more __builtin_expect.
82
83         * pthreadP.h: Define dummy version of DEBUGGING_P.
84
85 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
86
87         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
88         _POSIX_THREAD_PRIORITY_SCHEDULING.
89         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
90         _XOPEN_REALTIME_THREADS.
91         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
92
93         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
94         kernel returns EINVAL for PID <= 0, work around it.
95
96         * Makefile (tests): Add tst-signal5.
97         * tst-signal5.c: New file.
98
99         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
100         and LOGIN_NAME_MAX.
101
102         * tst-cancel1.c (tf): Block all signals.
103
104         * Makefile (tests): Add tst-basic6.
105         * tst-basic6.c: New file.
106
107         * tst-basic1.c: Add test for process ID.
108
109         * Makefile (tests): Add tst-cancel10.
110         * tst-cancel10.c: New file.
111
112         * Makefile (tests): Add tst-signal4.
113         * tst-signal4.c: New file.
114
115         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
116         __sigismember instead of sigismember.  Add __builtin_expect.
117
118 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
119
120         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
121         pthread_setcancelstate, and pthread_rwlock_setpshared.
122
123         * tst-cancel7.c (do_test): Make sure the pid file exists before
124         canceling the thread.
125
126         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
127         pthread_rwlock_timedrdlock tests.
128         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
129         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
130         Check for invalid tv_nsec field.
131         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
132         Likewise.
133
134         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
135         recursive mutex of overflow.
136
137         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
138
139         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
140         going into an endless loop.
141         * Makefile (tests): Add tst-cancel9.
142         * tst-cancel9.c: New file.
143
144         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
145
146 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
147
148         * tst-mutex5.c (do_test): Add more timedlock tests.
149
150         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
151         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
152
153         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
154         use INLINE_SYSCALL.  Error number is returned, not -1.
155
156         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
157         and __deallocate_stack with internal_function.
158         * pthread_create.c: Adjust definitions appropriately.
159         * allocatestack.c: Likewise.
160
161         * pthread_join.c: Add one more __builtin_expect.
162         * pthread_timedjoin.c: Likewise.
163
164         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
165         not data of sequence number does not match.
166         Add one __builtin_expect.
167
168         * Makefile (tests): Add tst-clock1.
169         * tst-clock1.c: New file.
170
171         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
172         negative arguments.
173         * Makefile (tests): Add tst-basic5.
174         * tst-basic5.c: New file.
175
176 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
177
178         * Makefile (tests): Add tst-basic4.
179         * tst-basic4.c: New file.
180
181         * pthreadP.h: Add declaraction for __nptl_nthreads.
182         * pthread_create.c: Define __nptl_nthreads
183         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
184         after thread is done.  If then zero, call exit(0).
185         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
186         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
187         * init.c (pthread_functions): Initialize ptr_nthreads.
188         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
189         (__reclaim_stacks): Decrement __nptl_nthreads.
190         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
191         Define.
192         * Makefile (tests): Add tst-basic3.
193         * tst-basic3.c: New file.
194
195         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
196         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
197         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
198         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
199         if asynchronous canceling is enabled.
200         * pthread_join.c (pthread_join): When recognizing circular joins,
201         take into account the other thread might be already canceled.
202         * Makefile (tests): Add tst-join5.
203         * tst-join5.c: New file.
204
205         * Makefile (tests): Add tst-join4.
206         * tst-join4.c: New file.
207
208 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
209
210         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
211
212 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
213
214         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
215         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
216         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
217         warning.
218         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
219         to avoid warning.
220         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
221         error if lll_futex_wake failed.
222
223 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
224
225         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
226         handling of cancellation and failung pthread_mutex_unlock call.
227         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
228         * Makefile (tests): Add tst-cond8 and tst-cond9.
229         * tst-cond8.c: New file.
230         * tst-cond9.c: New file.
231
232         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
233
234         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
235         non-standard initializers with __USE_GNU.
236
237         * Makefile (tests): Add tst-cleanup3.
238         * tst-cleanup3.c: New file.
239
240 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
241
242         * Makefile (tests): Add tst-attr1 and tst-attr2.
243         * tst-attr1.c: New file.
244         * tst-attr2.c: New file.
245
246         * Makefile: Add rules to build and run tst-atfork2 test.
247         * tst-atfork2.c: New file.
248         * tst-atfork2mod.c: New file.
249
250         * sysdeps/unix/sysv/linux/unregister-atfork.c
251         (__unregister_atfork): Free the memory allocated for the handlers
252         after removing them from the lists.
253
254         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
255         cleanup function.
256
257         * tst-atfork1.c (do_test): Wait for the child we forked.
258         Report error in child.
259
260         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
261
262         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
263
264 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
265
266         * Makefile (tests): Add tst-cancel8.
267         * tst-cancel8.c: New file.
268
269         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
270         clearing of control variable.
271         * Makefile (tests): Add tst-once3 and tst-once4.
272         * tst-once3.c: New file.
273         * tst-once4.c: New file.
274
275 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
276
277         * sysdeps/sh/Makefile: New file.
278         * sysdeps/sh/bits/atomic.h: New file.
279         * sysdeps/sh/pthread_spin_init.c: New file.
280         * sysdeps/sh/pthread_spin_lock.c: New file.
281         * sysdeps/sh/pthread_spin_trylock.S: New file.
282         * sysdeps/sh/pthread_spin_unlock.S: New file.
283         * sysdeps/sh/pthreaddef.h: New file.
284         * sysdeps/sh/tcb-offsets.sym: New file.
285         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
286         * sysdeps/sh/tls.h: New file.
287         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
288         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
289         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
290         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
291         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
292         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
293         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
294         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
295         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
296         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
297         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
298         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
299         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
300         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
301         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
302         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
303         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
304         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
305         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
306         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
307         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
308         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
309         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
310         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
311         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
312         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
313         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
314         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
315         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
316         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
317
318 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
319
320         * tst-cond2.c: Rearrange code to not rely on behavior undefined
321         according to POSIX.
322
323         * tst-basic2.c (do_test): Lock mutex before creating the thread.
324
325 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
326
327         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
328         (TLS_GET_FS): New #define.
329         (TLS_SET_FS): New #define.
330         Correct value of __NR_set_thread_area.
331
332         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
333
334 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
335
336         * Makefile (tests): Add tst-popen1.
337         * tst-popen1.c: New file.
338
339         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
340         but inactive generalization.
341         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
342         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
343         Minor optimization, remove one instruction.
344         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
345
346 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
347
348         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
349
350 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
351
352         * init.c (__NR_set_tid_address): Add #ifdef for s390.
353         * sysdeps/pthread/pthread_barrier_wait.c: New file.
354         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
355         * sysdeps/pthread/pthread_cond_signal.c: New file.
356         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
357         * sysdeps/pthread/pthread_cond_wait.c: New file.
358         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
359         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
360         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
361         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
362         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
363         * sysdeps/s390/Makefile: New file.
364         * sysdeps/s390/bits/atomic.h: New file.
365         * sysdeps/s390/pthread_spin_init.c: New file.
366         * sysdeps/s390/pthread_spin_lock.c: New file.
367         * sysdeps/s390/pthread_spin_trylock.c: New file.
368         * sysdeps/s390/pthread_spin_unlock.c: New file.
369         * sysdeps/s390/pthreaddef.h: New file.
370         * sysdeps/s390/tcb-offsets.sym: New file.
371         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
372         * sysdeps/s390/tls.h: New file.
373         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
374         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
375         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
376         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
377         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
378         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
379         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
380         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
381         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
382         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
383         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
384         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
385         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
386         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
387         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
388         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
389         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
390         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
391         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
392         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
393         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
394         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
395         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
396
397 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
398
399         * atomic.h: Add a couple more default implementations.
400         (atomic_compare_and_exchange_acq): Use
401         __arch_compare_and_exchange_32_acq in return value definition.  It
402         always exists.
403         (atomic_bit_set): Renamed from atomic_set_bit.
404         Add missing atomic_ prefixes.
405
406         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
407         thread library is available, use correct value to mark initialized
408         once variable.
409
410 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
411
412         * allocatestack.c (allocate_stack): Use __getpagesize instead of
413         __sysconf to determine pagesize.
414
415         * pthread_create.c: Include <atomic.h>.
416         * allocatestack.c (allocate_stack): Implement coloring of the
417         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
418         size minus one.  Adjust users.
419         * sysdeps/i386/i686/Makefile: New file.
420
421 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
422
423         * allocatestack.c: Improve comment throughout the file.
424
425         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
426         (__lll_lock_wait): Add branch prediction.
427         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
428         (__lll_lock_wait): Likewise.
429         (lll_unlock_wake_cb): Removed.
430
431 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
432
433         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
434         _POSIX_THREAD_PRIORITY_SCHEDULING.
435
436 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
437
438         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
439         Fix return type of ptr___pthread_getspecific.
440
441 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
442
443         * Makefile (tests): Add tst-umask1.
444         (tst-umask1-ARGS): Define.
445         * tst-umask1.c: New file.
446
447 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
448
449         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
450         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
451         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
452         pthread_rwlock_unlock.
453         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
454         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
455         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
456         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
457         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
458         New file.
459         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
460         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
461         New file.
462         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
463         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
464         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
465         New file.
466         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
467         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
468         New file.
469         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
470         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
471         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
472         New file.
473         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
474         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
475         New file.
476         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
477
478         * Makefile (libpthread-routines): Remove lowlevelcond and
479         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
480         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
481         and pthread_cond_broadcast.
482         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
483         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
484         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
485         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
486         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
487         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
488         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
489         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
490         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
491         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
492         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
493         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
494         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
496         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
497         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
498         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
499         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
500         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
501         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
502         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
503         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
504         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
505         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
506         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
507         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
508         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
509         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
510         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
511         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
512         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
513
514         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
515         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
516         of the code is moved to ...
517         * sysdeps/pthread/createthread.c: ...here.  New file.
518
519 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
520
521         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
522         (__new_sem_post): Clear %eax before returning.
523         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
524
525         * Makefile (tests): Add tst-cleanup2.
526         * tst-cleanup2.c: New file.
527
528         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
529         Interpret first parameter correctly.
530
531 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
532
533         * Makefile (headers): Add bits/semaphore.h.
534
535 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
536
537         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
538         if not SHARED.
539
540 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
541
542         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
543         must be used and mapping failed.
544         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
545
546         * Makefile (CFLAGS-pthread_self.os): Define this, not
547         CFLAGS-pthread_self.c.
548
549 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
550
551         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
552         lll_unlock_wake_cb.
553
554         * Makefile (libpthread-routines): Add version.  Add rules to build
555         version.os and banner.h.
556         * version.c: New file.
557
558 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
559
560         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
561         the alias unconditional.
562         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
563
564 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
565
566         * Makefile (CFLAGS-pthread_self.c): New definition.
567
568 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
569
570         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
571         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
572         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
573         * init.c (__pthread_initialize_minimal_internal): Likewise.
574
575 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
576
577         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
578
579         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
580         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
581         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
582         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
583         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
584         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
585
586 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
587
588         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
589         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
590         * tst-cancel-wrappers.sh: Remove all exceptions.
591
592 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
593
594         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
595         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
596
597         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
598         Use __libc_pthread_functions array if SHARED.
599
600         * pthreadP.h: Move pthread_cond_2_0_t definition to...
601         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
602
603         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
604         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
605         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
606         __libc_ptf_call instead of __libc_maybe_call.
607         (PTF): New #define.
608         (__libc_cleanup_region_start): Wrap function name with PTF call.
609         (__libc_cleanup_region_end): Likewise.
610         (__libc_cleanup_end): Likewise.
611
612         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
613         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
614         * pthread_key_create.c: Add __pthread_key_create_internal alias.
615         * pthreadP.h: Add prototypes.
616
617         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
618         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
619         __pthread_rwlock_unlock aliases.
620         * pthreadP.h: Add prototypes for new aliases.
621
622         * pthreadP.h (struct pthead_functions): Moved to...
623         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
624         * init.c (pthread_functions): Add initializers for new elements.
625
626         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
627         __pthread_cleanup_pop_restore aliases.
628         * pthreadP.h: Add prototypes.
629
630         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
631         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
632         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
633         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
634         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
635         * pthreadP.h: Adjust prototypes and callers.
636
637 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
638
639         * Makefile (tests): Add tst-cancel7.
640         (tst-cancel7-ARGS): New variable.
641         * tst-cancel7.c: New file.
642
643         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
644         around gcc defficiencies.
645         * old_pthread_cond_signal.c: Likewise.
646         * old_pthread_cond_timedwait.c: Likewise.
647         * old_pthread_cond_wait.c: Likewise.
648
649         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
650
651 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
652
653         * Makefile (tests): Add tst-cond7.
654         * tst-cond7.c: New file.
655
656         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
657         (condvar_cleanup): Get condvar address from the right place.
658
659         * atomic.h: Correct definitions of atomic_full_barrier,
660         atomic_read_barrier, atomic_write_barrier.
661
662         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
663         race-free.
664         * old_pthread_cond_signal.c: Likewise.
665         * old_pthread_cond_timedwait.c: Likewise.
666         * old_pthread_cond_wait.c: Likewise.
667
668 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
669
670         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
671
672 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
673
674         * pthreadP.h (pthread_cond_2_0_t): New type.
675         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
676         Use new type for the 2.0 condvar function prototypes.
677         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
678         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
679         parameter.
680         * old_pthread_cond_destroy.c: Likewise.
681         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
682         * old_pthread_cond_signal.c: Likewise.
683         * old_pthread_cond_timedwait.c: Likewise.
684         * old_pthread_cond_wait.c: Likewise.
685
686         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
687         (__pthread_cond_wait): Don't save cancellation mode and seq value
688         in same location.
689
690         * herrno.c (__h_errno_location): Don't define as weak.
691
692 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
693
694         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
695         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
696         and pthread_cond_wait.
697         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
698         Renamed to...
699         (__pthread_cond_broadcast_2_0): ... this.
700         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
701         Renamed to...
702         (__pthread_cond_destroy_2_0): ... this.
703         * old_pthread_cond_init.c (__old_pthread_cond_init):
704         Renamed to...
705         (__pthread_cond_init_2_0): ... this.
706         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
707         Renamed to...
708         (__pthread_cond_signal_2_0): ... this.
709         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
710         Renamed to...
711         (__pthread_cond_wait_2_0): ... this.
712         * pthread_cond_destroy.c: Include shlib-compat.h.
713         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
714         * pthread_cond_init.c: Include shlib-compat.h.
715         (pthread_cond_init): Change strong_alias into versioned_symbol.
716         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
717         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
718         fields.
719         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
720         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
721         __pthread_cond_wait_2_0): New prototypes.
722         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
723         __old_pthread_cond_init, __old_pthread_cond_signal,
724         __old_pthread_cond_wait): Removed.
725         * init.c: Include shlib-compat.h.
726         (pthread_functions): Guard ptr___pthread_attr_init_2_0
727         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
728         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
729         ptr___pthread_cond_*_2_0 fields.
730         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
731         pthread_cond_*@GLIBC_2.0 compatibility symbols.
732
733         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
734         LIBC_SIGACTION was not yet defined.
735         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
736         [!defined LIBC_SIGACTION] (__sigaction): New function and
737         libc_hidden_weak.
738         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
739         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
740
741 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
742
743         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
744
745 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
746
747         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
748         New, larger type definition.
749         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
750         implementation.
751         * Versions [libpthread]: Add definitions for new pthread_cond_*
752         interfaces for version GLIBC_2.3.2.
753         * pthread_cond_init.c: Update initialization for new type definition.
754         * Makefile (libpthread-routines): Remove pthread_cond_wait,
755         pthread_cond_timedwait, pthread_cond_signal, and
756         pthread_cond_broadcast.  Add old_pthread_cond_init,
757         old_pthread_cond_destroy, old_pthread_cond_wait,
758         old_pthread_cond_timedwait, old_pthread_cond_signal, and
759         old_pthread_cond_broadcast.
760         * old_pthread_cond_broadcast.c: New file.
761         * old_pthread_cond_destroy.c: New file.
762         * old_pthread_cond_init.c: New file.
763         * old_pthread_cond_signal.c: New file.
764         * old_pthread_cond_timedwait.c: New file.
765         * old_pthread_cond_wait.c: New file.
766         * pthreadP.h: Add prototypes for the compatibility interfaces.
767
768         * pthread_cond_destroy.c: Don't include <errno.h>.
769
770 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
771
772         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
773         unnecessary zero offset when addressing MUTEX.
774
775 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
776
777         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
778         __register_atfork.
779         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
780         for __register_atfork.
781
782 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
783
784         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
785         instead of ASSEMBLER test macro.
786
787         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
788         __libc_current_sigrtmax): Add libc_hidden_def.
789
790         * sysdeps/pthread/list.h: Remove assert.h include.
791
792 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
793
794         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
795         __pthread_initialize_minimal_internal not
796         __pthread_initialize_minimal.
797
798 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
799
800         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
801         __pthread_initialize_minimal as hidden.
802
803         * init.c (__pthread_initialize_minimal_internal): Don't mark as
804         constructor.
805
806 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
807
808         * Makefile ($(inst_libdir)/libpthread.so): Depend on
809         $(common-objpfx)format.lds, include that into the output script.
810         Fix comment.
811         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
812
813 2002-12-28  Andreas Jaeger  <aj@suse.de>
814
815         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
816         nsec resolution changes.
817         (xstat64_conv): Likewise.
818         (xstat32_conv): Likewise.
819         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
820         struct kernel_stat.
821         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
822         structs stat and stat64.
823         * time/time.h (__timespec_defined): Define for __USE_MISC.
824         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
825
826 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
827
828         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
829         argument.
830         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
831         (pthread_exit): Use strong_alias to avoid warnings.
832         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
833         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
834         ptr___pthread_attr_init_2_*.
835         * init.c (pthread_functions): Adjust.
836
837 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
838
839         * forward.c: Make all functions available by default again.  It
840         caused too much trouble.
841
842         * pt-siglongjmp.c: Removed.
843
844 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
845
846         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
847         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
848         * sysdeps/i386/Makefile: New file.
849         * sysdeps/i386/tcb-offsets.sym: New file.
850         * sysdeps/pthread/tcb-offsets.h: New file.
851         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
852         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
853
854         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
855         __register_atfork...
856         (GLIBC_2.3.2): ...here.
857
858 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
859
860         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
861         pthread_attr_setstackaddr with __attribute_deprecated__.
862
863 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
864
865         * pt-system.c (system): Remove cancellation handling.
866         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
867         cancellation routines.
868
869 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
870
871         * descr.h: Include <dl-sysdep.h>.
872         (struct pthread): Move header.data.list to the back of the struct.
873         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
874         (MULTIPLE_THREADS_OFFSET): Adjust offset.
875         (SYSINFO_OFFSEET): Likewise.
876
877 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
878
879         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
880         Define.
881         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
882         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
883         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
884         (USE_DL_SYSINFO): Undef.
885
886 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
887
888         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
889         $(common-objpfx)libc.so.
890         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
891         it is bigger than pipe buffer size even on arches with bigger
892         page size.
893         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
894
895 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
896
897         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
898         correct errno access for case that USE___THREAD is not defined.
899
900 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
901
902         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
903         Patch by Marijn Ros <marijn@mad.scientist.com>.
904
905 2002-12-22  Roland McGrath  <roland@redhat.com>
906
907         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
908
909 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
910
911         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
912
913 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
914
915         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
916         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
917         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
918
919         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
920         of int $0x80.
921         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
922         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
923         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
924         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
925         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
926         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
927         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
928         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
929
930         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
931         sysenter.
932         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
933
934         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
935
936         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
937         in new TCB.
938         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
939         that sysinfo is properly initialized.
940         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
941         to 1 only for ld.so.
942
943         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
944         RTLD_CORRECT_DYNAMIC_WEAK.
945
946 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
947
948         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
949         Use return 0 as 6th argument to FORWARD4.
950         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
951
952 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
953
954         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
955         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
956         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
957         (INIT_SYSINFO): New #define.
958         (TLS_TP_INIT): Use INIT_SYSINFO.
959         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
960         At test to make sure SYSINFO_OFFSET value is correct.
961         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
962
963 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
964
965         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
966         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
967         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
968         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
969         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
970         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
971         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
972
973 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
974
975         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
976         macro instead of using int $0x80 directly.
977
978         * sysdeps/pthread/bits/stdio-lock.h: New file.
979         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
980         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
981         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
982         * Makefile (routines): Add libc-lowlevelmutex.
983
984         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
985         __i686.get_pc_thunk.dx.
986
987 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
988
989         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
990         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
991         ($(objpfx)tst-cancel-wrappers.out): New rule.
992         * tst-cancel-wrappers.sh: New test.
993         * tst-locale1.c: Include signal.h.
994         (uselocale): Test static linking of __libc_current_sigrt*.
995
996 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
997
998         * Makefile (tests): Add tst-cancel6.
999         * tst-cancel6.c: New file
1000
1001 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
1002
1003         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1004         Define meaningfully for assembler as well.
1005         * pthreadP.h (struct pthread_functions): Remove
1006         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
1007         and ptr_pthread_attr_init_2_1 fields.
1008         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
1009         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
1010         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
1011         (FORWARD3): Define using FORWARD4.
1012         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
1013         versions.
1014         * pt-system.c: Remove duplicate stdlib.h include.
1015
1016 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
1017
1018         * sem_init.c: Define sem_init@GLIBC_2.0.
1019         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
1020         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
1021
1022         * flockfile.c: Moved to...
1023         * sysdeps/pthread/flockfile.c: ...here.  New file.
1024         * funlockfile.c: Moved to...
1025         * sysdeps/pthread/funlockfile.c: ...here.  New file.
1026         * ftrylockfile.c: Moved to...
1027         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
1028
1029 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
1030
1031         * libc-cancellation.c: Guard both function with
1032         #if !defined NOT_IN_libc.
1033         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
1034         automatically provided pthread wrappers.
1035         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
1036         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
1037         nor in libpthread.
1038         * pt-open.c: Removed.
1039         * pt-fcntl.c: Removed.
1040         * pt-fsync.c: Removed.
1041         * pt-lseek.c: Removed.
1042         * pt-msgrcv.c: Removed.
1043         * pt-msgsnd.c: Removed.
1044         * pt-msync.c: Removed.
1045         * pt-nanosleep.c: Removed.
1046         * pt-open64.c: Removed.
1047         * pt-pause.c: Removed.
1048         * pt-pread.c: Removed.
1049         * pt-pread64.c: Removed.
1050         * pt-pwrite.c: Removed.
1051         * pt-pwrite64.c: Removed.
1052         * pt-read.c: Removed.
1053         * pt-recv.c: Removed.
1054         * pt-recvfrom.c: Removed.
1055         * pt-recvmsg.c: Removed.
1056         * pt-send.c: Removed.
1057         * pt-sendto.c: Removed.
1058         * pt-sigtimedwait.c: Removed.
1059         * pt-sigwait.c: Removed.
1060         * pt-wait.c: Removed.
1061         * pt-waitpid.c: Removed.
1062         * pt-write.c: Removed.
1063         * pt-accept.c: Removed.
1064         * pt-close.c: Removed.
1065         * pt-connect.c: Removed.
1066         * pt-lseek64.c: Removed.
1067         * pt-sendmsg.c: Removed.
1068         * pt-tcdrain.c: Removed.
1069
1070 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
1071
1072         * init.c (__pthread_initialize_minimal_internal): Renamed from
1073         __pthread_initialize_minimal.  Make old name an alias.  This
1074         converts a normal relocation into a relative relocation.
1075
1076         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
1077
1078         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
1079         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
1080         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
1081         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
1082         pt-sigwaitinfo, pt-waitid, and pt-writev.
1083         * pt-creat.c: Removed.
1084         * pt-poll.c: Removed.
1085         * pt-pselect.c: Removed.
1086         * pt-readv.c: Removed.
1087         * pt-select.c: Removed.
1088         * pt-sigpause.c: Removed.
1089         * pt-sigsuspend.c: Removed.
1090         * pt-sigwaitinfo.c: Removed.
1091         * pt-waitid.c: Removed.
1092         * pt-writev.c: Removed.
1093
1094         * init.c (pthread_functions): New variable.
1095         (__pthread_initialize_minimal): Pass pointer to pthread_functions
1096         (or NULL) to __libc_pthread_init.
1097         * forward.c: Rewrite to use __libc:pthread_functions array to get
1098         function addresses.
1099         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
1100         prototype.
1101         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1102         Take new parameter.  Copy content of variable pointed to by it
1103         to __libc_pthread_init.
1104
1105         * pthreadP.h (struct pthread_functions): New type.
1106         (__libc_pthread_init): Declare.
1107
1108         * pthread_attr_destroy.c: Add namespace protected alias.
1109         * pthread_attr_getdetachstate.c: Likewise.
1110         * pthread_attr_getinheritsched.c: Likewise.
1111         * pthread_attr_getschedparam.c: Likewise.
1112         * pthread_attr_getschedpolicy.c: Likewise.
1113         * pthread_attr_getscope.c: Likewise.
1114         * pthread_attr_setdetachstate.c: Likewise.
1115         * pthread_attr_setinheritsched.c: Likewise.
1116         * pthread_attr_setschedparam.c: Likewise.
1117         * pthread_attr_setschedpolicy.c: Likewise.
1118         * pthread_attr_setscope.c: Likewise.
1119         * pthread_cond_broadcast.c: Likewise.
1120         * pthread_cond_destroy.c: Likewise.
1121         * pthread_cond_init.c: Likewise.
1122         * pthread_cond_signal.c: Likewise.
1123         * pthread_cond_wait.c: Likewise.
1124         * pthread_condattr_destroy.c: Likewise.
1125         * pthread_condattr_init.c: Likewise.
1126         * pthread_equal.c: Likewise.
1127         * pthread_exit.c: Likewise.
1128         * pthread_getschedparam.c: Likewise.
1129         * pthread_self.c: Likewise.
1130         * pthread_setcancelstate.c: Likewise.
1131         * pthread_setschedparam.c: Likewise.
1132         * pthread_mutex_destroy.c: Likewise.
1133         * pthread_mutex_init.c: Likewise.
1134         * pthreadP.h: Add prototypes for the aliases.
1135
1136         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
1137         multiple_threads member in correct TCB to 1.
1138
1139         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
1140         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
1141         member of thread decriptor, otherwise return unconditionally 1.
1142
1143 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
1144
1145         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
1146         regular Linux version.  Remove file.
1147         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
1148         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
1149         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
1150         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
1151         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
1152         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
1153         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
1154         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
1155         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
1156         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
1157         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
1158         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
1159         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
1160         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
1161         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
1162         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
1163         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
1164         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
1165         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
1166         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
1167         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
1168         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
1169         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
1170         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
1171         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
1172         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
1173         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
1174         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
1175         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
1176         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
1177
1178 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
1179
1180         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1181         * sysdeps/unix/sysv/linux/open.c: Removed.
1182         * sysdeps/unix/sysv/linux/fsync.c: Removed.
1183         * sysdeps/unix/sysv/linux/lseek.c: Removed.
1184         * sysdeps/unix/sysv/linux/msync.c: Removed.
1185         * sysdeps/unix/sysv/linux/read.c: Removed.
1186         * sysdeps/unix/sysv/linux/close.c: Removed.
1187         * sysdeps/unix/sysv/linux/creat.c: Removed.
1188         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
1189         * sysdeps/unix/sysv/linux/pause.c: Removed.
1190         * sysdeps/unix/sysv/linux/select.c: Removed.
1191         * sysdeps/unix/sysv/linux/write.c: Removed.
1192
1193 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
1194
1195         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
1196         element in TCB to see whether locking is needed.
1197
1198         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
1199         MULTIPLE_THREADS_OFFSET value is correct.
1200
1201         * sysdeps/unix/sysv/linux/close.c: New file.
1202         * sysdeps/unix/sysv/linux/connect.S: New file.
1203         * sysdeps/unix/sysv/linux/creat.c: New file.
1204         * sysdeps/unix/sysv/linux/fsync.c: New file.
1205         * sysdeps/unix/sysv/linux/llseek.c: New file.
1206         * sysdeps/unix/sysv/linux/lseek.c: New file.
1207         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
1208         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
1209         * sysdeps/unix/sysv/linux/msync.c: New file.
1210         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
1211         * sysdeps/unix/sysv/linux/open.c: New file.
1212         * sysdeps/unix/sysv/linux/open64.c: New file.
1213         * sysdeps/unix/sysv/linux/pause.c: New file.
1214         * sysdeps/unix/sysv/linux/poll.c: New file.
1215         * sysdeps/unix/sysv/linux/pread.c: New file.
1216         * sysdeps/unix/sysv/linux/pread64.c: New file.
1217         * sysdeps/unix/sysv/linux/pselect.c: New file.
1218         * sysdeps/unix/sysv/linux/pwrite.c: New file.
1219         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
1220         * sysdeps/unix/sysv/linux/readv.c: New file.
1221         * sysdeps/unix/sysv/linux/recv.S: New file.
1222         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
1223         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
1224         * sysdeps/unix/sysv/linux/select.c: New file.
1225         * sysdeps/unix/sysv/linux/send.S: New file.
1226         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
1227         * sysdeps/unix/sysv/linux/sendto.S: New file.
1228         * sysdeps/unix/sysv/linux/sigpause.c: New file.
1229         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
1230         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
1231         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1232         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
1233         * sysdeps/unix/sysv/linux/system.c: New file.
1234         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
1235         * sysdeps/unix/sysv/linux/wait.c: New file.
1236         * sysdeps/unix/sysv/linux/waitid.c: New file.
1237         * sysdeps/unix/sysv/linux/waitpid.c: New file.
1238         * sysdeps/unix/sysv/linux/writev.c: New file.
1239         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
1240
1241         * pt-readv.c: Fix comment.
1242
1243 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
1244
1245         * tst-cleanup1.c: Include stdlib.h.
1246
1247         * tst-cancel5.c: New test.
1248         * Makefile (tests): Add tst-cancel5.
1249         (tst-cancel5): Link against libc.so libpthread.so in that order.
1250
1251 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
1252
1253         * forward.c (test_loaded): Prevent recursive calls.
1254
1255         * Makefile (routines): Add libc-cancellation.
1256         * libc-cancellation.c: New file.
1257         * descr.h (struct pthread): Add multiple_threads field.
1258         * allocatestack.c (allocate_stack): Initialize multiple_header field of
1259         new thread descriptor to 1.
1260         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
1261         Initialize multiple_thread field after successful thread creation.
1262         * cancellation.c (__do_cancel): Move to pthreadP.h.
1263         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
1264         (__pthread_disable_asynccancel): Add internal_function attribute.
1265         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
1266         * pthread_setcancelstate.c: Likewise.
1267         * pthread_setcanceltype.c: Likewise.
1268         * pthread_exit.c: Likewise.
1269         * pthreadP.h (CANCELLATION_P): Likewise.
1270         (__do_cancel): Define as static inline.
1271         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
1272         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
1273         declarations.
1274         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
1275         fields.  Define MULTIPLE_THREADS_OFFSET.
1276         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
1277         declaration.
1278         * sysdeps/unix/sysv/linux/accept.S: New file.
1279         * sysdeps/unix/sysv/linux/read.c: New file.
1280         * sysdeps/unix/sysv/linux/write.c: New file.
1281         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
1282         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
1283         initialization of __libc_locking_needed.
1284         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
1285         __libc_locking_needed, use multiple_threads field in TCB.
1286         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1287
1288 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
1289
1290         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
1291         version.
1292         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
1293
1294         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
1295         access to __libc_locking_needed for PIC.
1296
1297 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
1298
1299         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
1300         declare for libc.so.
1301         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
1302         expression.
1303         (__libc_lock_lock): Put into statement expression.
1304         (__libc_lock_unlock): Remove trailing semicolon.
1305         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
1306
1307 2002-12-12  Roland McGrath  <roland@redhat.com>
1308
1309         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
1310         "m" constraint to refer to __libc_locking_needed.  Declare it here.
1311
1312 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
1313
1314         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
1315         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
1316         Initialize __libc_locking_needed.
1317         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
1318         instead of __register_pthread_fork_handler.
1319         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
1320         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
1321         fork-gen with libc_pthread_init.
1322         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
1323         of __register_pthread_fork_handler.
1324         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
1325         of __register_pthread_fork_handler.
1326         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
1327         __libc_locking_needed to determine whether lock prefix can be avoided.
1328         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1329
1330 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
1331
1332         * Makefile (tests): Add tst-cleanup1.
1333         * tst-cleanup1.c: New file.
1334         * cancellation.c (__cleanup_thread): Removed.
1335         (__do_cancel): Remove call to __cleanup_thread.
1336         * pthreadP.h: Remove __cleanup_thread prorotype.
1337
1338         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
1339         Remember function and argument even if cancellation handler
1340         function is not available.
1341         (__libc_cleanup_region_end): Execute registered function directly if
1342         pthread functions are not available.
1343         (__libc_cleanup_end): Likewise.
1344
1345         * init.c (__pthread_initialize_minimal): Fix initialization in
1346         static lib by preventing gcc from being too clever.
1347
1348 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
1349
1350         * init.c (__pthread_initialize_minimal): Remove unneccesary
1351         sigaddset call.
1352
1353         * Makefile (tests): We can run tst-locale2 now.
1354
1355 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
1356
1357         * Versions: Remove duplicated sigwait entry.
1358
1359 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
1360
1361         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
1362         inside libpthread.
1363
1364         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
1365
1366         * pthreadP.h: Declare __pthread_enable_asynccancel and
1367         __pthread_disable_asynccancel.
1368         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
1369         (CANCEL_RESET): Use __pthread_disable_asynccancel.
1370         * cancellation.c (__pthread_enable_asynccancel): New function.
1371         (__pthread_disable_asynccancel): New function.
1372         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
1373         * pt-close.c: Likewise.
1374         * pt-connect.c: Likewise.
1375         * pt-creat.c: Likewise.
1376         * pt-fcntl.c: Likewise.
1377         * pt-fsync.c: Likewise.
1378         * pt-lseek.c: Likewise.
1379         * pt-lseek64.c: Likewise.
1380         * pt-msgrcv.c: Likewise.
1381         * pt-msgsnd.c: Likewise.
1382         * pt-msync.c: Likewise.
1383         * pt-nanosleep.c: Likewise.
1384         * pt-open.c: Likewise.
1385         * pt-open64.c: Likewise.
1386         * pt-pause.c: Likewise.
1387         * pt-poll.c: Likewise.
1388         * pt-pread.c: Likewise.
1389         * pt-pread64.c: Likewise.
1390         * pt-pselect.c: Likewise.
1391         * pt-pwrite.c: Likewise.
1392         * pt-pwrite64.c: Likewise.
1393         * pt-read.c: Likewise.
1394         * pt-readv.c: Likewise.
1395         * pt-recv.c: Likewise.
1396         * pt-recvfrom.c: Likewise.
1397         * pt-recvmsg.c: Likewise.
1398         * pt-select.c: Likewise.
1399         * pt-send.c: Likewise.
1400         * pt-sendmsg.c: Likewise.
1401         * pt-sendto.c: Likewise.
1402         * pt-sigpause.c: Likewise.
1403         * pt-sigsuspend.c: Likewise.
1404         * pt-sigtimedwait.c: Likewise.
1405         * pt-sigwait.c: Likewise.
1406         * pt-sigwaitinfo.c: Likewise.
1407         * pt-system.c: Likewise.
1408         * pt-tcdrain.c: Likewise.
1409         * pt-wait.c: Likewise.
1410         * pt-waitid.c: Likewise.
1411         * pt-waitpid.c: Likewise.
1412         * pt-write.c: Likewise.
1413         * pt-writev.c: Likewise.
1414         * pthread_join.c: Likewise.
1415         * pthread_timedjoin.c: Likewise.
1416
1417         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
1418         (__xpg_sigpause): New function.
1419         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
1420
1421 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
1422
1423         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
1424
1425         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
1426         _GI_pthread_cleanup_pop to pthreadP.h.
1427
1428         * ftrylockfile.c: Use _IO_lock_trylock instead of
1429         pthread_mutex_trylock.
1430
1431         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
1432         (CANCEL_RESET): Likewise.
1433         (__pthread_setcanceltype_): Declare.
1434         (__pthread_mutex_lock_internal): Declare.
1435         (__pthread_mutex_unlock_internal): Declare.
1436         (__pthread_once_internal): Declare.
1437         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
1438         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
1439
1440         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
1441         and pthread_mutex_unlock.
1442         * pthread_cond_wait.c: Likewise.
1443         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
1444         * pthread_mutex_unlock.c: Likewise.
1445
1446         * pthread_setcanceltype.c: Add additional alias
1447         __pthread_setcanceltype.
1448
1449         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
1450         * sem_open.c (sem_open): Likewise.
1451         Use __libc_open, __libc_write, and __libc_close instead of
1452         open, write, and close respectively.
1453
1454         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
1455         Rewrite as statement expression since it must return a value.
1456
1457         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
1458         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
1459         __pthread_kill.
1460
1461         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
1462         alias __pthread_once_internal.
1463
1464         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
1465
1466 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
1467
1468         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
1469         * tst-stdio1.c: New file.
1470         * tst-stdio2.c: New file.
1471
1472         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
1473
1474         * Makefile (tests): Comment out tst-locale2 for now.
1475         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
1476
1477         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
1478         -D_IO_MTSAFE_IO.
1479         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
1480         Use _IO_lock_init instead of explicit assignment.
1481
1482         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
1483         Define __libc_lock_* and __libc_lock_recursive macros with
1484         lowlevellock macros, not pthread mutexes.
1485
1486         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
1487         of pthread_mutex_lock.
1488         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
1489         instead of pthread_mutex_unlock.
1490
1491 2002-12-06  Roland McGrath  <roland@redhat.com>
1492
1493         * allocatestack.c (__stack_user): Use uninitialized defn.
1494         * init.c (__pthread_initialize_minimal): Initialize it here.
1495
1496 2002-12-05  Roland McGrath  <roland@redhat.com>
1497
1498         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
1499         string.
1500         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
1501
1502         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
1503         missing & here too.
1504
1505 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
1506
1507         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
1508         lowlevellock.
1509         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
1510         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
1511         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
1512         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
1513         for __libc_lock_* macros.
1514         * Makefile (routines): Add libc-lowlevellock.
1515
1516 2002-10-09  Roland McGrath  <roland@redhat.com>
1517
1518         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
1519         Under [__PIC__], call the function via the pointer fetched for
1520         comparison rather than a call by name that uses the PLT.
1521         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
1522         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
1523         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
1524         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
1525         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
1526
1527 2002-12-04  Roland McGrath  <roland@redhat.com>
1528
1529         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
1530
1531         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
1532         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
1533
1534         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
1535
1536 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
1537
1538         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
1539         a completely opaque, non-integer type.
1540         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1541
1542 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
1543
1544         * sysdeps/i386/tls.h: Include stdlib.h.
1545         * sysdeps/x86_64/tls.h: Likewise.
1546
1547 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
1548
1549         * Makefile (tests): Add tst-locale2.
1550         (tests-static): Likewise.
1551         * tst-locale2.c: New file.
1552
1553         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
1554         volatile and add memory clobbers to lock operations.
1555
1556 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
1557
1558         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
1559         * sysdeps/i386/i486/bits/atomic.h: New file.
1560         * sysdeps/i386/i586/bits/atomic.h: New file.
1561         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
1562         include i486 version.
1563         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
1564         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
1565         Patch by Marijn Ros <marijn@mad.scientist.com>.
1566
1567         * allocatestack.c (get_cached_stack): Don't crash if we first
1568         found a stack with a larger size then needed.
1569         Reported by Hui Huang <hui.huang@sun.com>.
1570
1571         * Makefile (tests): Add tst-sysconf.
1572         * tst-sysconf.c: New file.
1573
1574         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
1575         PTHREAD_THREADS_MAX.
1576
1577 2002-12-02  Roland McGrath  <roland@redhat.com>
1578
1579         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
1580         Declare using hidden_proto instead of attribute_hidden, so there are
1581         non-.hidden static symbols for gdb to find.
1582         (__pthread_keys): Likewise.
1583         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
1584         * allocatestack.c (__stack_user): Likewise.
1585         * pthread_create.c (__pthread_keys): Likewise.
1586         (__nptl_threads_events, __nptl_last_event): Make these static instead
1587         of hidden.
1588         * pthread_key_create.c (__pthread_pthread_keys_max,
1589         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
1590
1591 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
1592
1593         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
1594         statically.
1595         * tst-locale1.c: New file.
1596
1597         * pthread_cond_timedwait.c: Include <stdlib.h>.
1598
1599         * Makefile (tests): Add tst-fork2 and tst-fork3.
1600         * tst-fork2.c: New file.
1601         * tst-fork3.c: New file.
1602
1603 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
1604
1605         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1606
1607         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
1608         require it to 200112L.
1609
1610         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
1611         instruction only if HAVE_CMOV is defined.
1612         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
1613
1614         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
1615
1616         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
1617
1618         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
1619
1620         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
1621
1622 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
1623
1624         * sysdeps/x86_64/bits/atomic.h: New file.
1625
1626         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
1627         16-bit operations.
1628
1629         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
1630         possible since gettid cannot fail.
1631
1632         * sysdeps/x86_64/pthreaddef.h: New file.
1633
1634         * sysdeps/i386/pthreaddef.h (gettid): Removed.
1635
1636         * sysdeps/x86_64/pthread_spin_init.c: New file.
1637         * sysdeps/x86_64/pthread_spin_lock.c: New file.
1638         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
1639         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
1640
1641         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
1642         Add missing lock prefix.  Minute optimization.
1643
1644         * tst-spin2.c (main): Also check successful trylock call.
1645
1646         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
1647         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
1648
1649         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
1650         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
1651
1652         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
1653         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
1654         value in case of an error.  Add support for INTERNAL_SYSCALL.
1655
1656         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
1657         value in case of an error.
1658
1659         * sysdeps/x86_64/tls.h: New file.
1660
1661 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
1662
1663         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
1664         takes the array member name and the index as parameters.
1665         (THREAD_SETMEM_NC): Likewise.
1666         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
1667         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
1668         interfaces.
1669
1670         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
1671         to decide which code to use.
1672         (THREAD_SETMEM_NC): Likewise.
1673
1674         * allocatestack.c (queue_stack): Don't remove stack from list here.
1675         Do it in the caller.  Correct condition to prematurely terminate
1676         loop to free stacks.
1677         (__deallocate_stack): Remove stack from list here.
1678
1679 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
1680
1681         * Makefile (tests): Add tst-stack1.
1682         * tst-stack1.c: New file.
1683
1684         * allocatestack.c (allocate_stack): Initialize the TCB on a user
1685         provided stack.
1686
1687         * pthread_attr_getstack.c: Return bottom of the thread area.
1688
1689 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
1690
1691         * Makefile (libpthread-routines): Add pt-allocrtsig and
1692         pthread_kill_other_threads.
1693         * pt-allocrtsig.c: New file.
1694         * pthread_kill_other_threads.c: New file.
1695         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
1696         all three functions.
1697         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
1698         allocrtsig.
1699         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
1700         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
1701         and __libc_allocate_rtsig_private.
1702         * Versions (libpthread): Export pthread_kill_other_threads_np,
1703         __libc_current_sigrtmin, and __libc_current_sigrtmax.
1704
1705 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
1706
1707         * allocatestack.c (allocate_stack): stackaddr in attribute points to
1708         the end of the stack.  Adjust computations.
1709         When mprotect call fails dequeue stack and free it.
1710         * pthread_attr_setstack.c: Store top of the stack in stackaddr
1711         attribute.
1712         * pthread_getattr_np.c: Likewise.
1713
1714         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
1715         surprises.
1716
1717 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
1718
1719         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
1720         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
1721
1722 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
1723
1724         * pthread_getspecific.c: Optimize access to first 2nd-level array.
1725         * pthread_setspecific.c: Likewise.
1726
1727 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
1728
1729         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
1730         definitions.  Get them from the official place.
1731         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
1732
1733         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
1734         Use new CLONE_ flags in clone() calls.
1735
1736         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
1737         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
1738
1739         * Versions: Add pthread_* functions for libc.
1740         * forward.c: New file.
1741
1742         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
1743         errno-loc.
1744         * herrno.c: New file.
1745         * res.c: New file.
1746
1747         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
1748         sem_trywait, and sem_timedwait.  Add herrno and res.
1749         * sem_init.c: Don't initialize lock and waiters members.
1750         * sem_open.c: Likewise.
1751         * sem_post.c: Removed.
1752         * sem_wait.c: Removed.
1753         * sem_trywait.c: Removed.
1754         * sem_timedwait.c: Removed.
1755         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
1756         Includes full implementations of sem_post, sem_wait, sem_trywait,
1757         and sem_timedwait.
1758         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
1759         for new implementation.
1760         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
1761         and waiters fields.
1762
1763         * tst-sem3.c: Improve error message.
1764         * tst-signal3.c: Likewise.
1765
1766         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
1767         to tell the kernel about the termination futex and to initialize tid
1768         member.  Don't initialize main_thread.
1769         * descr.h (struct pthread): Remove main_thread member.
1770         * cancelllation.c (__do_cancel): Remove code handling main thread.
1771         The main thread is not special anymore.
1772
1773         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
1774         size of the stacks to stack_cache_actsize.
1775
1776         * pt-readv.c: Add missing "defined".
1777         * pt-sigwait.c: Likewise.
1778         * pt-writev.c: Likewise.
1779
1780 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
1781
1782         * Versions: Export __connect from libpthread.
1783         Patch by Luca Barbieri <ldb@ldb.ods.org>.
1784
1785         * Makefile (libpthread-routines): Add pt-raise.
1786         * sysdeps/unix/sysv/linux/raise.c: New file.
1787         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
1788         * sysdeps/generic/pt-raise.c: New file.
1789
1790         * pthread_cond_init.c: Initialize all data elements of the condvar
1791         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
1792
1793         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
1794         * pthread_create.c: Likewise.
1795
1796         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
1797         * tst-key1.c: New file.
1798         * tst-key2.c: New file.
1799         * tst-key3.c: New file.
1800
1801         * Versions: Export pthread_detach for version GLIBC_2.0.
1802         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
1803
1804 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
1805
1806         * pthread_key_create.c: Terminate search after an unused key was found.
1807         Patch by Luca Barbieri <ldb@ldb.ods.org>.
1808
1809         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
1810         Patch by Luca Barbieri <ldb@ldb.ods.org>.
1811
1812 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
1813
1814         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
1815         dynamic lookup for errno in PIC.
1816
1817         * allocatestack.c (get_cached_stack): Rearrange code slightly to
1818         release the stack lock as soon as possible.
1819         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
1820         the static TLS block.
1821         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
1822
1823         * cancellation.c: Renamed from cancelation.c.
1824         * Makefile: Adjust accordingly.
1825         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
1826         * cleanup_defer.c: Use CANCELLATION_P.
1827         * pthread_testcancel.c: Likewise.
1828         * descr.h: Fix spelling in comments.
1829         * init.c: Likewise.
1830         * pthread_getattr_np.c: Likewise.
1831         * pthread_getschedparam.c: Likewise.
1832         * pthread_setschedparam.c: Likewise.
1833         * Versions: Likewise.
1834
1835         * pt-pselect.c: New file.
1836         * Makefile (libpthread-routines): Add pt-pselect.
1837         * Versions: Add pselect.
1838
1839         * tst-cancel4.c: New file.
1840         * Makefile (tests): Add tst-cancel4.
1841
1842 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
1843
1844         * pthread_mutex_lock.c: Always record lock ownership.
1845         * pthread_mutex_timedlock.c: Likewise.
1846         * pthread_mutex_trylock.c: Likewise.
1847
1848         * pt-readv.c: New file.
1849         * pt-writev.c: New file.
1850         * pt-creat.c: New file.
1851         * pt-msgrcv.c: New file.
1852         * pt-msgsnd.c: New file.
1853         * pt-poll.c: New file.
1854         * pt-select.c: New file.
1855         * pt-sigpause.c: New file.
1856         * pt-sigsuspend.c: New file.
1857         * pt-sigwait.c: New file.
1858         * pt-sigwaitinfo.c: New file.
1859         * pt-waitid.c: New file.
1860         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
1861         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
1862         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
1863         * Versions: Add all the new functions.
1864
1865         * tst-exit1.c: New file.
1866         * Makefile (tests): Add tst-exit1.
1867
1868         * sem_timedwait.c: Minor optimization for more optimal fastpath.
1869
1870 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
1871
1872         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
1873
1874         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
1875         call.  pthread_join is an official cancellation point.
1876         * pthread_timedjoin.c: Likewise.
1877
1878         * pthread_cond_wait.c: Revert order in which internal lock are dropped
1879         and the condvar's mutex are retrieved.
1880         * pthread_cond_timedwait.c: Likewise.
1881         Reported by dice@saros.East.Sun.COM.
1882
1883 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
1884
1885         * pthreadP.h: Cut out all type definitions and move them...
1886         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
1887         * pthreadP.h: Include <internaltypes.h>.
1888
1889         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
1890         performance tweaks.
1891
1892         * sem_trywait.c: Shuffle #includes around to get right order.
1893         * sem_timedwait.c: Likewise.
1894         * sem_post.c: Likewise.
1895         * sem_wait.c: Likewise.
1896
1897         * nptl 0.3 released.
1898
1899         * Makefile (tests): Add tst-signal3.
1900         * tst-signal3.c: New file.
1901
1902 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
1903
1904         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
1905         the asms modify the sem object.
1906         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
1907
1908         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
1909         the actual members.
1910         * pthreadP.h (struct sem): New type.  Actual semaphore type.
1911         * semaphoreP.h: Include pthreadP.h.
1912         * sem_getvalue.c: Adjust to sem_t change.
1913         * sem_init.c: Likewise.
1914         * sem_open.c: Likewise.
1915         * sem_post.c: Likewise.
1916         * sem_timedwait.c: Likewise.
1917         * sem_trywait.c: Likewise.
1918         * sem_wait.c: Likewise.
1919
1920 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
1921
1922         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
1923         * tst-basic2.c: New file.
1924         * tst-exec1.c: New file.
1925         * tst-exec2.c: New file.
1926         * tst-exec3.c: New file.
1927
1928         * tst-fork1.c: Remove extra */.
1929
1930         * nptl 0.2 released.  The API for IA-32 is complete.