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