* pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
[glibc.git] / nptl / ChangeLog
blobdbd9f04dec24066dfa75dd750a9de8c2e23eaeee
1 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
7         * sysdeps/pthread/createthread.c (do_clone): Move error handling
8         to first syscall error check.  Move syscall error check for tkill
9         into __ASSUME_CLONE_STOPPED #ifdef.
11 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
13         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
14         is not defined, do explicit synchronization.
15         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
16         is not defined also unlock pd->lock for non-debugging case in case
17         it is necessary.
18         * pthread_create.c (start_thread): Always get and release pd->lock
19         if __ASSUME_CLONE_STOPPED is not defined.
20         (start_thread_debug): Removed.  Adjust users.
21         * allocatestack.c (allocate_stack): Always initialize lock if
22         __ASSUME_CLONE_STOPPED is not defined.
23         * Makefile (tests): Add tst-sched1.
24         * tst-sched1.c: New file.
26         * sysdeps/pthread/createthread.c (do_clone): Only use
27         sched_setschduler and pass correct parameters.
29 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
31         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
32         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
33         PTHREAD_STACK_MIN in comments.
35 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
37         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
38         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
39         argument.
40         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
41         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
42         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
43         (__pthread_cleanup_upto): Fix prototype.
44         (_longjmp_unwind): Adjust caller.
45         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
46         Change second argument to const struct pointer.
47         * tst-sem8.c (main): Remove unused s2 and s3 variables.
48         * tst-sem9.c (main): Likewise.
49         * unwind.c: Include string.h for strlen prototype.
51 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
53         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
54         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
55         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
56         Define HAVE_CMOV.
57         Patch by Nicholas Miell <nmiell@attbi.com>.
59 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
61         * init.c (__pthread_initialize_minimal_internal): Initialize
62         GL(dl_init_static_tls).
63         * pthreadP.h (__pthread_init_static_tls): New prototype.
64         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
65         New functions.
66         * Makefile (tests): Add tst-tls4.
67         (modules-names): Add tst-tls4moda and tst-tls4modb.
68         ($(objpfx)tst-tls4): Link against libdl and libpthread.
69         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
70         tst-tls4modb.so.
71         * tst-tls4.c: New file.
72         * tst-tls4moda.c: New file.
73         * tst-tls4modb.c: New file.
75 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
77         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
78         before __timer_dealloc.
79         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
80         Don't call list_unlink.
82 2003-07-29  Roland McGrath  <roland@redhat.com>
84         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
86 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
88         * tst-cancel17.c (do_test): Check if aio_cancel failed.
89         Don't reuse struct aiocb A if it failed.
90         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
91         not just one byte, as that does not block.
93 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
95         * sysdeps/pthread/unwind-resume.c: New file.
96         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
97         unwind-resume in csu subdir.
98         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
99         exceptions.
100         (librt-sysdep_routines, librt-shared-only-routines): Add
101         rt-unwind-resume.
102         * sysdeps/pthread/rt-unwind-resume.c: New file.
103         * unwind-forcedunwind.c: New file.
104         * Makefile (libpthread-routines): Add unwind-forcedunwind.
105         (libpthread-shared-only-routines): Likewise.
106         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
107         * pthreadP.h (pthread_cancel_init): New prototype.
108         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
110         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
111         attr argument const struct pthread_attr *.
113         * res.c (__res_state): Return __resp.
114         * descr.h: Include resolv.h.
115         (struct pthread): Add res field.
116         * pthread_create.c: Include resolv.h.
117         (start_thread): Initialize __resp.
118         * Makefile (tests): Add tst-_res1.
119         (module-names): Add tst-_res1mod1, tst-_res1mod2.
120         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
121         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
122         libpthread.
123         * tst-_res1.c: New file.
124         * tst-_res1mod1.c: New file.
125         * tst-_res1mod2.c: New file.
127 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
129         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
131         * Makefile: Define various *-no-z-defs variables for test DSOs
132         which has undefined symbols.
134 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
136         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
137         Retry if the stwcx fails to store once_control.
139 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
141         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
142         pthread_attr_setaffinity.
143         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
144         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
145         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
146         * pthread_attr_destroy.c: Free cpuset element if allocated.
147         * pthread_create.c: Pass iattr as additional parameter to
148         create_thread.
149         * sysdeps/pthread/createthread.c: If attribute is provided and
150         a new thread is created with affinity set or scheduling parameters,
151         start thread with CLONE_STOPPED.
152         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
153         pthread_attr_setaffinity.
154         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
155         cpuset element.
157 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
159         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
161 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
163         * sysdeps/pthread/configure.in: Require CFI directives also for
164         ppc and s390.
166 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
168         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
169         Add cfi directives.
171 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
173         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
174         CLEANUP_JMP_BUF.
175         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
176         registers as variables.  Call __pthread_mutex_unlock_usercnt.
177         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
178         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
179         not self pointer in __writer.  Compare with TID to determine
180         deadlocks.
181         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
182         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
183         Likewise.
184         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
185         Likewise.
186         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
187         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
188         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
189         macros also when compiling librt.
191 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
193         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
194         -fasynchronous-unwind-tables.
195         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
196         (PSEUDO): Add cfi directives.
197         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
198         Likewise.
199         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
200         Likewise.
202 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
204         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
205         __pthread_unregister_cancel): Add prototypes and hidden_proto.
206         * unwind.c (__pthread_unwind_next): Add hidden_def.
207         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
208         Likewise.
209         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
210         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
211         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
212         Likewise.
213         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
214         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
215         Likewise.
216         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
217         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
218         __pthread_unregister_cancel and __pthread_unwind_next.
220 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
222         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
223         different symbol for the cancellation syscall wrapper and
224         non-cancellation syscall wrapper.
225         (PSEUDO_END): Define.
227 2003-07-05  Richard Henderson  <rth@redhat.com>
229         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
230         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
231         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
232         return actual return value from the syscall, not 0.
234 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
236         * descr.h (struct pthread): Add pid field.
237         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
238         (__reclaim_stacks): Likewise.
239         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
240         also check for PID of the signal source.
241         (__pthread_initialize_minimal_internal): Also initialize pid field
242         of initial thread's descriptor.
243         * pthread_cancel.c: Use tgkill instead of tkill if possible.
244         * sysdeps/unix/sysv/linux/fork.c: Likewise.
245         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
246         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
247         * sysdeps/unix/sysv/linux/raise.c: Likewise.
249 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
251         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
252         Fix use of parameter.
253         (__libc_cleanup_pop): Likewise.
255 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
257         * init.c (sigcancel_handler): Change parameters to match handler
258         for SA_SIGACTION.  Check signal number and code to recognize
259         invalid invocations.
261 2003-07-03  Roland McGrath  <roland@redhat.com>
263         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
264         Apply sizeof (struct pthread) bias to r13 value.
266 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
268         * sysdeps/pthread/configure.in: Require CFI directives.
270         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
271         definition.
272         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
273         libpthread compilation.
274         * unwind.c (__pthread_unwind): Add hidden_def.
275         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
277 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
279         * libc-cancellation.c (__libc_cleanup_routine): Define.
280         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
281         (__pthread_cleanup_pop): Define.
283 2003-07-01  Richard Henderson  <rth@redhat.com>
285         * sysdeps/alpha/elf/pt-initfini.c: New file.
286         * sysdeps/alpha/pthread_spin_lock.S: New file.
287         * sysdeps/alpha/pthread_spin_trylock.S: New file.
288         * sysdeps/alpha/pthreaddef.h: New file.
289         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
290         * sysdeps/alpha/tls.h: New file.
291         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
292         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
293         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
294         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
295         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
296         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
297         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
298         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
299         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
300         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
302 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
304         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
305         cleanup support and unwind info.
307 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
309         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
310         Use correct cleanup handler registration.  Add unwind info.
311         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
312         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
313         * tst-once3.c: Add cleanup handler and check it is called.
314         * tst-once4.c: Likewise.
315         * tst-oncex3.c: New file.
316         * tst-oncex4.c: New file.
317         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
319 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
321         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
323 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
325         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
326         (tf_msgsnd): Likewise.
328         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
329         premature returns a bit more.
331 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
333         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
334         definition to the front.
336         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
337         the cleanup functions to make the names unique.  Fix dwarf opcode
338         un unwind table.
339         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
340         functions to make the names unique.  Fix CFA offset for two blocks.
342 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
344         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
345         missing closing braces.
346         Patch by Christophe Saout <christophe@saout.de>.
348 2003-06-24  Roland McGrath  <roland@redhat.com>
350         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
352 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
354         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
355         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
357         * pthreadP.h: Declare __find_thread_by_id.
358         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
359         * pthread_clock_gettime.c: Allow using other thread's clock.
360         * pthread_clock_settime.c: Likewise.
361         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
362         * Makefile: Add rules to build and run tst-clock2.
363         * tst-clock2.c: New file.
365 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
367         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
368         to use exception-based cleanup handler.
369         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
371         * tst-cond8.c (ch): Announce that we are done.
373         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
375         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
376         Also test aio_suspend with timeout value.
378 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
380         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
381         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
382         attribute_hidden.
384         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
385         (__pthread_mutex_lock_internal): Likewise.
386         (__pthread_mutex_unlock_internal): Likewise.
387         (__pthread_mutex_unlock_usercnt): Declare.
388         * pthread_mutex_destroy.c: Always fail if used in any way.
389         * pthread_mutex_init.c: Update comment.
390         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
391         * pthread_mutex_timedlock.c: Adjust __nusers.
392         * pthread_mutex_trylock.c: Adjust __nusers.
393         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
394         and public interfaces are wrapper with pass additional parameter.
395         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
396         parameter zero.
397         * tst-mutex8.c: New file.
398         * Makefile (tests): Add tst-mutex8.
399         * sysdeps/pthread/pthread_cond_timedwait.c: Call
400         __pthread_mutex_unlock_usercnt.
401         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
402         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
403         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
404         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
405         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
406         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
407         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
408         Add __nusers.
409         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
410         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
411         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
412         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
413         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
415         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
416         * pthread_mutex_timedlock.c: Likewise.
417         * pthread_mutex_trylock.c: Adjust __nusers.
418         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
419         * tst-mutex9.c: New file.
420         * Makefile (tests): Add tst-mutex9.
421         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
422         * sysdeps/ia64/tls.h: Likewise.
423         * sysdeps/powerpc/tls.h: Likewise.
424         * sysdeps/s390/tls.h: Likewise.
425         * sysdeps/sh/tls.h: Likewise.
426         * sysdeps/x86_64/tls.h: Likewise.
427         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
428         Change type of __owner.
429         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
430         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
431         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
432         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
433         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
435 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
437         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
438         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
440         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
441         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
442         instead of nr to lll_futex_wake.  Only set errno and return -1
443         if err < 0.
445         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
446         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
447         return actual return value from the syscall, not 0.
449 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
451         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
452         find a random value.
453         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
454         errno==EIDRM.
456         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
457         compat_timer_settime.
458         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
459         compat_timer_gettime.
460         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
461         compat_timer_getoverrun.
462         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
463         compat_timer_delete.
465         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
466         error-checking mutex detect busy mutexes.
468 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
470         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
471         Add ax to clobber list.
472         (lll_mutex_cond_lock): Likewise.
473         (lll_mutex_unlock): Likewise.
474         (lll_lock): Likewise.
475         (lll_unlock): Likewise.
477         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
478         * tst-cancel18.c: New file.
479         * tst-cancelx18.c: New file.
481         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
482         and tcdrain.
484         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
485         * tst-cancel17.c: New file.
486         * tst-cancelx17.c: New file.
488         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
489         * sysdeps/unix/sysv/linux/sigwait.c: New file.
490         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
492         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
494 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
496         * sysdeps/pthread/createthread.c (create_thread): Set
497         header.multiple_threads unconditionally.
498         * allocatestack.c (allocate_stack): Likewise.
499         * descr.h (struct pthread): Add header.multiple_threads
500         unconditionally.
501         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
502         Define for librt.  #error if neither libpthread, libc nor librt.
503         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
504         Likewise.
505         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
506         CDISABLE): Likewise.
507         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
508         CDISABLE): Likewise.
509         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
510         CDISABLE): Likewise.
511         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
512         CDISABLE): Likewise.  Access header.multiple_threads outside of
513         libc and libpthread.
514         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
515         Likewise.
516         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
517         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
519 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
521         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
522         Also test early cancellation before the thread reaches the cancellation
523         point.
525         * Makefile: Compile forward.c with exceptions.
527         * sysdeps/unix/sysv/linux/sleep.c: New file.
529 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
531         * Makefile: Add CFLAGS definition to compile function wrappers
532         duplicated from libc with exceptions.
533         * tst-cancel4.c: Also check cancellation handlers.
535         * Makefile: Add rules to build and run tst-cancel16 and
536         tst-cancelx16.  Add missing CFLAGS definitions.
537         * tst-cancel16.c: New file.
538         * tst-cancelx16.c: New file.
540 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
542         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
543         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
544         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
545         (DL_SYSINFO_IMPLEMENTATION): Likewise.
547         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
548         (LIBC_CANCEL_RESET): Likewise.
549         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
550         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
551         librt-cancellation.
552         (CFLAGS-libcrt-cancellation.c): Define.
553         * sysdeps/pthread/librt-cancellation.c: New file.
554         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
555         macros also when compiling librt.
556         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
557         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
558         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
559         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
560         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
561         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
562         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
564         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
565         compat_timer_create.
567 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
569         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
571         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
572         __register_atfork.
573         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
574         Add libc_hidden_def.
576 2003-06-13  Roland McGrath  <roland@redhat.com>
578         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
579         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
581 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
583         * allocatestack.c (queue_stack): Always inline.
584         * ptreadhP.h (__do_cancel): Likewise.
586 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
588         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
589         a typo.
591 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
593         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
594         (__pthread_cond_signal): Remove incorrect second addition for
595         cond_lock!=0.
597 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
599         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
600         (__pthread_cond_signal): Use correct futex pointer in
601         __lll_mutex_lock_wait call.
603         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
604         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
606 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
608         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
609         cancelable.
610         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
611         Likewise.
613         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
614         hand-written CFI generation code.  Since ENTRY/END also initiated
615         CFI frames this caused two CFI sets to be generated.
617 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
619         * cleanup_routine.c: New file.
620         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
621         * sysdeps/pthread/pthread.h: Add support for fully exception-based
622         cleanup handling.
623         * Makefile (libpthread-routines): Add cleanup_routine.
624         Add more CFLAGS variables to compile with exceptions.  Add comments
625         why which file needs unwind tables.
626         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
627         tests.
628         * tst-cancelx1.c: New file.
629         * tst-cancelx2.c: New file.
630         * tst-cancelx3.c: New file.
631         * tst-cancelx4.c: New file.
632         * tst-cancelx5.c: New file.
633         * tst-cancelx6.c: New file.
634         * tst-cancelx7.c: New file.
635         * tst-cancelx8.c: New file.
636         * tst-cancelx9.c: New file.
637         * tst-cancelx10.c: New file.
638         * tst-cancelx11.c: New file.
639         * tst-cancelx12.c: New file.
640         * tst-cancelx13.c: New file.
641         * tst-cancelx14.c: New file.
642         * tst-cancelx15.c: New file.
643         * tst-cleanupx0.c: New file.
644         * tst-cleanupx0.expect: New file.
645         * tst-cleanupx1.c: New file.
646         * tst-cleanupx2.c: New file.
647         * tst-cleanupx3.c: New file.
649         * tst-cleanup0.c: Make standard compliant.
650         * tst-cleanup1.c: Likewise.
652         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
653         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
654         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
655         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
656         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
657         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
658         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
659         CLEANUP_JMP_BUF.
660         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
661         * tst-cancel12.c: New file.
662         * tst-cancel13.c: New file.
663         * tst-cancel14.c: New file.
664         * tst-cancel15.c: New file.
665         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
666         and tst-cancel15.
668         * tst-cancel1.c: Add some comments.
670         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
671         timeout correctly.
673 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
675         * Makefile (CFLAGS-pthread_cancel.c): Define.
677 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
679         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
680         Change type of __writer element to int.
681         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
682         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
683         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
684         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
685         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
686         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
687         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
688         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
689         Compare with TID to determine deadlocks.
690         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
691         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
692         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
693         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
694         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
695         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
696         Likewise.
697         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
698         Likewise.
699         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
700         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
701         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
702         Likewise.
703         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
704         Likewise.
705         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
706         * Makefile (tests): Add tst-rwlock12.
707         * tst-rwlock12.c: New file.
709 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
711         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
712         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
713         Remove bogus hidden_proto.
714         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
715         Likewise.
716         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
717         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
718         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
719         ___lll_mutex_timedlock): Likewise.
721 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
723         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
724         (__pthread_cond_signal): Add some code to eventually handle
725         cond_lock!=0.
727 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
729         * Makefile (tests): Add tst-exec4.
730         (tst-exec4-ARGS): Define.
731         * tst-exec4.c: New file.
733 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
735         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
736         Also fail if tv_nsec < 0.
737         (__lll_timedwait_tid): Likewise.
738         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
739         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
740         Likewise.
741         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
742         Likewise.
743         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
744         Likewise.
745         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
746         Likewise.
747         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
748         Likewise.
749         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
750         Likewise.
752         * Makefile (tests): Add tst-sem8 and tst-sem9.
753         * tst-sem8.c: New file.
754         * tst-sem9.c: New file.
755         * sem_open.c: Fix creation of in_use record if the file exists but
756         no internal record.
758         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
759         definitions.
761         * sysdeps/pthread/timer_create.c (timer_create): In case
762         evp==NULL, assign timer ID to sival_ptr.
764         * descr.h (struct pthread_unwind_buf): Change type of prev element to
765         struct pthread_unwind_buf *.
766         (struct pthread): Likewise for cleanup_jmp_buf element.
768         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
769         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
770         * unwind.c (__pthread_unwind_next): Likewise.
772 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
774         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
775         (lll_futex_timed_wait): Use int for futex value parameter.
776         (lll_futex_wake): Likewise.
777         (lll_futex_requeue): Likewise.
779         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
780         Replace one memory operation with one register operation.
782         * tst-join4.c (do_test): Fix error message.
784         * tst-rwlock6.c (do_test): Use correct format specifier.
786         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
787         (__lll_mutex_lock_wait): Replace one memory operation with one
788         register operation.
789         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
790         (__lll_mutex_lock_wait): Likewise.
792         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
793         (__lll_mutex_cond_lock): Add one to value parameter of
794         __lll_lock_wait to reflect reality in the futex syscall.
795         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
796         (lll_mutex_cond_lock): Likewise.
798 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
800         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
801         New function.
802         (lll_mutex_cond_lock): Define.
804 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
806         * Makefile (tests): Add tst-signal6.
807         * tst-signal6.c: New file.
809         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
810         (__lll_mutex_unlock_force): New function
811         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
813         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
814         (__lll_mutex_unlock_force): New function.
815         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
817         * tst-rwlock7.c (do_test): Use correct format specifier.
819         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
820         Find break parameter in correct asm argument.
822 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
824         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
825         Remove out4.
826         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
827         error occured.
828         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
829         Add __mutex.
830         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
831         lll_futex_requeue, lll_mutex_unlock_force): Define.
833 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
835         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
836         (pthread_cond_t): Add __mutex.
837         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
838         lll_futex_requeue, lll_mutex_unlock_force): Define.
840 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
842         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
843         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
844         Add __mutex field.
845         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
846         Define.
847         (lll_futex_wait, lll_futex_wake): Define.
848         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
849         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
850         FUTEX_REQUEUE instead of FUTEX_WAIT.
851         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
852         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
853         mutex which was used in condvar structure.  Call
854         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
855         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
857         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
858         include tcb-offsets.h.  Read wakeup value in locked region.
859         Use the value of gbr register as THREAD_ID.
860         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
861         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
862         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
864         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
865         macros.
867 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
869         * sysdeps/pthread/pthread_cond_broadcast.c
870         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
872 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
874         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
875         typo in register name.
876         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
877         correctly.  Actually use requeue.  Little optimization.
878         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
879         mutex address early.  Handle cancellation state as 32-bit value.
880         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
881         Remove unnecessary label.
883 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
885         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
886         instead of FUTEX_WAIT.
887         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
888         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
889         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
890         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
891         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
892         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
893         used in condvar structure.  Call __pthread_mutex_cond_lock instead
894         of __pthread_mutex_lock_internal.
895         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
896         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
897         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
898         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
899         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
900         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
901         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
902         Add pthread_mutex_cond_lock.
903         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
904         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
905         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
906         lll_mutex_cond_lock.
907         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
908         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
909         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
910         Add __mutex field.
911         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
912         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
914         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
915         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
917         * pthreadP.h: Declare __pthread_mutex_cond_lock.
918         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
919         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
920         macro don't define aliases.
922         * cancellation.c: Remove __pthread_enable_asynccancel_2.
923         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
924         * sysdeps/pthread/pthread_cond_timedwait.c: Use
925         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
926         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
927         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
928         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
929         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
930         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
932 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
934         * sem_open.c: Fix one endless loop.  Implement correct semantics
935         wrt opening the same semaphore more then once.
936         * sem_close.c: Adjust for sem_open change.
937         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
938         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
939         * Makefile (tests): Add tst-sem7.
940         * tst-sem7.c: New file.
942 2003-05-16  Roland McGrath  <roland@redhat.com>
944         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
945         uninitialized variable braino.
947 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
949         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
950         test for syscall availability.
952         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
953         __no_posix_timers to -1 if the syscalls don't exist.
955         * pthread_join.c (pthread_join): Set tid field of the joined
956         thread to -1.  This isn't necessary but helps to recognize some
957         error conditions with almost no cost.
959         * allocatestack.c (FREE_P): Also negative values indicate an
960         unused stack.
962         * unwind.c: Include <unistd.h>.
964 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
966         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
968 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
970         * Makefile (crti-objs, crtn-objs): New variables.
971         (omit-deps, extra-objs): Add crtn.
972         ($(objpfx)libpthread.so): Depend on both crti and crtn
973         and links to them in multidir.
974         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
976 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
978         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
979         (lll_mutex_unlock): Use atomic_exchange_rel.
981 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
983         * cond-perf.c (cons): Add missing locking around setting of alldone.
985 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
987         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
988         related macros.
989         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
991 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
993         * tst-sem6.c: New file.
994         * Makefile (tests): Add tst-sem6.
996         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
997         Use atomic_exchange_rel instead of atomic_exchange.
998         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
999         Likewise.
1001         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
1002         code for lll_futex_wait and lll_futex_wake in static apps.  Use
1003         vsyscall is possible.
1005         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
1006         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
1007         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
1008         pthread_setaffinity_np.
1009         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
1010         and pthread_setaffinity_np.
1011         * Makefile (libpthread-routines): Add pthread_getaffinity and
1012         pthread_setaffinity.
1014         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
1015         use it in case mmap to allocate the stack fails.
1016         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
1017         ARCH_MAP_FLAGS here.
1018         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
1019         ARCH_RETRY_MMAP.
1021 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
1023         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
1024         handler implementation.  It is now lockless in fork().
1025         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
1026         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1027         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
1028         declare the __fork_*_lists.
1029         (struct fork_handler): Include pointers to all three functions.
1030         Add next, refcntr and need_signal elements.
1031         (__fork_handlers): New declaration.
1032         (__register_atfork_malloc): Remove declaration.
1033         (HAVE_register_atfork_malloc): Remove definition.
1034         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
1035         __pthread_child_handler variable.
1036         (__libc_pthread_init): Use __register_atfork instead of explicitly
1037         adding to the list.
1038         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
1039         and lll_futex_wake.
1040         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1042         * unwind.c (unwind_cleanup): Print error message and then abort.  This
1043         function must never be reached.
1045         * cond-perf.c: New file.
1047 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
1049         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
1051 2003-05-04  Roland McGrath  <roland@redhat.com>
1053         * Makefile ($(objpfx)../libc.so): New target.
1055 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
1057         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1058         (pthread_condattr_t): Size is only an int, don't use long for
1059         alignment.
1060         (pthread_mutexattr_t): Likewise.
1061         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1062         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1063         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1065 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
1067         * sysdeps/i386/tls.h: Define THREAD_ID.
1068         * sysdeps/ia64/tls.h: Likewise.
1069         * sysdeps/powerpc/tls.h: Likewise.
1070         * sysdeps/s390/tls.h: Likewise.
1071         * sysdeps/sh/tls.h: Likewise.
1072         * sysdeps/x86_64/tls.h: Likewise.
1073         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
1074         record ownership.
1075         * pthread_mutex_timedlock.c: Likewise.
1076         * pthread_mutex_trylock.c: Likewise.
1077         * pthread_mutex_unlock.c: Likewise.
1078         * pthread_rwlock_trywrlock.c: Likewise.
1079         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
1080         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1081         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1082         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1084         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
1085         flag.
1087 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
1089         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1090         (__SIZEOF_PTHREAD_COND_T): Define to 48.
1091         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
1092         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1093         Make __align long long instead of long.
1094         (pthread_rwlock_t): Formatting.
1095         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
1096         (pthread_rwlock_t): Formatting.
1097         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1098         (pthread_cond_t): Make __align long long instead of long.
1099         (pthread_rwlock_t): Move __flags field to the same position as in
1100         linuxthreads.
1102 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
1104         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
1105         * tst-rwlock7.c (do_test): Likewise.
1107 2003-04-26  Roland McGrath  <roland@redhat.com>
1109         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
1111 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
1113         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
1114         sizeof (struct pthread).
1115         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
1116         1 struct pthread.
1117         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
1118         to 0.
1119         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1120         struct pthread.
1121         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1122         to 32-bit bytes.
1123         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1124         tcbp.
1125         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1126         unneccessarily.
1127         (NO_TLS_OFFSET): Define.
1128         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
1129         add TLS_TCB_SIZE unnecessarily.
1131 2003-04-22  Roland McGrath  <roland@redhat.com>
1133         * Makeconfig (shared-thread-library): Reverse link order to work
1134         around linker bug.
1136 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
1138         * semaphore.h: Fix typo in comment.
1140 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
1142         * sysdeps/pthread/sigfillset.c: New file.
1144         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
1145         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
1146         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
1147         * sysdeps/pthread/sigaction.c: Likewise.
1148         * sysdeps/pthread/sigprocmask.c: New file.
1149         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
1150         __SIGRTMIN+1.
1151         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1152         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
1153         in this case.
1155 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
1157         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1158         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
1160         * sysdeps/unix/sysv/linux/unregister-atfork.c
1161         (__unregister_atfork): Don't free memory not allocated dynamically.
1163         * semaphore.h: Remove __THROW marker from cancellation points.
1164         * nptl/sysdeps/pthread/pthread.h: Likewise.
1166 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
1168         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
1169         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
1170         __THROW.
1172 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
1174         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
1176 2003-04-15  Roland McGrath  <roland@redhat.com>
1178         * forward.c (__pthread_unwind): Tweak to avoid warning.
1180 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
1182         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
1184 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
1186         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
1187         overflow CFA advance instructions.
1188         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1190 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
1192         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
1193         * sysdeps/i386/pthread_spin_lock.c: Likewise.
1194         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
1195         defined.
1197         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
1198         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
1199         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1200         DW_CFA_advance_loc for .Laddl-.Lsubl.
1202 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
1204         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
1205         position-independent unwind data for static libraries.
1206         Add missing unwind info.  Add comments.
1208         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
1209         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1210         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1211         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1213 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
1215         * Makefile: Make sure all cancellation points are compiled with
1216         exception and asynchronous unwind tables.
1218         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
1219         which mishandles loading of global object addresses in PIC.
1220         (THREAD_SETMEM_NC): Likewise.
1222 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
1224         * pthread.h: Define new data structure for cleanup buffer.  Declare
1225         new cleanup handler interfaces.
1226         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
1227         (struct pthread): Add cleanup_jmp_buf pointer.  Define
1228         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
1229         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
1230         it.  Declare old cleanup handler installation functions.
1231         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
1232         handling.
1233         * cleanup_defer.c: Likewise.
1234         * cleanup_compat.c: New file.  Old cleanup code.
1235         * cleanup_def_compat.c: New file.  Old cleanup code.
1236         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
1237         if own thread descriptor.
1238         * unwind.c: New file.
1239         * forward.c: Add __pthread_unwind.
1240         * init.c (pthread_functions): Add __pthread_unwind.
1241         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
1242         Add ptr___pthread_unwind.
1243         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
1244         and unwind function.
1245         * Makefile (libpthread-routines): Add cleanup_compat,
1246         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
1247         table generation if necessary.
1248         * version.c: Record whether unwind support is compiled in.
1249         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
1250         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
1251         handler interfaces.
1252         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
1253         complication to generate unwind information for syscall wrappers.
1254         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1255         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
1256         __cleanup_fct_attribute.
1258         * Makefile: Add rules to build and run tst-cleanup0.
1259         * tst-cleanup0.c: New file.
1260         * tst-cleanup0.expect: New file.
1262         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
1263         caller.  Optimize to avoid often unecessary local variable.
1265 2003-04-11  Roland McGrath  <roland@redhat.com>
1267         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
1268         sets variable `multidir'; include that.
1269         (generated): Add it.
1270         ($(objpfx)$(multidir)/crti.o): New target.
1271         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
1273 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
1275         * tst-attr2.c (do_test): Add cast to avoid warning.
1276         * tst-mutex4.c (do_test): Likewise.
1278 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
1280         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
1281         in child.
1283 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
1285         * Makefile (tests): Add tst-detach1.
1286         * tst-detach1.c: New file.
1288 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
1290         * sysdeps/pthread/pthread.h: Remove duplicate
1291         pthread_cleanup_{push,pop} definitions.
1293         * tst-barrier2.c: Eliminate warnings.
1294         * tst-cancel4.c: Likewise.
1295         * tst-cond4.c: Likewise.
1296         * tst-cond6.c: Likewise.
1297         * tst-detach1.c: Likewise.
1298         * tst-rwlock4.c: Likewise.
1299         * tst-rwlock6.c: Likewise.
1300         * tst-rwlock7.c: Likewise.
1301         * tst-sem3.c: Likewise.
1302         * tst-spin2.c: Likewise.
1303         * tst-umask1.c: Likewise.
1305 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
1307         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
1309 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
1311         * descr.h (struct pthread): Move cancelhandling member to the front.
1313 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
1315         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
1316         malloc_parent, and malloc_child statically.
1317         (__register_atfork_malloc): New function.
1318         (free_mem): Don't free any of the malloc_* variables on the list.
1319         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
1320         Define HAVE_register_atfork_malloc.
1322 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
1324         * sysdeps/pthread/createthread.c (create_thread): Add some more
1325         comments explaining when to set multiple_threads and when not.
1327         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
1328         THREAD_ATOMIC_BIT_SET if not already defined.
1329         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
1330         THREAD_ATOMIC_BIT_SET:
1331         * sysdeps/x86_64/tls.h: Likewise.
1332         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
1333         THREAD_ATOMIC_CMPXCHG_VAL.
1334         (_pthread_cleanup_pop_restore): Likewise.
1335         * cancellation.c (__pthread_enable_asynccancel): Likewise.
1336         (__pthread_enable_asynccancel_2): Likewise.
1337         (__pthread_disable_asynccancel): Likewise.
1338         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
1339         (__libc_disable_asynccancel): Likewise.
1340         * init.c (sigcancel_handler): Likewise.
1341         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
1342         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
1344 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
1346         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
1347         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
1348         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
1349         * Makefile (tests): Add tst-cancel11.
1350         * tst-cancel11.c: New file.
1352 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
1354         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
1355         round, not the first.  Use specific_used flag instead of local
1356         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
1357         (__free_tcb): Don't call deallocate_tsd here.
1358         (start_thread): Call deallocate_tsd here.
1359         * pthread_setspecific.c: Set specific_used flag really only when
1360         needed.
1361         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
1362         * tst-tsd3.c: New file.
1363         * tst-tsd4.c: New file.
1365 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
1367         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
1368         Use atomic_exchange_and_add instead of __lll_add.
1369         (__lll_mutex_timedlock): Likewise.
1370         Patch by Ian Wienand.
1372 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
1374         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1375         (SINGLE_THREAD_P): Fix typo.
1376         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
1378 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
1380         * Makefile (tests): Add tst-align.
1381         * tst-align.c: New file.
1382         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
1384         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
1385         function correctly.
1387         * tst-tsd2.c: Add casts to avoid warnings.
1389 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
1391         * descr.h (struct pthread): Move most often used elements to the front.
1393 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
1395         * Makefile (libpthread-routines): Add pthread_atfork.
1396         (libpthread-static-only-routines): Add pthread_atfork.
1398 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1400         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
1401         of TLS_DTV_AT_TP.
1402         (INSTALL_DTV): Add parens.
1403         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1404         Use passed descr instead of THREAD_SELF.
1405         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
1406         (__lll_mutex_timedlock_wait): Correct expected value after
1407         spurious wakeup.
1408         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
1409         Release lock before waking up the waiters.
1410         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
1411         criteria.  Reorderstruct passed to cleanup handler.  Fix
1412         handling of cancellation and failung pthread_mutex_unlock call.
1413         Use __pthread_enable_asynccancel_2 instead of
1414         __pthread_enable_asynccancel.
1415         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1416         Return result of lock re-get if it fails.
1417         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
1418         for __pthread_cleanup_push.
1419         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
1420         completely broken rwlock implementation.
1421         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1422         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1423         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1424         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1425         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1426         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
1427         versioned_symbol macro.
1428         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
1429         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1431 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
1433         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
1434         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
1435         and __helper_tid.
1436         (struct timer): Remove th and bar field.
1437         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
1438         debugging code.  Create only one helper thread.
1439         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
1440         helper thread.
1441         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1442         Renamed.  Define statically.  Use thread info from siginfo.
1443         (__helper_once): New variable.
1444         (__helper_tid): New variable.
1445         (__reset_helper_control): New function.
1446         (__start_helper_thread): New function.
1448         * pthread_create.c (start_thread): Don't use setjmp inside
1449         __builtin_expect to work around gcc bug.
1451         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
1452         timer_delete syscall fails, but not with ENOSYS, set
1453         __no_posix_timers.
1455         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
1456         (timer_settime): Fix typo.
1457         * sysdeps/unix/sysv/linux/timer_getoverr.c
1458         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
1460 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
1462         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
1463         offset of cleanupbuf.__prev.
1465 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
1467         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
1468         of included file.
1470 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
1472         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
1473         NULL provide default definition to syscall.
1475 2003-03-25  Roland McGrath  <roland@redhat.com>
1477         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
1478         (timer_id2ptr): Fix typo.
1480 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
1482         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
1483         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
1484         * sysdeps/ia64/pthreaddef.h: Likewise.
1485         * sysdeps/powerpc/pthreaddef.h: Likewise.
1486         * sysdeps/s390/pthreaddef.h: Likewise.
1487         * sysdeps/sh/pthreaddef.h: Likewise.
1488         * sysdeps/x86_64/pthreaddef.h: Likewise.
1489         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
1490         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
1491         being changed.
1492         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1493         SIGTIMER is not unblocked.
1494         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
1495         RT signal taken.
1496         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
1497         be send.
1498         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
1499         pass pointer through as ID.
1500         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
1501         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
1502         * sysdeps/unix/sysv/linux/timer_create.c: New file.
1503         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
1504         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
1505         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
1506         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
1507         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
1508         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
1509         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
1510         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
1511         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
1512         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
1513         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
1514         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
1515         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
1516         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
1517         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
1518         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
1519         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
1520         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
1521         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
1522         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
1523         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
1524         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
1525         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
1526         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
1527         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
1528         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
1529         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
1530         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
1531         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
1532         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
1534         * pthreadP.h: Remove FRAME_LEFT definition.
1535         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
1536         already left frame.  Programs which have this problem are not POSIX
1537         compliant.
1538         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
1540 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
1542         * sysdeps/pthread/tst-timer.c: Check return values of the
1543         functions we test.
1545 2003-03-23  Roland McGrath  <roland@redhat.com>
1547         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
1548         * tst-tls3mod.c: Likewise.
1549         * tst-tls1.c: Likewise.
1550         * tst-tls2.c: Likewise.
1552         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
1553         undefined behavior.
1555         * tst-join5.c (tf1, tf2): Add a cast.
1557         * Makeconfig (includes): Append -I$(..)nptl to this variable.
1559         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
1560         Don't test anything.
1561         * tst-cond4.c: Likewise.
1562         * tst-cond6.c: Likewise.
1563         * tst-flock2.c: Likewise.
1564         * tst-mutex4.c: Likewise.
1565         * tst-rwlock4.c: Likewise.
1566         * tst-signal1.c: Likewise.
1567         * tst-spin2.c: Likewise.
1568         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
1570         * tst-mutex4.c: Use test-skeleton.c.
1571         * tst-spin2.c: Likewise.
1572         * tst-sysconf.c: Likewise.
1573         * tst-barrier2.c: Likewise.
1574         * tst-cond4.c: Likewise.
1575         * tst-cond6.c: Likewise.
1576         * tst-rwlock4.c: Likewise.
1577         * tst-unload.c: Likewise.
1578         * tst-flock2.c (do_test): Use return instead of exit.
1580 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
1582         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1584 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
1586         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1587         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
1588         instead of __lll_compare_and_swap.
1589         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1590         Likewise.
1591         Removed definition if __lll_compare_and_swap.
1593         * cancellation.c: Adjust for new form of compare&exchange macros.
1594         * cleanup_defer.c: Likewise.
1595         * init.c: Likewise.
1596         * libc-cancellation.c: Likewise.
1597         * old_pthread_cond_broadcast.c: Likewise.
1598         * old_pthread_cond_signal.c: Likewise.
1599         * old_pthread_cond_timedwait.c: Likewise.
1600         * old_pthread_cond_wait.c: Likewise.
1601         * pthread_cancel.c: Likewise.
1602         * pthread_create.c: Likewise.
1603         * pthread_detach.c: Likewise.
1604         * pthread_join.c: Likewise.
1605         * pthread_key_delete.c: Likewise.
1606         * pthread_setcancelstate.c: Likewise.
1607         * pthread_setcanceltype.c: Likewise.
1608         * pthread_timedjoin.c: Likewise.
1609         * pthread_tryjoin.c: Likewise.
1610         * sysdeps/pthread/createthread.c: Likewise.
1612 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
1614         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
1615         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
1616         definitions.  Replace uses with calls to atomic_* functions.
1617         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1618         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
1619         __lll_test_and_set calls with atomic_exchange_and_add and
1620         atomic_exchange calls respectively.
1621         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1622         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1623         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
1624         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1625         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
1626         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
1627         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1629         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
1630         returns the old value.
1632 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
1634         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
1635         int for variable OLDVAL and correct inline assembler contraint.
1636         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
1637         type int for variable OLD.
1639         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
1640         only for s390-32.
1641         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1642         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
1643         instead of multiple_threads field in the TCB.
1645 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
1647         * sysdeps/i386/i686/bits/atomic.h: Removed.
1648         * sysdeps/i386/i586/bits/atomic.h: Removed.
1649         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
1650         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
1651         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
1652         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
1653         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
1654         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
1655         * atomic.h: Removed.  Moved to glibc.
1657         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
1658         support for clock selection.
1660         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
1661         signalling waiters.
1663 2003-03-18  Roland McGrath  <roland@redhat.com>
1665         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
1666         Add __lll_rel_instr first.  Add memory clobber.
1667         (lll_mutex_unlock): Use __lll_test_and_set.
1668         From Paul Mackerras <paulus@samba.org>.
1670         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
1671         unconditionally.
1672         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1673         (SINGLE_THREAD_P):  Add `header.' prefix.
1674         From Paul Mackerras <paulus@samba.org>.
1676         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
1677         pthread_timedjoin_np to ...
1678         (libpthread: GLIBC_2.3.3): ... here.
1679         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
1681         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1682         Avoid shadowing VAL variable.
1684         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
1685         New macro.
1687 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
1689         * Makefile (tests): Add tst-cond11.
1690         * tst-cond11.c: New file.
1692         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
1693         struct passed to cleanup handler to eliminate one more
1694         instruction.
1695         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1697         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1698         (pthrad_cond_t): Replace __unused field with __clock.
1700         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
1701         waken all waiters in cleanup handler.
1702         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1703         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1705         * pthread_condattr_getclock.c: New file.
1706         * pthread_condattr_setclock.c: New file.
1707         * sysdeps/pthread/pthread.h: Declare these new functions.
1708         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
1709         * Makefile (libpthread-routines): Add the new functions.
1710         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
1711         Renamed field to value.  Document use of the bits.
1712         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
1713         change.
1714         * pthread_condattr_setpshared.c: Likewise.
1715         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
1716         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
1717         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1718         Add __clock field.
1719         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1720         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1721         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1722         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1723         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1724         Implement clock selection.
1725         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1726         * pthread-errnos.sym: Add ENOSYS.
1727         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1728         _POSIX_CLOCK_SELECTION.
1729         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1731         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
1732         invalid .size directive.
1734 2003-03-17  Roland McGrath  <roland@redhat.com>
1736         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
1737         Formatting tweaks.
1739 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
1741         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
1742         Use __lll_add instead of spelling it out.  Use protected symbol names.
1743         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
1744         Use __lll_add.
1745         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
1746         Renamed from lll_compare_and_swap.  Use new name where necessary.
1747         (__lll_add): Defined.
1748         (__lll_dec_if_positive): Defined.
1749         (__lll_test_and_set): Defined.
1750         * sysdeps/ia64/pthread_spin_init.c: Removed.
1751         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
1752         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
1753         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
1754         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
1755         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
1756         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
1757         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
1758         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
1759         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1760         __sync_lock_release_si.
1761         Patch by Jakub Jelinek.
1763         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1764         Fix timeout handling.
1765         (__lll_timedwait_tid): Likewise.
1766         (lll_unlock_wake_cb): Wake up other waiters if necessary.
1767         Patch by Jakub Jelinek.
1769         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
1771 2003-03-17  Roland McGrath  <roland@redhat.com>
1773         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
1774         * sysdeps/pthread/pthread_spin_init.c: New file.
1775         * sysdeps/pthread/pthread_spin_unlock.c: New file.
1776         * sysdeps/powerpc/Makefile: New file.
1777         * sysdeps/powerpc/pthread_spin_lock.c: New file.
1778         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
1779         * sysdeps/powerpc/pthreaddef.h: New file.
1780         * sysdeps/powerpc/tcb-offsets.sym: New file.
1781         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
1782         * sysdeps/powerpc/tls.h: New file.
1783         * sysdeps/powerpc/bits/atomic.h: New file.
1784         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
1785         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
1786         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
1788         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
1789         * sysdeps/unix/sysv/linux/sem_post.c: New file.
1790         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
1791         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
1792         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
1793         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
1794         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
1795         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
1796         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
1797         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
1798         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
1799         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
1800         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
1801         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1802         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
1804         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
1805         not gettimeofday.
1806         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
1807         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
1808         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
1809         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
1810         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
1812 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
1814         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
1815         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1816         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1817         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1818         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
1820 2003-03-16  Roland McGrath  <roland@redhat.com>
1822         * tst-fork4.c: Include <string.h>.
1823         * tst-signal2.c: Likewise.
1824         * tst-mutex5.c (do_test): exit -> return.
1825         * tst-mutex2.c: Include <stdlib.h>.
1827 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
1829         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1830         (__lll_mutex_timedlock_wait): Correct expected value after
1831         spurious wakeup.  Otherwise we would never wait again.
1833         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
1834         zone versus inline asm stupidity.  Use correct instructions.
1836         * tst-rwlock6.c: Add some more status output.
1838 2003-03-15  Roland McGrath  <roland@redhat.com>
1840         * sysdeps/pthread/configure.in: New file.
1841         * sysdeps/pthread/configure: New file (generated).
1843 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
1845         * allocatestack.c (allocate_stack): Store the exact stack size of
1846         user allocated stacks.
1848 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
1850         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1851         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
1852         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
1853         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1854         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1855         Use `header.' prefix.
1856         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
1858 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
1860         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
1861         __builtin_frame_address, use stack pointer.
1863         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
1864         instead of __builtin_frame_pointer.
1866 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
1868         * tst-basic1.c (do_test): Add cast to avoid warning.
1869         * tst-basic2.c (do_test): Likewise.
1871         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
1872         amount of stack correction.
1874         * tst-fork4.c: Use test-skeleton.c.
1876 2003-03-14  Roland McGrath  <roland@redhat.com>
1878         * init.c: Fix typo "#eli" for "#else".
1880 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
1882         * allocatestack.c (__stack_user): Use hidden_data_def.
1883         * pthread_create.c (__pthread_keys): Likewise.
1885         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
1887 2003-03-14  Roland McGrath  <roland@redhat.com>
1889         * tst-fork4.c: New file.
1890         * Makefile (tests): Add it.
1892         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
1893         we always define the padding space.
1894         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
1895         stopped supporting its own extensions fully.
1896         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
1897         struct also called `header', so `header.multiple_threads' is the field
1898         name to use on all machines.
1899         * allocatestack.c (allocate_stack): Use `header.' prefix.
1900         * sysdeps/pthread/createthread.c (create_thread): Likewise.
1901         * pthread_create.c (__pthread_create_2_1): Likewise.
1902         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
1903         (THREAD_SELF): Likewise.
1904         * sysdeps/x86_64/tls.h: Likewise.
1905         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1906         (SINGLE_THREAD_P): Likewise.
1907         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1908         (SINGLE_THREAD_P): Likewise.
1909         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1910         (SINGLE_THREAD_P): Likewise.
1912         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
1913         value directly.
1915 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
1917         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
1918         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
1920         * pthread_create.c (start_thread): setjmp is expected to return 0.
1922         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
1923         (THREAD_GETMEM_NC): Likewise.
1925 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
1927         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
1928         and the size of the stack which must be allocated is a multiple,
1929         allocate one more page.
1930         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
1931         MULTI_PAGE_ALIASING.
1933 2003-03-13  Roland McGrath  <roland@redhat.com>
1935         * pthread_create.c (start_thread): Set EXITING_BIT after the
1936         event-reporting (and destructors), not before.
1938 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
1940         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
1941         lll_futex_wake): Declare register variables as long int instead of
1942         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
1943         Make syscall arguments clobbered by the syscall.
1944         (lll_futex_wait): Define using lll_futex_timed_wait.
1946         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
1947         to void *.
1949         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
1950         PPID if [! NDEBUG].
1952         * allocatestack.c (nptl_ncreated): Only declare if
1953         COLORING_INCREMENT != 0.
1955         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
1956         (__libc_enable_asynccancel_2): Remove prototype.
1958         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
1959         ctid to match kernel.
1961 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
1963         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
1964         libc_multiple_threads.
1965         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
1966         __libc_multiple_threads to...
1967         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
1969         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
1970         versioning.
1971         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1972         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1974         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1975         (__pthread_once_internal): Define.
1977         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
1978         macros instead of .symver directly.
1979         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1980         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1982         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
1983         * sysdeps/x86_64/tcb-offsets.sym: New file.
1984         * sysdeps/x86_64/Makefile: New file.
1986         * sysdeps/i386/tcb-offsets.sym: Add SELF.
1987         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
1988         to access own pthread_t in TCB.
1989         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1990         Likewise.
1991         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1992         Likewise.
1993         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1995 2003-03-12  Roland McGrath  <roland@redhat.com>
1997         * pthread-errnos.sym: New file.
1998         * Makefile (gen-as-const-headers): New variable, list that file.
1999         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
2000         header <pthread-errnos.h> instead of defining errno values here.
2001         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2002         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2003         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2004         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2005         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2006         Likewise.
2007         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2008         Likewise.
2009         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2010         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2011         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2012         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2013         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2014         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2015         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2016         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2017         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2018         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
2019         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2020         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
2021         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
2022         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
2023         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
2024         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2025         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2026         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2027         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2028         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2029         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2030         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
2031         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
2032         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
2033         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
2034         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2035         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2037         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
2038         CLONE_CHILD_SETTID worked.
2040 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
2042         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
2043         file.
2044         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
2045         file.
2047         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2048         (pthread_cond_t): Add padding.
2050         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
2051         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
2052         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
2054         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2055         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
2056         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2057         (__pthread_rwlock_timedrdlock): Likewise.
2058         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
2059         (__pthread_rwlock_wrlock): Likewise.
2060         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
2061         (__pthread_rwlock_rdlock): Likewise.
2063         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
2065         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
2066         result of lock re-get if it fails.
2068 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
2070         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
2071         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2072         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
2073         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2074         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2075         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2076         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2077         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2078         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2079         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2081         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
2082         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
2084         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
2085         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
2086         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
2087         (create_thread): Likewise.
2088         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
2089         * init.c (__pthread_initialize_minimal_internal): Initialize
2090         __libc_multiple_threads_ptr if necessary.
2091         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
2092         __pthread_multiple_threads and __libc_multiple_threads_ptr.
2093         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
2094         __libc_multiple_threads.
2095         (__libc_pthread_init): Return pointer to __libc_pthread_init if
2096         necessary.
2098         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
2099         (THREAD_SETMEM_NC): Likewise.
2101         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
2102         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
2103         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
2104         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
2106         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
2107         Eliminate one entire instruction.
2109         * cancellation.c (__pthread_enable_asynccancel_2): New function.
2110         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
2111         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2112         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
2113         instead of __pthread_enable_asynccancel.
2114         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2115         (__pthread_cond_wait): Likewise.
2116         * sysdeps/pthread/pthread_cond_timedwait.c
2117         (__pthread_cond_timedwait): Likewise.
2118         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2120         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2121         (__condvar_cleanup): Wake up all waiters in case we got signaled
2122         after being woken up but before disabling asynchronous
2123         cancellation.
2124         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
2125         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2126         (__condvar_cleanup): Likewise.
2128         * init.c (__NR_set_tid_address): If already defined, don't redefine.
2129         Make it an error if architecture has no #if case.  Add x86-64.
2131         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
2132         pt-initfini.s generation.
2134         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
2135         (TLS_INIT_TP): Fix typo.
2137 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
2139         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
2140         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
2142         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
2143         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
2144         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
2145         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
2146         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
2147         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2148         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
2149         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
2151 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
2153         * sysdeps/pthread/pthread_cond_timedwait.c
2154         (__pthread_cond_timedwait): Return the result of the final
2155         locking.  If it succeeds, the regular function return value.
2157         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
2158         Return result of the final locking.
2159         * version.c (__nptl_main): Work around problems with the strange
2160         INTERNAL_SYSCALL macro on ppc32.
2161         * init.c (__pthread_initialize_minimal_internal): Unblock
2162         SIGCANCEL in case the parent blocked it.
2163         Reported by Paul Mackerras <paulus@samba.org>.
2165         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
2166         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
2167         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
2169 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
2171         * sysdeps/pthread/pthread_cond_timedwait.c
2172         (__pthread_cond_timedwait): Unlock and fail if
2173         __pthread_mutex_unlock_internal failed.
2175         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
2176         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
2177         Use ARCH_CLONE.
2178         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
2179         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
2180         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
2181         ALLOCATE_STACK): New macros.
2182         (TLS_TPADJ): New macro.
2183         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
2184         (allocate_stack): Handle TLS_DTV_AT_TP and
2185         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
2186         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
2187         Don't set PD->self.
2188         * init.c [__ia64__] (__NR_set_tid_address): Define.
2190         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
2191         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
2192         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
2193         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
2194         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
2195         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
2196         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
2197         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
2198         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
2199         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2200         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
2201         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
2202         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
2203         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
2204         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
2205         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
2206         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
2207         * sysdeps/ia64/bits/atomic.h: New file.
2208         * sysdeps/ia64/Makefile: New file.
2209         * sysdeps/ia64/pthread_spin_init.c: New file.
2210         * sysdeps/ia64/pthread_spin_lock.c: New file.
2211         * sysdeps/ia64/pthread_spin_trylock.c: New file.
2212         * sysdeps/ia64/pthread_spin_unlock.c: New file.
2213         * sysdeps/ia64/pthreaddef.h: New file.
2214         * sysdeps/ia64/tcb-offsets.sym: New file.
2215         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
2216         * sysdeps/ia64/tls.h: New file.
2218         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
2219         to syscall instead of no arguments.
2221 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
2223         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
2224         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
2225         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
2226         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
2228         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
2229         unused code.
2231         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
2233         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2234         lowlevelbarrier.sym.
2235         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
2236         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
2237         Include lowlevelbarrier.h and don't define offsets locally.
2238         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
2240         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2241         (__lll_mutex_lock_wait): Reverse order of first two parameters.
2242         (__lll_mutex_timedlock_wait): Likewise.
2243         (lll_mutex_lock): Adjust asm for that.
2244         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
2245         (lll_lock): Adjust asm for operand order change.
2246         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
2247         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
2249         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
2250         Reverse order of parameters.
2251         (__lll_timedwait_tid): Remove regparms attribute.
2252         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
2253         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
2255         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2256         (__lll_timedwait_tid): Remove one unnecessary instruction.
2258         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
2259         __lll_mutex_timedlock_wait only for NOT_IN_libc.
2260         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
2261         lowlevelmutex.S.
2263         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2264         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
2265         for NOT_IN_libc.
2266         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
2267         lowlevellock.S.
2269         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
2270         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
2271         for libc.so.
2272         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
2273         define LOCK here (if UP is not defined).  The actual code is in
2274         lowlevelmutex.S.
2276         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
2277         LOCK is already defined.  Don't define lll_unlock_wake_cb and
2278         __lll_timedwait_tid for libc.so.
2279         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
2280         define LOCK here (if UP is not defined).  The actual code is in
2281         lowlevellock.S.
2283         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
2284         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
2285         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
2286         instead of lowlevelsem.h.
2287         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2288         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
2289         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
2291         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2292         lowlevelrwlock.sym.
2293         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
2294         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
2295         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
2297         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
2298         register loading.
2299         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
2300         last changed.  D'oh.
2302         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
2304         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
2305         of __libc_locking_needed.
2306         (lll_trylock): Initialize %eax to zero.
2308         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
2309         pthread_cond_t definition.
2311 2003-03-10  Roland McGrath  <roland@redhat.com>
2313         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
2314         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
2315         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
2316         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
2317         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
2319         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
2320         Instead of setting PD->multiple_threads, set globals
2321         __pthread_multiple_threads and __libc_multiple_threads.
2322         * sysdeps/pthread/createthread.c (create_thread): Likewise.
2323         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
2324         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
2326         * descr.h (struct pthread): Conditionalize first member on
2327         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
2328         containing an anonymous tcbhead_t.  Move `list' member out.
2329         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
2330         * allocatestack.c: Remove use of `header.data.' prefix.
2331         * pthread_create.c: Likewise.
2332         * init.c (__pthread_initialize_minimal_internal): Likewise.
2333         * sysdeps/pthread/createthread.c (create_thread): Likewise.
2334         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
2335         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
2336         * sysdeps/x86_64/tls.h: Likewise.
2337         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2338         (SINGLE_THREAD_P): Likewise.
2339         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
2340         (SINGLE_THREAD_P): Likewise.
2341         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
2342         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
2344 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
2346         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
2348         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2349         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
2351         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
2352         leftovers from the ia32 code.
2354         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
2355         memory load.
2356         (clear_once_control): Don't load %esi.
2358         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
2359         handling.
2361         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
2363         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
2364         * sysdeps/unix/sysv/linux/createthread.c: ...here.
2366         * Makefile (tests): Add tst-cond10.
2367         * tst-cond10.c: New file.
2369 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
2371         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
2372         * tst-signal3.c (do_test): Likewise.
2373         * tst-sem5.c (do_test): Likewise.
2374         * tst-kill6.c (do_test): Likewise.
2375         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
2377         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
2378         of inc/dec.
2379         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
2380         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
2381         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2382         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2383         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2384         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2385         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2386         Likewise.
2387         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2388         Likewise.
2389         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2390         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2391         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2392         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2393         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2394         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2395         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2396         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2398         * allocatestack.c (allocate_stack): If mprotect() fails free the
2399         TLS memory.
2401 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
2403         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
2405         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
2406         lll_wake_tid.  This was used only to work around kernel limits in
2407         the early days.
2408         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2409         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
2410         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2411         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2413         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
2414         (__pthread_initialize_minimal_internal): Change initialization of
2415         __static_tls_align_m1 appropriately.
2416         * pthreadP.h (__static_tls_align_m1): Renamed from
2417         __static_tls_align.
2418         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
2419         instead of __static_tls_align-1.
2421 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
2423         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2425         * pthread_create.c: Define __pthread_keys using nocommon
2426         attribute, not by placing it explicitly in bss.
2427         Remove DEFINE_DEALLOC definition.  Not needed anymore.
2429         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
2430         Use it in mmap call to allocate stacks.
2432         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
2434         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
2435         result of the thread function.
2437 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
2439         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
2440         version is just fine.
2442         * sysdeps/unix/sysv/linux/libc_pthread_init.c
2443         (__pthread_child_handler): Renamed from pthread_child_handler,
2444         exported, and marked hidden.  Change all users.
2445         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
2446         free __pthread_child_handler from child list.
2448 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2450         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
2452         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2453         Fix handling of cancellation and failing pthread_mutex_unlock call.
2454         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
2455         (__pthread_cond_wait): Likewise.
2457         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2458         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
2459         lll_futex_timed_wait call.
2460         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2461         (pthread_rwlock_timedwrlock): Likewise.
2463         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
2464         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
2465         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
2467         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
2468         check of lll_futex_wake return value.
2470 2003-03-03  Roland McGrath  <roland@redhat.com>
2472         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
2474         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2475         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
2476         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2478 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
2480         * sysdeps/pthread/timer_create.c (timer_create): Return correct
2481         error for CPU clocks.
2483         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2484         _POSIX_MONOTONIC_CLOCK.
2485         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2487         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
2488         recent kernels.
2490 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
2492         * descr.h (struct pthread): Move cleanup field to the front.
2494 2003-03-01  Roland McGrath  <roland@redhat.com>
2496         * sem_open.c (sem_open): Braino fix.
2498 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
2500         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
2501         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
2502         __pthread_cleanup_pop functionality.
2503         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2505         * descr.h (struct pthread): Move tid field to the front now that
2506         it is often used.
2508         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
2509         (__lll_mutex_timedlock_wait): Remove.
2510         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
2511         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2512         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
2513         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2514         (lll_unlock_wake_cb): Don't save and restore %esi.
2515         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
2516         %esi.
2517         (__lll_timedwait_tid): Add alignment.
2518         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
2519         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
2520         %esi.
2521         (__lll_timedwait_tid): Removed.
2522         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2523         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
2524         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2525         (pthread_barrier_wait): Don't save, load, and restore %esi for
2526         last thread.
2527         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2528         (__pthread_cond_signal): Don't save, load, and restore %esi.
2529         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2530         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
2531         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
2532         Don't save, load, and restore %esi.
2534 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
2536         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2537         Release lock before waking up the waiters.
2539         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
2541         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
2542         (reader_thread): Likewise.
2544         * sysdeps/pthread/pthread_rwlock_unlock.c
2545         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
2546         to wake up readers if there are none.
2548         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2549         Release internal lock before wake threads.
2551 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
2553         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
2554         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
2555         predefined.
2556         * tst-rwlock9.c: Likewise.
2557         * tst-rwlock10.c: New file.
2558         * tst-rwlock11.c: New file.
2560         * Makefile (tests): Add tst-dlsym1.
2561         * tst-dlsym1.c: New file.
2563         * init.c (__pthread_initialize_minimal_internal): Set
2564         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
2565         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
2567 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
2569         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
2571         * tst-cond2.c: Fix sychronization with child.
2573         * tst-rwlock8.c (reader_thread): Remove unused variable.
2575         * Makefile: Add rules to build and run tst-tls3.
2576         * tst-tls3.c: New file.
2577         * tst-tls3mod.c: New file.
2579         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
2580         * tst-rwlock8.c: New file.
2581         * tst-rwlock9.c: New file.
2582         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
2583         complete broken rwlock implementation.
2584         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2585         Likewise.
2586         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2587         Likewise.
2588         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2589         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2590         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
2591         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2592         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2593         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
2594         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
2596 2003-02-23  Roland McGrath  <roland@redhat.com>
2598         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
2600 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
2602         * Makefile (tests): Add tst-context1.
2603         * tst-context1.c: New file.
2605         * Makefile (tests): Add tst-tls1 and tst-tls2.
2606         * tst-tls1.c: New file.
2607         * tst-tls2.c: New file.
2609         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
2610         for failed cmpxchg.
2612         * pthread_create.c (start_thread): Set EXITING_BIT early.
2614         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
2615         (THREAD_GETMEM_NC): Likewise.
2617 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
2619         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
2620         off 3 more bytes by using offset-less instructions when possible.
2622         * Makefile: Add dependency for $(objpfx)version.d.
2624         * eintr.c (eintr_source): Add unnecessary return but the compiler
2625         insists.
2627         * tst-kill3.c: Include <unistd.h>.
2629 2003-02-21  Roland McGrath  <roland@redhat.com>
2631         * pthread_create.c (start_thread): Call __libc_thread_freeres.
2633 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
2635         * Makefile (tests): Add tst-eintr1.
2636         (distribute): Add eintr.c.
2637         * tst-eintr1.c: New file.
2638         * eintr.c: New file.
2640         * pthread_cancel.c (pthread_cancel): Use tkill directly.
2642         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
2643         Disallow sending SIGCANCEL.
2645         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
2646         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
2647         * tst-kill1.c: New file.
2648         * tst-kill2.c: New file.
2649         * tst-kill3.c: New file.
2650         * tst-kill5.c: New file.
2651         * tst-kill6.c: New file.
2652         * tst-basic7.c: Renamed to...
2653         * tst-kill4.c: ...this.
2655 2003-02-21  Roland McGrath  <roland@redhat.com>
2657         * Makefile (install-lib-ldscripts): New variable.
2659 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
2661         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
2662         * pthread_cancel.c: Use INVALID_TD_P.
2663         * pthread_detach.c: Likewise.
2664         * pthread_getschedparam.c: Likewise.
2665         * pthread_setschedparam.c: Likewise.
2666         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
2667         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2668         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
2669         * pthread_timedjoin.c: Likewise.
2671         * tst-basic7.c: Include <signal.h>.
2673         * pthread_join.c (pthread_join): Limited checking for invalid
2674         descriptors.
2675         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
2677 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
2679         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
2680         beginning of the loop.  Clear the entire first block of TSD.
2681         * Makefile (tests): Add tst-key4.
2682         * tst-key4.c: New file.
2684 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
2686         * Makefile (tests): Add tst-basic7.
2687         * tst-basic7.c: New file.
2689         * pthread_create.c (deallocate_tsd): Mark as internal_function.
2690         Add some more __builtin_expect.
2692         * pthreadP.h: Define dummy version of DEBUGGING_P.
2694 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
2696         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
2697         _POSIX_THREAD_PRIORITY_SCHEDULING.
2698         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2699         _XOPEN_REALTIME_THREADS.
2700         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2702         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
2703         kernel returns EINVAL for PID <= 0, work around it.
2705         * Makefile (tests): Add tst-signal5.
2706         * tst-signal5.c: New file.
2708         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
2709         and LOGIN_NAME_MAX.
2711         * tst-cancel1.c (tf): Block all signals.
2713         * Makefile (tests): Add tst-basic6.
2714         * tst-basic6.c: New file.
2716         * tst-basic1.c: Add test for process ID.
2718         * Makefile (tests): Add tst-cancel10.
2719         * tst-cancel10.c: New file.
2721         * Makefile (tests): Add tst-signal4.
2722         * tst-signal4.c: New file.
2724         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
2725         __sigismember instead of sigismember.  Add __builtin_expect.
2727 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
2729         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
2730         pthread_setcancelstate, and pthread_rwlock_setpshared.
2732         * tst-cancel7.c (do_test): Make sure the pid file exists before
2733         canceling the thread.
2735         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
2736         pthread_rwlock_timedrdlock tests.
2737         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
2738         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2739         Check for invalid tv_nsec field.
2740         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2741         Likewise.
2743         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
2744         recursive mutex of overflow.
2746         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
2748         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
2749         going into an endless loop.
2750         * Makefile (tests): Add tst-cancel9.
2751         * tst-cancel9.c: New file.
2753         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
2755 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
2757         * tst-mutex5.c (do_test): Add more timedlock tests.
2759         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
2760         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
2762         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
2763         use INLINE_SYSCALL.  Error number is returned, not -1.
2765         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
2766         and __deallocate_stack with internal_function.
2767         * pthread_create.c: Adjust definitions appropriately.
2768         * allocatestack.c: Likewise.
2770         * pthread_join.c: Add one more __builtin_expect.
2771         * pthread_timedjoin.c: Likewise.
2773         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
2774         not data of sequence number does not match.
2775         Add one __builtin_expect.
2777         * Makefile (tests): Add tst-clock1.
2778         * tst-clock1.c: New file.
2780         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
2781         negative arguments.
2782         * Makefile (tests): Add tst-basic5.
2783         * tst-basic5.c: New file.
2785 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
2787         * Makefile (tests): Add tst-basic4.
2788         * tst-basic4.c: New file.
2790         * pthreadP.h: Add declaraction for __nptl_nthreads.
2791         * pthread_create.c: Define __nptl_nthreads
2792         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
2793         after thread is done.  If then zero, call exit(0).
2794         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2795         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
2796         * init.c (pthread_functions): Initialize ptr_nthreads.
2797         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
2798         (__reclaim_stacks): Decrement __nptl_nthreads.
2799         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
2800         Define.
2801         * Makefile (tests): Add tst-basic3.
2802         * tst-basic3.c: New file.
2804         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
2805         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
2806         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
2807         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
2808         if asynchronous canceling is enabled.
2809         * pthread_join.c (pthread_join): When recognizing circular joins,
2810         take into account the other thread might be already canceled.
2811         * Makefile (tests): Add tst-join5.
2812         * tst-join5.c: New file.
2814         * Makefile (tests): Add tst-join4.
2815         * tst-join4.c: New file.
2817 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
2819         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
2821 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2823         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
2824         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
2825         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
2826         warning.
2827         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
2828         to avoid warning.
2829         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
2830         error if lll_futex_wake failed.
2832 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
2834         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
2835         handling of cancellation and failung pthread_mutex_unlock call.
2836         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2837         * Makefile (tests): Add tst-cond8 and tst-cond9.
2838         * tst-cond8.c: New file.
2839         * tst-cond9.c: New file.
2841         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
2843         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
2844         non-standard initializers with __USE_GNU.
2846         * Makefile (tests): Add tst-cleanup3.
2847         * tst-cleanup3.c: New file.
2849 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
2851         * Makefile (tests): Add tst-attr1 and tst-attr2.
2852         * tst-attr1.c: New file.
2853         * tst-attr2.c: New file.
2855         * Makefile: Add rules to build and run tst-atfork2 test.
2856         * tst-atfork2.c: New file.
2857         * tst-atfork2mod.c: New file.
2859         * sysdeps/unix/sysv/linux/unregister-atfork.c
2860         (__unregister_atfork): Free the memory allocated for the handlers
2861         after removing them from the lists.
2863         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
2864         cleanup function.
2866         * tst-atfork1.c (do_test): Wait for the child we forked.
2867         Report error in child.
2869         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
2871         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
2873 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
2875         * Makefile (tests): Add tst-cancel8.
2876         * tst-cancel8.c: New file.
2878         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
2879         clearing of control variable.
2880         * Makefile (tests): Add tst-once3 and tst-once4.
2881         * tst-once3.c: New file.
2882         * tst-once4.c: New file.
2884 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2886         * sysdeps/sh/Makefile: New file.
2887         * sysdeps/sh/bits/atomic.h: New file.
2888         * sysdeps/sh/pthread_spin_init.c: New file.
2889         * sysdeps/sh/pthread_spin_lock.c: New file.
2890         * sysdeps/sh/pthread_spin_trylock.S: New file.
2891         * sysdeps/sh/pthread_spin_unlock.S: New file.
2892         * sysdeps/sh/pthreaddef.h: New file.
2893         * sysdeps/sh/tcb-offsets.sym: New file.
2894         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
2895         * sysdeps/sh/tls.h: New file.
2896         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
2897         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
2898         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
2899         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
2900         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
2901         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
2902         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
2903         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
2904         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
2905         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
2906         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
2907         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
2908         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2909         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
2910         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
2911         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
2912         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
2913         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
2914         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
2915         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
2916         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
2917         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
2918         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
2919         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
2920         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
2921         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
2922         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
2923         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
2924         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
2925         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
2927 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
2929         * tst-cond2.c: Rearrange code to not rely on behavior undefined
2930         according to POSIX.
2932         * tst-basic2.c (do_test): Lock mutex before creating the thread.
2934 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
2936         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
2937         (TLS_GET_FS): New #define.
2938         (TLS_SET_FS): New #define.
2939         Correct value of __NR_set_thread_area.
2941         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
2943 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
2945         * Makefile (tests): Add tst-popen1.
2946         * tst-popen1.c: New file.
2948         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
2949         but inactive generalization.
2950         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2952         Minor optimization, remove one instruction.
2953         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2955 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2957         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
2959 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2961         * init.c (__NR_set_tid_address): Add #ifdef for s390.
2962         * sysdeps/pthread/pthread_barrier_wait.c: New file.
2963         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
2964         * sysdeps/pthread/pthread_cond_signal.c: New file.
2965         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
2966         * sysdeps/pthread/pthread_cond_wait.c: New file.
2967         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
2968         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
2969         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
2970         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
2971         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
2972         * sysdeps/s390/Makefile: New file.
2973         * sysdeps/s390/bits/atomic.h: New file.
2974         * sysdeps/s390/pthread_spin_init.c: New file.
2975         * sysdeps/s390/pthread_spin_lock.c: New file.
2976         * sysdeps/s390/pthread_spin_trylock.c: New file.
2977         * sysdeps/s390/pthread_spin_unlock.c: New file.
2978         * sysdeps/s390/pthreaddef.h: New file.
2979         * sysdeps/s390/tcb-offsets.sym: New file.
2980         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
2981         * sysdeps/s390/tls.h: New file.
2982         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
2983         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
2984         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
2985         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
2986         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
2987         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
2988         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
2989         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
2990         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
2991         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
2992         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
2993         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
2994         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
2995         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
2996         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
2997         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
2998         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
2999         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
3000         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
3001         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
3002         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
3003         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
3004         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
3006 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
3008         * atomic.h: Add a couple more default implementations.
3009         (atomic_compare_and_exchange_acq): Use
3010         __arch_compare_and_exchange_32_acq in return value definition.  It
3011         always exists.
3012         (atomic_bit_set): Renamed from atomic_set_bit.
3013         Add missing atomic_ prefixes.
3015         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
3016         thread library is available, use correct value to mark initialized
3017         once variable.
3019 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
3021         * allocatestack.c (allocate_stack): Use __getpagesize instead of
3022         __sysconf to determine pagesize.
3024         * pthread_create.c: Include <atomic.h>.
3025         * allocatestack.c (allocate_stack): Implement coloring of the
3026         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
3027         size minus one.  Adjust users.
3028         * sysdeps/i386/i686/Makefile: New file.
3030 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
3032         * allocatestack.c: Improve comment throughout the file.
3034         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3035         (__lll_lock_wait): Add branch prediction.
3036         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
3037         (__lll_lock_wait): Likewise.
3038         (lll_unlock_wake_cb): Removed.
3040 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
3042         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
3043         _POSIX_THREAD_PRIORITY_SCHEDULING.
3045 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
3047         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3048         Fix return type of ptr___pthread_getspecific.
3050 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
3052         * Makefile (tests): Add tst-umask1.
3053         (tst-umask1-ARGS): Define.
3054         * tst-umask1.c: New file.
3056 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
3058         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
3059         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
3060         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
3061         pthread_rwlock_unlock.
3062         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
3063         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
3064         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
3065         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
3066         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3067         New file.
3068         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
3069         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3070         New file.
3071         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
3072         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
3073         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
3074         New file.
3075         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
3076         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
3077         New file.
3078         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
3079         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
3080         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
3081         New file.
3082         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
3083         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
3084         New file.
3085         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
3087         * Makefile (libpthread-routines): Remove lowlevelcond and
3088         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
3089         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
3090         and pthread_cond_broadcast.
3091         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
3092         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
3093         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
3094         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
3095         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
3096         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
3097         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
3098         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
3099         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
3100         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
3101         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
3102         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
3103         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
3104         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
3105         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
3106         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
3107         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
3108         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
3109         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
3110         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
3111         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
3112         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
3113         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
3114         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
3115         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
3116         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
3117         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
3118         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
3119         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
3120         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
3121         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
3123         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
3124         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
3125         of the code is moved to ...
3126         * sysdeps/pthread/createthread.c: ...here.  New file.
3128 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
3130         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
3131         (__new_sem_post): Clear %eax before returning.
3132         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
3134         * Makefile (tests): Add tst-cleanup2.
3135         * tst-cleanup2.c: New file.
3137         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
3138         Interpret first parameter correctly.
3140 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
3142         * Makefile (headers): Add bits/semaphore.h.
3144 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
3146         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
3147         if not SHARED.
3149 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
3151         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
3152         must be used and mapping failed.
3153         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
3155         * Makefile (CFLAGS-pthread_self.os): Define this, not
3156         CFLAGS-pthread_self.c.
3158 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
3160         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
3161         lll_unlock_wake_cb.
3163         * Makefile (libpthread-routines): Add version.  Add rules to build
3164         version.os and banner.h.
3165         * version.c: New file.
3167 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
3169         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
3170         the alias unconditional.
3171         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
3173 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
3175         * Makefile (CFLAGS-pthread_self.c): New definition.
3177 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
3179         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
3180         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
3181         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
3182         * init.c (__pthread_initialize_minimal_internal): Likewise.
3184 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
3186         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
3188         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3189         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
3190         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
3191         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
3192         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
3193         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
3195 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
3197         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
3198         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
3199         * tst-cancel-wrappers.sh: Remove all exceptions.
3201 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
3203         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
3204         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
3206         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
3207         Use __libc_pthread_functions array if SHARED.
3209         * pthreadP.h: Move pthread_cond_2_0_t definition to...
3210         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
3212         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
3213         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
3214         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
3215         __libc_ptf_call instead of __libc_maybe_call.
3216         (PTF): New #define.
3217         (__libc_cleanup_region_start): Wrap function name with PTF call.
3218         (__libc_cleanup_region_end): Likewise.
3219         (__libc_cleanup_end): Likewise.
3221         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
3222         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
3223         * pthread_key_create.c: Add __pthread_key_create_internal alias.
3224         * pthreadP.h: Add prototypes.
3226         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
3227         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
3228         __pthread_rwlock_unlock aliases.
3229         * pthreadP.h: Add prototypes for new aliases.
3231         * pthreadP.h (struct pthead_functions): Moved to...
3232         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
3233         * init.c (pthread_functions): Add initializers for new elements.
3235         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
3236         __pthread_cleanup_pop_restore aliases.
3237         * pthreadP.h: Add prototypes.
3239         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
3240         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
3241         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
3242         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3243         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3244         * pthreadP.h: Adjust prototypes and callers.
3246 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
3248         * Makefile (tests): Add tst-cancel7.
3249         (tst-cancel7-ARGS): New variable.
3250         * tst-cancel7.c: New file.
3252         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
3253         around gcc defficiencies.
3254         * old_pthread_cond_signal.c: Likewise.
3255         * old_pthread_cond_timedwait.c: Likewise.
3256         * old_pthread_cond_wait.c: Likewise.
3258         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
3260 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
3262         * Makefile (tests): Add tst-cond7.
3263         * tst-cond7.c: New file.
3265         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
3266         (condvar_cleanup): Get condvar address from the right place.
3268         * atomic.h: Correct definitions of atomic_full_barrier,
3269         atomic_read_barrier, atomic_write_barrier.
3271         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
3272         race-free.
3273         * old_pthread_cond_signal.c: Likewise.
3274         * old_pthread_cond_timedwait.c: Likewise.
3275         * old_pthread_cond_wait.c: Likewise.
3277 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
3279         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
3281 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
3283         * pthreadP.h (pthread_cond_2_0_t): New type.
3284         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
3285         Use new type for the 2.0 condvar function prototypes.
3286         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
3287         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
3288         parameter.
3289         * old_pthread_cond_destroy.c: Likewise.
3290         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
3291         * old_pthread_cond_signal.c: Likewise.
3292         * old_pthread_cond_timedwait.c: Likewise.
3293         * old_pthread_cond_wait.c: Likewise.
3295         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
3296         (__pthread_cond_wait): Don't save cancellation mode and seq value
3297         in same location.
3299         * herrno.c (__h_errno_location): Don't define as weak.
3301 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
3303         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
3304         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
3305         and pthread_cond_wait.
3306         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
3307         Renamed to...
3308         (__pthread_cond_broadcast_2_0): ... this.
3309         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
3310         Renamed to...
3311         (__pthread_cond_destroy_2_0): ... this.
3312         * old_pthread_cond_init.c (__old_pthread_cond_init):
3313         Renamed to...
3314         (__pthread_cond_init_2_0): ... this.
3315         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
3316         Renamed to...
3317         (__pthread_cond_signal_2_0): ... this.
3318         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
3319         Renamed to...
3320         (__pthread_cond_wait_2_0): ... this.
3321         * pthread_cond_destroy.c: Include shlib-compat.h.
3322         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
3323         * pthread_cond_init.c: Include shlib-compat.h.
3324         (pthread_cond_init): Change strong_alias into versioned_symbol.
3325         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
3326         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
3327         fields.
3328         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
3329         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
3330         __pthread_cond_wait_2_0): New prototypes.
3331         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
3332         __old_pthread_cond_init, __old_pthread_cond_signal,
3333         __old_pthread_cond_wait): Removed.
3334         * init.c: Include shlib-compat.h.
3335         (pthread_functions): Guard ptr___pthread_attr_init_2_0
3336         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
3337         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
3338         ptr___pthread_cond_*_2_0 fields.
3339         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
3340         pthread_cond_*@GLIBC_2.0 compatibility symbols.
3342         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
3343         LIBC_SIGACTION was not yet defined.
3344         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
3345         [!defined LIBC_SIGACTION] (__sigaction): New function and
3346         libc_hidden_weak.
3347         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
3348         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
3350 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
3352         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
3354 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
3356         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3357         New, larger type definition.
3358         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
3359         implementation.
3360         * Versions [libpthread]: Add definitions for new pthread_cond_*
3361         interfaces for version GLIBC_2.3.2.
3362         * pthread_cond_init.c: Update initialization for new type definition.
3363         * Makefile (libpthread-routines): Remove pthread_cond_wait,
3364         pthread_cond_timedwait, pthread_cond_signal, and
3365         pthread_cond_broadcast.  Add old_pthread_cond_init,
3366         old_pthread_cond_destroy, old_pthread_cond_wait,
3367         old_pthread_cond_timedwait, old_pthread_cond_signal, and
3368         old_pthread_cond_broadcast.
3369         * old_pthread_cond_broadcast.c: New file.
3370         * old_pthread_cond_destroy.c: New file.
3371         * old_pthread_cond_init.c: New file.
3372         * old_pthread_cond_signal.c: New file.
3373         * old_pthread_cond_timedwait.c: New file.
3374         * old_pthread_cond_wait.c: New file.
3375         * pthreadP.h: Add prototypes for the compatibility interfaces.
3377         * pthread_cond_destroy.c: Don't include <errno.h>.
3379 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
3381         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
3382         unnecessary zero offset when addressing MUTEX.
3384 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
3386         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
3387         __register_atfork.
3388         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
3389         for __register_atfork.
3391 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
3393         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
3394         instead of ASSEMBLER test macro.
3396         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
3397         __libc_current_sigrtmax): Add libc_hidden_def.
3399         * sysdeps/pthread/list.h: Remove assert.h include.
3401 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
3403         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
3404         __pthread_initialize_minimal_internal not
3405         __pthread_initialize_minimal.
3407 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
3409         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
3410         __pthread_initialize_minimal as hidden.
3412         * init.c (__pthread_initialize_minimal_internal): Don't mark as
3413         constructor.
3415 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
3417         * Makefile ($(inst_libdir)/libpthread.so): Depend on
3418         $(common-objpfx)format.lds, include that into the output script.
3419         Fix comment.
3420         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
3422 2002-12-28  Andreas Jaeger  <aj@suse.de>
3424         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
3425         nsec resolution changes.
3426         (xstat64_conv): Likewise.
3427         (xstat32_conv): Likewise.
3428         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
3429         struct kernel_stat.
3430         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
3431         structs stat and stat64.
3432         * time/time.h (__timespec_defined): Define for __USE_MISC.
3433         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
3435 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
3437         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
3438         argument.
3439         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
3440         (pthread_exit): Use strong_alias to avoid warnings.
3441         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
3442         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
3443         ptr___pthread_attr_init_2_*.
3444         * init.c (pthread_functions): Adjust.
3446 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
3448         * forward.c: Make all functions available by default again.  It
3449         caused too much trouble.
3451         * pt-siglongjmp.c: Removed.
3453 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
3455         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
3456         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
3457         * sysdeps/i386/Makefile: New file.
3458         * sysdeps/i386/tcb-offsets.sym: New file.
3459         * sysdeps/pthread/tcb-offsets.h: New file.
3460         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3461         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
3463         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
3464         __register_atfork...
3465         (GLIBC_2.3.2): ...here.
3467 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
3469         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
3470         pthread_attr_setstackaddr with __attribute_deprecated__.
3472 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
3474         * pt-system.c (system): Remove cancellation handling.
3475         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
3476         cancellation routines.
3478 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
3480         * descr.h: Include <dl-sysdep.h>.
3481         (struct pthread): Move header.data.list to the back of the struct.
3482         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
3483         (MULTIPLE_THREADS_OFFSET): Adjust offset.
3484         (SYSINFO_OFFSEET): Likewise.
3486 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
3488         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
3489         Define.
3490         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
3491         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
3492         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
3493         (USE_DL_SYSINFO): Undef.
3495 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
3497         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
3498         $(common-objpfx)libc.so.
3499         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
3500         it is bigger than pipe buffer size even on arches with bigger
3501         page size.
3502         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
3504 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
3506         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
3507         correct errno access for case that USE___THREAD is not defined.
3509 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
3511         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
3512         Patch by Marijn Ros <marijn@mad.scientist.com>.
3514 2002-12-22  Roland McGrath  <roland@redhat.com>
3516         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
3518 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
3520         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
3522 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
3524         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
3525         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
3526         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
3528         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
3529         of int $0x80.
3530         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3531         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
3532         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
3533         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3534         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
3535         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
3536         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
3537         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3539         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
3540         sysenter.
3541         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
3543         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
3545         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
3546         in new TCB.
3547         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
3548         that sysinfo is properly initialized.
3549         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
3550         to 1 only for ld.so.
3552         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
3553         RTLD_CORRECT_DYNAMIC_WEAK.
3555 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
3557         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
3558         Use return 0 as 6th argument to FORWARD4.
3559         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
3561 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
3563         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
3564         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
3565         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
3566         (INIT_SYSINFO): New #define.
3567         (TLS_TP_INIT): Use INIT_SYSINFO.
3568         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3569         At test to make sure SYSINFO_OFFSET value is correct.
3570         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
3572 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
3574         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
3575         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
3576         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
3577         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
3578         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
3579         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
3580         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
3582 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
3584         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
3585         macro instead of using int $0x80 directly.
3587         * sysdeps/pthread/bits/stdio-lock.h: New file.
3588         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
3589         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
3590         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
3591         * Makefile (routines): Add libc-lowlevelmutex.
3593         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
3594         __i686.get_pc_thunk.dx.
3596 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
3598         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
3599         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
3600         ($(objpfx)tst-cancel-wrappers.out): New rule.
3601         * tst-cancel-wrappers.sh: New test.
3602         * tst-locale1.c: Include signal.h.
3603         (uselocale): Test static linking of __libc_current_sigrt*.
3605 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
3607         * Makefile (tests): Add tst-cancel6.
3608         * tst-cancel6.c: New file
3610 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
3612         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3613         Define meaningfully for assembler as well.
3614         * pthreadP.h (struct pthread_functions): Remove
3615         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
3616         and ptr_pthread_attr_init_2_1 fields.
3617         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
3618         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
3619         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
3620         (FORWARD3): Define using FORWARD4.
3621         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
3622         versions.
3623         * pt-system.c: Remove duplicate stdlib.h include.
3625 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
3627         * sem_init.c: Define sem_init@GLIBC_2.0.
3628         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
3629         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
3631         * flockfile.c: Moved to...
3632         * sysdeps/pthread/flockfile.c: ...here.  New file.
3633         * funlockfile.c: Moved to...
3634         * sysdeps/pthread/funlockfile.c: ...here.  New file.
3635         * ftrylockfile.c: Moved to...
3636         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
3638 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
3640         * libc-cancellation.c: Guard both function with
3641         #if !defined NOT_IN_libc.
3642         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
3643         automatically provided pthread wrappers.
3644         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
3645         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
3646         nor in libpthread.
3647         * pt-open.c: Removed.
3648         * pt-fcntl.c: Removed.
3649         * pt-fsync.c: Removed.
3650         * pt-lseek.c: Removed.
3651         * pt-msgrcv.c: Removed.
3652         * pt-msgsnd.c: Removed.
3653         * pt-msync.c: Removed.
3654         * pt-nanosleep.c: Removed.
3655         * pt-open64.c: Removed.
3656         * pt-pause.c: Removed.
3657         * pt-pread.c: Removed.
3658         * pt-pread64.c: Removed.
3659         * pt-pwrite.c: Removed.
3660         * pt-pwrite64.c: Removed.
3661         * pt-read.c: Removed.
3662         * pt-recv.c: Removed.
3663         * pt-recvfrom.c: Removed.
3664         * pt-recvmsg.c: Removed.
3665         * pt-send.c: Removed.
3666         * pt-sendto.c: Removed.
3667         * pt-sigtimedwait.c: Removed.
3668         * pt-sigwait.c: Removed.
3669         * pt-wait.c: Removed.
3670         * pt-waitpid.c: Removed.
3671         * pt-write.c: Removed.
3672         * pt-accept.c: Removed.
3673         * pt-close.c: Removed.
3674         * pt-connect.c: Removed.
3675         * pt-lseek64.c: Removed.
3676         * pt-sendmsg.c: Removed.
3677         * pt-tcdrain.c: Removed.
3679 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
3681         * init.c (__pthread_initialize_minimal_internal): Renamed from
3682         __pthread_initialize_minimal.  Make old name an alias.  This
3683         converts a normal relocation into a relative relocation.
3685         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
3687         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
3688         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
3689         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
3690         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
3691         pt-sigwaitinfo, pt-waitid, and pt-writev.
3692         * pt-creat.c: Removed.
3693         * pt-poll.c: Removed.
3694         * pt-pselect.c: Removed.
3695         * pt-readv.c: Removed.
3696         * pt-select.c: Removed.
3697         * pt-sigpause.c: Removed.
3698         * pt-sigsuspend.c: Removed.
3699         * pt-sigwaitinfo.c: Removed.
3700         * pt-waitid.c: Removed.
3701         * pt-writev.c: Removed.
3703         * init.c (pthread_functions): New variable.
3704         (__pthread_initialize_minimal): Pass pointer to pthread_functions
3705         (or NULL) to __libc_pthread_init.
3706         * forward.c: Rewrite to use __libc:pthread_functions array to get
3707         function addresses.
3708         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
3709         prototype.
3710         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3711         Take new parameter.  Copy content of variable pointed to by it
3712         to __libc_pthread_init.
3714         * pthreadP.h (struct pthread_functions): New type.
3715         (__libc_pthread_init): Declare.
3717         * pthread_attr_destroy.c: Add namespace protected alias.
3718         * pthread_attr_getdetachstate.c: Likewise.
3719         * pthread_attr_getinheritsched.c: Likewise.
3720         * pthread_attr_getschedparam.c: Likewise.
3721         * pthread_attr_getschedpolicy.c: Likewise.
3722         * pthread_attr_getscope.c: Likewise.
3723         * pthread_attr_setdetachstate.c: Likewise.
3724         * pthread_attr_setinheritsched.c: Likewise.
3725         * pthread_attr_setschedparam.c: Likewise.
3726         * pthread_attr_setschedpolicy.c: Likewise.
3727         * pthread_attr_setscope.c: Likewise.
3728         * pthread_cond_broadcast.c: Likewise.
3729         * pthread_cond_destroy.c: Likewise.
3730         * pthread_cond_init.c: Likewise.
3731         * pthread_cond_signal.c: Likewise.
3732         * pthread_cond_wait.c: Likewise.
3733         * pthread_condattr_destroy.c: Likewise.
3734         * pthread_condattr_init.c: Likewise.
3735         * pthread_equal.c: Likewise.
3736         * pthread_exit.c: Likewise.
3737         * pthread_getschedparam.c: Likewise.
3738         * pthread_self.c: Likewise.
3739         * pthread_setcancelstate.c: Likewise.
3740         * pthread_setschedparam.c: Likewise.
3741         * pthread_mutex_destroy.c: Likewise.
3742         * pthread_mutex_init.c: Likewise.
3743         * pthreadP.h: Add prototypes for the aliases.
3745         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
3746         multiple_threads member in correct TCB to 1.
3748         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
3749         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
3750         member of thread decriptor, otherwise return unconditionally 1.
3752 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
3754         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
3755         regular Linux version.  Remove file.
3756         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
3757         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
3758         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
3759         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
3760         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
3761         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
3762         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
3763         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
3764         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
3765         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
3766         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
3767         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
3768         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
3769         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
3770         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
3771         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
3772         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
3773         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
3774         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
3775         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
3776         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
3777         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
3778         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
3779         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
3780         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
3781         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
3782         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
3783         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
3784         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
3785         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
3787 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
3789         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
3790         * sysdeps/unix/sysv/linux/open.c: Removed.
3791         * sysdeps/unix/sysv/linux/fsync.c: Removed.
3792         * sysdeps/unix/sysv/linux/lseek.c: Removed.
3793         * sysdeps/unix/sysv/linux/msync.c: Removed.
3794         * sysdeps/unix/sysv/linux/read.c: Removed.
3795         * sysdeps/unix/sysv/linux/close.c: Removed.
3796         * sysdeps/unix/sysv/linux/creat.c: Removed.
3797         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
3798         * sysdeps/unix/sysv/linux/pause.c: Removed.
3799         * sysdeps/unix/sysv/linux/select.c: Removed.
3800         * sysdeps/unix/sysv/linux/write.c: Removed.
3802 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
3804         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
3805         element in TCB to see whether locking is needed.
3807         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
3808         MULTIPLE_THREADS_OFFSET value is correct.
3810         * sysdeps/unix/sysv/linux/close.c: New file.
3811         * sysdeps/unix/sysv/linux/connect.S: New file.
3812         * sysdeps/unix/sysv/linux/creat.c: New file.
3813         * sysdeps/unix/sysv/linux/fsync.c: New file.
3814         * sysdeps/unix/sysv/linux/llseek.c: New file.
3815         * sysdeps/unix/sysv/linux/lseek.c: New file.
3816         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
3817         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
3818         * sysdeps/unix/sysv/linux/msync.c: New file.
3819         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
3820         * sysdeps/unix/sysv/linux/open.c: New file.
3821         * sysdeps/unix/sysv/linux/open64.c: New file.
3822         * sysdeps/unix/sysv/linux/pause.c: New file.
3823         * sysdeps/unix/sysv/linux/poll.c: New file.
3824         * sysdeps/unix/sysv/linux/pread.c: New file.
3825         * sysdeps/unix/sysv/linux/pread64.c: New file.
3826         * sysdeps/unix/sysv/linux/pselect.c: New file.
3827         * sysdeps/unix/sysv/linux/pwrite.c: New file.
3828         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
3829         * sysdeps/unix/sysv/linux/readv.c: New file.
3830         * sysdeps/unix/sysv/linux/recv.S: New file.
3831         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
3832         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
3833         * sysdeps/unix/sysv/linux/select.c: New file.
3834         * sysdeps/unix/sysv/linux/send.S: New file.
3835         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
3836         * sysdeps/unix/sysv/linux/sendto.S: New file.
3837         * sysdeps/unix/sysv/linux/sigpause.c: New file.
3838         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
3839         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
3840         * sysdeps/unix/sysv/linux/sigwait.c: New file.
3841         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
3842         * sysdeps/unix/sysv/linux/system.c: New file.
3843         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
3844         * sysdeps/unix/sysv/linux/wait.c: New file.
3845         * sysdeps/unix/sysv/linux/waitid.c: New file.
3846         * sysdeps/unix/sysv/linux/waitpid.c: New file.
3847         * sysdeps/unix/sysv/linux/writev.c: New file.
3848         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
3850         * pt-readv.c: Fix comment.
3852 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
3854         * tst-cleanup1.c: Include stdlib.h.
3856         * tst-cancel5.c: New test.
3857         * Makefile (tests): Add tst-cancel5.
3858         (tst-cancel5): Link against libc.so libpthread.so in that order.
3860 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
3862         * forward.c (test_loaded): Prevent recursive calls.
3864         * Makefile (routines): Add libc-cancellation.
3865         * libc-cancellation.c: New file.
3866         * descr.h (struct pthread): Add multiple_threads field.
3867         * allocatestack.c (allocate_stack): Initialize multiple_header field of
3868         new thread descriptor to 1.
3869         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
3870         Initialize multiple_thread field after successful thread creation.
3871         * cancellation.c (__do_cancel): Move to pthreadP.h.
3872         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
3873         (__pthread_disable_asynccancel): Add internal_function attribute.
3874         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
3875         * pthread_setcancelstate.c: Likewise.
3876         * pthread_setcanceltype.c: Likewise.
3877         * pthread_exit.c: Likewise.
3878         * pthreadP.h (CANCELLATION_P): Likewise.
3879         (__do_cancel): Define as static inline.
3880         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
3881         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
3882         declarations.
3883         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
3884         fields.  Define MULTIPLE_THREADS_OFFSET.
3885         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
3886         declaration.
3887         * sysdeps/unix/sysv/linux/accept.S: New file.
3888         * sysdeps/unix/sysv/linux/read.c: New file.
3889         * sysdeps/unix/sysv/linux/write.c: New file.
3890         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
3891         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
3892         initialization of __libc_locking_needed.
3893         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
3894         __libc_locking_needed, use multiple_threads field in TCB.
3895         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3897 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
3899         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
3900         version.
3901         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
3903         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
3904         access to __libc_locking_needed for PIC.
3906 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
3908         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
3909         declare for libc.so.
3910         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
3911         expression.
3912         (__libc_lock_lock): Put into statement expression.
3913         (__libc_lock_unlock): Remove trailing semicolon.
3914         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
3916 2002-12-12  Roland McGrath  <roland@redhat.com>
3918         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
3919         "m" constraint to refer to __libc_locking_needed.  Declare it here.
3921 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
3923         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
3924         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
3925         Initialize __libc_locking_needed.
3926         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
3927         instead of __register_pthread_fork_handler.
3928         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
3929         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
3930         fork-gen with libc_pthread_init.
3931         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
3932         of __register_pthread_fork_handler.
3933         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
3934         of __register_pthread_fork_handler.
3935         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
3936         __libc_locking_needed to determine whether lock prefix can be avoided.
3937         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3939 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
3941         * Makefile (tests): Add tst-cleanup1.
3942         * tst-cleanup1.c: New file.
3943         * cancellation.c (__cleanup_thread): Removed.
3944         (__do_cancel): Remove call to __cleanup_thread.
3945         * pthreadP.h: Remove __cleanup_thread prorotype.
3947         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
3948         Remember function and argument even if cancellation handler
3949         function is not available.
3950         (__libc_cleanup_region_end): Execute registered function directly if
3951         pthread functions are not available.
3952         (__libc_cleanup_end): Likewise.
3954         * init.c (__pthread_initialize_minimal): Fix initialization in
3955         static lib by preventing gcc from being too clever.
3957 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
3959         * init.c (__pthread_initialize_minimal): Remove unneccesary
3960         sigaddset call.
3962         * Makefile (tests): We can run tst-locale2 now.
3964 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
3966         * Versions: Remove duplicated sigwait entry.
3968 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
3970         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
3971         inside libpthread.
3973         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
3975         * pthreadP.h: Declare __pthread_enable_asynccancel and
3976         __pthread_disable_asynccancel.
3977         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
3978         (CANCEL_RESET): Use __pthread_disable_asynccancel.
3979         * cancellation.c (__pthread_enable_asynccancel): New function.
3980         (__pthread_disable_asynccancel): New function.
3981         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
3982         * pt-close.c: Likewise.
3983         * pt-connect.c: Likewise.
3984         * pt-creat.c: Likewise.
3985         * pt-fcntl.c: Likewise.
3986         * pt-fsync.c: Likewise.
3987         * pt-lseek.c: Likewise.
3988         * pt-lseek64.c: Likewise.
3989         * pt-msgrcv.c: Likewise.
3990         * pt-msgsnd.c: Likewise.
3991         * pt-msync.c: Likewise.
3992         * pt-nanosleep.c: Likewise.
3993         * pt-open.c: Likewise.
3994         * pt-open64.c: Likewise.
3995         * pt-pause.c: Likewise.
3996         * pt-poll.c: Likewise.
3997         * pt-pread.c: Likewise.
3998         * pt-pread64.c: Likewise.
3999         * pt-pselect.c: Likewise.
4000         * pt-pwrite.c: Likewise.
4001         * pt-pwrite64.c: Likewise.
4002         * pt-read.c: Likewise.
4003         * pt-readv.c: Likewise.
4004         * pt-recv.c: Likewise.
4005         * pt-recvfrom.c: Likewise.
4006         * pt-recvmsg.c: Likewise.
4007         * pt-select.c: Likewise.
4008         * pt-send.c: Likewise.
4009         * pt-sendmsg.c: Likewise.
4010         * pt-sendto.c: Likewise.
4011         * pt-sigpause.c: Likewise.
4012         * pt-sigsuspend.c: Likewise.
4013         * pt-sigtimedwait.c: Likewise.
4014         * pt-sigwait.c: Likewise.
4015         * pt-sigwaitinfo.c: Likewise.
4016         * pt-system.c: Likewise.
4017         * pt-tcdrain.c: Likewise.
4018         * pt-wait.c: Likewise.
4019         * pt-waitid.c: Likewise.
4020         * pt-waitpid.c: Likewise.
4021         * pt-write.c: Likewise.
4022         * pt-writev.c: Likewise.
4023         * pthread_join.c: Likewise.
4024         * pthread_timedjoin.c: Likewise.
4026         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
4027         (__xpg_sigpause): New function.
4028         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
4030 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
4032         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
4034         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
4035         _GI_pthread_cleanup_pop to pthreadP.h.
4037         * ftrylockfile.c: Use _IO_lock_trylock instead of
4038         pthread_mutex_trylock.
4040         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
4041         (CANCEL_RESET): Likewise.
4042         (__pthread_setcanceltype_): Declare.
4043         (__pthread_mutex_lock_internal): Declare.
4044         (__pthread_mutex_unlock_internal): Declare.
4045         (__pthread_once_internal): Declare.
4046         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
4047         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
4049         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
4050         and pthread_mutex_unlock.
4051         * pthread_cond_wait.c: Likewise.
4052         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
4053         * pthread_mutex_unlock.c: Likewise.
4055         * pthread_setcanceltype.c: Add additional alias
4056         __pthread_setcanceltype.
4058         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
4059         * sem_open.c (sem_open): Likewise.
4060         Use __libc_open, __libc_write, and __libc_close instead of
4061         open, write, and close respectively.
4063         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
4064         Rewrite as statement expression since it must return a value.
4066         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
4067         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
4068         __pthread_kill.
4070         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
4071         alias __pthread_once_internal.
4073         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
4075 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
4077         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
4078         * tst-stdio1.c: New file.
4079         * tst-stdio2.c: New file.
4081         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
4083         * Makefile (tests): Comment out tst-locale2 for now.
4084         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
4086         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
4087         -D_IO_MTSAFE_IO.
4088         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
4089         Use _IO_lock_init instead of explicit assignment.
4091         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
4092         Define __libc_lock_* and __libc_lock_recursive macros with
4093         lowlevellock macros, not pthread mutexes.
4095         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
4096         of pthread_mutex_lock.
4097         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
4098         instead of pthread_mutex_unlock.
4100 2002-12-06  Roland McGrath  <roland@redhat.com>
4102         * allocatestack.c (__stack_user): Use uninitialized defn.
4103         * init.c (__pthread_initialize_minimal): Initialize it here.
4105 2002-12-05  Roland McGrath  <roland@redhat.com>
4107         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
4108         string.
4109         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
4111         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
4112         missing & here too.
4114 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
4116         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
4117         lowlevellock.
4118         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
4119         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
4120         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
4121         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
4122         for __libc_lock_* macros.
4123         * Makefile (routines): Add libc-lowlevellock.
4125 2002-10-09  Roland McGrath  <roland@redhat.com>
4127         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
4128         Under [__PIC__], call the function via the pointer fetched for
4129         comparison rather than a call by name that uses the PLT.
4130         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
4131         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
4132         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
4133         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
4134         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
4136 2002-12-04  Roland McGrath  <roland@redhat.com>
4138         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
4140         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
4141         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
4143         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
4145 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
4147         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
4148         a completely opaque, non-integer type.
4149         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4151 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
4153         * sysdeps/i386/tls.h: Include stdlib.h.
4154         * sysdeps/x86_64/tls.h: Likewise.
4156 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
4158         * Makefile (tests): Add tst-locale2.
4159         (tests-static): Likewise.
4160         * tst-locale2.c: New file.
4162         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
4163         volatile and add memory clobbers to lock operations.
4165 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
4167         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
4168         * sysdeps/i386/i486/bits/atomic.h: New file.
4169         * sysdeps/i386/i586/bits/atomic.h: New file.
4170         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
4171         include i486 version.
4172         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
4173         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
4174         Patch by Marijn Ros <marijn@mad.scientist.com>.
4176         * allocatestack.c (get_cached_stack): Don't crash if we first
4177         found a stack with a larger size then needed.
4178         Reported by Hui Huang <hui.huang@sun.com>.
4180         * Makefile (tests): Add tst-sysconf.
4181         * tst-sysconf.c: New file.
4183         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
4184         PTHREAD_THREADS_MAX.
4186 2002-12-02  Roland McGrath  <roland@redhat.com>
4188         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
4189         Declare using hidden_proto instead of attribute_hidden, so there are
4190         non-.hidden static symbols for gdb to find.
4191         (__pthread_keys): Likewise.
4192         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
4193         * allocatestack.c (__stack_user): Likewise.
4194         * pthread_create.c (__pthread_keys): Likewise.
4195         (__nptl_threads_events, __nptl_last_event): Make these static instead
4196         of hidden.
4197         * pthread_key_create.c (__pthread_pthread_keys_max,
4198         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
4200 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
4202         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
4203         statically.
4204         * tst-locale1.c: New file.
4206         * pthread_cond_timedwait.c: Include <stdlib.h>.
4208         * Makefile (tests): Add tst-fork2 and tst-fork3.
4209         * tst-fork2.c: New file.
4210         * tst-fork3.c: New file.
4212 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
4214         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4216         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
4217         require it to 200112L.
4219         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
4220         instruction only if HAVE_CMOV is defined.
4221         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
4223         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
4225         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
4227         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
4229         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
4231 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
4233         * sysdeps/x86_64/bits/atomic.h: New file.
4235         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
4236         16-bit operations.
4238         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
4239         possible since gettid cannot fail.
4241         * sysdeps/x86_64/pthreaddef.h: New file.
4243         * sysdeps/i386/pthreaddef.h (gettid): Removed.
4245         * sysdeps/x86_64/pthread_spin_init.c: New file.
4246         * sysdeps/x86_64/pthread_spin_lock.c: New file.
4247         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
4248         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
4250         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
4251         Add missing lock prefix.  Minute optimization.
4253         * tst-spin2.c (main): Also check successful trylock call.
4255         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
4256         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
4258         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
4259         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
4261         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
4262         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
4263         value in case of an error.  Add support for INTERNAL_SYSCALL.
4265         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
4266         value in case of an error.
4268         * sysdeps/x86_64/tls.h: New file.
4270 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
4272         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
4273         takes the array member name and the index as parameters.
4274         (THREAD_SETMEM_NC): Likewise.
4275         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
4276         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
4277         interfaces.
4279         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
4280         to decide which code to use.
4281         (THREAD_SETMEM_NC): Likewise.
4283         * allocatestack.c (queue_stack): Don't remove stack from list here.
4284         Do it in the caller.  Correct condition to prematurely terminate
4285         loop to free stacks.
4286         (__deallocate_stack): Remove stack from list here.
4288 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
4290         * Makefile (tests): Add tst-stack1.
4291         * tst-stack1.c: New file.
4293         * allocatestack.c (allocate_stack): Initialize the TCB on a user
4294         provided stack.
4296         * pthread_attr_getstack.c: Return bottom of the thread area.
4298 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
4300         * Makefile (libpthread-routines): Add pt-allocrtsig and
4301         pthread_kill_other_threads.
4302         * pt-allocrtsig.c: New file.
4303         * pthread_kill_other_threads.c: New file.
4304         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
4305         all three functions.
4306         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
4307         allocrtsig.
4308         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
4309         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
4310         and __libc_allocate_rtsig_private.
4311         * Versions (libpthread): Export pthread_kill_other_threads_np,
4312         __libc_current_sigrtmin, and __libc_current_sigrtmax.
4314 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
4316         * allocatestack.c (allocate_stack): stackaddr in attribute points to
4317         the end of the stack.  Adjust computations.
4318         When mprotect call fails dequeue stack and free it.
4319         * pthread_attr_setstack.c: Store top of the stack in stackaddr
4320         attribute.
4321         * pthread_getattr_np.c: Likewise.
4323         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
4324         surprises.
4326 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
4328         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
4329         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
4331 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
4333         * pthread_getspecific.c: Optimize access to first 2nd-level array.
4334         * pthread_setspecific.c: Likewise.
4336 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
4338         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
4339         definitions.  Get them from the official place.
4340         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
4342         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
4343         Use new CLONE_ flags in clone() calls.
4345         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
4346         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
4348         * Versions: Add pthread_* functions for libc.
4349         * forward.c: New file.
4351         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
4352         errno-loc.
4353         * herrno.c: New file.
4354         * res.c: New file.
4356         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
4357         sem_trywait, and sem_timedwait.  Add herrno and res.
4358         * sem_init.c: Don't initialize lock and waiters members.
4359         * sem_open.c: Likewise.
4360         * sem_post.c: Removed.
4361         * sem_wait.c: Removed.
4362         * sem_trywait.c: Removed.
4363         * sem_timedwait.c: Removed.
4364         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
4365         Includes full implementations of sem_post, sem_wait, sem_trywait,
4366         and sem_timedwait.
4367         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
4368         for new implementation.
4369         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
4370         and waiters fields.
4372         * tst-sem3.c: Improve error message.
4373         * tst-signal3.c: Likewise.
4375         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
4376         to tell the kernel about the termination futex and to initialize tid
4377         member.  Don't initialize main_thread.
4378         * descr.h (struct pthread): Remove main_thread member.
4379         * cancelllation.c (__do_cancel): Remove code handling main thread.
4380         The main thread is not special anymore.
4382         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
4383         size of the stacks to stack_cache_actsize.
4385         * pt-readv.c: Add missing "defined".
4386         * pt-sigwait.c: Likewise.
4387         * pt-writev.c: Likewise.
4389 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
4391         * Versions: Export __connect from libpthread.
4392         Patch by Luca Barbieri <ldb@ldb.ods.org>.
4394         * Makefile (libpthread-routines): Add pt-raise.
4395         * sysdeps/unix/sysv/linux/raise.c: New file.
4396         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
4397         * sysdeps/generic/pt-raise.c: New file.
4399         * pthread_cond_init.c: Initialize all data elements of the condvar
4400         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
4402         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
4403         * pthread_create.c: Likewise.
4405         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
4406         * tst-key1.c: New file.
4407         * tst-key2.c: New file.
4408         * tst-key3.c: New file.
4410         * Versions: Export pthread_detach for version GLIBC_2.0.
4411         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
4413 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
4415         * pthread_key_create.c: Terminate search after an unused key was found.
4416         Patch by Luca Barbieri <ldb@ldb.ods.org>.
4418         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
4419         Patch by Luca Barbieri <ldb@ldb.ods.org>.
4421 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
4423         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
4424         dynamic lookup for errno in PIC.
4426         * allocatestack.c (get_cached_stack): Rearrange code slightly to
4427         release the stack lock as soon as possible.
4428         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
4429         the static TLS block.
4430         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
4432         * cancellation.c: Renamed from cancelation.c.
4433         * Makefile: Adjust accordingly.
4434         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
4435         * cleanup_defer.c: Use CANCELLATION_P.
4436         * pthread_testcancel.c: Likewise.
4437         * descr.h: Fix spelling in comments.
4438         * init.c: Likewise.
4439         * pthread_getattr_np.c: Likewise.
4440         * pthread_getschedparam.c: Likewise.
4441         * pthread_setschedparam.c: Likewise.
4442         * Versions: Likewise.
4444         * pt-pselect.c: New file.
4445         * Makefile (libpthread-routines): Add pt-pselect.
4446         * Versions: Add pselect.
4448         * tst-cancel4.c: New file.
4449         * Makefile (tests): Add tst-cancel4.
4451 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
4453         * pthread_mutex_lock.c: Always record lock ownership.
4454         * pthread_mutex_timedlock.c: Likewise.
4455         * pthread_mutex_trylock.c: Likewise.
4457         * pt-readv.c: New file.
4458         * pt-writev.c: New file.
4459         * pt-creat.c: New file.
4460         * pt-msgrcv.c: New file.
4461         * pt-msgsnd.c: New file.
4462         * pt-poll.c: New file.
4463         * pt-select.c: New file.
4464         * pt-sigpause.c: New file.
4465         * pt-sigsuspend.c: New file.
4466         * pt-sigwait.c: New file.
4467         * pt-sigwaitinfo.c: New file.
4468         * pt-waitid.c: New file.
4469         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
4470         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
4471         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
4472         * Versions: Add all the new functions.
4474         * tst-exit1.c: New file.
4475         * Makefile (tests): Add tst-exit1.
4477         * sem_timedwait.c: Minor optimization for more optimal fastpath.
4479 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
4481         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
4483         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
4484         call.  pthread_join is an official cancellation point.
4485         * pthread_timedjoin.c: Likewise.
4487         * pthread_cond_wait.c: Revert order in which internal lock are dropped
4488         and the condvar's mutex are retrieved.
4489         * pthread_cond_timedwait.c: Likewise.
4490         Reported by dice@saros.East.Sun.COM.
4492 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
4494         * pthreadP.h: Cut out all type definitions and move them...
4495         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
4496         * pthreadP.h: Include <internaltypes.h>.
4498         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
4499         performance tweaks.
4501         * sem_trywait.c: Shuffle #includes around to get right order.
4502         * sem_timedwait.c: Likewise.
4503         * sem_post.c: Likewise.
4504         * sem_wait.c: Likewise.
4506         * nptl 0.3 released.
4508         * Makefile (tests): Add tst-signal3.
4509         * tst-signal3.c: New file.
4511 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
4513         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
4514         the asms modify the sem object.
4515         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
4517         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
4518         the actual members.
4519         * pthreadP.h (struct sem): New type.  Actual semaphore type.
4520         * semaphoreP.h: Include pthreadP.h.
4521         * sem_getvalue.c: Adjust to sem_t change.
4522         * sem_init.c: Likewise.
4523         * sem_open.c: Likewise.
4524         * sem_post.c: Likewise.
4525         * sem_timedwait.c: Likewise.
4526         * sem_trywait.c: Likewise.
4527         * sem_wait.c: Likewise.
4529 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
4531         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
4532         * tst-basic2.c: New file.
4533         * tst-exec1.c: New file.
4534         * tst-exec2.c: New file.
4535         * tst-exec3.c: New file.
4537         * tst-fork1.c: Remove extra */.
4539         * nptl 0.2 released.  The API for IA-32 is complete.