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