* sysdeps/unix/sysv/linux/kernel-features.h: Define
[platform/upstream/glibc.git] / nptl / ChangeLog
1 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2             Jakub Jelinek  <jakub@redhat.com>
3
4         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
5         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
6         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
7         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
8         * pthread_mutex_init.c: Add support for priority inheritance mutex.
9         * pthread_mutex_lock.c: Likewise.
10         * pthread_mutex_timedlock.c: Likewise.
11         * pthread_mutex_trylock.c: Likewise.
12         * pthread_mutex_unlock.c: Likewise.
13         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
14         all mutexes.
15         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
16         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
17         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
18         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
19         pthread-pi-defines.sym.
20         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
21         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
22         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
23         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
24         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
25         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
26         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
27         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
28         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
29         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
30         _POSIX_THREAD_PRIO_INHERIT to 200112L.
31         * tst-mutex1.c: Adjust to allow use in PI mutex test.
32         * tst-mutex2.c: Likewise.
33         * tst-mutex3.c: Likewise.
34         * tst-mutex4.c: Likewise.
35         * tst-mutex5.c: Likewise.
36         * tst-mutex6.c: Likewise.
37         * tst-mutex7.c: Likewise.
38         * tst-mutex7a.c: Likewise.
39         * tst-mutex8.c: Likewise.
40         * tst-mutex9.c: Likewise.
41         * tst-robust1.c: Likewise.
42         * tst-robust7.c: Likewise.
43         * tst-robust8.c: Likewise.
44         * tst-mutexpi1.c: New file.
45         * tst-mutexpi2.c: New file.
46         * tst-mutexpi3.c: New file.
47         * tst-mutexpi4.c: New file.
48         * tst-mutexpi5.c: New file.
49         * tst-mutexpi6.c: New file.
50         * tst-mutexpi7.c: New file.
51         * tst-mutexpi7a.c: New file.
52         * tst-mutexpi8.c: New file.
53         * tst-mutexpi9.c: New file.
54         * tst-robust1.c: New file.
55         * tst-robust2.c: New file.
56         * tst-robust3.c: New file.
57         * tst-robust4.c: New file.
58         * tst-robust5.c: New file.
59         * tst-robust6.c: New file.
60         * tst-robust7.c: New file.
61         * tst-robust8.c: New file.
62         * Makefile (tests): Add the new tests.
63
64         * pthread_create.c (start_thread): Add some casts to avoid warnings.
65         * pthread_mutex_destroy.c: Remove unneeded label.
66
67 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
68
69         * pthread_mutex_init.c (__pthread_mutex_init): Move some
70         computations to compile time.
71
72 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
73
74         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
75
76 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
77
78         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
79
80 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
81
82         * pthread_key_create.c (__pthread_key_create): Do away with
83         __pthread_keys_lock.
84
85         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
86         (__kernel_cpumask_size): Mark as hidden.
87         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
88
89         * sem_open.c (__sem_mappings_lock): Mark as hidden.
90         * semaphoreP.h (__sem_mappings_lock): Likewise.
91
92 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
93
94         * pthread_atfork.c: Mark __dso_handle as hidden.
95
96 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
97
98         [BZ #2644]
99         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
100         the reload problem.  Change the one path in pthread_cancel_init
101         which causes the problem.  Force gcc to reload.  Simplify callers.
102         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
103         (_Unwind_GetBSP): Undo last patch.
104
105 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
106
107         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
108         function pointer is reloaded after pthread_cancel_init calls.
109
110         [BZ #2644]
111         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
112         pointers are reloaded after pthread_cancel_init calls.
113
114 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
115
116         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
117         __always_inline.
118
119 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
120
121         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
122         Allocate new object which is passed to timer_sigev_thread so that
123         the timer can be deleted before the new thread is scheduled.
124
125 2006-04-26  Roland McGrath  <roland@redhat.com>
126
127         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
128
129 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
130
131         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
132         suffix for conditional jumps.
133         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
134         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
135         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
136         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
137         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
138         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
139
140         * init.c (sigcancel_handler): Compare with correct PID even if the
141         thread is in the middle of a fork call.
142         (sighandler_setxid): Likewise.
143         Reported by Suzuki K P <suzuki@in.ibm.com> .
144
145 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
146
147         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
148
149 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
150
151         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
152         fails [Coverity CID 105].
153
154 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
155
156         * sysdeps/pthread/pthread.h: Add nonnull attributes.
157
158 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
159
160         [BZ #2505]
161         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
162         Define __lll_rel_instr using lwsync.
163
164 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
165
166         * allocatestack.c (allocate_stack): Always initialize robust_head.
167         * descr.h: Define struct robust_list_head.
168         (struct pthread): Use robust_list_head in robust mutex list definition.
169         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
170         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
171         (__pthread_initialize_minimal_internal): Register robust_list with
172         the kernel.
173         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
174         Declare __set_robust_list_avail.
175         * pthread_create.c (start_thread): Register robust_list of new thread.
176         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
177         waiters.
178         * pthread_mutex_destroy.c: For robust mutexes don't look at the
179         number of users, it's unreliable.
180         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
181         set_robust_list syscall is available.
182         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
183         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
184         Set robust_head.list_op_pending before trying to lock a robust mutex.
185         * pthread_mutex_timedlock.c: Likewise.
186         * pthread_mutex_trylock.c: Likewise.
187         * pthread_mutex_unlock.c: Likewise for unlocking.
188         * Makefile (tests): Add tst-robust8.
189         * tst-robust8.c: New file.
190
191 2006-03-08  Andreas Schwab  <schwab@suse.de>
192
193         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
194         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
195
196 2006-03-05  Roland McGrath  <roland@redhat.com>
197
198         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
199         and $config_os doesn't match *linux*.
200
201 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
202
203         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
204         Use __syscall_error.
205         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
206         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
207         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
208         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
209         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
210         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
211
212 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
213
214         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
215
216 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
217
218         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
219         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
220         mutex.
221         (__lll_robust_timedlock_wait): Likewise.
222         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
223         (__lll_robust_lock_wait): Likewise.
224         (__lll_robust_timedlock_wait): Likewise.
225         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
226         (__lll_robust_lock_wait): Likewise.
227         (__lll_robust_timedlock_wait): Likewise.
228
229 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
230
231         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
232         lll_robust_mutex_trylock, lll_robust_mutex_lock,
233         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
234         lll_robust_mutex_unlock): Define.
235         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
236
237 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
238
239         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
240         instead of <clone.S>.
241
242 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
243
244         * Makefile (libpthread-routines): Add
245         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
246         and pthread_mutex_[sg]etprioceiling.
247         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
248         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
249         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
250         pthread_mutex_setprioceiling.
251         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
252         PTHREAD_PRIO_PROTECT): New enum values.
253         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
254         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
255         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
256         prototypes.
257         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
258         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
259         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
260         Define.
261         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
262         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
263         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
264         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
265         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
266         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
267         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
268         protocol mutexes.
269         * pthread_mutex_getprioceiling.c: New file.
270         * pthread_mutex_setprioceiling.c: New file.
271         * pthread_mutexattr_getprioceiling.c: New file.
272         * pthread_mutexattr_setprioceiling.c: New file.
273         * pthread_mutexattr_getprotocol.c: New file.
274         * pthread_mutexattr_setprotocol.c: New file.
275
276 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
277
278         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
279
280 2006-02-27  Roland McGrath  <roland@redhat.com>
281
282         * sysdeps/pthread/Subdirs: List nptl here too.
283         * configure (libc_add_on_canonical): New variable.
284
285         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
286
287         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
288         self to get main source tree's file.
289         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
290         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
291         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
292         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
293         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
294         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
295         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
296         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
297         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
298         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
299         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
300         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
301         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
302
303         * Makefile: Use $(sysdirs) in vpath directive.
304
305         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
306         (CPPFLAGS-timer_routines.c): Likewise.
307
308         * Makeconfig (includes): Variable removed.
309
310 2006-02-26  Roland McGrath  <roland@redhat.com>
311
312         * sysdeps/generic/pt-raise.c: Moved to ...
313         * pt-raise.c: ... here.
314         * sysdeps/generic/lowlevellock.h: Moved to ...
315         * lowlevellock.h: ... here.
316
317 2006-02-23  Roland McGrath  <roland@redhat.com>
318
319         * descr.h (struct pthread): Add final member `end_padding'.
320         (PTHREAD_STRUCT_END_PADDING): Use it.
321
322 2006-02-20  Roland McGrath  <roland@redhat.com>
323
324         * sysdeps/mips: Directory removed, saved in ports repository.
325         * sysdeps/unix/sysv/linux/mips: Likewise.
326
327 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
328
329         * tst-robust1.c: Add second mutex to check that the mutex list is
330         handled correctly.
331
332 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
333
334         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
335         lll_robust_mutex_trylock, lll_robust_mutex_lock,
336         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
337         lll_robust_mutex_unlock): New macros.
338         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
339         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
340         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
341         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
342         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
343
344 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
345
346         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
347         definitions.
348         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
349
350 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
351
352         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
353         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
354         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
355         (lll_robust_mutex_unlock): Likewise.
356
357 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
358
359         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
360         Set robust_list.__next rather than robust_list.
361         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
362         (__pthread_list_t): New typedef.
363         (pthread_mutex_t): Replace __next and __prev fields with __list.
364         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
365         (__pthread_list_t): New typedef.
366         (pthread_mutex_t): Replace __next and __prev fields with __list.
367         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
368         (__pthread_list_t, __pthread_slist_t): New typedefs.
369         (pthread_mutex_t): Replace __next and __prev fields with __list.
370         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
371         (__pthread_list_t, __pthread_slist_t): New typedefs.
372         (pthread_mutex_t): Replace __next and __prev fields with __list.
373         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
374         (__pthread_list_t, __pthread_slist_t): New typedefs.
375         (pthread_mutex_t): Replace __next and __prev fields with __list.
376         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
377         (__pthread_slist_t): New typedef.
378         (pthread_mutex_t): Replace __next field with __list.
379
380 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
381
382         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
383         PTHREAD_MUTEX_OWNERDEAD.
384         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
385         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
386         * Makefile (libpthread-routines): Add lowlevelrobustlock.
387         * pthread_create.c (start_thread): Very much simplify robust_list loop.
388         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
389         to PTHREAD_MUTEX_INCONSISTENT.
390         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
391         * pthread_mutex_lock.c: Reimplement robust mutex handling.
392         * pthread_mutex_trylock.c: Likewise.
393         * pthread_mutex_timedlock.c: Likewise.
394         * pthread_mutex_unlock.c: Likewise.
395         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
396         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
397         lowlevelrobustlock.sym.
398         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
399         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
400         definitions.
401         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
402         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
403         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
404         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
405         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
406
407 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
408
409         * allocatestack.c (allocate_stack): Initialize robust_list.
410         * init.c (__pthread_initialize_minimal_internal): Likewise.
411         * descr.h (struct xid_command): Pretty printing.
412         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
413         robust_list.  Adjust macros.
414         * pthread_create.c (start_thread): Adjust robust_list handling.
415         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
416         but the owner for all robust mutex types.
417         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
418         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
419         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
420         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
421
422         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
423         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
424
425 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
426
427         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
428         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
429
430 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
431
432         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
433         Return status.
434         (lll_futex_timed_wait): Define.
435
436 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
437
438         * tst-cancel4.c: Test ppoll.
439
440 2006-01-18  Andreas Jaeger  <aj@suse.de>
441
442         [BZ #2167]
443         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
444         (pthread_mutex_t): Follow changes for other archs.  Based on patch
445         by Jim Gifford <patches@jg555.com>.
446
447 2006-01-13  Richard Henderson  <rth@redhat.com>
448
449         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
450
451 2006-01-10  Roland McGrath  <roland@redhat.com>
452
453         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
454         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
455         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
456         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
457         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
458         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
459         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
460         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
461         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
462         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
463
464 2006-01-09  Roland McGrath  <roland@redhat.com>
465
466         * tst-initializers1-c89.c: New file.
467         * tst-initializers1-c99.c: New file.
468         * tst-initializers1-gnu89.c: New file.
469         * tst-initializers1-gnu99.c: New file.
470         * Makefile (tests): Add them.
471         (CFLAGS-tst-initializers1-c89.c): New variable.
472         (CFLAGS-tst-initializers1-c99.c): New variable.
473         (CFLAGS-tst-initializers1-gnu89.c): New variable.
474         (CFLAGS-tst-initializers1-gnu99.c): New variable.
475
476         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
477         Use __extension__ on anonymous union definition.
478         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
479         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
480         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
481         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
482         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
483
484 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
485
486         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
487         Don't give the union a name because it changes the mangled name.
488         Instead name the struct for __data.
489         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
490         Likewise.
491         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
492         Likewise.
493
494 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
495
496         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
497         stack bias to mc_ftp field.
498
499 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
500
501         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
502         being too clever and reloading the futex value where it shouldn't.
503
504 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
505
506         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
507         correct type.
508
509 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
510
511         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
512         Add cfi directives.
513
514 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
515
516         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
517         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
518         rename in tcbhead_t.
519
520         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
521         Don't give the union a name because it changes the mangled name.
522         Instead name the struct for __data.
523         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
524         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
525         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
526         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
527         * pthread_create.c (start_thread): Adjust robust mutex free loop.
528         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
529
530 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
531
532         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
533         Return status.
534         (lll_futex_timed_wait): Define.
535         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
536         * sysdeps/pthread/aio_misc.h: New file.
537
538 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
539
540         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
541
542 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
543
544         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
545         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
546         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
547
548 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
549
550         * tst-cancel24.cc: Use C headers instead of C++ headers.
551
552 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
553
554         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
555         sparc-linux configured glibc.
556         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
557         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
558         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
559         atomic_compare_and_exchange_val_24_acq instead of
560         atomic_compare_and_exchange_val_acq.
561         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
562         instead of atomic_exchange_rel.
563         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
564         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
565         file.
566         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
567         file.
568         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
569         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
570         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
571         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
572         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
573         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
574         New file.
575         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
576         New file.
577         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
578         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
579         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
580         file.
581         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
582         file.
583         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
584
585 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
586
587         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
588         mutex initializers.
589
590 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
591
592         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
593         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
594         THREAD_COPY_POINTER_GUARD): Define.
595         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
596         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
597
598 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
599
600         * version.c: Update copyright year.
601
602 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
603
604         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
605         .eh_frame section, use cfi_* directives.
606         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
607
608 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
609
610         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
611         now.
612
613 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
614
615         * sysdeps/pthread/sigaction.c: Removed.
616         * sigaction.c: New file.
617         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
618
619 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
620
621         * Makefile (tests): Add tst-signal7.
622         * tst-signal7.c: New file.
623
624 2005-12-27  Roland McGrath  <roland@redhat.com>
625
626         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
627         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
628         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
629         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
630         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
631         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
632         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
633         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
634         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
635         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
636         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
637
638 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
639
640         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
641         and __prev field to pthread_mutex_t.
642         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
643         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
644         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
645         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
646         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
647         to pthread_mutex_t.
648
649 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
650
651         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
652         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
653         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
654         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
655         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
656         and PTHREAD_MUTEXATTR_FLAG_BITS.
657         * descr.h (struct pthread): Add robust_list field and define
658         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
659         * pthread_mutexattr_getrobust.c: New file.
660         * pthread_mutexattr_setrobust.c: New file.
661         * pthread_mutex_consistent.c: New file.
662         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
663         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
664         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
665         Adjust pthread_mutex_t initializers.
666         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
667         field to pthread_mutex_t.
668         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
669         and __prev field to pthread_mutex_t.
670         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
671         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
672         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
673         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
674         * pthread_mutexattr_gettype.c: Likewise.
675         * pthread_mutexattr_setpshared.c: Likewise.
676         * pthread_mutexattr_settype.c: Likewise.
677         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
678         Initialize mutex kind according to robust flag.
679         * pthread_mutex_lock.c: Implement local robust mutex.
680         * pthread_mutex_timedlock.c: Likewise.
681         * pthread_mutex_trylock.c: Likewise.
682         * pthread_mutex_unlock.c: Likewise.
683         * pthread_create.c (start_thread): Mark robust mutexes which remained
684         locked as dead.
685         * tst-robust1.c: New file.
686         * tst-robust2.c: New file.
687         * tst-robust3.c: New file.
688         * tst-robust4.c: New file.
689         * tst-robust5.c: New file.
690         * tst-robust6.c: New file.
691         * tst-robust7.c: New file.
692         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
693         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
694         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
695         tst-robust5, tst-robust6, and tst-robust7.
696
697         * tst-typesizes.c: New file.
698         * Makefile (tests): Add tst-typesizes.
699
700         * tst-once3.c: More debug output.
701
702 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
703
704         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
705         missing after last change.
706
707         * version.c: Update copyright year.
708
709 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
710
711         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
712         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
713         * pthread_mutex_trylock.c: Likewise.
714         * pthread_mutex_timedlock.c: Likewise.
715         * pthread_mutex_unlock.c: Likewise.
716
717 2005-12-22  Roland McGrath  <roland@redhat.com>
718
719         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
720         so that #include_next's search location is not reset to the -I..
721         directory where <nptl/...> can be found.
722
723 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
724
725         [BZ #1913]
726         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
727         Fix unwind info.  Remove useless branch prediction prefix.
728         * tst-cancel24.cc: New file.
729         * Makefile: Add rules to build and run tst-cancel24.
730
731 2005-12-21  Roland McGrath  <roland@redhat.com>
732
733         * libc-cancellation.c: Use <> rather than "" #includes.
734         * pt-cleanup.c: Likewise.
735         * pthread_create.c: Likewise.
736         * pthread_join.c: Likewise.
737         * pthread_timedjoin.c: Likewise.
738         * pthread_tryjoin.c: Likewise.
739         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
740         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
741         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
742         * unwind.c: Likewise.
743
744 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
745
746         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
747         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
748         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
749         THREAD_COPY_POINTER_GUARD): Define.
750
751 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
752
753         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
754         rather than one.
755         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
756         THREAD_COPY_POINTER_GUARD): Define.
757         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
758         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
759         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
760         THREAD_COPY_POINTER_GUARD): Define.
761         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
762         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
763         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
764         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
765         Use PTR_DEMANGLE for B0 if defined.
766
767 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
768
769         * pthread_create.c (__pthread_create_2_1): Use
770         THREAD_COPY_POINTER_GUARD if available.
771         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
772         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
773         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
774         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
775         * sysdeps/x86_64/tls.h: Likewise.
776
777 2005-12-15  Roland McGrath  <roland@redhat.com>
778
779         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
780
781 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
782
783         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
784         sysdeps/generic.
785         * errno-loc.c: New file.
786
787 2005-12-12  Roland McGrath  <roland@redhat.com>
788
789         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
790         adjustments before choosing stack size.  Update minimum stack size
791         calculation to match allocate_stack change.
792
793 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
794
795         * allocatestack.c (allocate_stack): Don't demand that there is an
796         additional full page available on the stack beside guard, TLS, the
797         minimum stack.
798
799 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
800
801         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
802         (__cleanup_fct_attribute): Use __regparm__ not regparm.
803
804         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
805         compiling 32-bit code we must define __cleanup_fct_attribute.
806
807 005-11-24  Jakub Jelinek  <jakub@redhat.com>
808
809         [BZ #1920]
810         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
811         __attribute__ instead of __attribute.
812         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
813         (__cleanup_fct_attribute): Likewise.
814
815 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
816
817         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
818         a write barrier before writing libgcc_s_getcfa.
819
820 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
821
822         * sysdeps/unix/sysv/linux/configure: Removed.
823
824 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
825
826         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
827         optional init_array/fini_array support.
828
829 2005-10-24  Roland McGrath  <roland@redhat.com>
830
831         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
832         versioned_symbol use.
833
834 2005-10-16  Roland McGrath  <roland@redhat.com>
835
836         * init.c (__pthread_initialize_minimal_internal): Even when using a
837         compile-time default stack size, apply the minimum that allocate_stack
838         will require, and round up to page size.
839
840 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
841
842         * Makefile ($(test-modules)): Remove static pattern rule.
843
844 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
845             Ulrich Drepper  <drepper@redhat.com>
846
847         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
848         alignment in callback function.
849         * Makefile: Add rules to build and run tst-align3.
850         * tst-align3.c: New file.
851
852 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
853
854         * allocatestack.c (setxid_signal_thread): Add
855         INTERNAL_SYSCALL_DECL (err).
856
857 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
858
859         * allocatestack.c (setxid_signal_thread): Need to use
860         atomic_compare_and_exchange_bool_acq.
861
862 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
863             Jakub Jelinek  <jakub@redhat.com>
864
865         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
866         CANCEL_RESTMASK.
867         (struct pthread): Move specific_used field to avoid padding.
868         Add setxid_futex field.
869         * init.c (sighandler_setxid): Reset setxid flag and release the
870         setxid futex.
871         * allocatestack.c (setxid_signal_thread): New function.  Broken
872         out of the bodies of the two loops in __nptl_setxid.  For undetached
873         threads check whether they are exiting and if yes, don't send a signal.
874         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
875         * pthread_create.c (start_thread): For undetached threads, check
876         whether setxid bit is set.  If yes, wait until signal has been
877         processed.
878
879         * allocatestack.c (STACK_VARIABLES): Initialize them.
880         * pthread_create.c (__pthread_create_2_1): Initialize pd.
881
882 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
883
884         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
885         waiters, awake all waiters on the associated mutex.
886
887 2005-09-22  Roland McGrath  <roland@redhat.com>
888
889         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
890         ../sysdeps/x86_64/hp-timing.h).
891
892 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
893
894         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
895         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
896         (lll_futex_wake_unlock): Define.
897         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
898         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
899         (lll_futex_wake_unlock): Define.
900         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
901         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
902         (lll_futex_wake_unlock): Define.
903         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
904         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
905         (lll_futex_wake_unlock): Define.
906         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
907         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
908         (lll_futex_wake_unlock): Define.
909         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
910         lll_futex_wake_unlock.
911         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
912         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
913         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
914         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
915         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
916         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
917
918 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
919
920         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
921         Fix typo in register name.
922
923 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
924
925         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
926         Use __sigfillset.  Document that sigfillset does the right thing wrt
927         to SIGSETXID.
928
929 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
930
931         [BZ #1102]
932         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
933         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
934         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
935         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
936         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
937         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
938         in the structure.
939         * Makefile (tests): Add tst-initializers1.
940         (CFLAGS-tst-initializers1.c): Set.
941         * tst-initializers1.c: New test.
942
943 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
944
945         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
946         Make sure __flags are located at offset 48 from the start of the
947         structure.
948
949 2005-07-02  Roland McGrath  <roland@redhat.com>
950
951         * Makeconfig: Comment fix.
952
953 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
954
955         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
956         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
957         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
958         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
959         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
960         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
961         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
962         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
963         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
964         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
965
966 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
967
968         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
969         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
970         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
971         fields.
972         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
973         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
974         field.  Put in sysinfo field unconditionally.
975         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
976         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
977         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
978         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
979         fields.
980         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
981         * pthread_create.c (__pthread_create_2_1): Use
982         THREAD_COPY_STACK_GUARD macro.
983         * Makefile: Add rules to build and run tst-stackguard1{,-static}
984         tests.
985         * tst-stackguard1.c: New file.
986         * tst-stackguard1-static.c: New file.
987
988 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
989
990         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
991         Invoke CGOTSETUP and CGOTRESTORE.
992         (CGOTSETUP, CGOTRESTORE): Define.
993
994 2005-05-29  Richard Henderson  <rth@redhat.com>
995
996         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
997         (tf_write, tf_writev): Use it.
998         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
999         the system minimum.
1000
1001 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
1002
1003         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1004         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1005         __librt_*_asynccancel@local.
1006
1007 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
1008
1009         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1010         all occurrences of JUMPTARGET.  Instead append @local to labels.
1011
1012 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
1013
1014         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1015         size/alignment of struct pthread rather than tcbhead_t.
1016         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1017         Likewise.
1018         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1019         Likewise.
1020         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1021         Likewise.
1022
1023 2005-05-19  Richard Henderson  <rth@redhat.com>
1024
1025         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1026         __sync_val_compare_and_swap, not explicit _si variant.
1027         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1028
1029 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
1030
1031         [BZ #915]
1032         * sysdeps/pthread/pthread.h: Avoid empty initializers.
1033
1034 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
1035
1036         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1037         .eh_frame section, use cfi_* directives.
1038
1039 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
1040
1041         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1042         of "" includes.
1043
1044 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
1045
1046         [BZ #1075]
1047         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1048         aio_write blocks.
1049
1050 2005-04-27  Roland McGrath  <roland@redhat.com>
1051
1052         * Makefile (tests): Remove tst-clock2.
1053
1054         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1055         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1056         translating to the kernel clockid_t for our own process/thread clock.
1057
1058         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1059
1060 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
1061
1062         * old_pthread_cond_init.c: Include <errno.h>.
1063         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1064         process shared or uses clock other than CLOCK_REALTIME.
1065         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1066
1067 2005-04-13  David S. Miller  <davem@davemloft.net>
1068
1069         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1070         * sysdeps/sparc/sparc64/clone.S: New file.
1071
1072 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
1073
1074         [BZ #1102]
1075         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1076         __inline instead of inline.
1077         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1078
1079 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
1080
1081         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1082         functionally equivalent, but shorter instructions.
1083         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1084         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1085         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1086         Likewise.
1087         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1088         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1089         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1090         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1091         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1092         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1093         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1094         Likewise.
1095         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1096         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1097         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1098         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1099         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1100
1101 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
1102
1103         * sysdeps/mips/Makefile: New file.
1104         * sysdeps/mips/nptl-sysdep.S: New file.
1105         * sysdeps/mips/tcb-offsets.sym: New file.
1106         * sysdeps/mips/pthread_spin_lock.S: New file.
1107         * sysdeps/mips/pthread_spin_trylock.S: New file.
1108         * sysdeps/mips/pthreaddef.h: New file.
1109         * sysdeps/mips/tls.h: New file.
1110         * sysdeps/mips/jmpbuf-unwind.h: New file.
1111         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1112         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1113         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1114         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1115         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1116         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1117         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1118         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1119         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1120         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1121
1122 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
1123
1124         [BZ #1112]
1125         * pthread_create.c (__pthread_create_2_1): Rename syscall error
1126         variable to scerr.
1127
1128 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
1129
1130         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1131
1132 2005-02-25  Roland McGrath  <roland@redhat.com>
1133
1134         * alloca_cutoff.c: Correct license text.
1135         * tst-unload.c: Likewise.
1136         * sysdeps/pthread/allocalim.h: Likewise.
1137         * sysdeps/pthread/pt-initfini.c: Likewise.
1138         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1139         * sysdeps/pthread/bits/sigthread.h: Likewise.
1140         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1141         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1142
1143 2005-02-16  Roland McGrath  <roland@redhat.com>
1144
1145         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1146         Use unsigned int * for ptr_nthreads.
1147
1148 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
1149
1150         [BZ #721]
1151         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1152         gcc4.
1153
1154 2005-02-07  Richard Henderson  <rth@redhat.com>
1155
1156         [BZ #787]
1157         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1158         argument.
1159
1160 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
1161
1162         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1163         order of arguments in invocation of atomic_add_zero.
1164
1165 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
1166
1167         [BZ #737]
1168         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1169         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1170         at least gotntpoff relocation and addition.
1171         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1172         Likewise.
1173         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1174         Likewise.
1175         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1176         Likewise.
1177
1178 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
1179
1180         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1181         entry for static tls deallocation fix.
1182         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1183         also contains information whether the memory pointed to is static
1184         TLS or not.
1185         * sysdeps/i386/tls.h: Likewise.
1186         * sysdeps/ia64/tls.h: Likewise.
1187         * sysdeps/powerpc/tls.h: Likewise.
1188         * sysdeps/s390/tls.h: Likewise.
1189         * sysdeps/sh/tls.h: Likewise.
1190         * sysdeps/sparc/tls.h: Likewise.
1191         * sysdeps/x86_64/tls.h: Likewise.
1192
1193 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
1194
1195         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1196
1197 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
1198
1199         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1200         %esp.
1201         * Makefile (tests): Add tst-align2.
1202         * tst-align2.c: New test.
1203         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1204         -mpreferred-stack-boundary=4.
1205
1206 2004-12-18  Roland McGrath  <roland@redhat.com>
1207
1208         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1209         New file removed withdrawn for the moment.
1210
1211 2004-12-17  Richard Henderson  <rth@redhat.com>
1212
1213         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1214         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1215
1216 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
1217
1218         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1219         Increased PTHREAD_STACK_MIN.
1220
1221         * tst-context1.c (stacks): Use bigger stack size.
1222
1223 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
1224
1225         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1226         * sysdeps/sparc/tcb-offsets.sym: Add TID.
1227
1228 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
1229
1230         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1231         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1232         * sysdeps/s390/tcb-offsets.sym (TID): Add.
1233
1234 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
1235
1236         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1237
1238 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
1239
1240         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1241         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1242
1243         * tst-getpid1.c: If child crashes, report this first.  Print which
1244         signal.
1245
1246 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
1247
1248         * init.c (__pthread_initialize_minimal_internal): Also unblock
1249         SIGSETXID.
1250
1251 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1252
1253         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1254         _POSIX_THREAD_CPUTIME): Define to 0.
1255         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1256         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1257         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1258         __timer_signal_thread_tclk): Remove.
1259         (init_module): Remove their initialization.
1260         (thread_cleanup): Remove their cleanup assertions.
1261         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1262         __timer_signal_thread_tclk): Remove.
1263         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1264         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1265         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1266
1267 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
1268
1269         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1270         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1271
1272         * Makefile (tests): Add tst-getpid2.
1273         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1274         (do_test): Use it.  Use __clone2 instead of clone on ia64.
1275         * tst-getpid2.c: New test.
1276
1277 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1278
1279         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1280
1281 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
1282
1283         * Makefile (tests): Add tst-getpid1.
1284         * tst-getpid1.c: New file.
1285         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1286         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1287
1288 2004-12-02  Roland McGrath  <roland@redhat.com>
1289
1290         * Makefile (libpthread-nonshared): Variable removed.
1291         ($(objpfx)libpthread_nonshared.a): Target removed.
1292         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1293         These are now handled by generic magic from
1294         libpthread-static-only-routines being set.
1295
1296 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
1297
1298         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1299         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1300         _POSIX_THREAD_PRIO_PROTECT): Define.
1301         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1302         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1303         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1304
1305 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
1306
1307         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1308         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1309         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1310         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1311         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1312         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1313         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1314
1315 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
1316
1317         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1318
1319         * Makefile (libpthread-routines): Add pthread_setschedprio.
1320         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1321         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1322         * pthread_setschedprio.c: New file.
1323
1324 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
1325
1326         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1327         * pthread_cancel.c (pthread_create): Likewise.
1328
1329         * Makefile (libpthread-routines): Add vars.
1330         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1331         * init.c (__default_stacksize, __is_smp): Remove.
1332         * vars.c: New file.
1333         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1334         and define a wrapper macro.
1335         (PTHREAD_STATIC_FN_REQUIRE): Define.
1336         * allocatestack.c (__find_thread_by_id): Undefine.
1337         * pthread_create (__pthread_keys): Remove.
1338         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1339         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1340         PTHREAD_STATIC_FN_REQUIRE.
1341
1342 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1343
1344         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1345         parameter to REGISTER macro.
1346
1347 2004-11-17  Roland McGrath  <roland@redhat.com>
1348
1349         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1350         Make sure SIGCANCEL is blocked as well.
1351
1352 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1353
1354         * sysdeps/pthread/setxid.h: New file.
1355         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1356         (struct xid_command): Add forward decl.
1357         (struct pthread_functions): Change return type of __nptl_setxid hook
1358         to int.
1359         * pthreadP.h (__nptl_setxid): Change return type to int.
1360         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1361         calling thread, return its return value and set errno on failure.
1362         * descr.h (struct xid_command): Change id type to long array.
1363
1364         * Makefile: Add rules to build and test tst-setuid1 and
1365         tst-setuid1-static.
1366         * tst-setuid1.c: New test.
1367         * tst-setuid1-static.c: New test.
1368
1369 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1370
1371         * Makefile (tests): Add tst-exit3.
1372         * tst-exit3.c: New test.
1373
1374 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
1375
1376         * Makefile (tests): Add tst-exit2.
1377         * tst-exit2.c: New file.
1378
1379 2004-11-09  Roland McGrath  <roland@redhat.com>
1380
1381         [BZ #530]
1382         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1383         here, before calling clone.
1384         * pthread_create.c (start_thread): Don't do it here.
1385
1386 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
1387
1388         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1389
1390 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
1391
1392         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1393         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
1394         assembler warning.
1395
1396 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
1397
1398         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1399         if sched_priority is not between minprio and maxprio.
1400
1401 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1402
1403         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1404         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1405
1406         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1407         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1408
1409 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
1410
1411         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1412         not-cancelable I/O functions.
1413
1414 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1415
1416         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1417         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1418         make sure 2 is stored in the futex and we looked at the old value.
1419         Fix a few other problems to return the correct value.
1420
1421 2004-10-14  Richard Henderson  <rth@redhat.com>
1422
1423         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1424         make gcc4 happy.
1425
1426 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
1427
1428         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1429         of pthread-functions.h and pthreaddef.h.
1430         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1431
1432         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1433         Change __data.__nwaiters from int to unsigned int.
1434
1435         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1436         sysconf (_SC_THREAD_CPUTIME) returns negative value.
1437
1438         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1439         before return type.
1440
1441         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1442         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1443
1444 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
1445
1446         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
1447         test fails, remove message queue.
1448         (tf_msgsnd): Likewise.
1449
1450 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1451
1452         * tst-clock1.c: Change #ifdef to #if defined.
1453         * tst-clock2.c: Likewise.
1454         * tst-cond11.c: Likewise.
1455
1456         * sysdeps/pthread/timer_create.c (timer_create): Use
1457         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1458         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1459         THREAD_CPUTIME.
1460
1461 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1462
1463         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1464         _POSIX_THREAD_CPUTIME): Define to 0.
1465
1466 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
1467
1468         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1469         and _POSIX_THREAD_CPUTIME to zero.
1470         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1471         * tst-barrier2.c: Fix testing for POSIX feature.
1472         * tst-clock1.c: Likewise.
1473         * tst-clock2.c: Likewise.
1474         * tst-cond11.c: Likewise.
1475         * tst-cond4.c: Likewise.
1476         * tst-cond6.c: Likewise.
1477         * tst-flock2.c: Likewise.
1478         * tst-mutex4.c: Likewise.
1479         * tst-mutex9.c: Likewise.
1480         * tst-rwlock12.c: Likewise.
1481         * tst-rwlock4.c: Likewise.
1482         * tst-signal1.c: Likewise.
1483         * tst-spin2.c: Likewise.
1484         * sysdeps/pthread/posix-timer.h: Likewise.
1485         * sysdeps/pthread/timer_create.c: Likewise.
1486         * sysdeps/pthread/timer_routines.c: Likewise.
1487
1488 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
1489
1490         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1491         (__lll_mutex_timedlock_wait): Address futex correctly.
1492
1493         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1494         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1495         make sure 2 is stored in the futex and we looked at the old value.
1496         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1497         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
1498         which might very well made the code not working at all before.
1499         [BZ #417]
1500
1501 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
1502
1503         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1504         allow SIGSETXID to be sent.
1505         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1506         for SIGSETXID to be defined.
1507         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1508         SIGSETXID cannot be blocked.
1509
1510         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1511         Add __extension__ to long long types.
1512         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1513         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1514         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1515         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1516         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1517         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1518         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1519
1520 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
1521
1522         * descr.h (struct pthread): Add stopped_start field.
1523         * sysdeps/pthread/createthread.c (create_thread): Set
1524         start_stopped flag in descriptor for new thread appropriately.
1525         * pthread_create.c (start_thread): Only take lock to be stopped on
1526         startup if stopped_start flag says so.
1527
1528 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
1529
1530         * pthread_create.c (__pthread_create_2_1): Remember whether thread
1531         is created detached and if yes, do not try to free the stack in case
1532         the thread creation failed.
1533         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1534         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1535         case there has been no error.  [BZ #405]
1536
1537         * pthread_create.c (start_thread): Don't wait for scheduler data
1538         etc to be set at the beginning of the function.  The cancellation
1539         infrastructure must have been set up.  And enable async
1540         cancellation before potentially going to sleep.  [BZ #401]
1541
1542 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
1543
1544         * Versions: Remove exports for pthread_set*id_np functions.
1545         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1546         for now.
1547         * Makefile: Don't build pthread_set*id code for now.
1548
1549 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
1550
1551         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1552         internal use.
1553         * allocatestack.c (__nptl_setxid): New function.
1554         * descr.h (struct xid_command): Define type.
1555         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1556         (sighandler_setxid): New function.
1557         (__pthread_initialize_minimal): Register sighandler_setxid for
1558         SIGCANCEL.
1559         * pt-allocrtsig.c: Update comment.
1560         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
1561         Declare __nptl_setxid.
1562         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1563         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1564         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1565         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1566         and pthread_setresuid_np.
1567         * pthread_setgid_np.c: New file.
1568         * pthread_setuid_np.c: New file.
1569         * pthread_setegid_np.c: New file.
1570         * pthread_seteuid_np.c: New file.
1571         * pthread_setregid_np.c: New file.
1572         * pthread_setreuid_np.c: New file.
1573         * pthread_setresgid_np.c: New file.
1574         * pthread_setresuid_np.c: New file.
1575         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
1576         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1577         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1578         and pthread_setresuid_np.
1579         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1580         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1581         pthread_setregid, and pthread_setresgid.
1582
1583 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
1584
1585         * allocatestack.c (allocate_stack): Return EAGAIN instead of
1586         ENOMEM when out of memory.
1587
1588 2004-09-10  Roland McGrath  <roland@redhat.com>
1589
1590         [BZ #379]
1591         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1592         code, since we don't try to use the broken CLONE_STOPPED any more.
1593         * pthread_create.c (start_thread): Likewise.
1594
1595 2004-09-15  Richard Henderson  <rth@redhat.com>
1596
1597         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1598
1599 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
1600
1601         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1602         (__libc_unwind_longjmp): Delete macro and declare as function.
1603         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1604         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1605         nptl directory.
1606         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1607         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1608         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1609
1610 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
1611
1612         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1613         for __USE_XOPEN2K.
1614         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1615         types also for __USE_XOPEN2K.
1616         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1617         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1618         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1619         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1620         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1621         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1622         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1623         [BZ #320]
1624
1625 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
1626
1627         * sysdeps/pthread/pthread.h
1628         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
1629         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1630         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1631         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
1632         [BZ #375]
1633
1634 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
1635
1636         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1637         PSEUDO to be used with . prefix.
1638
1639         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1640         Use atomic_increment instead of atomic_exchange_and_add.
1641         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1642         Likewise.
1643         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1644         Likewise.
1645         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1646         Likewise.
1647
1648         * allocatestack.c (allocate_stack): Use atomic_increment_val
1649         instead of atomic_exchange_and_add.
1650         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1651         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1652         Likewise.
1653         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1654         Likewise.
1655
1656         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1657         the initialization function might throw.
1658
1659 2005-09-05  Richard Henderson  <rth@redhat.com>
1660
1661         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1662         Move definition inside libpthread, libc, librt check.  Provide
1663         definition for rtld.
1664
1665 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
1666
1667         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1668         * sysdeps/i386/jmpbuf-unwind.h: Likewise
1669         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1670         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1671         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1672         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1673         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1674         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1675         * unwind.c: Use it.
1676
1677         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1678         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1679         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1680         Likewise.
1681         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1682         Decrement __nwaiters.  If pthread_cond_destroy has been called and
1683         this is the last waiter, signal pthread_cond_destroy caller and
1684         avoid using the pthread_cond_t structure after unlock.
1685         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1686         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1687         Read clock type from the least significant bits of __nwaiters instead
1688         of __clock.
1689         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1690         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1691
1692 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
1693
1694         [BZ #342]
1695         * Makefile (tests): Add tst-cond20 and tst-cond21.
1696         * tst-cond20.c: New test.
1697         * tst-cond21.c: New test.
1698         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1699         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1700         it unsigned int.
1701         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1702         Likewise.
1703         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1704         (pthread_cond_t): Likewise.
1705         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1706         Likewise.
1707         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1708         Likewise.
1709         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1710         Likewise.
1711         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1712         (cond_nwaiters): New.
1713         (clock_bits): New.
1714         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1715         if there are waiters not signalled yet.
1716         Wait until all already signalled waiters wake up.
1717         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1718         __nwaiters.  If pthread_cond_destroy has been called and this is the
1719         last waiter, signal pthread_cond_destroy caller and avoid using
1720         the pthread_cond_t structure after unlock.
1721         (__pthread_cond_wait): Increment __nwaiters in the beginning,
1722         decrement it when leaving.  If pthread_cond_destroy has been called
1723         and this is the last waiter, signal pthread_cond_destroy caller.
1724         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1725         Likewise.  Read clock type from the least significant bits of
1726         __nwaiters instead of __clock.
1727         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1728         whether clock ID can be encoded in COND_CLOCK_BITS bits.
1729         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1730         clock type just from the last COND_CLOCK_BITS bits of value.
1731         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1732         instead of __clock, just from second bit of condattr's value.
1733
1734 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
1735
1736         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1737         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
1738         != 64.
1739         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1740
1741 2004-08-15  Roland McGrath  <roland@frob.com>
1742
1743         * pthread_atfork.c: Update copyright terms including special exception
1744         for these trivial files, which are statically linked into executables
1745         that use dynamic linking for the significant library code.
1746
1747 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
1748
1749         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1750         pthread_rwlock_rdlock.
1751         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1752         Decrease __nr_readers_queued after reacquiring lock.
1753         * sysdeps/pthread/pthread_rwlock_timedrdlock
1754         (pthread_rwlock_timedrdlock): Likewise.
1755         Reported by Bob Cook <bobcook47@hotmail.com>.
1756
1757 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
1758
1759         * tst-rwlock14.c (tf): Read main thread handle from *ARG
1760         before pthread_barrier_wait.
1761
1762 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
1763
1764         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1765         Remove unnecessary exception handling data.
1766
1767 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
1768
1769         [BZ #284]
1770         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1771         instead of clockid_t.
1772
1773 2004-07-21  Roland McGrath  <roland@redhat.com>
1774
1775         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1776
1777 2004-07-19  Roland McGrath  <roland@redhat.com>
1778
1779         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1780
1781 2004-07-02  Roland McGrath  <roland@redhat.com>
1782
1783         * configure: Don't exit.
1784
1785 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1786
1787         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1788         (__pthread_cond_timedwait): Check for invalid nanosecond in
1789         timeout value.
1790
1791 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
1792
1793         * Makefile: Add rules to build and run tst-fini1.
1794         * tst-fini1.c: New file.
1795         * tst-fini1mod.c: New file.
1796
1797 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
1798
1799         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
1800         if no cancellation support is needed.
1801         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1802         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1803         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1804         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1805         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1806         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1807         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1808         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1809         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1810
1811         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
1812         only if not already defined.
1813
1814 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
1815
1816         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
1817         constraint "m" instead of "0" for futex.
1818
1819         * shlib-versions: Add powerpc64-.*-linux.*.
1820
1821 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
1822
1823         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1824         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
1825         for valid tv_nsec.
1826         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
1827         1 billion and 64-bit tv_nsec which is valid when truncated to 32
1828         bits.
1829
1830 2004-06-29  Roland McGrath  <roland@redhat.com>
1831
1832         * Banner: NPTL no longer has its own version number.
1833         * Makefile (nptl-version): Variable removed.
1834         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
1835         using $(version), the glibc version number.
1836
1837 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1838
1839         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1840         Fix branch offset for a PLT entry.
1841         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1842         Likewise.
1843         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1844         Likewise.
1845         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1846         Likewise.
1847         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
1848         Likewise.
1849
1850 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
1851
1852         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
1853         unconditionally.
1854
1855 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
1856
1857         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1858         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
1859         instead of tv_sec.
1860         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1861         (pthread_rwlock_timedrdlock): Likewise.
1862
1863 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
1864
1865         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1866         Set __r7 to val, not mutex.
1867
1868 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
1869
1870         * Makefile: Add rules to build tst-rwlock14.
1871         * tst-rwlock14.c: New file.
1872
1873 2004-06-24  Boris Hu  <boris.hu@intel.com>
1874
1875         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
1876         check.
1877         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1878
1879 2004-06-19  Andreas Jaeger  <aj@suse.de>
1880
1881         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
1882         assembler in last patch.
1883
1884 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
1885
1886         * sysdeps/pthread/pthread_cond_timedwait.c
1887         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
1888         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1889         (__pthread_cond_timedwait): Check for invalid nanosecond in
1890         timeout value.
1891         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1892         * tst-cond19.c: New file.
1893         * Makefile: Add rules to build and run tst-cond19.
1894
1895 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
1896
1897         * tst-context1.c (GUARD_PATTERN): Defined.
1898         (tst_context_t): Define struct containing ucontext_t & guard words.
1899         (ctx): Declare as an array of tst_context_t.
1900         (fct): Verify uc_link & guard words are still valid.
1901         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
1902
1903 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1904
1905         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1906         Add __data.__futex field, reshuffle __data.__clock.
1907         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1908         (__pthread_cond_signal): Increment __futex at the same time as
1909         __wakeup_seq or __total_seq.  Pass address of __futex instead of
1910         address of low 32-bits of __wakeup_seq to futex syscall.
1911         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1912         (__pthread_cond_wait): Likewise.  Pass __futex value from before
1913         releasing internal lock to FUTEX_WAIT.
1914         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1915         (__pthread_cond_timedwait): Likewise.
1916         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1917         (FUTEX_CMP_REQUEUE): Define.
1918         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1919         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1920         Pass __futex value from before the unlock and __futex address instead
1921         of address of low 32-bits of __wakeup_seq to futex syscall.
1922         Fallback to FUTEX_WAKE all on any errors.
1923
1924 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
1925
1926         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
1927         comment typo.
1928         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
1929         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
1930         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
1931         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
1932         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
1933
1934 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1935
1936         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
1937         Add memory clobber to inline assembly.
1938         (__lll_mutex_trylock): Likewise.
1939         (__lll_mutex_cond_trylock): Likewise.
1940
1941 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1942
1943         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1944         Pass val argument as 6th system call argument in %r7.
1945
1946 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
1947
1948         * Makefile (tests): Add tst-cond16.
1949         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
1950         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
1951         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1952         Add __data.__futex field, reshuffle __data.__clock.
1953         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
1954         (__pthread_cond_signal): Increment __futex at the same time as
1955         __wakeup_seq or __total_seq.  Pass address of __futex instead of
1956         address of low 32-bits of __wakeup_seq to futex syscall.
1957         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
1958         (__pthread_cond_wait): Likewise.  Pass __futex value from before
1959         releasing internal lock to FUTEX_WAIT.
1960         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
1961         (__pthread_cond_timedwait): Likewise.
1962         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
1963         (FUTEX_CMP_REQUEUE): Define.
1964         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1965         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1966         Pass __futex value from before the unlock and __futex address instead
1967         of address of low 32-bits of __wakeup_seq to futex syscall.
1968         Fallback to FUTEX_WAKE all on any errors.
1969         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
1970         Define.
1971         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1972         internally.  Return non-zero if error, zero if success.
1973         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1974         Add __data.__futex field, reshuffle __data.__clock.
1975         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
1976         Define.
1977         (lll_futex_requeue): Add val argument, return 1 unconditionally
1978         for the time being.
1979         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1980         Add __data.__futex field, reshuffle __data.__clock.
1981         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1982         Define.
1983         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1984         internally.  Return non-zero if error, zero if success.
1985         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1986         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
1987         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1988         Define.
1989         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1990         internally.  Return non-zero if error, zero if success.
1991         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1992         Add __data.__futex field, reshuffle __data.__clock.
1993         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
1994         Define.
1995         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1996         internally.  Return non-zero if error, zero if success.
1997         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1998         Add __data.__futex field, reshuffle __data.__clock.
1999         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2000         Add __data.__futex field, reshuffle __data.__clock.
2001         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2002         Increment __futex at the same time as __wakeup_seq or __total_seq.
2003         Pass address of __futex instead of address of low 32-bits of
2004         __wakeup_seq to futex syscall.
2005         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2006         Pass __futex value from before releasing internal lock
2007         to FUTEX_WAIT.
2008         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2009         Likewise.  Avoid unnecessary shadowing of variables.
2010         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2011         Set __futex to 2 * __total_seq.  Pass __futex value from before the
2012         unlock and __futex address instead of address of low 32-bits of
2013         __wakeup_seq to futex_requeue macro, adjust for new return value
2014         meaning.
2015         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2016         (__pthread_cond_signal): Increment __futex at the same time as
2017         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2018         address of low 32-bits of __wakeup_seq to futex syscall.
2019         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2020         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2021         releasing internal lock to FUTEX_WAIT.
2022         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2023         (__pthread_cond_timedwait): Likewise.
2024         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2025         (FUTEX_CMP_REQUEUE): Define.
2026         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2027         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2028         Pass __futex value from before the unlock and __futex address instead
2029         of address of low 32-bits of __wakeup_seq to futex syscall.
2030         Fallback to FUTEX_WAKE all on any errors.
2031
2032 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2033
2034         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2035         Add nop to align the end of critical section.
2036         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2037
2038 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2039
2040         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2041         Add __broadcast_seq field.
2042         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2043         all waiters as woken with woken_seq and bump broadcast counter.
2044         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2045         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
2046         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2047         Comment typo fixes.  Avoid returning -ETIMEDOUT.
2048
2049 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
2050
2051         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2052         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2053         Reported by Kaz Kojima.
2054
2055 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
2056
2057         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2058
2059 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2060
2061         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2062         __broadcast_seq with bc_seq after acquiring internal lock instead of
2063         before it.
2064
2065 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
2066
2067         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2068         compilation.
2069         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2070         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2071         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2072         (pthread_cond_t): Add __data.__broadcast_seq field.
2073         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2074         (FRAME_SIZE): Define.
2075         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
2076         Comment typo fixes.
2077         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2078         Define.
2079         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
2080         typo fixes.
2081         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2082         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
2083         fixes.
2084
2085 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
2086
2087         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2088         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2089         Add __broadcast_seq field.
2090         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2091         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2092         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2093         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2094         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2095         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2096         all waiters as woken with woken_seq and bump broadcast counter.
2097         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2098         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2099         __broadcast_seq field.
2100         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2101         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2102         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2103         * pthread_cond_init.c: Initialize __broadcast_seq field.
2104         * Makefile (tests): Add tst-cond17 and tst-cond18.
2105         Add .NOTPARALLEL goal.
2106         * tst-cond16.c: New file.  From Jakub.
2107         * tst-cond17.c: New file.  From Jakub.
2108         * tst-cond18.c: New file.  From Jakub.
2109
2110 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
2111
2112         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2113         unwind info.
2114
2115         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2116         Parametrize frame size.  Correct some unwind info.
2117         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2118
2119 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2120
2121         * tst-stack3.c: Note testing functionality beyond POSIX.
2122
2123 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2124
2125         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2126         Change conditional from ifdef to if.
2127
2128 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
2129
2130         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2131         SYSDEP_CANCEL_ERROR): Define.
2132         (PSEUDO): Use it.
2133
2134 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
2135
2136         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2137
2138 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
2139
2140         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2141
2142 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2143
2144         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2145         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2146         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2147         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2148
2149 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
2150
2151         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2152         thread has all signals blocked.
2153
2154 2004-04-18  Andreas Jaeger  <aj@suse.de>
2155
2156         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2157         (SEM_VALUE_MAX): Add missing brace.
2158
2159 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2160
2161         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2162         in rt subdir.
2163         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2164         * sysdeps/pthread/tst-mqueue8x.c: New test.
2165         * tst-cancel4.c: Update comment about message queues.
2166
2167         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2168         return it_value { 0, 0 }.
2169         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2170         like SIGEV_SIGNAL.
2171         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2172         assertion for SIGEV_NONE.
2173         (thread_attr_compare): Compare all attributes, not just a partial
2174         subset.
2175
2176 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2177
2178         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2179
2180 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
2181
2182         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2183         Just use a plain number.
2184         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2185         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2186         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2187         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2188         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2189         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2190         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2191
2192 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2193
2194         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2195         frame info.
2196         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2197
2198 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
2199
2200         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2201         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2202         of calling sigwaitinfo.
2203
2204 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
2205
2206         * allocatestack.c (allocate_stack): Set reported_guardsize
2207         unconditionally.
2208         * pthread_getattr_np.c (pthread_getattr_np): Use
2209         reported_guardsize instead of guardsize.
2210         * descr.h (struct pthread): Add reported_guardsize field.
2211
2212 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
2213
2214         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2215
2216 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
2217
2218         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2219
2220 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
2221
2222         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2223         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2224         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2225         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2226         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2227         Define.
2228         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2229         (_POSIX_MESSAGE_PASSING): Define.
2230         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2231         (_POSIX_MESSAGE_PASSING): Define.
2232         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2233         (_POSIX_MESSAGE_PASSING): Define.
2234
2235 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
2236
2237         * tst-context1.c (fct): Check whether correct stack is used.
2238
2239 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
2240
2241         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2242         matching constraints for asm mem parameters.
2243
2244         * tst-clock2.c (tf): Don't define unless needed.
2245
2246 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
2247
2248         * Makefile (link-libc-static): Use $(static-gnulib) instead of
2249         $(gnulib).
2250
2251 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
2252
2253         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2254         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2255         * pthreadP.h: Declare __nptl_deallocate_tsd.
2256         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2257         Adjust caller.
2258
2259         * Makefile (tests): Add tst-tsd5.
2260         * tst-tsd5.c: New file.
2261
2262 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
2263
2264         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2265         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2266         is SHLIB_COMPAT check.
2267         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2268         (__pthread_attr_getaffinity_old): Likewise.
2269         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2270         (__pthread_getaffinity_old): Likewise.
2271         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2272         (__pthread_setaffinity_old): Likewise.
2273
2274 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
2275
2276         * allocatestack.c (_make_stacks_executable): Call
2277         _dl_make_stack_executable first.
2278
2279 2004-03-24  Roland McGrath  <roland@redhat.com>
2280
2281         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2282         constraint instead of "0".
2283
2284 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
2285
2286         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2287         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2288
2289         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2290         code to avoid warning.
2291
2292 2004-03-24  Andreas Jaeger  <aj@suse.de>
2293
2294         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2295         (__pthread_attr_setaffinity_old): Remove const.
2296
2297 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
2298
2299         * sysdeps/unix/sysv/linux/smp.h: New file.
2300         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2301         * init.c: Define __is_smp.
2302         (__pthread_initialize_minimal_internal): Call is_smp_system to
2303         initialize __is_smp.
2304         * pthreadP.h: Declare __is_smp.
2305         Define MAX_ADAPTIVE_COUNT is necessary.
2306         * pthread_mutex_init.c: Add comment regarding __spins field.
2307         * pthread_mutex_lock.c: Implement adaptive mutex type.
2308         * pthread_mutex_timedlock.c: Likewise.
2309         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2310         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2311         Add __spins field.
2312         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2313         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2314         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2315         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2316         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2317         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2318         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2319         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2320         lll_mutex_cond_trylock.
2321         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2322         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2323         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2324         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2325         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2326         Define BUSY_WAIT_NOP.
2327         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2328         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2329
2330         * tst-mutex5.c: Add support for testing adaptive mutexes.
2331         * tst-mutex7.c: Likewise.
2332         * tst-mutex5a.c: New file.
2333         * tst-mutex7a.c: New file.
2334         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2335
2336         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2337         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2338         vgettimeofday call might destroy the content.
2339
2340         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2341         @pause in the loop.
2342
2343         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2344         No need to restrict type of ret.  Make it int.  Add comment.
2345
2346         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2347         Remove unnecessary setne instruction.
2348
2349 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
2350
2351         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2352         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2353         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2354         If realloc fails, break out of the loop.
2355
2356 2004-03-20  Andreas Jaeger  <aj@suse.de>
2357
2358         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2359         (__pthread_setaffinity_old): Fix interface.
2360         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2361         (__pthread_getaffinity_old): Likewise.
2362
2363         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2364         (__pthread_setaffinity_new): Remove duplicate declaration.
2365
2366 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2367
2368         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2369         the return value to a safe register.
2370         (CDISABLE): Set the function argument correctly.
2371
2372 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2373
2374         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2375         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2376         Rewrite so that only one locked memory operation per round is needed.
2377         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2378         (pthread_barrier_wait): After wakeup, release lock only when the
2379         last thread stopped using the barrier object.
2380         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2381         (__pthread_cond_wait): Don't store mutex address if the current
2382         value is ~0l.  Add correct cleanup support and unwind info.
2383         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2384         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2385         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2386         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2387         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2388         Add correct cleanup support and unwind info.
2389         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2390         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2391         information for syscall wrappers.
2392
2393 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
2394
2395         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2396         cpusetsize field, remove next.
2397         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2398         parameter for size of the CPU set.
2399         (pthread_setaffinity_np): Likewise.
2400         (pthread_attr_getaffinity_np): Likewise.
2401         (pthread_attr_setaffinity_np): Likewise.
2402         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2403         interface change, keep compatibility code.
2404         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2405         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2406         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2407         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
2408         __pthread_getaffinity_np.
2409         * Versions: Add version for changed interfaces.
2410         * tst-attr3.c: Adjust test for interface change.
2411         * pthread_getattr_np.c: Query the kernel about the affinity mask with
2412         increasing buffer sizes.
2413         * pthread_attr_destroy.c: Remove unused list handling.
2414         * pthread_attr_init.c: Likewise.
2415
2416 2004-03-17  Roland McGrath  <roland@redhat.com>
2417
2418         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2419         first argument to clock_getres so we ever enable kernel timers.
2420
2421 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
2422
2423         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2424
2425 2004-03-12  Richard Henderson  <rth@redhat.com>
2426
2427         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2428         oldvalue from CENABLE to CDISABLE.
2429
2430 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
2431
2432         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2433         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2434         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2435         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2436
2437 2004-03-11  Richard Henderson  <rth@redhat.com>
2438
2439         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2440         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2441         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2442
2443 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2444
2445         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2446         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2447         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2448
2449 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2450
2451         * forward.c (__pthread_cond_broadcast_2_0,
2452         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2453         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2454         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2455
2456 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2457
2458         * sysdeps/sh/tcb-offsets.sym: Add PID.
2459         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2460         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2461
2462 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
2463
2464         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2465         include <sysdep-cancel.h>, vfork is no cancellation point.
2466         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2467         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2468         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2469
2470 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
2471
2472         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2473         libc_hidden_def.
2474         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2475         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2476         Likewise.
2477         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2478         Likewise.
2479         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2480         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2481         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2482         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2483         of DO_CALL_VIA_BREAK.  Work around a gas problem.
2484
2485         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2486         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2487         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2488         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2489         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2490         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2491
2492         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2493         a local register for saving old PID.  Negate PID in parent upon exit.
2494
2495         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2496         tcb-offsets.h.
2497         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2498         before syscall, set to the old value in the parent afterwards.
2499         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2500         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2501         tcb-offsets.h.
2502         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2503         before syscall, set to the old value in the parent afterwards.
2504         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2505         * sysdeps/s390/tcb-offsets.sym: Add PID.
2506
2507         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2508         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2509         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2510         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2511         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2512         * sysdeps/sparc/tcb-offsets.sym: Add PID.
2513
2514 2004-03-10  Andreas Schwab  <schwab@suse.de>
2515
2516         * sysdeps/ia64/tcb-offsets.sym: Add PID.
2517         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2518         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2519
2520 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
2521
2522         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2523         * tst-cancel21.c (do_one_test): Likewise.
2524         Reported by Gordon Jin <gordon.jin@intel.com>.
2525
2526 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
2527
2528         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2529         if non-zero and set to INT_MIN if zero.
2530         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2531         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2532         (SAVE_PID, RESTORE_PID): Define.
2533         (__vfork): Use it.
2534         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2535         Use relative path to avoid including NPTL i386/vfork.S.
2536         (SAVE_PID, RESTORE_PID): Define.
2537         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2538         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2539         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2540         tst-vfork2x.
2541         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2542         * tst-vfork1.c: New test.
2543         * tst-vfork2.c: New test.
2544         * tst-vfork1x.c: New test.
2545         * tst-vfork2x.c: New test.
2546
2547 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
2548
2549         * sysdeps/i386/tcb-offsets.sym: Add PID.
2550         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2551         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2552         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2553
2554 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
2555
2556         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2557
2558 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
2559
2560         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2561         _rtld_global_ro.
2562
2563 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
2564
2565         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2566         _rtld_global_ro.
2567
2568         * tst-once4.c: Remove unnecessary macro definition.
2569
2570         * tst-mutex7.c (do_test): Limit thread stack size.
2571         * tst-once2.c (do_test): Likewise.
2572         * tst-tls3.c (do_test): Likewise.
2573         * tst-tls1.c (do_test): Likewise.
2574         * tst-signal3.c (do_test): Likewise.
2575         * tst-kill6.c (do_test): Likewise.
2576         * tst-key4.c (do_test): Likewise.
2577         * tst-join4.c (do_test): Likewise.
2578         * tst-fork1.c (do_test): Likewise.
2579         * tst-context1.c (do_test): Likewise.
2580         * tst-cond2.c (do_test): Likewise.
2581         * tst-cond10.c (do_test): Likewise.
2582         * tst-clock2.c (do_test): Likewise.
2583         * tst-cancel10.c (do_test): Likewise.
2584         * tst-basic2.c (do_test): Likewise.
2585         * tst-barrier4.c (do_test): Likewise.
2586
2587 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
2588
2589         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2590
2591 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
2592
2593         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2594         (__pthread_cond_timedwait): Optimize wakeup test.
2595         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2596         (__pthread_cond_wait): Likewise.
2597         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2598         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2599         Likewise.
2600
2601 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
2602
2603         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2604         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
2605         the atomic instruction needed.
2606         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2607         (__lll_mutex_lock_wait): Likewise.
2608
2609 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
2610
2611         * Makefile (tests): Add tst-cond14 and tst-cond15.
2612         * tst-cond14.c: New file.
2613         * tst-cond15.c: New file.
2614
2615 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
2616
2617         * sysdeps/pthread/createthread.c (create_thread): Remove use of
2618         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
2619         needs to be implemented differently to be useful.
2620
2621 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
2622
2623         * pthread_attr_setschedparam.c: Don't test priority against limits
2624         here.  Set ATTR_FLAG_SCHED_SET flag.
2625         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
2626         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
2627         from parent thread to child.  If attribute is used and scheduling
2628         parameters are not inherited, copy parameters from attribute or
2629         compute them.  Check priority value.
2630         * pthread_getschedparam.c: If the parameters aren't known yet get
2631         them from the kernel.
2632         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
2633         ATTR_FLAG_POLICY_SET flag for thread.
2634         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
2635         and ATTR_FLAG_POLICY_SET.
2636
2637         * sysdeps/pthread/createthread.c: Use tgkill if possible.
2638
2639         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2640         fail if stack address hasn't been set.  Just return 0.
2641
2642 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
2643
2644         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
2645         libpthread for the files in this list.
2646         (CFLAGS-tst-unload): Removed.
2647         * tst-unload.c (do_test): Don't use complete path for
2648         LIBPHREAD_SO.
2649
2650         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2651         tst-_res1mod2.
2652
2653 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
2654
2655         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2656         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2657         operation per round is needed.
2658         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2659         (__lll_mutex_lock_wait): Likewise.
2660
2661 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
2662
2663         * tst-cancel9.c (cleanup): Don't print to stderr.
2664
2665 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2666
2667         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2668
2669 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
2670
2671         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2672         (__syscall_error_handler2): Call CDISABLE.
2673         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2674         (__syscall_error_handler2): Call CDISABLE.
2675
2676         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2677         Release lock before the loop, don't reacquire it.
2678
2679         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2680
2681 2004-02-19  Andreas Schwab  <schwab@suse.de>
2682
2683         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2684         Fix last change.
2685
2686 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
2687
2688         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2689         (pthread_barrier_wait): After wakeup, release lock only when the
2690         last thread stopped using the barrier object.
2691         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2692         (pthread_barrier_wait): Likewise.
2693         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2694         Likewise.
2695         * Makefile (tests): Add tst-barrier4.
2696         * tst-barrier4.c: New file.
2697
2698         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2699         (__pthread_cond_timedwait): Perform timeout test while holding
2700         internal lock to prevent wakeup race.
2701         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2702         * sysdeps/pthread/pthread_cond_timedwait.c
2703         (__pthread_cond_timedwait): Likewise.
2704         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2705         (__pthread_cond_timedwait): Likewise.
2706
2707 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
2708
2709         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2710         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2711         * Makefile (tests): Add tst-rwlock13.
2712         * tst-rwlock13.c: New test.
2713
2714 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
2715
2716         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2717         (__condvar_tw_cleanup): Little optimization.
2718         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2719
2720 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
2721
2722         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2723         libpthread as "lib" parameter to SHLIB_COMPAT.
2724         (__novmx_siglongjmp): Fix typo in function name.
2725         (__novmx_longjmp): Fix typo in function name.
2726
2727 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2728
2729         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2730         __builtin_expect.
2731
2732         * sysdeps/generic/pt-longjmp.c: Moved to...
2733         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
2734
2735 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
2736
2737         * Makefile (libpthread-routines): Add pt-cleanup.
2738         * pt-longjmp.c: Removed.
2739         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2740         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2741         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2742         Version longjmp, siglongjmp for GLIBC_2.3.4.
2743         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2744
2745 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2746
2747         * sysdeps/pthread/pthread_cond_timedwait.c
2748         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
2749         Reuse code.  Add __builtin_expects.
2750
2751         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2752         (__pthread_cond_timedwait): Get internal lock in case timeout has
2753         passed before the futex syscall.
2754         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2755
2756 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
2757
2758         * allocatestack.c: Pretty printing.
2759
2760         * sysdeps/pthread/createthread.c (create_thread): Don't add
2761         CLONE_DETACHED bit if it is not necessary.
2762
2763 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
2764
2765         * pthread_getattr_np.c: Include ldsodefs.h.
2766
2767 2004-01-16  Richard Henderson  <rth@redhat.com>
2768
2769         * allocatestack.c: Don't declare __libc_stack_end.
2770         * init.c (__pthread_initialize_minimal_internal): Likewise.
2771         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
2772
2773 2004-01-15  Richard Henderson  <rth@redhat.com>
2774
2775         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2776         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2777         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2778         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2779         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2780         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2781         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2782         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
2783
2784 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
2785
2786         * init.c (pthread_functions): Make array const.
2787
2788 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
2789
2790         * allocatestack.c (__make_stacks_executable): Change interface.
2791         Check parameters.  Pass parameter on to libc counterpart.
2792         * pthreadP.h: Change declaration.
2793
2794 2004-01-13  Richard Henderson  <rth@redhat.com>
2795
2796         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
2797         prototype form.
2798         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
2799         Likewise.
2800
2801         * sysdeps/alpha/Makefile: New file.
2802         * sysdeps/alpha/tcb-offsets.sym: New file.
2803         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2804         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
2805
2806         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
2807         on powerpc version.
2808
2809 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
2810
2811         * Makefile (tests): Add tst-backtrace1.
2812         * tst-backtrace1.c: New test.
2813
2814 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
2815
2816         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
2817         register as second parameter to the REGISTER macro.
2818         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
2819         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
2820         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
2821         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
2822         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
2823         of thread register as second parameter to REGISTER macro in 64 case.
2824
2825 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
2826
2827         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
2828         (CFLAGS-getpid.o): Defined.
2829         (CFLAGS-getpid.os): Defined.
2830
2831 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
2832
2833         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
2834         returned for main thread does not overlap with any other VMA.
2835         Patch by Jakub Jelinek.
2836
2837 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
2838
2839         * tst-raise1.c: Include stdio.h.
2840
2841 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
2842
2843         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
2844         setting with __ASSUME_TGKILL || defined __NR_tgkill.
2845         If pid is 0, set it to selftid.
2846         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
2847         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
2848         != 0, return self->tid without doing a syscall.
2849         * descr.h (struct pthread): Move pid field after tid.
2850
2851         * Makefile (tests): Add tst-raise1.
2852         * tst-raise1.c: New file.
2853
2854 2003-12-23  Roland McGrath  <roland@redhat.com>
2855
2856         * tst-oddstacklimit.c: New file.
2857         * Makefile (tests): Add it.
2858         (tst-oddstacklimit-ENV): New variable.
2859
2860         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
2861         value up to page size for __default_stacksize.
2862
2863 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
2864
2865         * Makefile (tests): Add tst-eintr5.
2866         * tst-eintr5.c: New file.
2867
2868         * eintr.c (eintr_source): Prevent sending signal to self.
2869
2870         * tst-eintr2.c (tf1): Improve error message.
2871
2872 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
2873
2874         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
2875         * sysdeps/unix/sysv/linux/getpid.c: New file.
2876         * pthread_cancel.c: Add comment explaining use of PID field.
2877         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2878         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
2879         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
2880         temporarily to signal the field must not be relied on and updated
2881         by getpid().
2882         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
2883         temporarily negative.
2884         * sysdeps/unix/sysv/linux/raise.c: Likewise.
2885
2886 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
2887
2888         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
2889         (eintr_source): If ARG != NULL, use pthread_kill.
2890         * tst-eintr1.c: Adjust for this change.
2891         * tst-eintr2.c: Likewise.
2892         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
2893         * tst-eintr3.c: New file.
2894         * tst-eintr4.c: New file.
2895
2896 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
2897
2898         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
2899         if CANCELSTATE_BITMASK is set.
2900         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
2901         Likewise.
2902
2903         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
2904         (tests-reverse): Add tst-cancel23.
2905         * tst-cancel22.c: New test.
2906         * tst-cancel23.c: New test.
2907
2908 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
2909
2910         * tst-eintr1.c: Better error messages.
2911
2912         * Makefile (tests): Add tst-eintr2.
2913         * tst-eintr2.c: New file.
2914
2915 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
2916
2917         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
2918         (CFLAGS-tst-cancelx21.c): Set.
2919         * tst-cancel21.c: New test.
2920         * tst-cancelx21.c: New test.
2921
2922         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
2923         comparison operand.
2924         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
2925         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
2926         * pt-longjmp.c: Include jmpbuf-unwind.h.
2927         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
2928         _JMPBUF_UNWINDS.  Adjust compared pointers.
2929         * init.c (__pthread_initialize_minimal_internal): Initialize
2930         pd->stackblock_size.
2931         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
2932         * sysdeps/alpha/jmpbuf-unwind.h: New file.
2933         * sysdeps/i386/jmpbuf-unwind.h: New file.
2934         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
2935         * sysdeps/s390/jmpbuf-unwind.h: New file.
2936         * sysdeps/sh/jmpbuf-unwind.h: New file.
2937         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
2938         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2939         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
2940         (_JMPBUF_CFA_UNWINDS): Remove.
2941         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
2942
2943 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
2944
2945         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
2946         (CFLAGS-tst-cancelx20.c): Set.
2947         * tst-cancel20.c: New test.
2948         * tst-cancelx20.c: New test.
2949
2950 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
2951
2952         * init.c (__pthread_initialize_minimal_internal): Don't treat
2953         architectures with separate register stack special here when
2954         computing default stack size.
2955
2956 2003-12-17  Roland McGrath  <roland@redhat.com>
2957
2958         * Makefile (tst-cancelx7-ARGS): New variable.
2959         Reportd by Greg Schafer <gschafer@zip.com.au>.
2960
2961 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
2962
2963         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
2964         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
2965         (tst-stack3-ENV): Set.
2966         ($(objpfx)tst-stack3-mem): New.
2967         * tst-stack3.c: New test.
2968
2969 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
2970
2971         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
2972         Add unwind directives.  Drop unused .regstk directive.
2973         (_fini_EPILOG_BEGINS): Add unwind directives.
2974
2975 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
2976
2977         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2978         Assume parameter is a pointer.
2979         (lll_futex_wake): Likewise.
2980         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
2981         Likewise.
2982         (lll_futex_wake): Likewise.
2983         Reported by Boris Hu.
2984         * sysdeps/unix/sysv/linux/unregister-atfork.c
2985         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
2986
2987         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
2988
2989 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
2990
2991         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
2992         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
2993         __rtld_lock_initialize for ld.so lock.
2994         Patch in part by Adam Li <adam.li@intel.com>.
2995
2996 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
2997
2998         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
2999         in $(gnulib).  Also, remove stale comment.
3000
3001 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
3002
3003         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3004         advantage of new syscall stub and optimize accordingly.
3005
3006         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3007         from SYS_futex, to match expectations of
3008         sysdep.h:DO_INLINE_SYSCALL.
3009         (lll_futex_clobbers): Remove.
3010         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3011         (lll_futex_wake): Likewise.
3012         (lll_futex_requeue): Likewise.
3013         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3014         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3015         Jelinek).
3016         (__lll_mutex_lock): Likewise.
3017         (__lll_mutex_cond_lock): Likewise.
3018         (__lll_mutex_timed_lock): Likewise.
3019         (__lll_mutex_unlock): Likewise.
3020         (__lll_mutex_unlock_force): Likewise.
3021
3022         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3023         comes before the include of <sysdep.h>.
3024         (THREAD_SELF_SYSINFO): New macro.
3025         (THREAD_SYSINFO): Likewise.
3026         (INIT_SYSINFO): New macro.
3027         (TLS_INIT_TP): Call INIT_SYSINFO.
3028
3029         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3030
3031         * sysdeps/pthread/createthread.c (create_thread): Use
3032         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3033         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3034         THREAD_SELF_SYSINFO instead of open code.
3035         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3036         (THREAD_SYSINFO): Likewise.
3037
3038         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3039
3040         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3041
3042 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
3043
3044         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3045         instead of .init.  Patch by David Mosberger.
3046
3047 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
3048
3049         * sysdeps/pthread/configure.in: Remove broken declaration in C
3050         cleanup handling check.
3051
3052 2003-11-30  Andreas Jaeger  <aj@suse.de>
3053
3054         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
3055         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
3056         Likewise.
3057
3058 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
3059
3060         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3061         * pthread_attr_destroy.c: Include shlib-compat.h.
3062         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3063         is set in iattr->flags.
3064         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3065
3066 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
3067
3068         * Makefile (distribute): Add tst-cleanup4aux.c.
3069
3070         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
3071         include.
3072
3073 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
3074
3075         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3076         pthread_cond_signal.
3077
3078         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3079         store mutex address if the current value is ~0l.
3080         * sysdeps/pthread/pthread_cond_timedwait.c
3081         (__pthread_cond_timedwait): Likewise.
3082         * sysdeps/pthread/pthread_cond_broadcast.c
3083         (__pthread_cond_broadcast): Don't use requeue for pshared
3084         condvars.
3085
3086         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3087         (__pthread_cond_wait): Don't store mutex address if the current
3088         value is ~0l.
3089         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3090         (__pthread_cond_timedwait): Likewise.
3091         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3092         (__pthread_cond_broadcast): Don't use requeue for pshared
3093         condvars.
3094
3095         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3096         element with ~0l for pshared condvars, with NULL otherwise.
3097
3098         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3099         (__pthread_cond_wait): Don't store mutex address if the current
3100         value is ~0l.
3101         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3102         (__pthread_cond_timedwait): Likewise.
3103         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3104         (__pthread_cond_broadcast): Don't use requeue for pshared
3105         condvars.
3106
3107         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3108         * tst-cond12.c: New file.
3109         * tst-cond13.c: New file.
3110
3111 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
3112
3113         * sysdeps/pthread/configure.in: Make missing forced unwind support
3114         fatal.
3115
3116 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
3117
3118         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3119
3120 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
3121
3122         * Makefile: Add magic to clean up correctly.
3123
3124 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
3125
3126         * unwind.c (FRAME_LEFT): Define.
3127         (unwind_stop): Handle old style cleanups here.
3128         (__pthread_unwind): Handle old style cleanups only if
3129         !HAVE_FORCED_UNWIND.
3130         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3131         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3132         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3133         ($(objpfx)tst-cleanupx4): Likewise.
3134         * tst-cleanup4.c: New test.
3135         * tst-cleanup4aux.c: New.
3136         * tst-cleanupx4.c: New test.
3137
3138 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
3139
3140         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3141         lll_mutex_*lock macros to skip atomic operations on some archs.
3142
3143 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
3144
3145         * sysdeps/pthread/tst-timer.c (main): Initialize
3146         sigev2.sigev_value as well.
3147
3148 2003-10-15  Roland McGrath  <roland@redhat.com>
3149
3150         * sysdeps/pthread/configure.in: Barf if visibility attribute support
3151         is missing.
3152         * sysdeps/pthread/configure: Regenerated.
3153
3154 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3155
3156         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3157         locking macros.  No distinction between normal and mutex locking
3158         anymore.
3159         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3160         Merge bits from lowlevelmutex.S we still need.
3161         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3162         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3163         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3164         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3165         new mutex implementation.
3166         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3167         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3168         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3169         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3170         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3171         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3172         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3173         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3174         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3175         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3176         symbol for entry point to avoid cancellation.
3177
3178 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
3179
3180         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3181         changes.
3182         (SAVE_OLDTYPE_0): Fix a typo.
3183
3184 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
3185
3186         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3187         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
3188
3189 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3190
3191         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3192         correct offset.
3193
3194 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
3195
3196         * Makefile (tests): Add tst-cancel19.
3197         * tst-cancel19.c: New test.
3198
3199 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3200
3201         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3202         restoring of the old cancellation type.
3203
3204 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
3205
3206         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3207
3208 2003-09-27  Wolfram Gloger  <wg@malloc.de>
3209
3210         * sysdeps/pthread/malloc-machine.h: New file
3211
3212 2003-09-24  Roland McGrath  <roland@redhat.com>
3213
3214         * allocatestack.c (__make_stacks_executable): Don't ignore return
3215         value from _dl_make_stack_executable.
3216
3217 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
3218
3219         * allocatestack.c (__make_stacks_executable): Also change
3220         permission of the currently unused stacks.
3221
3222         * allocatestack.c (change_stack_perm): Split out from
3223         __make_stacks_executable.
3224         (allocate_stack): If the required permission changed between the time
3225         we started preparing the stack and queueing it, change the permission.
3226         (__make_stacks_executable): Call change_stack_perm.
3227
3228         * Makefile: Build tst-execstack-mod locally.
3229         * tst-execstack-mod.c: New file.
3230
3231 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
3232
3233         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3234
3235 2003-09-23  Roland McGrath  <roland@redhat.com>
3236
3237         * tst-execstack.c: New file.
3238         * Makefile (tests): Add it.
3239         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3240         (LDFLAGS-tst-execstack): New variable.
3241
3242         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3243         whether to use PROT_EXEC for stack mmap.
3244         (__make_stacks_executable): New function.
3245         * pthreadP.h: Declare it.
3246         * init.c (__pthread_initialize_minimal_internal): Set
3247         GL(dl_make_stack_executable_hook) to that.
3248
3249 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3250
3251         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3252         recommendation from AMD re avoidance of lock prefix.
3253
3254 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
3255
3256         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3257         lll_futex_timed_wait instead of lll_futex_wait.
3258         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3259         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3260         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3261         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3262         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3263         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3264         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3265         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3266         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3267         Completely revamp the locking macros.  No distinction between
3268         normal and mutex locking anymore.
3269         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3270         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3271         __lll_lock_timedwait): Fix prototypes.
3272         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3273         __lll_lock_timedwait): Likewise.
3274         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3275         macros, add __builtin_expect.
3276         (lll_mutex_timedlock): Likewise.  Fix return value.
3277         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3278         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3279         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3280         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3281         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3282         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3283         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3284         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3285
3286 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3287
3288         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3289         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3290         operation if possible.
3291
3292         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3293         like jumping over the lock prefix.
3294
3295 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
3296
3297         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3298         locking macros.  No distinction between normal and mutex locking
3299         anymore.
3300         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3301         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3302         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3303         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3304         locking.  Merge bits from lowlevelmutex.S we still need.
3305         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3306         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3307         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3308         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3309         * Makefile (routines): Remove libc-lowlevelmutex.
3310         (libpthread-rountines): Remove lowlevelmutex.
3311         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3312         for new mutex implementation.
3313         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3314         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3315         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3316         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3317         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3318         Likewise.
3319         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3320         Likewise.
3321         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3322         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3323         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3324         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3325         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3326         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3327         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3328         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3329         Likewise.
3330         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3331         Likewise.
3332         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3333         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3334         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3335         Don't use requeue.
3336         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3337         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3338
3339 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
3340
3341         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3342         in parameters of asm with output parameters.
3343
3344         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3345         type of DECR parameter to int.
3346         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3347
3348 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
3349
3350         * tst-attr3.c (tf, do_test): Print stack start/end/size and
3351         guardsize for each thread.
3352
3353 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3354
3355         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3356         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3357         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3358
3359         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3360         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3361         NULL.
3362         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3363         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3364         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3365         (pthread_getaffinity_np): Add hidden_def.
3366
3367         * Makefile (tests): Add tst-attr3.
3368         * tst-attr3.c: New test.
3369
3370         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3371
3372 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3373
3374         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3375         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3376
3377 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3378
3379         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3380         * tst-align.c: Include tst-stack-align.h.
3381         (tf, do_test): Use TEST_STACK_ALIGN macro.
3382
3383 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
3384
3385         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3386         variable.
3387
3388 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
3389
3390         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3391         stack-related values for the initial thread.
3392
3393 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3394
3395         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3396
3397 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
3398
3399         * pthread_mutex_lock.c: Minor code rearrangements.
3400
3401 2003-09-05  Roland McGrath  <roland@redhat.com>
3402
3403         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3404         Instead, include ../nptl_db/db_info.c to do its magic.
3405         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3406         (__pthread_pthread_key_2ndlevel_size): Likewise.
3407         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3408         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3409         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3410         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3411         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3412         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3413         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3414         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3415         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3416         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3417         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3418         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3419         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3420         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3421         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3422         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3423         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3424
3425 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
3426
3427         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3428         of pthread_t to be compatible with LT.
3429         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3430         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3431         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3432         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3433         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3434         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3435         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3436
3437 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
3438
3439         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3440
3441 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
3442
3443         * unwind-forcedunwind.c: Move to...
3444         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3445         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3446         * sysdeps/pthread/jmpbuf-unwind.h: New file.
3447         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3448         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3449         * unwind.c: Include jmpbuf-unwind.h.
3450         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3451
3452 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
3453
3454         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3455         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3456         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3457         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3458         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3459         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3460         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3461         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3462         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3463         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3464         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3465         function.
3466         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3467         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3468         * Makefile (tests): Add tst-stack2.
3469         * tst-stack2.c: New test.
3470         * tst-stack1.c: Include limits.h and sys/param.h.
3471         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3472
3473         * pthread_condattr_setpshared.c: Include errno.h.
3474         (pthread_condattr_setpshared): Return EINVAL if pshared
3475         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3476
3477         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3478         defined symbol for entry point to avoid cancellation.
3479         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3480         Likewise.
3481         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3482         Likewise.
3483         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3484         Likewise.
3485         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3486         Likewise.
3487         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3488         Likewise.
3489         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3490         __close_nocancel, __read_nocancel, __write_nocancel,
3491         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
3492         libpthread.so or librt.so, define to corresponding function
3493         without _nocancel suffix.
3494         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3495         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3496         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3497
3498         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3499
3500 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
3501
3502         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3503         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3504
3505         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3506         in subsections has a symbol associated with it.
3507
3508         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3509         defined symbol for entry point to avoid cancellation.
3510         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3511
3512 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3513
3514         * Makefile (tests): Add tst-tls5.
3515         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3516         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3517         ($(objpfx)tst-tls5): New.
3518         ($(objpfx)tst-tls6.out): Likewise.
3519         (tests): Depend on $(objpfx)tst-tls6.out.
3520         * tst-tls3.c: Include stdint.h and pthreaddef.h.
3521         (do_test): Check pthread_self () return value alignment.
3522         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3523         (tf): Check pthread_self () return value alignment.
3524         * tst-tls5.c: New test.
3525         * tst-tls5.h: New.
3526         * tst-tls5mod.c: New.
3527         * tst-tls5moda.c: New.
3528         * tst-tls5modb.c: New.
3529         * tst-tls5modc.c: New.
3530         * tst-tls5modd.c: New.
3531         * tst-tls5mode.c: New.
3532         * tst-tls5modf.c: New.
3533         * tst-tls6.sh: New test.
3534
3535         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3536         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3537         * init.c (pthread_functions): Initialize them.
3538         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3539         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3540         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3541         pthread_cond_timedwait@@GLIBC_2.3.2.
3542
3543 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3544
3545         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3546         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3547         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3548         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3549         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3550         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3551
3552         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3553
3554         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3555         _POSIX_THREAD_PRIORITY_SCHEDULING.
3556         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3557
3558 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
3559
3560         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3561         nested function, use static inline function from libio.h.
3562         Code by Richard Henderson.
3563
3564         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3565         weak.
3566
3567 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
3568
3569         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3570         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3571         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3572         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3573         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3574         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3575         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3576         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3577         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3578         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3579         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3580         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3581         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3582         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3583         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3584         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3585         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3586         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3587         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3588         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3589         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3590         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3591         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3592         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3593         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3594         * sysdeps/sparc/tls.h: New file.
3595         * sysdeps/sparc/tcb-offsets.sym: New file.
3596         * sysdeps/sparc/Makefile: New file.
3597         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3598         * init.c [__sparc__] (__NR_set_tid_address): Define.
3599
3600 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
3601
3602         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3603         _IO_release_lock): Define.
3604
3605 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
3606
3607         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3608         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
3609
3610 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
3611
3612         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3613         (__pthread_cleanup_class): Add missing return types of member
3614         functions.
3615
3616 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
3617
3618         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3619         (lll_mutex_unlock_force): Add memory barrier between store and futex
3620         syscall.
3621
3622 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
3623
3624         * tst-cancel4.c (do_test): Also unlink tempfname and remove
3625         tempmsg in first loop.
3626
3627 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
3628
3629         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3630         _POSIX_THREAD_PRIORITY_SCHEDULING.
3631         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3632
3633 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3634
3635         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
3636         (__rtld_lock_default_lock_recursive,
3637         __rtld_lock_default_unlock_recursive): Define.
3638         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3639         __rtld_lock_unlock_recursive): Define using
3640         GL(_dl_rtld_*lock_recursive).
3641         * init.c (__pthread_initialize_minimal_internal): Initialize
3642         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3643         Lock GL(_dl_load_lock) the same number of times as
3644         GL(_dl_load_lock) using non-mt implementation was nested.
3645
3646         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3647         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3648
3649 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
3650
3651         * tst-cancel17.c (do_test): Make len2 maximum of page size and
3652         PIPE_BUF.
3653
3654 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3655
3656         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3657
3658 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
3659
3660         * sysdeps/pthread/createthread.c (do_clone): Move error handling
3661         to first syscall error check.  Move syscall error check for tkill
3662         into __ASSUME_CLONE_STOPPED #ifdef.
3663
3664 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
3665
3666         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3667         is not defined, do explicit synchronization.
3668         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
3669         is not defined also unlock pd->lock for non-debugging case in case
3670         it is necessary.
3671         * pthread_create.c (start_thread): Always get and release pd->lock
3672         if __ASSUME_CLONE_STOPPED is not defined.
3673         (start_thread_debug): Removed.  Adjust users.
3674         * allocatestack.c (allocate_stack): Always initialize lock if
3675         __ASSUME_CLONE_STOPPED is not defined.
3676         * Makefile (tests): Add tst-sched1.
3677         * tst-sched1.c: New file.
3678
3679         * sysdeps/pthread/createthread.c (do_clone): Only use
3680         sched_setschduler and pass correct parameters.
3681
3682 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3683
3684         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3685         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3686         PTHREAD_STACK_MIN in comments.
3687
3688 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3689
3690         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3691         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3692         argument.
3693         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3694         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3695         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3696         (__pthread_cleanup_upto): Fix prototype.
3697         (_longjmp_unwind): Adjust caller.
3698         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3699         Change second argument to const struct pointer.
3700         * tst-sem8.c (main): Remove unused s2 and s3 variables.
3701         * tst-sem9.c (main): Likewise.
3702         * unwind.c: Include string.h for strlen prototype.
3703
3704 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
3705
3706         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3707         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3708         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3709         Define HAVE_CMOV.
3710         Patch by Nicholas Miell <nmiell@attbi.com>.
3711
3712 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
3713
3714         * init.c (__pthread_initialize_minimal_internal): Initialize
3715         GL(dl_init_static_tls).
3716         * pthreadP.h (__pthread_init_static_tls): New prototype.
3717         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3718         New functions.
3719         * Makefile (tests): Add tst-tls4.
3720         (modules-names): Add tst-tls4moda and tst-tls4modb.
3721         ($(objpfx)tst-tls4): Link against libdl and libpthread.
3722         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3723         tst-tls4modb.so.
3724         * tst-tls4.c: New file.
3725         * tst-tls4moda.c: New file.
3726         * tst-tls4modb.c: New file.
3727
3728 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
3729
3730         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3731         before __timer_dealloc.
3732         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3733         Don't call list_unlink.
3734
3735 2003-07-29  Roland McGrath  <roland@redhat.com>
3736
3737         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3738
3739 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
3740
3741         * tst-cancel17.c (do_test): Check if aio_cancel failed.
3742         Don't reuse struct aiocb A if it failed.
3743         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3744         not just one byte, as that does not block.
3745
3746 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
3747
3748         * sysdeps/pthread/unwind-resume.c: New file.
3749         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3750         unwind-resume in csu subdir.
3751         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3752         exceptions.
3753         (librt-sysdep_routines, librt-shared-only-routines): Add
3754         rt-unwind-resume.
3755         * sysdeps/pthread/rt-unwind-resume.c: New file.
3756         * unwind-forcedunwind.c: New file.
3757         * Makefile (libpthread-routines): Add unwind-forcedunwind.
3758         (libpthread-shared-only-routines): Likewise.
3759         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3760         * pthreadP.h (pthread_cancel_init): New prototype.
3761         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3762
3763         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3764         attr argument const struct pthread_attr *.
3765
3766         * res.c (__res_state): Return __resp.
3767         * descr.h: Include resolv.h.
3768         (struct pthread): Add res field.
3769         * pthread_create.c: Include resolv.h.
3770         (start_thread): Initialize __resp.
3771         * Makefile (tests): Add tst-_res1.
3772         (module-names): Add tst-_res1mod1, tst-_res1mod2.
3773         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3774         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3775         libpthread.
3776         * tst-_res1.c: New file.
3777         * tst-_res1mod1.c: New file.
3778         * tst-_res1mod2.c: New file.
3779
3780 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
3781
3782         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
3783
3784         * Makefile: Define various *-no-z-defs variables for test DSOs
3785         which has undefined symbols.
3786
3787 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
3788
3789         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3790         Retry if the stwcx fails to store once_control.
3791
3792 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
3793
3794         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
3795         pthread_attr_setaffinity.
3796         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
3797         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
3798         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
3799         * pthread_attr_destroy.c: Free cpuset element if allocated.
3800         * pthread_create.c: Pass iattr as additional parameter to
3801         create_thread.
3802         * sysdeps/pthread/createthread.c: If attribute is provided and
3803         a new thread is created with affinity set or scheduling parameters,
3804         start thread with CLONE_STOPPED.
3805         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
3806         pthread_attr_setaffinity.
3807         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
3808         cpuset element.
3809
3810 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
3811
3812         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
3813
3814 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
3815
3816         * sysdeps/pthread/configure.in: Require CFI directives also for
3817         ppc and s390.
3818
3819 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
3820
3821         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3822         Add cfi directives.
3823
3824 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3825
3826         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
3827         CLEANUP_JMP_BUF.
3828         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
3829         registers as variables.  Call __pthread_mutex_unlock_usercnt.
3830         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3831         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
3832         not self pointer in __writer.  Compare with TID to determine
3833         deadlocks.
3834         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3835         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3836         Likewise.
3837         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3838         Likewise.
3839         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
3840         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
3841         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
3842         macros also when compiling librt.
3843
3844 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
3845
3846         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
3847         -fasynchronous-unwind-tables.
3848         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3849         (PSEUDO): Add cfi directives.
3850         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
3851         Likewise.
3852         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3853         Likewise.
3854
3855 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
3856
3857         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
3858         __pthread_unregister_cancel): Add prototypes and hidden_proto.
3859         * unwind.c (__pthread_unwind_next): Add hidden_def.
3860         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
3861         Likewise.
3862         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3863         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3864         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3865         Likewise.
3866         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
3867         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3868         Likewise.
3869         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
3870         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
3871         __pthread_unregister_cancel and __pthread_unwind_next.
3872
3873 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
3874
3875         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
3876         different symbol for the cancellation syscall wrapper and
3877         non-cancellation syscall wrapper.
3878         (PSEUDO_END): Define.
3879
3880 2003-07-05  Richard Henderson  <rth@redhat.com>
3881
3882         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
3883         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
3884         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3885         return actual return value from the syscall, not 0.
3886
3887 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
3888
3889         * descr.h (struct pthread): Add pid field.
3890         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
3891         (__reclaim_stacks): Likewise.
3892         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
3893         also check for PID of the signal source.
3894         (__pthread_initialize_minimal_internal): Also initialize pid field
3895         of initial thread's descriptor.
3896         * pthread_cancel.c: Use tgkill instead of tkill if possible.
3897         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3898         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
3899         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3900         * sysdeps/unix/sysv/linux/raise.c: Likewise.
3901
3902 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
3903
3904         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
3905         Fix use of parameter.
3906         (__libc_cleanup_pop): Likewise.
3907
3908 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
3909
3910         * init.c (sigcancel_handler): Change parameters to match handler
3911         for SA_SIGACTION.  Check signal number and code to recognize
3912         invalid invocations.
3913
3914 2003-07-03  Roland McGrath  <roland@redhat.com>
3915
3916         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
3917         Apply sizeof (struct pthread) bias to r13 value.
3918
3919 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
3920
3921         * sysdeps/pthread/configure.in: Require CFI directives.
3922
3923         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
3924         definition.
3925         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
3926         libpthread compilation.
3927         * unwind.c (__pthread_unwind): Add hidden_def.
3928         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
3929
3930 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
3931
3932         * libc-cancellation.c (__libc_cleanup_routine): Define.
3933         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
3934         (__pthread_cleanup_pop): Define.
3935
3936 2003-07-01  Richard Henderson  <rth@redhat.com>
3937
3938         * sysdeps/alpha/elf/pt-initfini.c: New file.
3939         * sysdeps/alpha/pthread_spin_lock.S: New file.
3940         * sysdeps/alpha/pthread_spin_trylock.S: New file.
3941         * sysdeps/alpha/pthreaddef.h: New file.
3942         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
3943         * sysdeps/alpha/tls.h: New file.
3944         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
3945         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
3946         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
3947         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
3948         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
3949         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
3950         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
3951         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
3952         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
3953         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
3954
3955 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
3956
3957         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
3958         cleanup support and unwind info.
3959
3960 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
3961
3962         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3963         Use correct cleanup handler registration.  Add unwind info.
3964         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
3965         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3966         * tst-once3.c: Add cleanup handler and check it is called.
3967         * tst-once4.c: Likewise.
3968         * tst-oncex3.c: New file.
3969         * tst-oncex4.c: New file.
3970         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
3971
3972 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
3973
3974         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
3975
3976 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
3977
3978         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
3979         (tf_msgsnd): Likewise.
3980
3981         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
3982         premature returns a bit more.
3983
3984 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
3985
3986         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
3987         definition to the front.
3988
3989         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
3990         the cleanup functions to make the names unique.  Fix dwarf opcode
3991         un unwind table.
3992         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
3993         functions to make the names unique.  Fix CFA offset for two blocks.
3994
3995 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
3996
3997         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
3998         missing closing braces.
3999         Patch by Christophe Saout <christophe@saout.de>.
4000
4001 2003-06-24  Roland McGrath  <roland@redhat.com>
4002
4003         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
4004
4005 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
4006
4007         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
4008         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
4009
4010         * pthreadP.h: Declare __find_thread_by_id.
4011         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
4012         * pthread_clock_gettime.c: Allow using other thread's clock.
4013         * pthread_clock_settime.c: Likewise.
4014         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4015         * Makefile: Add rules to build and run tst-clock2.
4016         * tst-clock2.c: New file.
4017
4018 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
4019
4020         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
4021         to use exception-based cleanup handler.
4022         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4023
4024         * tst-cond8.c (ch): Announce that we are done.
4025
4026         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
4027
4028         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
4029         Also test aio_suspend with timeout value.
4030
4031 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
4032
4033         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
4034         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
4035         attribute_hidden.
4036
4037         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
4038         (__pthread_mutex_lock_internal): Likewise.
4039         (__pthread_mutex_unlock_internal): Likewise.
4040         (__pthread_mutex_unlock_usercnt): Declare.
4041         * pthread_mutex_destroy.c: Always fail if used in any way.
4042         * pthread_mutex_init.c: Update comment.
4043         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
4044         * pthread_mutex_timedlock.c: Adjust __nusers.
4045         * pthread_mutex_trylock.c: Adjust __nusers.
4046         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
4047         and public interfaces are wrapper with pass additional parameter.
4048         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
4049         parameter zero.
4050         * tst-mutex8.c: New file.
4051         * Makefile (tests): Add tst-mutex8.
4052         * sysdeps/pthread/pthread_cond_timedwait.c: Call
4053         __pthread_mutex_unlock_usercnt.
4054         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4055         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4056         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4057         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4058         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4059         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
4060         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4061         Add __nusers.
4062         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4063         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4064         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4065         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4066         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4067
4068         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
4069         * pthread_mutex_timedlock.c: Likewise.
4070         * pthread_mutex_trylock.c: Adjust __nusers.
4071         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
4072         * tst-mutex9.c: New file.
4073         * Makefile (tests): Add tst-mutex9.
4074         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
4075         * sysdeps/ia64/tls.h: Likewise.
4076         * sysdeps/powerpc/tls.h: Likewise.
4077         * sysdeps/s390/tls.h: Likewise.
4078         * sysdeps/sh/tls.h: Likewise.
4079         * sysdeps/x86_64/tls.h: Likewise.
4080         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4081         Change type of __owner.
4082         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4083         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4084         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4085         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4086         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4087
4088 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
4089
4090         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
4091         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
4092
4093         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
4094         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
4095         instead of nr to lll_futex_wake.  Only set errno and return -1
4096         if err < 0.
4097
4098         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
4099         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4100         return actual return value from the syscall, not 0.
4101
4102 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
4103
4104         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
4105         find a random value.
4106         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
4107         errno==EIDRM.
4108
4109         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
4110         compat_timer_settime.
4111         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
4112         compat_timer_gettime.
4113         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4114         compat_timer_getoverrun.
4115         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4116         compat_timer_delete.
4117
4118         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4119         error-checking mutex detect busy mutexes.
4120
4121 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4122
4123         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4124         Add ax to clobber list.
4125         (lll_mutex_cond_lock): Likewise.
4126         (lll_mutex_unlock): Likewise.
4127         (lll_lock): Likewise.
4128         (lll_unlock): Likewise.
4129
4130         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4131         * tst-cancel18.c: New file.
4132         * tst-cancelx18.c: New file.
4133
4134         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4135         and tcdrain.
4136
4137         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4138         * tst-cancel17.c: New file.
4139         * tst-cancelx17.c: New file.
4140
4141         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4142         * sysdeps/unix/sysv/linux/sigwait.c: New file.
4143         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4144
4145         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4146
4147 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
4148
4149         * sysdeps/pthread/createthread.c (create_thread): Set
4150         header.multiple_threads unconditionally.
4151         * allocatestack.c (allocate_stack): Likewise.
4152         * descr.h (struct pthread): Add header.multiple_threads
4153         unconditionally.
4154         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4155         Define for librt.  #error if neither libpthread, libc nor librt.
4156         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4157         Likewise.
4158         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4159         CDISABLE): Likewise.
4160         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4161         CDISABLE): Likewise.
4162         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4163         CDISABLE): Likewise.
4164         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4165         CDISABLE): Likewise.  Access header.multiple_threads outside of
4166         libc and libpthread.
4167         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4168         Likewise.
4169         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4170         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4171
4172 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4173
4174         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4175         Also test early cancellation before the thread reaches the cancellation
4176         point.
4177
4178         * Makefile: Compile forward.c with exceptions.
4179
4180         * sysdeps/unix/sysv/linux/sleep.c: New file.
4181
4182 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
4183
4184         * Makefile: Add CFLAGS definition to compile function wrappers
4185         duplicated from libc with exceptions.
4186         * tst-cancel4.c: Also check cancellation handlers.
4187
4188         * Makefile: Add rules to build and run tst-cancel16 and
4189         tst-cancelx16.  Add missing CFLAGS definitions.
4190         * tst-cancel16.c: New file.
4191         * tst-cancelx16.c: New file.
4192
4193 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
4194
4195         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4196         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4197         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4198         (DL_SYSINFO_IMPLEMENTATION): Likewise.
4199
4200         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4201         (LIBC_CANCEL_RESET): Likewise.
4202         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4203         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4204         librt-cancellation.
4205         (CFLAGS-libcrt-cancellation.c): Define.
4206         * sysdeps/pthread/librt-cancellation.c: New file.
4207         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4208         macros also when compiling librt.
4209         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4210         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4211         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4212         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4213         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4214         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4215         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4216
4217         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4218         compat_timer_create.
4219
4220 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
4221
4222         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4223
4224         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4225         __register_atfork.
4226         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4227         Add libc_hidden_def.
4228
4229 2003-06-13  Roland McGrath  <roland@redhat.com>
4230
4231         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4232         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4233
4234 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
4235
4236         * allocatestack.c (queue_stack): Always inline.
4237         * ptreadhP.h (__do_cancel): Likewise.
4238
4239 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
4240
4241         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4242         a typo.
4243
4244 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
4245
4246         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4247         (__pthread_cond_signal): Remove incorrect second addition for
4248         cond_lock!=0.
4249
4250 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
4251
4252         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4253         (__pthread_cond_signal): Use correct futex pointer in
4254         __lll_mutex_lock_wait call.
4255
4256         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4257         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4258
4259 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
4260
4261         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4262         cancelable.
4263         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4264         Likewise.
4265
4266         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4267         hand-written CFI generation code.  Since ENTRY/END also initiated
4268         CFI frames this caused two CFI sets to be generated.
4269
4270 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
4271
4272         * cleanup_routine.c: New file.
4273         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4274         * sysdeps/pthread/pthread.h: Add support for fully exception-based
4275         cleanup handling.
4276         * Makefile (libpthread-routines): Add cleanup_routine.
4277         Add more CFLAGS variables to compile with exceptions.  Add comments
4278         why which file needs unwind tables.
4279         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4280         tests.
4281         * tst-cancelx1.c: New file.
4282         * tst-cancelx2.c: New file.
4283         * tst-cancelx3.c: New file.
4284         * tst-cancelx4.c: New file.
4285         * tst-cancelx5.c: New file.
4286         * tst-cancelx6.c: New file.
4287         * tst-cancelx7.c: New file.
4288         * tst-cancelx8.c: New file.
4289         * tst-cancelx9.c: New file.
4290         * tst-cancelx10.c: New file.
4291         * tst-cancelx11.c: New file.
4292         * tst-cancelx12.c: New file.
4293         * tst-cancelx13.c: New file.
4294         * tst-cancelx14.c: New file.
4295         * tst-cancelx15.c: New file.
4296         * tst-cleanupx0.c: New file.
4297         * tst-cleanupx0.expect: New file.
4298         * tst-cleanupx1.c: New file.
4299         * tst-cleanupx2.c: New file.
4300         * tst-cleanupx3.c: New file.
4301
4302         * tst-cleanup0.c: Make standard compliant.
4303         * tst-cleanup1.c: Likewise.
4304
4305         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4306         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4307         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4308         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4309         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4310         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4311         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4312         CLEANUP_JMP_BUF.
4313         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4314         * tst-cancel12.c: New file.
4315         * tst-cancel13.c: New file.
4316         * tst-cancel14.c: New file.
4317         * tst-cancel15.c: New file.
4318         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4319         and tst-cancel15.
4320
4321         * tst-cancel1.c: Add some comments.
4322
4323         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4324         timeout correctly.
4325
4326 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
4327
4328         * Makefile (CFLAGS-pthread_cancel.c): Define.
4329
4330 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
4331
4332         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4333         Change type of __writer element to int.
4334         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4335         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4336         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4337         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4338         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4339         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4340         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4341         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4342         Compare with TID to determine deadlocks.
4343         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4344         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4345         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4346         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4347         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4348         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4349         Likewise.
4350         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4351         Likewise.
4352         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4353         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4354         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4355         Likewise.
4356         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4357         Likewise.
4358         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4359         * Makefile (tests): Add tst-rwlock12.
4360         * tst-rwlock12.c: New file.
4361
4362 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
4363
4364         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4365         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4366         Remove bogus hidden_proto.
4367         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4368         Likewise.
4369         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4370         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4371         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4372         ___lll_mutex_timedlock): Likewise.
4373
4374 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
4375
4376         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4377         (__pthread_cond_signal): Add some code to eventually handle
4378         cond_lock!=0.
4379
4380 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
4381
4382         * Makefile (tests): Add tst-exec4.
4383         (tst-exec4-ARGS): Define.
4384         * tst-exec4.c: New file.
4385
4386 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
4387
4388         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4389         Also fail if tv_nsec < 0.
4390         (__lll_timedwait_tid): Likewise.
4391         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4392         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4393         Likewise.
4394         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4395         Likewise.
4396         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4397         Likewise.
4398         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4399         Likewise.
4400         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4401         Likewise.
4402         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4403         Likewise.
4404
4405         * Makefile (tests): Add tst-sem8 and tst-sem9.
4406         * tst-sem8.c: New file.
4407         * tst-sem9.c: New file.
4408         * sem_open.c: Fix creation of in_use record if the file exists but
4409         no internal record.
4410
4411         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4412         definitions.
4413
4414         * sysdeps/pthread/timer_create.c (timer_create): In case
4415         evp==NULL, assign timer ID to sival_ptr.
4416
4417         * descr.h (struct pthread_unwind_buf): Change type of prev element to
4418         struct pthread_unwind_buf *.
4419         (struct pthread): Likewise for cleanup_jmp_buf element.
4420
4421         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4422         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4423         * unwind.c (__pthread_unwind_next): Likewise.
4424
4425 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
4426
4427         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4428         (lll_futex_timed_wait): Use int for futex value parameter.
4429         (lll_futex_wake): Likewise.
4430         (lll_futex_requeue): Likewise.
4431
4432         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4433         Replace one memory operation with one register operation.
4434
4435         * tst-join4.c (do_test): Fix error message.
4436
4437         * tst-rwlock6.c (do_test): Use correct format specifier.
4438
4439         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4440         (__lll_mutex_lock_wait): Replace one memory operation with one
4441         register operation.
4442         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4443         (__lll_mutex_lock_wait): Likewise.
4444
4445         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4446         (__lll_mutex_cond_lock): Add one to value parameter of
4447         __lll_lock_wait to reflect reality in the futex syscall.
4448         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4449         (lll_mutex_cond_lock): Likewise.
4450
4451 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4452
4453         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4454         New function.
4455         (lll_mutex_cond_lock): Define.
4456
4457 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
4458
4459         * Makefile (tests): Add tst-signal6.
4460         * tst-signal6.c: New file.
4461
4462         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4463         (__lll_mutex_unlock_force): New function
4464         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4465
4466         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4467         (__lll_mutex_unlock_force): New function.
4468         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4469
4470         * tst-rwlock7.c (do_test): Use correct format specifier.
4471
4472         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4473         Find break parameter in correct asm argument.
4474
4475 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
4476
4477         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4478         Remove out4.
4479         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4480         error occured.
4481         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4482         Add __mutex.
4483         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4484         lll_futex_requeue, lll_mutex_unlock_force): Define.
4485
4486 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4487
4488         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4489         (pthread_cond_t): Add __mutex.
4490         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4491         lll_futex_requeue, lll_mutex_unlock_force): Define.
4492
4493 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4494
4495         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4496         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4497         Add __mutex field.
4498         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4499         Define.
4500         (lll_futex_wait, lll_futex_wake): Define.
4501         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4502         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4503         FUTEX_REQUEUE instead of FUTEX_WAIT.
4504         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4505         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4506         mutex which was used in condvar structure.  Call
4507         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4508         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4509
4510         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4511         include tcb-offsets.h.  Read wakeup value in locked region.
4512         Use the value of gbr register as THREAD_ID.
4513         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4514         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4515         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4516
4517         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4518         macros.
4519
4520 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
4521
4522         * sysdeps/pthread/pthread_cond_broadcast.c
4523         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4524
4525 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
4526
4527         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4528         typo in register name.
4529         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4530         correctly.  Actually use requeue.  Little optimization.
4531         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4532         mutex address early.  Handle cancellation state as 32-bit value.
4533         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4534         Remove unnecessary label.
4535
4536 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
4537
4538         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4539         instead of FUTEX_WAIT.
4540         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4541         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4542         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4543         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4544         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4545         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
4546         used in condvar structure.  Call __pthread_mutex_cond_lock instead
4547         of __pthread_mutex_lock_internal.
4548         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4549         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4550         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4551         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
4552         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4553         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4554         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
4555         Add pthread_mutex_cond_lock.
4556         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
4557         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
4558         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
4559         lll_mutex_cond_lock.
4560         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4561         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4562         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4563         Add __mutex field.
4564         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4565         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4566
4567         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
4568         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4569
4570         * pthreadP.h: Declare __pthread_mutex_cond_lock.
4571         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
4572         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
4573         macro don't define aliases.
4574
4575         * cancellation.c: Remove __pthread_enable_asynccancel_2.
4576         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
4577         * sysdeps/pthread/pthread_cond_timedwait.c: Use
4578         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
4579         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4580         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4581         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4582         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4583         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4584
4585 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
4586
4587         * sem_open.c: Fix one endless loop.  Implement correct semantics
4588         wrt opening the same semaphore more then once.
4589         * sem_close.c: Adjust for sem_open change.
4590         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
4591         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
4592         * Makefile (tests): Add tst-sem7.
4593         * tst-sem7.c: New file.
4594
4595 2003-05-16  Roland McGrath  <roland@redhat.com>
4596
4597         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
4598         uninitialized variable braino.
4599
4600 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
4601
4602         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
4603         test for syscall availability.
4604
4605         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
4606         __no_posix_timers to -1 if the syscalls don't exist.
4607
4608         * pthread_join.c (pthread_join): Set tid field of the joined
4609         thread to -1.  This isn't necessary but helps to recognize some
4610         error conditions with almost no cost.
4611
4612         * allocatestack.c (FREE_P): Also negative values indicate an
4613         unused stack.
4614
4615         * unwind.c: Include <unistd.h>.
4616
4617 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
4618
4619         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
4620
4621 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
4622
4623         * Makefile (crti-objs, crtn-objs): New variables.
4624         (omit-deps, extra-objs): Add crtn.
4625         ($(objpfx)libpthread.so): Depend on both crti and crtn
4626         and links to them in multidir.
4627         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
4628
4629 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
4630
4631         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4632         (lll_mutex_unlock): Use atomic_exchange_rel.
4633
4634 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
4635
4636         * cond-perf.c (cons): Add missing locking around setting of alldone.
4637
4638 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
4639
4640         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4641         related macros.
4642         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4643
4644 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
4645
4646         * tst-sem6.c: New file.
4647         * Makefile (tests): Add tst-sem6.
4648
4649         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4650         Use atomic_exchange_rel instead of atomic_exchange.
4651         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4652         Likewise.
4653
4654         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4655         code for lll_futex_wait and lll_futex_wake in static apps.  Use
4656         vsyscall is possible.
4657
4658         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4659         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4660         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4661         pthread_setaffinity_np.
4662         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4663         and pthread_setaffinity_np.
4664         * Makefile (libpthread-routines): Add pthread_getaffinity and
4665         pthread_setaffinity.
4666
4667         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4668         use it in case mmap to allocate the stack fails.
4669         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4670         ARCH_MAP_FLAGS here.
4671         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4672         ARCH_RETRY_MMAP.
4673
4674 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
4675
4676         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4677         handler implementation.  It is now lockless in fork().
4678         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4679         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4680         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
4681         declare the __fork_*_lists.
4682         (struct fork_handler): Include pointers to all three functions.
4683         Add next, refcntr and need_signal elements.
4684         (__fork_handlers): New declaration.
4685         (__register_atfork_malloc): Remove declaration.
4686         (HAVE_register_atfork_malloc): Remove definition.
4687         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4688         __pthread_child_handler variable.
4689         (__libc_pthread_init): Use __register_atfork instead of explicitly
4690         adding to the list.
4691         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4692         and lll_futex_wake.
4693         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4694
4695         * unwind.c (unwind_cleanup): Print error message and then abort.  This
4696         function must never be reached.
4697
4698         * cond-perf.c: New file.
4699
4700 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
4701
4702         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4703
4704 2003-05-04  Roland McGrath  <roland@redhat.com>
4705
4706         * Makefile ($(objpfx)../libc.so): New target.
4707
4708 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
4709
4710         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4711         (pthread_condattr_t): Size is only an int, don't use long for
4712         alignment.
4713         (pthread_mutexattr_t): Likewise.
4714         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4715         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4716         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4717
4718 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
4719
4720         * sysdeps/i386/tls.h: Define THREAD_ID.
4721         * sysdeps/ia64/tls.h: Likewise.
4722         * sysdeps/powerpc/tls.h: Likewise.
4723         * sysdeps/s390/tls.h: Likewise.
4724         * sysdeps/sh/tls.h: Likewise.
4725         * sysdeps/x86_64/tls.h: Likewise.
4726         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4727         record ownership.
4728         * pthread_mutex_timedlock.c: Likewise.
4729         * pthread_mutex_trylock.c: Likewise.
4730         * pthread_mutex_unlock.c: Likewise.
4731         * pthread_rwlock_trywrlock.c: Likewise.
4732         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4733         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4734         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4735         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4736
4737         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4738         flag.
4739
4740 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
4741
4742         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4743         (__SIZEOF_PTHREAD_COND_T): Define to 48.
4744         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4745         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4746         Make __align long long instead of long.
4747         (pthread_rwlock_t): Formatting.
4748         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4749         (pthread_rwlock_t): Formatting.
4750         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4751         (pthread_cond_t): Make __align long long instead of long.
4752         (pthread_rwlock_t): Move __flags field to the same position as in
4753         linuxthreads.
4754
4755 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
4756
4757         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4758         * tst-rwlock7.c (do_test): Likewise.
4759
4760 2003-04-26  Roland McGrath  <roland@redhat.com>
4761
4762         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4763
4764 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
4765
4766         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4767         sizeof (struct pthread).
4768         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
4769         1 struct pthread.
4770         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
4771         to 0.
4772         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
4773         struct pthread.
4774         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
4775         to 32-bit bytes.
4776         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
4777         tcbp.
4778         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
4779         unneccessarily.
4780         (NO_TLS_OFFSET): Define.
4781         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
4782         add TLS_TCB_SIZE unnecessarily.
4783
4784 2003-04-22  Roland McGrath  <roland@redhat.com>
4785
4786         * Makeconfig (shared-thread-library): Reverse link order to work
4787         around linker bug.
4788
4789 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
4790
4791         * semaphore.h: Fix typo in comment.
4792
4793 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
4794
4795         * sysdeps/pthread/sigfillset.c: New file.
4796
4797         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
4798         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
4799         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
4800         * sysdeps/pthread/sigaction.c: Likewise.
4801         * sysdeps/pthread/sigprocmask.c: New file.
4802         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
4803         __SIGRTMIN+1.
4804         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4805         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
4806         in this case.
4807
4808 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
4809
4810         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4811         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
4812
4813         * sysdeps/unix/sysv/linux/unregister-atfork.c
4814         (__unregister_atfork): Don't free memory not allocated dynamically.
4815
4816         * semaphore.h: Remove __THROW marker from cancellation points.
4817         * nptl/sysdeps/pthread/pthread.h: Likewise.
4818
4819 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
4820
4821         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
4822         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
4823         __THROW.
4824
4825 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
4826
4827         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
4828
4829 2003-04-15  Roland McGrath  <roland@redhat.com>
4830
4831         * forward.c (__pthread_unwind): Tweak to avoid warning.
4832
4833 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
4834
4835         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
4836
4837 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
4838
4839         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
4840         overflow CFA advance instructions.
4841         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4842
4843 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
4844
4845         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
4846         * sysdeps/i386/pthread_spin_lock.c: Likewise.
4847         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
4848         defined.
4849
4850         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
4851         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
4852         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
4853         DW_CFA_advance_loc for .Laddl-.Lsubl.
4854
4855 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
4856
4857         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
4858         position-independent unwind data for static libraries.
4859         Add missing unwind info.  Add comments.
4860
4861         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
4862         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4863         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4864         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4865
4866 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
4867
4868         * Makefile: Make sure all cancellation points are compiled with
4869         exception and asynchronous unwind tables.
4870
4871         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
4872         which mishandles loading of global object addresses in PIC.
4873         (THREAD_SETMEM_NC): Likewise.
4874
4875 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
4876
4877         * pthread.h: Define new data structure for cleanup buffer.  Declare
4878         new cleanup handler interfaces.
4879         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
4880         (struct pthread): Add cleanup_jmp_buf pointer.  Define
4881         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
4882         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
4883         it.  Declare old cleanup handler installation functions.
4884         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
4885         handling.
4886         * cleanup_defer.c: Likewise.
4887         * cleanup_compat.c: New file.  Old cleanup code.
4888         * cleanup_def_compat.c: New file.  Old cleanup code.
4889         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
4890         if own thread descriptor.
4891         * unwind.c: New file.
4892         * forward.c: Add __pthread_unwind.
4893         * init.c (pthread_functions): Add __pthread_unwind.
4894         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
4895         Add ptr___pthread_unwind.
4896         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
4897         and unwind function.
4898         * Makefile (libpthread-routines): Add cleanup_compat,
4899         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
4900         table generation if necessary.
4901         * version.c: Record whether unwind support is compiled in.
4902         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
4903         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
4904         handler interfaces.
4905         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
4906         complication to generate unwind information for syscall wrappers.
4907         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4908         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4909         __cleanup_fct_attribute.
4910
4911         * Makefile: Add rules to build and run tst-cleanup0.
4912         * tst-cleanup0.c: New file.
4913         * tst-cleanup0.expect: New file.
4914
4915         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
4916         caller.  Optimize to avoid often unecessary local variable.
4917
4918 2003-04-11  Roland McGrath  <roland@redhat.com>
4919
4920         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
4921         sets variable `multidir'; include that.
4922         (generated): Add it.
4923         ($(objpfx)$(multidir)/crti.o): New target.
4924         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
4925
4926 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
4927
4928         * tst-attr2.c (do_test): Add cast to avoid warning.
4929         * tst-mutex4.c (do_test): Likewise.
4930
4931 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
4932
4933         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
4934         in child.
4935
4936 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
4937
4938         * Makefile (tests): Add tst-detach1.
4939         * tst-detach1.c: New file.
4940
4941 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
4942
4943         * sysdeps/pthread/pthread.h: Remove duplicate
4944         pthread_cleanup_{push,pop} definitions.
4945
4946         * tst-barrier2.c: Eliminate warnings.
4947         * tst-cancel4.c: Likewise.
4948         * tst-cond4.c: Likewise.
4949         * tst-cond6.c: Likewise.
4950         * tst-detach1.c: Likewise.
4951         * tst-rwlock4.c: Likewise.
4952         * tst-rwlock6.c: Likewise.
4953         * tst-rwlock7.c: Likewise.
4954         * tst-sem3.c: Likewise.
4955         * tst-spin2.c: Likewise.
4956         * tst-umask1.c: Likewise.
4957
4958 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
4959
4960         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
4961
4962 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
4963
4964         * descr.h (struct pthread): Move cancelhandling member to the front.
4965
4966 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
4967
4968         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
4969         malloc_parent, and malloc_child statically.
4970         (__register_atfork_malloc): New function.
4971         (free_mem): Don't free any of the malloc_* variables on the list.
4972         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
4973         Define HAVE_register_atfork_malloc.
4974
4975 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
4976
4977         * sysdeps/pthread/createthread.c (create_thread): Add some more
4978         comments explaining when to set multiple_threads and when not.
4979
4980         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4981         THREAD_ATOMIC_BIT_SET if not already defined.
4982         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4983         THREAD_ATOMIC_BIT_SET:
4984         * sysdeps/x86_64/tls.h: Likewise.
4985         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
4986         THREAD_ATOMIC_CMPXCHG_VAL.
4987         (_pthread_cleanup_pop_restore): Likewise.
4988         * cancellation.c (__pthread_enable_asynccancel): Likewise.
4989         (__pthread_enable_asynccancel_2): Likewise.
4990         (__pthread_disable_asynccancel): Likewise.
4991         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
4992         (__libc_disable_asynccancel): Likewise.
4993         * init.c (sigcancel_handler): Likewise.
4994         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
4995         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
4996
4997 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
4998
4999         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
5000         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5001         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
5002         * Makefile (tests): Add tst-cancel11.
5003         * tst-cancel11.c: New file.
5004
5005 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
5006
5007         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
5008         round, not the first.  Use specific_used flag instead of local
5009         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
5010         (__free_tcb): Don't call deallocate_tsd here.
5011         (start_thread): Call deallocate_tsd here.
5012         * pthread_setspecific.c: Set specific_used flag really only when
5013         needed.
5014         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
5015         * tst-tsd3.c: New file.
5016         * tst-tsd4.c: New file.
5017
5018 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
5019
5020         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
5021         Use atomic_exchange_and_add instead of __lll_add.
5022         (__lll_mutex_timedlock): Likewise.
5023         Patch by Ian Wienand.
5024
5025 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
5026
5027         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5028         (SINGLE_THREAD_P): Fix typo.
5029         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
5030
5031 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
5032
5033         * Makefile (tests): Add tst-align.
5034         * tst-align.c: New file.
5035         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
5036
5037         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
5038         function correctly.
5039
5040         * tst-tsd2.c: Add casts to avoid warnings.
5041
5042 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
5043
5044         * descr.h (struct pthread): Move most often used elements to the front.
5045
5046 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
5047
5048         * Makefile (libpthread-routines): Add pthread_atfork.
5049         (libpthread-static-only-routines): Add pthread_atfork.
5050
5051 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5052
5053         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
5054         of TLS_DTV_AT_TP.
5055         (INSTALL_DTV): Add parens.
5056         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
5057         Use passed descr instead of THREAD_SELF.
5058         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
5059         (__lll_mutex_timedlock_wait): Correct expected value after
5060         spurious wakeup.
5061         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
5062         Release lock before waking up the waiters.
5063         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
5064         criteria.  Reorderstruct passed to cleanup handler.  Fix
5065         handling of cancellation and failung pthread_mutex_unlock call.
5066         Use __pthread_enable_asynccancel_2 instead of
5067         __pthread_enable_asynccancel.
5068         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5069         Return result of lock re-get if it fails.
5070         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
5071         for __pthread_cleanup_push.
5072         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
5073         completely broken rwlock implementation.
5074         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5075         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5076         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5077         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5078         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5079         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
5080         versioned_symbol macro.
5081         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
5082         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5083
5084 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
5085
5086         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
5087         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
5088         and __helper_tid.
5089         (struct timer): Remove th and bar field.
5090         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
5091         debugging code.  Create only one helper thread.
5092         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
5093         helper thread.
5094         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5095         Renamed.  Define statically.  Use thread info from siginfo.
5096         (__helper_once): New variable.
5097         (__helper_tid): New variable.
5098         (__reset_helper_control): New function.
5099         (__start_helper_thread): New function.
5100
5101         * pthread_create.c (start_thread): Don't use setjmp inside
5102         __builtin_expect to work around gcc bug.
5103
5104         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
5105         timer_delete syscall fails, but not with ENOSYS, set
5106         __no_posix_timers.
5107
5108         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
5109         (timer_settime): Fix typo.
5110         * sysdeps/unix/sysv/linux/timer_getoverr.c
5111         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5112
5113 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
5114
5115         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5116         offset of cleanupbuf.__prev.
5117
5118 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
5119
5120         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5121         of included file.
5122
5123 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
5124
5125         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5126         NULL provide default definition to syscall.
5127
5128 2003-03-25  Roland McGrath  <roland@redhat.com>
5129
5130         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5131         (timer_id2ptr): Fix typo.
5132
5133 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
5134
5135         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5136         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5137         * sysdeps/ia64/pthreaddef.h: Likewise.
5138         * sysdeps/powerpc/pthreaddef.h: Likewise.
5139         * sysdeps/s390/pthreaddef.h: Likewise.
5140         * sysdeps/sh/pthreaddef.h: Likewise.
5141         * sysdeps/x86_64/pthreaddef.h: Likewise.
5142         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5143         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5144         being changed.
5145         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5146         SIGTIMER is not unblocked.
5147         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5148         RT signal taken.
5149         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5150         be send.
5151         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5152         pass pointer through as ID.
5153         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5154         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5155         * sysdeps/unix/sysv/linux/timer_create.c: New file.
5156         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5157         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5158         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5159         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5160         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5161         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5162         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5163         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5164         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5165         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5166         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5167         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5168         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5169         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5170         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5171         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5172         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5173         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5174         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5175         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5176         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5177         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5178         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5179         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5180         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5181         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5182         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5183         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5184         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5185         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5186
5187         * pthreadP.h: Remove FRAME_LEFT definition.
5188         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5189         already left frame.  Programs which have this problem are not POSIX
5190         compliant.
5191         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5192
5193 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
5194
5195         * sysdeps/pthread/tst-timer.c: Check return values of the
5196         functions we test.
5197
5198 2003-03-23  Roland McGrath  <roland@redhat.com>
5199
5200         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5201         * tst-tls3mod.c: Likewise.
5202         * tst-tls1.c: Likewise.
5203         * tst-tls2.c: Likewise.
5204
5205         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5206         undefined behavior.
5207
5208         * tst-join5.c (tf1, tf2): Add a cast.
5209
5210         * Makeconfig (includes): Append -I$(..)nptl to this variable.
5211
5212         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5213         Don't test anything.
5214         * tst-cond4.c: Likewise.
5215         * tst-cond6.c: Likewise.
5216         * tst-flock2.c: Likewise.
5217         * tst-mutex4.c: Likewise.
5218         * tst-rwlock4.c: Likewise.
5219         * tst-signal1.c: Likewise.
5220         * tst-spin2.c: Likewise.
5221         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5222
5223         * tst-mutex4.c: Use test-skeleton.c.
5224         * tst-spin2.c: Likewise.
5225         * tst-sysconf.c: Likewise.
5226         * tst-barrier2.c: Likewise.
5227         * tst-cond4.c: Likewise.
5228         * tst-cond6.c: Likewise.
5229         * tst-rwlock4.c: Likewise.
5230         * tst-unload.c: Likewise.
5231         * tst-flock2.c (do_test): Use return instead of exit.
5232
5233 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
5234
5235         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5236
5237 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
5238
5239         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5240         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5241         instead of __lll_compare_and_swap.
5242         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5243         Likewise.
5244         Removed definition if __lll_compare_and_swap.
5245
5246         * cancellation.c: Adjust for new form of compare&exchange macros.
5247         * cleanup_defer.c: Likewise.
5248         * init.c: Likewise.
5249         * libc-cancellation.c: Likewise.
5250         * old_pthread_cond_broadcast.c: Likewise.
5251         * old_pthread_cond_signal.c: Likewise.
5252         * old_pthread_cond_timedwait.c: Likewise.
5253         * old_pthread_cond_wait.c: Likewise.
5254         * pthread_cancel.c: Likewise.
5255         * pthread_create.c: Likewise.
5256         * pthread_detach.c: Likewise.
5257         * pthread_join.c: Likewise.
5258         * pthread_key_delete.c: Likewise.
5259         * pthread_setcancelstate.c: Likewise.
5260         * pthread_setcanceltype.c: Likewise.
5261         * pthread_timedjoin.c: Likewise.
5262         * pthread_tryjoin.c: Likewise.
5263         * sysdeps/pthread/createthread.c: Likewise.
5264
5265 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
5266
5267         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5268         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5269         definitions.  Replace uses with calls to atomic_* functions.
5270         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5271         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5272         __lll_test_and_set calls with atomic_exchange_and_add and
5273         atomic_exchange calls respectively.
5274         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5275         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5276         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5277         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5278         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5279         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5280         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5281
5282         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5283         returns the old value.
5284
5285 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
5286
5287         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5288         int for variable OLDVAL and correct inline assembler contraint.
5289         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5290         type int for variable OLD.
5291
5292         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5293         only for s390-32.
5294         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5295         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5296         instead of multiple_threads field in the TCB.
5297
5298 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
5299
5300         * sysdeps/i386/i686/bits/atomic.h: Removed.
5301         * sysdeps/i386/i586/bits/atomic.h: Removed.
5302         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
5303         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
5304         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
5305         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
5306         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
5307         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
5308         * atomic.h: Removed.  Moved to glibc.
5309
5310         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5311         support for clock selection.
5312
5313         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5314         signalling waiters.
5315
5316 2003-03-18  Roland McGrath  <roland@redhat.com>
5317
5318         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5319         Add __lll_rel_instr first.  Add memory clobber.
5320         (lll_mutex_unlock): Use __lll_test_and_set.
5321         From Paul Mackerras <paulus@samba.org>.
5322
5323         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5324         unconditionally.
5325         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5326         (SINGLE_THREAD_P):  Add `header.' prefix.
5327         From Paul Mackerras <paulus@samba.org>.
5328
5329         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5330         pthread_timedjoin_np to ...
5331         (libpthread: GLIBC_2.3.3): ... here.
5332         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5333
5334         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5335         Avoid shadowing VAL variable.
5336
5337         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5338         New macro.
5339
5340 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
5341
5342         * Makefile (tests): Add tst-cond11.
5343         * tst-cond11.c: New file.
5344
5345         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5346         struct passed to cleanup handler to eliminate one more
5347         instruction.
5348         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5349
5350         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5351         (pthrad_cond_t): Replace __unused field with __clock.
5352
5353         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5354         waken all waiters in cleanup handler.
5355         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5356         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5357
5358         * pthread_condattr_getclock.c: New file.
5359         * pthread_condattr_setclock.c: New file.
5360         * sysdeps/pthread/pthread.h: Declare these new functions.
5361         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5362         * Makefile (libpthread-routines): Add the new functions.
5363         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5364         Renamed field to value.  Document use of the bits.
5365         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5366         change.
5367         * pthread_condattr_setpshared.c: Likewise.
5368         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5369         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5370         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5371         Add __clock field.
5372         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5373         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5374         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5375         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5376         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5377         Implement clock selection.
5378         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5379         * pthread-errnos.sym: Add ENOSYS.
5380         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5381         _POSIX_CLOCK_SELECTION.
5382         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5383
5384         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5385         invalid .size directive.
5386
5387 2003-03-17  Roland McGrath  <roland@redhat.com>
5388
5389         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5390         Formatting tweaks.
5391
5392 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5393
5394         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5395         Use __lll_add instead of spelling it out.  Use protected symbol names.
5396         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5397         Use __lll_add.
5398         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5399         Renamed from lll_compare_and_swap.  Use new name where necessary.
5400         (__lll_add): Defined.
5401         (__lll_dec_if_positive): Defined.
5402         (__lll_test_and_set): Defined.
5403         * sysdeps/ia64/pthread_spin_init.c: Removed.
5404         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5405         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5406         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5407         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5408         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5409         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5410         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5411         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5412         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5413         __sync_lock_release_si.
5414         Patch by Jakub Jelinek.
5415
5416         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5417         Fix timeout handling.
5418         (__lll_timedwait_tid): Likewise.
5419         (lll_unlock_wake_cb): Wake up other waiters if necessary.
5420         Patch by Jakub Jelinek.
5421
5422         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5423
5424 2003-03-17  Roland McGrath  <roland@redhat.com>
5425
5426         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5427         * sysdeps/pthread/pthread_spin_init.c: New file.
5428         * sysdeps/pthread/pthread_spin_unlock.c: New file.
5429         * sysdeps/powerpc/Makefile: New file.
5430         * sysdeps/powerpc/pthread_spin_lock.c: New file.
5431         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5432         * sysdeps/powerpc/pthreaddef.h: New file.
5433         * sysdeps/powerpc/tcb-offsets.sym: New file.
5434         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5435         * sysdeps/powerpc/tls.h: New file.
5436         * sysdeps/powerpc/bits/atomic.h: New file.
5437         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5438         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5439         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5440
5441         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5442         * sysdeps/unix/sysv/linux/sem_post.c: New file.
5443         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5444         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5445         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5446         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5447         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5448         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5449         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5450         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5451         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5452         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5453         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5454         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5455         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5456
5457         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5458         not gettimeofday.
5459         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5460         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5461         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5462         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5463         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5464
5465 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5466
5467         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5468         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5469         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5470         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5471         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5472
5473 2003-03-16  Roland McGrath  <roland@redhat.com>
5474
5475         * tst-fork4.c: Include <string.h>.
5476         * tst-signal2.c: Likewise.
5477         * tst-mutex5.c (do_test): exit -> return.
5478         * tst-mutex2.c: Include <stdlib.h>.
5479
5480 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
5481
5482         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5483         (__lll_mutex_timedlock_wait): Correct expected value after
5484         spurious wakeup.  Otherwise we would never wait again.
5485
5486         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5487         zone versus inline asm stupidity.  Use correct instructions.
5488
5489         * tst-rwlock6.c: Add some more status output.
5490
5491 2003-03-15  Roland McGrath  <roland@redhat.com>
5492
5493         * sysdeps/pthread/configure.in: New file.
5494         * sysdeps/pthread/configure: New file (generated).
5495
5496 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5497
5498         * allocatestack.c (allocate_stack): Store the exact stack size of
5499         user allocated stacks.
5500
5501 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
5502
5503         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5504         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5505         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5506         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5507         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5508         Use `header.' prefix.
5509         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5510
5511 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5512
5513         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5514         __builtin_frame_address, use stack pointer.
5515
5516         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5517         instead of __builtin_frame_pointer.
5518
5519 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
5520
5521         * tst-basic1.c (do_test): Add cast to avoid warning.
5522         * tst-basic2.c (do_test): Likewise.
5523
5524         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5525         amount of stack correction.
5526
5527         * tst-fork4.c: Use test-skeleton.c.
5528
5529 2003-03-14  Roland McGrath  <roland@redhat.com>
5530
5531         * init.c: Fix typo "#eli" for "#else".
5532
5533 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
5534
5535         * allocatestack.c (__stack_user): Use hidden_data_def.
5536         * pthread_create.c (__pthread_keys): Likewise.
5537
5538         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5539
5540 2003-03-14  Roland McGrath  <roland@redhat.com>
5541
5542         * tst-fork4.c: New file.
5543         * Makefile (tests): Add it.
5544
5545         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
5546         we always define the padding space.
5547         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
5548         stopped supporting its own extensions fully.
5549         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
5550         struct also called `header', so `header.multiple_threads' is the field
5551         name to use on all machines.
5552         * allocatestack.c (allocate_stack): Use `header.' prefix.
5553         * sysdeps/pthread/createthread.c (create_thread): Likewise.
5554         * pthread_create.c (__pthread_create_2_1): Likewise.
5555         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
5556         (THREAD_SELF): Likewise.
5557         * sysdeps/x86_64/tls.h: Likewise.
5558         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5559         (SINGLE_THREAD_P): Likewise.
5560         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5561         (SINGLE_THREAD_P): Likewise.
5562         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5563         (SINGLE_THREAD_P): Likewise.
5564
5565         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
5566         value directly.
5567
5568 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
5569
5570         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
5571         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
5572
5573         * pthread_create.c (start_thread): setjmp is expected to return 0.
5574
5575         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
5576         (THREAD_GETMEM_NC): Likewise.
5577
5578 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
5579
5580         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
5581         and the size of the stack which must be allocated is a multiple,
5582         allocate one more page.
5583         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
5584         MULTI_PAGE_ALIASING.
5585
5586 2003-03-13  Roland McGrath  <roland@redhat.com>
5587
5588         * pthread_create.c (start_thread): Set EXITING_BIT after the
5589         event-reporting (and destructors), not before.
5590
5591 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
5592
5593         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
5594         lll_futex_wake): Declare register variables as long int instead of
5595         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
5596         Make syscall arguments clobbered by the syscall.
5597         (lll_futex_wait): Define using lll_futex_timed_wait.
5598
5599         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
5600         to void *.
5601
5602         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
5603         PPID if [! NDEBUG].
5604
5605         * allocatestack.c (nptl_ncreated): Only declare if
5606         COLORING_INCREMENT != 0.
5607
5608         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
5609         (__libc_enable_asynccancel_2): Remove prototype.
5610
5611         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
5612         ctid to match kernel.
5613
5614 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
5615
5616         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
5617         libc_multiple_threads.
5618         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
5619         __libc_multiple_threads to...
5620         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
5621
5622         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
5623         versioning.
5624         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5625         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5626
5627         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
5628         (__pthread_once_internal): Define.
5629
5630         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
5631         macros instead of .symver directly.
5632         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5633         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5634
5635         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
5636         * sysdeps/x86_64/tcb-offsets.sym: New file.
5637         * sysdeps/x86_64/Makefile: New file.
5638
5639         * sysdeps/i386/tcb-offsets.sym: Add SELF.
5640         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5641         to access own pthread_t in TCB.
5642         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5643         Likewise.
5644         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5645         Likewise.
5646         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5647
5648 2003-03-12  Roland McGrath  <roland@redhat.com>
5649
5650         * pthread-errnos.sym: New file.
5651         * Makefile (gen-as-const-headers): New variable, list that file.
5652         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5653         header <pthread-errnos.h> instead of defining errno values here.
5654         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5655         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5656         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5657         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5658         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5659         Likewise.
5660         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5661         Likewise.
5662         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5663         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5664         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5665         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5666         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5667         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5668         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5669         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5670         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5671         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5672         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5673         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5674         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5675         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5676         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5677         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5678         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5679         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5680         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5681         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5682         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5683         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5684         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5685         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5686         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5687         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5688         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5689
5690         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5691         CLONE_CHILD_SETTID worked.
5692
5693 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
5694
5695         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5696         file.
5697         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5698         file.
5699
5700         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5701         (pthread_cond_t): Add padding.
5702
5703         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5704         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5705         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5706
5707         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5708         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5709         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5710         (__pthread_rwlock_timedrdlock): Likewise.
5711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5712         (__pthread_rwlock_wrlock): Likewise.
5713         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5714         (__pthread_rwlock_rdlock): Likewise.
5715
5716         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5717
5718         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5719         result of lock re-get if it fails.
5720
5721 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
5722
5723         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5724         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5725         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5726         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5727         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5728         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5729         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5730         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5731         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5732         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5733
5734         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5735         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5736
5737         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5738         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5739         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5740         (create_thread): Likewise.
5741         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5742         * init.c (__pthread_initialize_minimal_internal): Initialize
5743         __libc_multiple_threads_ptr if necessary.
5744         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
5745         __pthread_multiple_threads and __libc_multiple_threads_ptr.
5746         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5747         __libc_multiple_threads.
5748         (__libc_pthread_init): Return pointer to __libc_pthread_init if
5749         necessary.
5750
5751         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5752         (THREAD_SETMEM_NC): Likewise.
5753
5754         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5755         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5756         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5757         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5758
5759         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5760         Eliminate one entire instruction.
5761
5762         * cancellation.c (__pthread_enable_asynccancel_2): New function.
5763         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5764         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5765         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5766         instead of __pthread_enable_asynccancel.
5767         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5768         (__pthread_cond_wait): Likewise.
5769         * sysdeps/pthread/pthread_cond_timedwait.c
5770         (__pthread_cond_timedwait): Likewise.
5771         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5772
5773         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5774         (__condvar_cleanup): Wake up all waiters in case we got signaled
5775         after being woken up but before disabling asynchronous
5776         cancellation.
5777         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5778         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5779         (__condvar_cleanup): Likewise.
5780
5781         * init.c (__NR_set_tid_address): If already defined, don't redefine.
5782         Make it an error if architecture has no #if case.  Add x86-64.
5783
5784         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
5785         pt-initfini.s generation.
5786
5787         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
5788         (TLS_INIT_TP): Fix typo.
5789
5790 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
5791
5792         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
5793         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
5794
5795         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
5796         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5797         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
5798         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
5799         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
5800         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5801         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5802         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5803
5804 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
5805
5806         * sysdeps/pthread/pthread_cond_timedwait.c
5807         (__pthread_cond_timedwait): Return the result of the final
5808         locking.  If it succeeds, the regular function return value.
5809
5810         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
5811         Return result of the final locking.
5812         * version.c (__nptl_main): Work around problems with the strange
5813         INTERNAL_SYSCALL macro on ppc32.
5814         * init.c (__pthread_initialize_minimal_internal): Unblock
5815         SIGCANCEL in case the parent blocked it.
5816         Reported by Paul Mackerras <paulus@samba.org>.
5817
5818         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
5819         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
5820         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
5821
5822 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
5823
5824         * sysdeps/pthread/pthread_cond_timedwait.c
5825         (__pthread_cond_timedwait): Unlock and fail if
5826         __pthread_mutex_unlock_internal failed.
5827
5828         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
5829         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
5830         Use ARCH_CLONE.
5831         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
5832         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
5833         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
5834         ALLOCATE_STACK): New macros.
5835         (TLS_TPADJ): New macro.
5836         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
5837         (allocate_stack): Handle TLS_DTV_AT_TP and
5838         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
5839         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
5840         Don't set PD->self.
5841         * init.c [__ia64__] (__NR_set_tid_address): Define.
5842
5843         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
5844         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
5845         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
5846         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
5847         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
5848         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
5849         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
5850         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
5851         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
5852         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
5853         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
5854         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
5855         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
5856         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
5857         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
5858         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
5859         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
5860         * sysdeps/ia64/bits/atomic.h: New file.
5861         * sysdeps/ia64/Makefile: New file.
5862         * sysdeps/ia64/pthread_spin_init.c: New file.
5863         * sysdeps/ia64/pthread_spin_lock.c: New file.
5864         * sysdeps/ia64/pthread_spin_trylock.c: New file.
5865         * sysdeps/ia64/pthread_spin_unlock.c: New file.
5866         * sysdeps/ia64/pthreaddef.h: New file.
5867         * sysdeps/ia64/tcb-offsets.sym: New file.
5868         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
5869         * sysdeps/ia64/tls.h: New file.
5870
5871         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
5872         to syscall instead of no arguments.
5873
5874 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
5875
5876         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
5877         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
5878         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
5879         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
5880
5881         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
5882         unused code.
5883
5884         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
5885
5886         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5887         lowlevelbarrier.sym.
5888         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
5889         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
5890         Include lowlevelbarrier.h and don't define offsets locally.
5891         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
5892
5893         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5894         (__lll_mutex_lock_wait): Reverse order of first two parameters.
5895         (__lll_mutex_timedlock_wait): Likewise.
5896         (lll_mutex_lock): Adjust asm for that.
5897         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
5898         (lll_lock): Adjust asm for operand order change.
5899         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
5900         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
5901
5902         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
5903         Reverse order of parameters.
5904         (__lll_timedwait_tid): Remove regparms attribute.
5905         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
5906         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
5907
5908         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5909         (__lll_timedwait_tid): Remove one unnecessary instruction.
5910
5911         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
5912         __lll_mutex_timedlock_wait only for NOT_IN_libc.
5913         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
5914         lowlevelmutex.S.
5915
5916         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
5917         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
5918         for NOT_IN_libc.
5919         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
5920         lowlevellock.S.
5921
5922         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
5923         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
5924         for libc.so.
5925         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
5926         define LOCK here (if UP is not defined).  The actual code is in
5927         lowlevelmutex.S.
5928
5929         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
5930         LOCK is already defined.  Don't define lll_unlock_wake_cb and
5931         __lll_timedwait_tid for libc.so.
5932         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
5933         define LOCK here (if UP is not defined).  The actual code is in
5934         lowlevellock.S.
5935
5936         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
5937         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
5938         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
5939         instead of lowlevelsem.h.
5940         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5941         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5942         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5943
5944         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5945         lowlevelrwlock.sym.
5946         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
5947         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
5948         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
5949
5950         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
5951         register loading.
5952         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
5953         last changed.  D'oh.
5954
5955         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
5956
5957         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
5958         of __libc_locking_needed.
5959         (lll_trylock): Initialize %eax to zero.
5960
5961         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
5962         pthread_cond_t definition.
5963
5964 2003-03-10  Roland McGrath  <roland@redhat.com>
5965
5966         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
5967         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
5968         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
5969         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
5970         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
5971
5972         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
5973         Instead of setting PD->multiple_threads, set globals
5974         __pthread_multiple_threads and __libc_multiple_threads.
5975         * sysdeps/pthread/createthread.c (create_thread): Likewise.
5976         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
5977         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
5978
5979         * descr.h (struct pthread): Conditionalize first member on
5980         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
5981         containing an anonymous tcbhead_t.  Move `list' member out.
5982         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
5983         * allocatestack.c: Remove use of `header.data.' prefix.
5984         * pthread_create.c: Likewise.
5985         * init.c (__pthread_initialize_minimal_internal): Likewise.
5986         * sysdeps/pthread/createthread.c (create_thread): Likewise.
5987         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
5988         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
5989         * sysdeps/x86_64/tls.h: Likewise.
5990         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5991         (SINGLE_THREAD_P): Likewise.
5992         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5993         (SINGLE_THREAD_P): Likewise.
5994         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
5995         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
5996
5997 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
5998
5999         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
6000
6001         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
6002         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6003
6004         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
6005         leftovers from the ia32 code.
6006
6007         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
6008         memory load.
6009         (clear_once_control): Don't load %esi.
6010
6011         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
6012         handling.
6013
6014         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6015
6016         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
6017         * sysdeps/unix/sysv/linux/createthread.c: ...here.
6018
6019         * Makefile (tests): Add tst-cond10.
6020         * tst-cond10.c: New file.
6021
6022 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
6023
6024         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
6025         * tst-signal3.c (do_test): Likewise.
6026         * tst-sem5.c (do_test): Likewise.
6027         * tst-kill6.c (do_test): Likewise.
6028         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
6029
6030         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
6031         of inc/dec.
6032         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6033         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
6034         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6035         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6036         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6037         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6038         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6039         Likewise.
6040         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6041         Likewise.
6042         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6043         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6044         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6045         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6046         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6047         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6048         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6049         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6050
6051         * allocatestack.c (allocate_stack): If mprotect() fails free the
6052         TLS memory.
6053
6054 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
6055
6056         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
6057
6058         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
6059         lll_wake_tid.  This was used only to work around kernel limits in
6060         the early days.
6061         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
6062         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
6063         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6064         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
6065
6066         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
6067         (__pthread_initialize_minimal_internal): Change initialization of
6068         __static_tls_align_m1 appropriately.
6069         * pthreadP.h (__static_tls_align_m1): Renamed from
6070         __static_tls_align.
6071         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
6072         instead of __static_tls_align-1.
6073
6074 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
6075
6076         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6077
6078         * pthread_create.c: Define __pthread_keys using nocommon
6079         attribute, not by placing it explicitly in bss.
6080         Remove DEFINE_DEALLOC definition.  Not needed anymore.
6081
6082         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
6083         Use it in mmap call to allocate stacks.
6084
6085         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
6086
6087         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
6088         result of the thread function.
6089
6090 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
6091
6092         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
6093         version is just fine.
6094
6095         * sysdeps/unix/sysv/linux/libc_pthread_init.c
6096         (__pthread_child_handler): Renamed from pthread_child_handler,
6097         exported, and marked hidden.  Change all users.
6098         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
6099         free __pthread_child_handler from child list.
6100
6101 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6102
6103         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
6104
6105         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6106         Fix handling of cancellation and failing pthread_mutex_unlock call.
6107         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6108         (__pthread_cond_wait): Likewise.
6109
6110         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6111         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
6112         lll_futex_timed_wait call.
6113         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6114         (pthread_rwlock_timedwrlock): Likewise.
6115
6116         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6117         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6118         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6119
6120         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6121         check of lll_futex_wake return value.
6122
6123 2003-03-03  Roland McGrath  <roland@redhat.com>
6124
6125         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6126
6127         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6128         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6129         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6130
6131 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
6132
6133         * sysdeps/pthread/timer_create.c (timer_create): Return correct
6134         error for CPU clocks.
6135
6136         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6137         _POSIX_MONOTONIC_CLOCK.
6138         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6139
6140         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6141         recent kernels.
6142
6143 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6144
6145         * descr.h (struct pthread): Move cleanup field to the front.
6146
6147 2003-03-01  Roland McGrath  <roland@redhat.com>
6148
6149         * sem_open.c (sem_open): Braino fix.
6150
6151 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6152
6153         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6154         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6155         __pthread_cleanup_pop functionality.
6156         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6157
6158         * descr.h (struct pthread): Move tid field to the front now that
6159         it is often used.
6160
6161         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6162         (__lll_mutex_timedlock_wait): Remove.
6163         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6164         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6165         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6166         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6167         (lll_unlock_wake_cb): Don't save and restore %esi.
6168         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6169         %esi.
6170         (__lll_timedwait_tid): Add alignment.
6171         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6172         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6173         %esi.
6174         (__lll_timedwait_tid): Removed.
6175         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6176         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6177         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6178         (pthread_barrier_wait): Don't save, load, and restore %esi for
6179         last thread.
6180         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6181         (__pthread_cond_signal): Don't save, load, and restore %esi.
6182         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6183         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6184         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6185         Don't save, load, and restore %esi.
6186
6187 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
6188
6189         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6190         Release lock before waking up the waiters.
6191
6192         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6193
6194         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6195         (reader_thread): Likewise.
6196
6197         * sysdeps/pthread/pthread_rwlock_unlock.c
6198         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
6199         to wake up readers if there are none.
6200
6201         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6202         Release internal lock before wake threads.
6203
6204 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
6205
6206         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6207         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
6208         predefined.
6209         * tst-rwlock9.c: Likewise.
6210         * tst-rwlock10.c: New file.
6211         * tst-rwlock11.c: New file.
6212
6213         * Makefile (tests): Add tst-dlsym1.
6214         * tst-dlsym1.c: New file.
6215
6216         * init.c (__pthread_initialize_minimal_internal): Set
6217         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6218         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6219
6220 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
6221
6222         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6223
6224         * tst-cond2.c: Fix sychronization with child.
6225
6226         * tst-rwlock8.c (reader_thread): Remove unused variable.
6227
6228         * Makefile: Add rules to build and run tst-tls3.
6229         * tst-tls3.c: New file.
6230         * tst-tls3mod.c: New file.
6231
6232         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6233         * tst-rwlock8.c: New file.
6234         * tst-rwlock9.c: New file.
6235         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6236         complete broken rwlock implementation.
6237         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6238         Likewise.
6239         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6240         Likewise.
6241         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6242         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6243         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6244         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6245         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6246         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6247         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6248
6249 2003-02-23  Roland McGrath  <roland@redhat.com>
6250
6251         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6252
6253 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
6254
6255         * Makefile (tests): Add tst-context1.
6256         * tst-context1.c: New file.
6257
6258         * Makefile (tests): Add tst-tls1 and tst-tls2.
6259         * tst-tls1.c: New file.
6260         * tst-tls2.c: New file.
6261
6262         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6263         for failed cmpxchg.
6264
6265         * pthread_create.c (start_thread): Set EXITING_BIT early.
6266
6267         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6268         (THREAD_GETMEM_NC): Likewise.
6269
6270 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
6271
6272         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6273         off 3 more bytes by using offset-less instructions when possible.
6274
6275         * Makefile: Add dependency for $(objpfx)version.d.
6276
6277         * eintr.c (eintr_source): Add unnecessary return but the compiler
6278         insists.
6279
6280         * tst-kill3.c: Include <unistd.h>.
6281
6282 2003-02-21  Roland McGrath  <roland@redhat.com>
6283
6284         * pthread_create.c (start_thread): Call __libc_thread_freeres.
6285
6286 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6287
6288         * Makefile (tests): Add tst-eintr1.
6289         (distribute): Add eintr.c.
6290         * tst-eintr1.c: New file.
6291         * eintr.c: New file.
6292
6293         * pthread_cancel.c (pthread_cancel): Use tkill directly.
6294
6295         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6296         Disallow sending SIGCANCEL.
6297
6298         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
6299         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6300         * tst-kill1.c: New file.
6301         * tst-kill2.c: New file.
6302         * tst-kill3.c: New file.
6303         * tst-kill5.c: New file.
6304         * tst-kill6.c: New file.
6305         * tst-basic7.c: Renamed to...
6306         * tst-kill4.c: ...this.
6307
6308 2003-02-21  Roland McGrath  <roland@redhat.com>
6309
6310         * Makefile (install-lib-ldscripts): New variable.
6311
6312 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6313
6314         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6315         * pthread_cancel.c: Use INVALID_TD_P.
6316         * pthread_detach.c: Likewise.
6317         * pthread_getschedparam.c: Likewise.
6318         * pthread_setschedparam.c: Likewise.
6319         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6320         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6321         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6322         * pthread_timedjoin.c: Likewise.
6323
6324         * tst-basic7.c: Include <signal.h>.
6325
6326         * pthread_join.c (pthread_join): Limited checking for invalid
6327         descriptors.
6328         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6329
6330 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
6331
6332         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6333         beginning of the loop.  Clear the entire first block of TSD.
6334         * Makefile (tests): Add tst-key4.
6335         * tst-key4.c: New file.
6336
6337 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
6338
6339         * Makefile (tests): Add tst-basic7.
6340         * tst-basic7.c: New file.
6341
6342         * pthread_create.c (deallocate_tsd): Mark as internal_function.
6343         Add some more __builtin_expect.
6344
6345         * pthreadP.h: Define dummy version of DEBUGGING_P.
6346
6347 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
6348
6349         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6350         _POSIX_THREAD_PRIORITY_SCHEDULING.
6351         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6352         _XOPEN_REALTIME_THREADS.
6353         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6354
6355         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6356         kernel returns EINVAL for PID <= 0, work around it.
6357
6358         * Makefile (tests): Add tst-signal5.
6359         * tst-signal5.c: New file.
6360
6361         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6362         and LOGIN_NAME_MAX.
6363
6364         * tst-cancel1.c (tf): Block all signals.
6365
6366         * Makefile (tests): Add tst-basic6.
6367         * tst-basic6.c: New file.
6368
6369         * tst-basic1.c: Add test for process ID.
6370
6371         * Makefile (tests): Add tst-cancel10.
6372         * tst-cancel10.c: New file.
6373
6374         * Makefile (tests): Add tst-signal4.
6375         * tst-signal4.c: New file.
6376
6377         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6378         __sigismember instead of sigismember.  Add __builtin_expect.
6379
6380 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
6381
6382         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6383         pthread_setcancelstate, and pthread_rwlock_setpshared.
6384
6385         * tst-cancel7.c (do_test): Make sure the pid file exists before
6386         canceling the thread.
6387
6388         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6389         pthread_rwlock_timedrdlock tests.
6390         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6391         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6392         Check for invalid tv_nsec field.
6393         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6394         Likewise.
6395
6396         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6397         recursive mutex of overflow.
6398
6399         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6400
6401         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6402         going into an endless loop.
6403         * Makefile (tests): Add tst-cancel9.
6404         * tst-cancel9.c: New file.
6405
6406         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6407
6408 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
6409
6410         * tst-mutex5.c (do_test): Add more timedlock tests.
6411
6412         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6413         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6414
6415         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6416         use INLINE_SYSCALL.  Error number is returned, not -1.
6417
6418         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6419         and __deallocate_stack with internal_function.
6420         * pthread_create.c: Adjust definitions appropriately.
6421         * allocatestack.c: Likewise.
6422
6423         * pthread_join.c: Add one more __builtin_expect.
6424         * pthread_timedjoin.c: Likewise.
6425
6426         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6427         not data of sequence number does not match.
6428         Add one __builtin_expect.
6429
6430         * Makefile (tests): Add tst-clock1.
6431         * tst-clock1.c: New file.
6432
6433         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6434         negative arguments.
6435         * Makefile (tests): Add tst-basic5.
6436         * tst-basic5.c: New file.
6437
6438 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
6439
6440         * Makefile (tests): Add tst-basic4.
6441         * tst-basic4.c: New file.
6442
6443         * pthreadP.h: Add declaraction for __nptl_nthreads.
6444         * pthread_create.c: Define __nptl_nthreads
6445         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
6446         after thread is done.  If then zero, call exit(0).
6447         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6448         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
6449         * init.c (pthread_functions): Initialize ptr_nthreads.
6450         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6451         (__reclaim_stacks): Decrement __nptl_nthreads.
6452         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6453         Define.
6454         * Makefile (tests): Add tst-basic3.
6455         * tst-basic3.c: New file.
6456
6457         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
6458         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
6459         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6460         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
6461         if asynchronous canceling is enabled.
6462         * pthread_join.c (pthread_join): When recognizing circular joins,
6463         take into account the other thread might be already canceled.
6464         * Makefile (tests): Add tst-join5.
6465         * tst-join5.c: New file.
6466
6467         * Makefile (tests): Add tst-join4.
6468         * tst-join4.c: New file.
6469
6470 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6471
6472         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6473
6474 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6475
6476         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6477         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6478         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6479         warning.
6480         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6481         to avoid warning.
6482         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6483         error if lll_futex_wake failed.
6484
6485 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6486
6487         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6488         handling of cancellation and failung pthread_mutex_unlock call.
6489         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6490         * Makefile (tests): Add tst-cond8 and tst-cond9.
6491         * tst-cond8.c: New file.
6492         * tst-cond9.c: New file.
6493
6494         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6495
6496         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
6497         non-standard initializers with __USE_GNU.
6498
6499         * Makefile (tests): Add tst-cleanup3.
6500         * tst-cleanup3.c: New file.
6501
6502 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
6503
6504         * Makefile (tests): Add tst-attr1 and tst-attr2.
6505         * tst-attr1.c: New file.
6506         * tst-attr2.c: New file.
6507
6508         * Makefile: Add rules to build and run tst-atfork2 test.
6509         * tst-atfork2.c: New file.
6510         * tst-atfork2mod.c: New file.
6511
6512         * sysdeps/unix/sysv/linux/unregister-atfork.c
6513         (__unregister_atfork): Free the memory allocated for the handlers
6514         after removing them from the lists.
6515
6516         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6517         cleanup function.
6518
6519         * tst-atfork1.c (do_test): Wait for the child we forked.
6520         Report error in child.
6521
6522         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6523
6524         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6525
6526 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
6527
6528         * Makefile (tests): Add tst-cancel8.
6529         * tst-cancel8.c: New file.
6530
6531         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6532         clearing of control variable.
6533         * Makefile (tests): Add tst-once3 and tst-once4.
6534         * tst-once3.c: New file.
6535         * tst-once4.c: New file.
6536
6537 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
6538
6539         * sysdeps/sh/Makefile: New file.
6540         * sysdeps/sh/bits/atomic.h: New file.
6541         * sysdeps/sh/pthread_spin_init.c: New file.
6542         * sysdeps/sh/pthread_spin_lock.c: New file.
6543         * sysdeps/sh/pthread_spin_trylock.S: New file.
6544         * sysdeps/sh/pthread_spin_unlock.S: New file.
6545         * sysdeps/sh/pthreaddef.h: New file.
6546         * sysdeps/sh/tcb-offsets.sym: New file.
6547         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
6548         * sysdeps/sh/tls.h: New file.
6549         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
6550         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
6551         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
6552         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
6553         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
6554         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
6555         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
6556         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
6557         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
6558         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
6559         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
6560         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
6561         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
6562         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
6563         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
6564         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
6565         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
6566         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
6567         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
6568         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
6569         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
6570         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
6571         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
6572         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
6573         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
6574         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
6575         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
6576         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
6577         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
6578         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
6579
6580 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
6581
6582         * tst-cond2.c: Rearrange code to not rely on behavior undefined
6583         according to POSIX.
6584
6585         * tst-basic2.c (do_test): Lock mutex before creating the thread.
6586
6587 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
6588
6589         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
6590         (TLS_GET_FS): New #define.
6591         (TLS_SET_FS): New #define.
6592         Correct value of __NR_set_thread_area.
6593
6594         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
6595
6596 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
6597
6598         * Makefile (tests): Add tst-popen1.
6599         * tst-popen1.c: New file.
6600
6601         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
6602         but inactive generalization.
6603         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6604         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6605         Minor optimization, remove one instruction.
6606         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6607
6608 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6609
6610         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
6611
6612 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6613
6614         * init.c (__NR_set_tid_address): Add #ifdef for s390.
6615         * sysdeps/pthread/pthread_barrier_wait.c: New file.
6616         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
6617         * sysdeps/pthread/pthread_cond_signal.c: New file.
6618         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
6619         * sysdeps/pthread/pthread_cond_wait.c: New file.
6620         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
6621         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
6622         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
6623         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
6624         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
6625         * sysdeps/s390/Makefile: New file.
6626         * sysdeps/s390/bits/atomic.h: New file.
6627         * sysdeps/s390/pthread_spin_init.c: New file.
6628         * sysdeps/s390/pthread_spin_lock.c: New file.
6629         * sysdeps/s390/pthread_spin_trylock.c: New file.
6630         * sysdeps/s390/pthread_spin_unlock.c: New file.
6631         * sysdeps/s390/pthreaddef.h: New file.
6632         * sysdeps/s390/tcb-offsets.sym: New file.
6633         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
6634         * sysdeps/s390/tls.h: New file.
6635         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
6636         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6637         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6638         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6639         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6640         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6641         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6642         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6643         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6644         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6645         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6646         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6647         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6648         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6649         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6650         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6651         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6652         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6653         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6654         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6655         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6656         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6657         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6658
6659 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
6660
6661         * atomic.h: Add a couple more default implementations.
6662         (atomic_compare_and_exchange_acq): Use
6663         __arch_compare_and_exchange_32_acq in return value definition.  It
6664         always exists.
6665         (atomic_bit_set): Renamed from atomic_set_bit.
6666         Add missing atomic_ prefixes.
6667
6668         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6669         thread library is available, use correct value to mark initialized
6670         once variable.
6671
6672 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
6673
6674         * allocatestack.c (allocate_stack): Use __getpagesize instead of
6675         __sysconf to determine pagesize.
6676
6677         * pthread_create.c: Include <atomic.h>.
6678         * allocatestack.c (allocate_stack): Implement coloring of the
6679         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
6680         size minus one.  Adjust users.
6681         * sysdeps/i386/i686/Makefile: New file.
6682
6683 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
6684
6685         * allocatestack.c: Improve comment throughout the file.
6686
6687         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6688         (__lll_lock_wait): Add branch prediction.
6689         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6690         (__lll_lock_wait): Likewise.
6691         (lll_unlock_wake_cb): Removed.
6692
6693 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
6694
6695         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6696         _POSIX_THREAD_PRIORITY_SCHEDULING.
6697
6698 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
6699
6700         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6701         Fix return type of ptr___pthread_getspecific.
6702
6703 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
6704
6705         * Makefile (tests): Add tst-umask1.
6706         (tst-umask1-ARGS): Define.
6707         * tst-umask1.c: New file.
6708
6709 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
6710
6711         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
6712         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6713         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6714         pthread_rwlock_unlock.
6715         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6716         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6717         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6718         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6719         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6720         New file.
6721         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6722         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6723         New file.
6724         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6725         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6726         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6727         New file.
6728         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6729         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6730         New file.
6731         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6732         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6733         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6734         New file.
6735         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6736         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6737         New file.
6738         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6739
6740         * Makefile (libpthread-routines): Remove lowlevelcond and
6741         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6742         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6743         and pthread_cond_broadcast.
6744         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6745         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6746         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6747         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6748         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6749         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6750         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6751         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6752         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6753         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6754         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6755         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6756         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6757         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6758         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6759         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6760         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6761         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6762         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6763         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6764         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6765         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6766         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6767         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6768         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6769         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
6770         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
6771         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
6772         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
6773         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
6774         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
6775
6776         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
6777         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
6778         of the code is moved to ...
6779         * sysdeps/pthread/createthread.c: ...here.  New file.
6780
6781 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
6782
6783         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
6784         (__new_sem_post): Clear %eax before returning.
6785         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
6786
6787         * Makefile (tests): Add tst-cleanup2.
6788         * tst-cleanup2.c: New file.
6789
6790         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6791         Interpret first parameter correctly.
6792
6793 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
6794
6795         * Makefile (headers): Add bits/semaphore.h.
6796
6797 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
6798
6799         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
6800         if not SHARED.
6801
6802 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
6803
6804         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
6805         must be used and mapping failed.
6806         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
6807
6808         * Makefile (CFLAGS-pthread_self.os): Define this, not
6809         CFLAGS-pthread_self.c.
6810
6811 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
6812
6813         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
6814         lll_unlock_wake_cb.
6815
6816         * Makefile (libpthread-routines): Add version.  Add rules to build
6817         version.os and banner.h.
6818         * version.c: New file.
6819
6820 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
6821
6822         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
6823         the alias unconditional.
6824         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
6825
6826 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
6827
6828         * Makefile (CFLAGS-pthread_self.c): New definition.
6829
6830 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
6831
6832         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
6833         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
6834         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
6835         * init.c (__pthread_initialize_minimal_internal): Likewise.
6836
6837 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
6838
6839         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
6840
6841         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6842         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6843         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6844         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6845         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6846         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6847
6848 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
6849
6850         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
6851         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
6852         * tst-cancel-wrappers.sh: Remove all exceptions.
6853
6854 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
6855
6856         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
6857         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
6858
6859         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
6860         Use __libc_pthread_functions array if SHARED.
6861
6862         * pthreadP.h: Move pthread_cond_2_0_t definition to...
6863         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
6864
6865         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
6866         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
6867         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
6868         __libc_ptf_call instead of __libc_maybe_call.
6869         (PTF): New #define.
6870         (__libc_cleanup_region_start): Wrap function name with PTF call.
6871         (__libc_cleanup_region_end): Likewise.
6872         (__libc_cleanup_end): Likewise.
6873
6874         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
6875         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
6876         * pthread_key_create.c: Add __pthread_key_create_internal alias.
6877         * pthreadP.h: Add prototypes.
6878
6879         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
6880         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
6881         __pthread_rwlock_unlock aliases.
6882         * pthreadP.h: Add prototypes for new aliases.
6883
6884         * pthreadP.h (struct pthead_functions): Moved to...
6885         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
6886         * init.c (pthread_functions): Add initializers for new elements.
6887
6888         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
6889         __pthread_cleanup_pop_restore aliases.
6890         * pthreadP.h: Add prototypes.
6891
6892         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
6893         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
6894         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
6895         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
6896         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6897         * pthreadP.h: Adjust prototypes and callers.
6898
6899 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
6900
6901         * Makefile (tests): Add tst-cancel7.
6902         (tst-cancel7-ARGS): New variable.
6903         * tst-cancel7.c: New file.
6904
6905         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
6906         around gcc defficiencies.
6907         * old_pthread_cond_signal.c: Likewise.
6908         * old_pthread_cond_timedwait.c: Likewise.
6909         * old_pthread_cond_wait.c: Likewise.
6910
6911         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
6912
6913 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
6914
6915         * Makefile (tests): Add tst-cond7.
6916         * tst-cond7.c: New file.
6917
6918         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6919         (condvar_cleanup): Get condvar address from the right place.
6920
6921         * atomic.h: Correct definitions of atomic_full_barrier,
6922         atomic_read_barrier, atomic_write_barrier.
6923
6924         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
6925         race-free.
6926         * old_pthread_cond_signal.c: Likewise.
6927         * old_pthread_cond_timedwait.c: Likewise.
6928         * old_pthread_cond_wait.c: Likewise.
6929
6930 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
6931
6932         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
6933
6934 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
6935
6936         * pthreadP.h (pthread_cond_2_0_t): New type.
6937         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
6938         Use new type for the 2.0 condvar function prototypes.
6939         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
6940         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
6941         parameter.
6942         * old_pthread_cond_destroy.c: Likewise.
6943         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
6944         * old_pthread_cond_signal.c: Likewise.
6945         * old_pthread_cond_timedwait.c: Likewise.
6946         * old_pthread_cond_wait.c: Likewise.
6947
6948         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6949         (__pthread_cond_wait): Don't save cancellation mode and seq value
6950         in same location.
6951
6952         * herrno.c (__h_errno_location): Don't define as weak.
6953
6954 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
6955
6956         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
6957         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
6958         and pthread_cond_wait.
6959         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
6960         Renamed to...
6961         (__pthread_cond_broadcast_2_0): ... this.
6962         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
6963         Renamed to...
6964         (__pthread_cond_destroy_2_0): ... this.
6965         * old_pthread_cond_init.c (__old_pthread_cond_init):
6966         Renamed to...
6967         (__pthread_cond_init_2_0): ... this.
6968         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
6969         Renamed to...
6970         (__pthread_cond_signal_2_0): ... this.
6971         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
6972         Renamed to...
6973         (__pthread_cond_wait_2_0): ... this.
6974         * pthread_cond_destroy.c: Include shlib-compat.h.
6975         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
6976         * pthread_cond_init.c: Include shlib-compat.h.
6977         (pthread_cond_init): Change strong_alias into versioned_symbol.
6978         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
6979         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
6980         fields.
6981         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
6982         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
6983         __pthread_cond_wait_2_0): New prototypes.
6984         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
6985         __old_pthread_cond_init, __old_pthread_cond_signal,
6986         __old_pthread_cond_wait): Removed.
6987         * init.c: Include shlib-compat.h.
6988         (pthread_functions): Guard ptr___pthread_attr_init_2_0
6989         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
6990         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
6991         ptr___pthread_cond_*_2_0 fields.
6992         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
6993         pthread_cond_*@GLIBC_2.0 compatibility symbols.
6994
6995         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
6996         LIBC_SIGACTION was not yet defined.
6997         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
6998         [!defined LIBC_SIGACTION] (__sigaction): New function and
6999         libc_hidden_weak.
7000         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
7001         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
7002
7003 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
7004
7005         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
7006
7007 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
7008
7009         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7010         New, larger type definition.
7011         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
7012         implementation.
7013         * Versions [libpthread]: Add definitions for new pthread_cond_*
7014         interfaces for version GLIBC_2.3.2.
7015         * pthread_cond_init.c: Update initialization for new type definition.
7016         * Makefile (libpthread-routines): Remove pthread_cond_wait,
7017         pthread_cond_timedwait, pthread_cond_signal, and
7018         pthread_cond_broadcast.  Add old_pthread_cond_init,
7019         old_pthread_cond_destroy, old_pthread_cond_wait,
7020         old_pthread_cond_timedwait, old_pthread_cond_signal, and
7021         old_pthread_cond_broadcast.
7022         * old_pthread_cond_broadcast.c: New file.
7023         * old_pthread_cond_destroy.c: New file.
7024         * old_pthread_cond_init.c: New file.
7025         * old_pthread_cond_signal.c: New file.
7026         * old_pthread_cond_timedwait.c: New file.
7027         * old_pthread_cond_wait.c: New file.
7028         * pthreadP.h: Add prototypes for the compatibility interfaces.
7029
7030         * pthread_cond_destroy.c: Don't include <errno.h>.
7031
7032 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
7033
7034         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
7035         unnecessary zero offset when addressing MUTEX.
7036
7037 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
7038
7039         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7040         __register_atfork.
7041         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
7042         for __register_atfork.
7043
7044 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
7045
7046         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
7047         instead of ASSEMBLER test macro.
7048
7049         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
7050         __libc_current_sigrtmax): Add libc_hidden_def.
7051
7052         * sysdeps/pthread/list.h: Remove assert.h include.
7053
7054 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
7055
7056         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
7057         __pthread_initialize_minimal_internal not
7058         __pthread_initialize_minimal.
7059
7060 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
7061
7062         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
7063         __pthread_initialize_minimal as hidden.
7064
7065         * init.c (__pthread_initialize_minimal_internal): Don't mark as
7066         constructor.
7067
7068 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
7069
7070         * Makefile ($(inst_libdir)/libpthread.so): Depend on
7071         $(common-objpfx)format.lds, include that into the output script.
7072         Fix comment.
7073         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
7074
7075 2002-12-28  Andreas Jaeger  <aj@suse.de>
7076
7077         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
7078         nsec resolution changes.
7079         (xstat64_conv): Likewise.
7080         (xstat32_conv): Likewise.
7081         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
7082         struct kernel_stat.
7083         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
7084         structs stat and stat64.
7085         * time/time.h (__timespec_defined): Define for __USE_MISC.
7086         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
7087
7088 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
7089
7090         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
7091         argument.
7092         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
7093         (pthread_exit): Use strong_alias to avoid warnings.
7094         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
7095         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
7096         ptr___pthread_attr_init_2_*.
7097         * init.c (pthread_functions): Adjust.
7098
7099 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
7100
7101         * forward.c: Make all functions available by default again.  It
7102         caused too much trouble.
7103
7104         * pt-siglongjmp.c: Removed.
7105
7106 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
7107
7108         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
7109         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
7110         * sysdeps/i386/Makefile: New file.
7111         * sysdeps/i386/tcb-offsets.sym: New file.
7112         * sysdeps/pthread/tcb-offsets.h: New file.
7113         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7114         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7115
7116         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7117         __register_atfork...
7118         (GLIBC_2.3.2): ...here.
7119
7120 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7121
7122         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7123         pthread_attr_setstackaddr with __attribute_deprecated__.
7124
7125 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7126
7127         * pt-system.c (system): Remove cancellation handling.
7128         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7129         cancellation routines.
7130
7131 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7132
7133         * descr.h: Include <dl-sysdep.h>.
7134         (struct pthread): Move header.data.list to the back of the struct.
7135         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7136         (MULTIPLE_THREADS_OFFSET): Adjust offset.
7137         (SYSINFO_OFFSEET): Likewise.
7138
7139 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7140
7141         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7142         Define.
7143         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7144         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7145         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7146         (USE_DL_SYSINFO): Undef.
7147
7148 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
7149
7150         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7151         $(common-objpfx)libc.so.
7152         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7153         it is bigger than pipe buffer size even on arches with bigger
7154         page size.
7155         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7156
7157 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
7158
7159         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7160         correct errno access for case that USE___THREAD is not defined.
7161
7162 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
7163
7164         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7165         Patch by Marijn Ros <marijn@mad.scientist.com>.
7166
7167 2002-12-22  Roland McGrath  <roland@redhat.com>
7168
7169         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7170
7171 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
7172
7173         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7174
7175 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
7176
7177         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7178         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7179         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7180
7181         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7182         of int $0x80.
7183         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7184         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7185         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7186         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7187         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7188         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7189         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7190         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7191
7192         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7193         sysenter.
7194         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7195
7196         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7197
7198         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7199         in new TCB.
7200         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7201         that sysinfo is properly initialized.
7202         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7203         to 1 only for ld.so.
7204
7205         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7206         RTLD_CORRECT_DYNAMIC_WEAK.
7207
7208 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
7209
7210         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7211         Use return 0 as 6th argument to FORWARD4.
7212         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7213
7214 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7215
7216         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7217         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7218         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7219         (INIT_SYSINFO): New #define.
7220         (TLS_TP_INIT): Use INIT_SYSINFO.
7221         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7222         At test to make sure SYSINFO_OFFSET value is correct.
7223         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7224
7225 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
7226
7227         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7228         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7229         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7230         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7231         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7232         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7233         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7234
7235 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7236
7237         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7238         macro instead of using int $0x80 directly.
7239
7240         * sysdeps/pthread/bits/stdio-lock.h: New file.
7241         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7242         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7243         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7244         * Makefile (routines): Add libc-lowlevelmutex.
7245
7246         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7247         __i686.get_pc_thunk.dx.
7248
7249 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7250
7251         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7252         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7253         ($(objpfx)tst-cancel-wrappers.out): New rule.
7254         * tst-cancel-wrappers.sh: New test.
7255         * tst-locale1.c: Include signal.h.
7256         (uselocale): Test static linking of __libc_current_sigrt*.
7257
7258 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
7259
7260         * Makefile (tests): Add tst-cancel6.
7261         * tst-cancel6.c: New file
7262
7263 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7264
7265         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7266         Define meaningfully for assembler as well.
7267         * pthreadP.h (struct pthread_functions): Remove
7268         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
7269         and ptr_pthread_attr_init_2_1 fields.
7270         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7271         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7272         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7273         (FORWARD3): Define using FORWARD4.
7274         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7275         versions.
7276         * pt-system.c: Remove duplicate stdlib.h include.
7277
7278 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
7279
7280         * sem_init.c: Define sem_init@GLIBC_2.0.
7281         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7282         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7283
7284         * flockfile.c: Moved to...
7285         * sysdeps/pthread/flockfile.c: ...here.  New file.
7286         * funlockfile.c: Moved to...
7287         * sysdeps/pthread/funlockfile.c: ...here.  New file.
7288         * ftrylockfile.c: Moved to...
7289         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
7290
7291 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
7292
7293         * libc-cancellation.c: Guard both function with
7294         #if !defined NOT_IN_libc.
7295         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7296         automatically provided pthread wrappers.
7297         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7298         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7299         nor in libpthread.
7300         * pt-open.c: Removed.
7301         * pt-fcntl.c: Removed.
7302         * pt-fsync.c: Removed.
7303         * pt-lseek.c: Removed.
7304         * pt-msgrcv.c: Removed.
7305         * pt-msgsnd.c: Removed.
7306         * pt-msync.c: Removed.
7307         * pt-nanosleep.c: Removed.
7308         * pt-open64.c: Removed.
7309         * pt-pause.c: Removed.
7310         * pt-pread.c: Removed.
7311         * pt-pread64.c: Removed.
7312         * pt-pwrite.c: Removed.
7313         * pt-pwrite64.c: Removed.
7314         * pt-read.c: Removed.
7315         * pt-recv.c: Removed.
7316         * pt-recvfrom.c: Removed.
7317         * pt-recvmsg.c: Removed.
7318         * pt-send.c: Removed.
7319         * pt-sendto.c: Removed.
7320         * pt-sigtimedwait.c: Removed.
7321         * pt-sigwait.c: Removed.
7322         * pt-wait.c: Removed.
7323         * pt-waitpid.c: Removed.
7324         * pt-write.c: Removed.
7325         * pt-accept.c: Removed.
7326         * pt-close.c: Removed.
7327         * pt-connect.c: Removed.
7328         * pt-lseek64.c: Removed.
7329         * pt-sendmsg.c: Removed.
7330         * pt-tcdrain.c: Removed.
7331
7332 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
7333
7334         * init.c (__pthread_initialize_minimal_internal): Renamed from
7335         __pthread_initialize_minimal.  Make old name an alias.  This
7336         converts a normal relocation into a relative relocation.
7337
7338         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7339
7340         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7341         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7342         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7343         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7344         pt-sigwaitinfo, pt-waitid, and pt-writev.
7345         * pt-creat.c: Removed.
7346         * pt-poll.c: Removed.
7347         * pt-pselect.c: Removed.
7348         * pt-readv.c: Removed.
7349         * pt-select.c: Removed.
7350         * pt-sigpause.c: Removed.
7351         * pt-sigsuspend.c: Removed.
7352         * pt-sigwaitinfo.c: Removed.
7353         * pt-waitid.c: Removed.
7354         * pt-writev.c: Removed.
7355
7356         * init.c (pthread_functions): New variable.
7357         (__pthread_initialize_minimal): Pass pointer to pthread_functions
7358         (or NULL) to __libc_pthread_init.
7359         * forward.c: Rewrite to use __libc:pthread_functions array to get
7360         function addresses.
7361         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7362         prototype.
7363         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7364         Take new parameter.  Copy content of variable pointed to by it
7365         to __libc_pthread_init.
7366
7367         * pthreadP.h (struct pthread_functions): New type.
7368         (__libc_pthread_init): Declare.
7369
7370         * pthread_attr_destroy.c: Add namespace protected alias.
7371         * pthread_attr_getdetachstate.c: Likewise.
7372         * pthread_attr_getinheritsched.c: Likewise.
7373         * pthread_attr_getschedparam.c: Likewise.
7374         * pthread_attr_getschedpolicy.c: Likewise.
7375         * pthread_attr_getscope.c: Likewise.
7376         * pthread_attr_setdetachstate.c: Likewise.
7377         * pthread_attr_setinheritsched.c: Likewise.
7378         * pthread_attr_setschedparam.c: Likewise.
7379         * pthread_attr_setschedpolicy.c: Likewise.
7380         * pthread_attr_setscope.c: Likewise.
7381         * pthread_cond_broadcast.c: Likewise.
7382         * pthread_cond_destroy.c: Likewise.
7383         * pthread_cond_init.c: Likewise.
7384         * pthread_cond_signal.c: Likewise.
7385         * pthread_cond_wait.c: Likewise.
7386         * pthread_condattr_destroy.c: Likewise.
7387         * pthread_condattr_init.c: Likewise.
7388         * pthread_equal.c: Likewise.
7389         * pthread_exit.c: Likewise.
7390         * pthread_getschedparam.c: Likewise.
7391         * pthread_self.c: Likewise.
7392         * pthread_setcancelstate.c: Likewise.
7393         * pthread_setschedparam.c: Likewise.
7394         * pthread_mutex_destroy.c: Likewise.
7395         * pthread_mutex_init.c: Likewise.
7396         * pthreadP.h: Add prototypes for the aliases.
7397
7398         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7399         multiple_threads member in correct TCB to 1.
7400
7401         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7402         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
7403         member of thread decriptor, otherwise return unconditionally 1.
7404
7405 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7406
7407         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7408         regular Linux version.  Remove file.
7409         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
7410         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
7411         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
7412         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
7413         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
7414         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
7415         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
7416         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
7417         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
7418         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
7419         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
7420         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
7421         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
7422         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
7423         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
7424         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
7425         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
7426         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
7427         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
7428         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
7429         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
7430         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
7431         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
7432         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
7433         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
7434         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
7435         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
7436         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
7437         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
7438         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
7439
7440 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7441
7442         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7443         * sysdeps/unix/sysv/linux/open.c: Removed.
7444         * sysdeps/unix/sysv/linux/fsync.c: Removed.
7445         * sysdeps/unix/sysv/linux/lseek.c: Removed.
7446         * sysdeps/unix/sysv/linux/msync.c: Removed.
7447         * sysdeps/unix/sysv/linux/read.c: Removed.
7448         * sysdeps/unix/sysv/linux/close.c: Removed.
7449         * sysdeps/unix/sysv/linux/creat.c: Removed.
7450         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7451         * sysdeps/unix/sysv/linux/pause.c: Removed.
7452         * sysdeps/unix/sysv/linux/select.c: Removed.
7453         * sysdeps/unix/sysv/linux/write.c: Removed.
7454
7455 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7456
7457         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7458         element in TCB to see whether locking is needed.
7459
7460         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7461         MULTIPLE_THREADS_OFFSET value is correct.
7462
7463         * sysdeps/unix/sysv/linux/close.c: New file.
7464         * sysdeps/unix/sysv/linux/connect.S: New file.
7465         * sysdeps/unix/sysv/linux/creat.c: New file.
7466         * sysdeps/unix/sysv/linux/fsync.c: New file.
7467         * sysdeps/unix/sysv/linux/llseek.c: New file.
7468         * sysdeps/unix/sysv/linux/lseek.c: New file.
7469         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7470         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7471         * sysdeps/unix/sysv/linux/msync.c: New file.
7472         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7473         * sysdeps/unix/sysv/linux/open.c: New file.
7474         * sysdeps/unix/sysv/linux/open64.c: New file.
7475         * sysdeps/unix/sysv/linux/pause.c: New file.
7476         * sysdeps/unix/sysv/linux/poll.c: New file.
7477         * sysdeps/unix/sysv/linux/pread.c: New file.
7478         * sysdeps/unix/sysv/linux/pread64.c: New file.
7479         * sysdeps/unix/sysv/linux/pselect.c: New file.
7480         * sysdeps/unix/sysv/linux/pwrite.c: New file.
7481         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7482         * sysdeps/unix/sysv/linux/readv.c: New file.
7483         * sysdeps/unix/sysv/linux/recv.S: New file.
7484         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7485         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7486         * sysdeps/unix/sysv/linux/select.c: New file.
7487         * sysdeps/unix/sysv/linux/send.S: New file.
7488         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7489         * sysdeps/unix/sysv/linux/sendto.S: New file.
7490         * sysdeps/unix/sysv/linux/sigpause.c: New file.
7491         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7492         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7493         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7494         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7495         * sysdeps/unix/sysv/linux/system.c: New file.
7496         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7497         * sysdeps/unix/sysv/linux/wait.c: New file.
7498         * sysdeps/unix/sysv/linux/waitid.c: New file.
7499         * sysdeps/unix/sysv/linux/waitpid.c: New file.
7500         * sysdeps/unix/sysv/linux/writev.c: New file.
7501         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7502
7503         * pt-readv.c: Fix comment.
7504
7505 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7506
7507         * tst-cleanup1.c: Include stdlib.h.
7508
7509         * tst-cancel5.c: New test.
7510         * Makefile (tests): Add tst-cancel5.
7511         (tst-cancel5): Link against libc.so libpthread.so in that order.
7512
7513 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
7514
7515         * forward.c (test_loaded): Prevent recursive calls.
7516
7517         * Makefile (routines): Add libc-cancellation.
7518         * libc-cancellation.c: New file.
7519         * descr.h (struct pthread): Add multiple_threads field.
7520         * allocatestack.c (allocate_stack): Initialize multiple_header field of
7521         new thread descriptor to 1.
7522         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7523         Initialize multiple_thread field after successful thread creation.
7524         * cancellation.c (__do_cancel): Move to pthreadP.h.
7525         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7526         (__pthread_disable_asynccancel): Add internal_function attribute.
7527         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7528         * pthread_setcancelstate.c: Likewise.
7529         * pthread_setcanceltype.c: Likewise.
7530         * pthread_exit.c: Likewise.
7531         * pthreadP.h (CANCELLATION_P): Likewise.
7532         (__do_cancel): Define as static inline.
7533         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7534         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7535         declarations.
7536         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7537         fields.  Define MULTIPLE_THREADS_OFFSET.
7538         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7539         declaration.
7540         * sysdeps/unix/sysv/linux/accept.S: New file.
7541         * sysdeps/unix/sysv/linux/read.c: New file.
7542         * sysdeps/unix/sysv/linux/write.c: New file.
7543         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7544         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7545         initialization of __libc_locking_needed.
7546         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
7547         __libc_locking_needed, use multiple_threads field in TCB.
7548         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7549
7550 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
7551
7552         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
7553         version.
7554         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
7555
7556         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
7557         access to __libc_locking_needed for PIC.
7558
7559 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
7560
7561         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
7562         declare for libc.so.
7563         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
7564         expression.
7565         (__libc_lock_lock): Put into statement expression.
7566         (__libc_lock_unlock): Remove trailing semicolon.
7567         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
7568
7569 2002-12-12  Roland McGrath  <roland@redhat.com>
7570
7571         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
7572         "m" constraint to refer to __libc_locking_needed.  Declare it here.
7573
7574 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
7575
7576         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
7577         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
7578         Initialize __libc_locking_needed.
7579         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
7580         instead of __register_pthread_fork_handler.
7581         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
7582         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
7583         fork-gen with libc_pthread_init.
7584         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
7585         of __register_pthread_fork_handler.
7586         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
7587         of __register_pthread_fork_handler.
7588         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
7589         __libc_locking_needed to determine whether lock prefix can be avoided.
7590         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7591
7592 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
7593
7594         * Makefile (tests): Add tst-cleanup1.
7595         * tst-cleanup1.c: New file.
7596         * cancellation.c (__cleanup_thread): Removed.
7597         (__do_cancel): Remove call to __cleanup_thread.
7598         * pthreadP.h: Remove __cleanup_thread prorotype.
7599
7600         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7601         Remember function and argument even if cancellation handler
7602         function is not available.
7603         (__libc_cleanup_region_end): Execute registered function directly if
7604         pthread functions are not available.
7605         (__libc_cleanup_end): Likewise.
7606
7607         * init.c (__pthread_initialize_minimal): Fix initialization in
7608         static lib by preventing gcc from being too clever.
7609
7610 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
7611
7612         * init.c (__pthread_initialize_minimal): Remove unneccesary
7613         sigaddset call.
7614
7615         * Makefile (tests): We can run tst-locale2 now.
7616
7617 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
7618
7619         * Versions: Remove duplicated sigwait entry.
7620
7621 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
7622
7623         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
7624         inside libpthread.
7625
7626         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
7627
7628         * pthreadP.h: Declare __pthread_enable_asynccancel and
7629         __pthread_disable_asynccancel.
7630         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
7631         (CANCEL_RESET): Use __pthread_disable_asynccancel.
7632         * cancellation.c (__pthread_enable_asynccancel): New function.
7633         (__pthread_disable_asynccancel): New function.
7634         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
7635         * pt-close.c: Likewise.
7636         * pt-connect.c: Likewise.
7637         * pt-creat.c: Likewise.
7638         * pt-fcntl.c: Likewise.
7639         * pt-fsync.c: Likewise.
7640         * pt-lseek.c: Likewise.
7641         * pt-lseek64.c: Likewise.
7642         * pt-msgrcv.c: Likewise.
7643         * pt-msgsnd.c: Likewise.
7644         * pt-msync.c: Likewise.
7645         * pt-nanosleep.c: Likewise.
7646         * pt-open.c: Likewise.
7647         * pt-open64.c: Likewise.
7648         * pt-pause.c: Likewise.
7649         * pt-poll.c: Likewise.
7650         * pt-pread.c: Likewise.
7651         * pt-pread64.c: Likewise.
7652         * pt-pselect.c: Likewise.
7653         * pt-pwrite.c: Likewise.
7654         * pt-pwrite64.c: Likewise.
7655         * pt-read.c: Likewise.
7656         * pt-readv.c: Likewise.
7657         * pt-recv.c: Likewise.
7658         * pt-recvfrom.c: Likewise.
7659         * pt-recvmsg.c: Likewise.
7660         * pt-select.c: Likewise.
7661         * pt-send.c: Likewise.
7662         * pt-sendmsg.c: Likewise.
7663         * pt-sendto.c: Likewise.
7664         * pt-sigpause.c: Likewise.
7665         * pt-sigsuspend.c: Likewise.
7666         * pt-sigtimedwait.c: Likewise.
7667         * pt-sigwait.c: Likewise.
7668         * pt-sigwaitinfo.c: Likewise.
7669         * pt-system.c: Likewise.
7670         * pt-tcdrain.c: Likewise.
7671         * pt-wait.c: Likewise.
7672         * pt-waitid.c: Likewise.
7673         * pt-waitpid.c: Likewise.
7674         * pt-write.c: Likewise.
7675         * pt-writev.c: Likewise.
7676         * pthread_join.c: Likewise.
7677         * pthread_timedjoin.c: Likewise.
7678
7679         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7680         (__xpg_sigpause): New function.
7681         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7682
7683 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
7684
7685         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7686
7687         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7688         _GI_pthread_cleanup_pop to pthreadP.h.
7689
7690         * ftrylockfile.c: Use _IO_lock_trylock instead of
7691         pthread_mutex_trylock.
7692
7693         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7694         (CANCEL_RESET): Likewise.
7695         (__pthread_setcanceltype_): Declare.
7696         (__pthread_mutex_lock_internal): Declare.
7697         (__pthread_mutex_unlock_internal): Declare.
7698         (__pthread_once_internal): Declare.
7699         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7700         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7701
7702         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7703         and pthread_mutex_unlock.
7704         * pthread_cond_wait.c: Likewise.
7705         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7706         * pthread_mutex_unlock.c: Likewise.
7707
7708         * pthread_setcanceltype.c: Add additional alias
7709         __pthread_setcanceltype.
7710
7711         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7712         * sem_open.c (sem_open): Likewise.
7713         Use __libc_open, __libc_write, and __libc_close instead of
7714         open, write, and close respectively.
7715
7716         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7717         Rewrite as statement expression since it must return a value.
7718
7719         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7720         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7721         __pthread_kill.
7722
7723         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7724         alias __pthread_once_internal.
7725
7726         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7727
7728 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
7729
7730         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7731         * tst-stdio1.c: New file.
7732         * tst-stdio2.c: New file.
7733
7734         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7735
7736         * Makefile (tests): Comment out tst-locale2 for now.
7737         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7738
7739         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7740         -D_IO_MTSAFE_IO.
7741         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7742         Use _IO_lock_init instead of explicit assignment.
7743
7744         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7745         Define __libc_lock_* and __libc_lock_recursive macros with
7746         lowlevellock macros, not pthread mutexes.
7747
7748         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
7749         of pthread_mutex_lock.
7750         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
7751         instead of pthread_mutex_unlock.
7752
7753 2002-12-06  Roland McGrath  <roland@redhat.com>
7754
7755         * allocatestack.c (__stack_user): Use uninitialized defn.
7756         * init.c (__pthread_initialize_minimal): Initialize it here.
7757
7758 2002-12-05  Roland McGrath  <roland@redhat.com>
7759
7760         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7761         string.
7762         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7763
7764         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7765         missing & here too.
7766
7767 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
7768
7769         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7770         lowlevellock.
7771         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
7772         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
7773         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
7774         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
7775         for __libc_lock_* macros.
7776         * Makefile (routines): Add libc-lowlevellock.
7777
7778 2002-10-09  Roland McGrath  <roland@redhat.com>
7779
7780         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
7781         Under [__PIC__], call the function via the pointer fetched for
7782         comparison rather than a call by name that uses the PLT.
7783         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
7784         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
7785         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
7786         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
7787         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
7788
7789 2002-12-04  Roland McGrath  <roland@redhat.com>
7790
7791         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
7792
7793         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
7794         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
7795
7796         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
7797
7798 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
7799
7800         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
7801         a completely opaque, non-integer type.
7802         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7803
7804 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
7805
7806         * sysdeps/i386/tls.h: Include stdlib.h.
7807         * sysdeps/x86_64/tls.h: Likewise.
7808
7809 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
7810
7811         * Makefile (tests): Add tst-locale2.
7812         (tests-static): Likewise.
7813         * tst-locale2.c: New file.
7814
7815         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
7816         volatile and add memory clobbers to lock operations.
7817
7818 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
7819
7820         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
7821         * sysdeps/i386/i486/bits/atomic.h: New file.
7822         * sysdeps/i386/i586/bits/atomic.h: New file.
7823         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
7824         include i486 version.
7825         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
7826         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
7827         Patch by Marijn Ros <marijn@mad.scientist.com>.
7828
7829         * allocatestack.c (get_cached_stack): Don't crash if we first
7830         found a stack with a larger size then needed.
7831         Reported by Hui Huang <hui.huang@sun.com>.
7832
7833         * Makefile (tests): Add tst-sysconf.
7834         * tst-sysconf.c: New file.
7835
7836         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
7837         PTHREAD_THREADS_MAX.
7838
7839 2002-12-02  Roland McGrath  <roland@redhat.com>
7840
7841         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
7842         Declare using hidden_proto instead of attribute_hidden, so there are
7843         non-.hidden static symbols for gdb to find.
7844         (__pthread_keys): Likewise.
7845         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
7846         * allocatestack.c (__stack_user): Likewise.
7847         * pthread_create.c (__pthread_keys): Likewise.
7848         (__nptl_threads_events, __nptl_last_event): Make these static instead
7849         of hidden.
7850         * pthread_key_create.c (__pthread_pthread_keys_max,
7851         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
7852
7853 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
7854
7855         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
7856         statically.
7857         * tst-locale1.c: New file.
7858
7859         * pthread_cond_timedwait.c: Include <stdlib.h>.
7860
7861         * Makefile (tests): Add tst-fork2 and tst-fork3.
7862         * tst-fork2.c: New file.
7863         * tst-fork3.c: New file.
7864
7865 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
7866
7867         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
7868
7869         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
7870         require it to 200112L.
7871
7872         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
7873         instruction only if HAVE_CMOV is defined.
7874         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
7875
7876         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
7877
7878         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
7879
7880         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
7881
7882         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
7883
7884 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
7885
7886         * sysdeps/x86_64/bits/atomic.h: New file.
7887
7888         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
7889         16-bit operations.
7890
7891         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
7892         possible since gettid cannot fail.
7893
7894         * sysdeps/x86_64/pthreaddef.h: New file.
7895
7896         * sysdeps/i386/pthreaddef.h (gettid): Removed.
7897
7898         * sysdeps/x86_64/pthread_spin_init.c: New file.
7899         * sysdeps/x86_64/pthread_spin_lock.c: New file.
7900         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
7901         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
7902
7903         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
7904         Add missing lock prefix.  Minute optimization.
7905
7906         * tst-spin2.c (main): Also check successful trylock call.
7907
7908         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
7909         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
7910
7911         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
7912         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
7913
7914         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
7915         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
7916         value in case of an error.  Add support for INTERNAL_SYSCALL.
7917
7918         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
7919         value in case of an error.
7920
7921         * sysdeps/x86_64/tls.h: New file.
7922
7923 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
7924
7925         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
7926         takes the array member name and the index as parameters.
7927         (THREAD_SETMEM_NC): Likewise.
7928         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
7929         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
7930         interfaces.
7931
7932         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
7933         to decide which code to use.
7934         (THREAD_SETMEM_NC): Likewise.
7935
7936         * allocatestack.c (queue_stack): Don't remove stack from list here.
7937         Do it in the caller.  Correct condition to prematurely terminate
7938         loop to free stacks.
7939         (__deallocate_stack): Remove stack from list here.
7940
7941 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
7942
7943         * Makefile (tests): Add tst-stack1.
7944         * tst-stack1.c: New file.
7945
7946         * allocatestack.c (allocate_stack): Initialize the TCB on a user
7947         provided stack.
7948
7949         * pthread_attr_getstack.c: Return bottom of the thread area.
7950
7951 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
7952
7953         * Makefile (libpthread-routines): Add pt-allocrtsig and
7954         pthread_kill_other_threads.
7955         * pt-allocrtsig.c: New file.
7956         * pthread_kill_other_threads.c: New file.
7957         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
7958         all three functions.
7959         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7960         allocrtsig.
7961         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
7962         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
7963         and __libc_allocate_rtsig_private.
7964         * Versions (libpthread): Export pthread_kill_other_threads_np,
7965         __libc_current_sigrtmin, and __libc_current_sigrtmax.
7966
7967 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
7968
7969         * allocatestack.c (allocate_stack): stackaddr in attribute points to
7970         the end of the stack.  Adjust computations.
7971         When mprotect call fails dequeue stack and free it.
7972         * pthread_attr_setstack.c: Store top of the stack in stackaddr
7973         attribute.
7974         * pthread_getattr_np.c: Likewise.
7975
7976         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
7977         surprises.
7978
7979 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
7980
7981         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
7982         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
7983
7984 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
7985
7986         * pthread_getspecific.c: Optimize access to first 2nd-level array.
7987         * pthread_setspecific.c: Likewise.
7988
7989 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
7990
7991         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
7992         definitions.  Get them from the official place.
7993         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
7994
7995         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
7996         Use new CLONE_ flags in clone() calls.
7997
7998         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
7999         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
8000
8001         * Versions: Add pthread_* functions for libc.
8002         * forward.c: New file.
8003
8004         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
8005         errno-loc.
8006         * herrno.c: New file.
8007         * res.c: New file.
8008
8009         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
8010         sem_trywait, and sem_timedwait.  Add herrno and res.
8011         * sem_init.c: Don't initialize lock and waiters members.
8012         * sem_open.c: Likewise.
8013         * sem_post.c: Removed.
8014         * sem_wait.c: Removed.
8015         * sem_trywait.c: Removed.
8016         * sem_timedwait.c: Removed.
8017         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
8018         Includes full implementations of sem_post, sem_wait, sem_trywait,
8019         and sem_timedwait.
8020         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
8021         for new implementation.
8022         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
8023         and waiters fields.
8024
8025         * tst-sem3.c: Improve error message.
8026         * tst-signal3.c: Likewise.
8027
8028         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
8029         to tell the kernel about the termination futex and to initialize tid
8030         member.  Don't initialize main_thread.
8031         * descr.h (struct pthread): Remove main_thread member.
8032         * cancelllation.c (__do_cancel): Remove code handling main thread.
8033         The main thread is not special anymore.
8034
8035         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
8036         size of the stacks to stack_cache_actsize.
8037
8038         * pt-readv.c: Add missing "defined".
8039         * pt-sigwait.c: Likewise.
8040         * pt-writev.c: Likewise.
8041
8042 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
8043
8044         * Versions: Export __connect from libpthread.
8045         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8046
8047         * Makefile (libpthread-routines): Add pt-raise.
8048         * sysdeps/unix/sysv/linux/raise.c: New file.
8049         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
8050         * sysdeps/generic/pt-raise.c: New file.
8051
8052         * pthread_cond_init.c: Initialize all data elements of the condvar
8053         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
8054
8055         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
8056         * pthread_create.c: Likewise.
8057
8058         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
8059         * tst-key1.c: New file.
8060         * tst-key2.c: New file.
8061         * tst-key3.c: New file.
8062
8063         * Versions: Export pthread_detach for version GLIBC_2.0.
8064         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
8065
8066 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
8067
8068         * pthread_key_create.c: Terminate search after an unused key was found.
8069         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8070
8071         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
8072         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8073
8074 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
8075
8076         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
8077         dynamic lookup for errno in PIC.
8078
8079         * allocatestack.c (get_cached_stack): Rearrange code slightly to
8080         release the stack lock as soon as possible.
8081         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
8082         the static TLS block.
8083         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
8084
8085         * cancellation.c: Renamed from cancelation.c.
8086         * Makefile: Adjust accordingly.
8087         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
8088         * cleanup_defer.c: Use CANCELLATION_P.
8089         * pthread_testcancel.c: Likewise.
8090         * descr.h: Fix spelling in comments.
8091         * init.c: Likewise.
8092         * pthread_getattr_np.c: Likewise.
8093         * pthread_getschedparam.c: Likewise.
8094         * pthread_setschedparam.c: Likewise.
8095         * Versions: Likewise.
8096
8097         * pt-pselect.c: New file.
8098         * Makefile (libpthread-routines): Add pt-pselect.
8099         * Versions: Add pselect.
8100
8101         * tst-cancel4.c: New file.
8102         * Makefile (tests): Add tst-cancel4.
8103
8104 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
8105
8106         * pthread_mutex_lock.c: Always record lock ownership.
8107         * pthread_mutex_timedlock.c: Likewise.
8108         * pthread_mutex_trylock.c: Likewise.
8109
8110         * pt-readv.c: New file.
8111         * pt-writev.c: New file.
8112         * pt-creat.c: New file.
8113         * pt-msgrcv.c: New file.
8114         * pt-msgsnd.c: New file.
8115         * pt-poll.c: New file.
8116         * pt-select.c: New file.
8117         * pt-sigpause.c: New file.
8118         * pt-sigsuspend.c: New file.
8119         * pt-sigwait.c: New file.
8120         * pt-sigwaitinfo.c: New file.
8121         * pt-waitid.c: New file.
8122         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8123         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8124         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8125         * Versions: Add all the new functions.
8126
8127         * tst-exit1.c: New file.
8128         * Makefile (tests): Add tst-exit1.
8129
8130         * sem_timedwait.c: Minor optimization for more optimal fastpath.
8131
8132 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
8133
8134         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8135
8136         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8137         call.  pthread_join is an official cancellation point.
8138         * pthread_timedjoin.c: Likewise.
8139
8140         * pthread_cond_wait.c: Revert order in which internal lock are dropped
8141         and the condvar's mutex are retrieved.
8142         * pthread_cond_timedwait.c: Likewise.
8143         Reported by dice@saros.East.Sun.COM.
8144
8145 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
8146
8147         * pthreadP.h: Cut out all type definitions and move them...
8148         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
8149         * pthreadP.h: Include <internaltypes.h>.
8150
8151         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8152         performance tweaks.
8153
8154         * sem_trywait.c: Shuffle #includes around to get right order.
8155         * sem_timedwait.c: Likewise.
8156         * sem_post.c: Likewise.
8157         * sem_wait.c: Likewise.
8158
8159         * nptl 0.3 released.
8160
8161         * Makefile (tests): Add tst-signal3.
8162         * tst-signal3.c: New file.
8163
8164 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
8165
8166         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8167         the asms modify the sem object.
8168         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8169
8170         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8171         the actual members.
8172         * pthreadP.h (struct sem): New type.  Actual semaphore type.
8173         * semaphoreP.h: Include pthreadP.h.
8174         * sem_getvalue.c: Adjust to sem_t change.
8175         * sem_init.c: Likewise.
8176         * sem_open.c: Likewise.
8177         * sem_post.c: Likewise.
8178         * sem_timedwait.c: Likewise.
8179         * sem_trywait.c: Likewise.
8180         * sem_wait.c: Likewise.
8181
8182 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
8183
8184         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8185         * tst-basic2.c: New file.
8186         * tst-exec1.c: New file.
8187         * tst-exec2.c: New file.
8188         * tst-exec3.c: New file.
8189
8190         * tst-fork1.c: Remove extra */.
8191
8192         * nptl 0.2 released.  The API for IA-32 is complete.