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