.
[kopensolaris-gnu/glibc.git] / nptl / ChangeLog
1 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2
3         * tst-robust1.c: Add second mutex to check that the mutex list is
4         handled correctly.
5
6 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
7
8         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
9         lll_robust_mutex_trylock, lll_robust_mutex_lock,
10         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
11         lll_robust_mutex_unlock): New macros.
12         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
13         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
14         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
15         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
16         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
17
18 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
19
20         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
21         definitions.
22         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
23
24 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
25
26         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
27         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
28         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
29         (lll_robust_mutex_unlock): Likewise.
30
31 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
32
33         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
34         Set robust_list.__next rather than robust_list.
35         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
36         (__pthread_list_t): New typedef.
37         (pthread_mutex_t): Replace __next and __prev fields with __list.
38         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
39         (__pthread_list_t): New typedef.
40         (pthread_mutex_t): Replace __next and __prev fields with __list.
41         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
42         (__pthread_list_t, __pthread_slist_t): New typedefs.
43         (pthread_mutex_t): Replace __next and __prev fields with __list.
44         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
45         (__pthread_list_t, __pthread_slist_t): New typedefs.
46         (pthread_mutex_t): Replace __next and __prev fields with __list.
47         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
48         (__pthread_list_t, __pthread_slist_t): New typedefs.
49         (pthread_mutex_t): Replace __next and __prev fields with __list.
50         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
51         (__pthread_slist_t): New typedef.
52         (pthread_mutex_t): Replace __next field with __list.
53
54 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
55
56         * pthreadp.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
57         PTHREAD_MUTEX_OWNERDEAD.
58         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
59         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
60         * Makefile (libpthread-routines): Add lowlevelrobustlock.
61         * pthread_create.c (start_thread): Very much simplify robust_list loop.
62         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
63         to PTHREAD_MUTEX_INCONSISTENT.
64         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
65         * pthread_mutex_lock.c: Reimplement robust mutex handling.
66         * pthread_mutex_trylock.c: Likewise.
67         * pthread_mutex_timedlock.c: Likewise.
68         * pthread_mutex_unlock.c: Likewise.
69         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
70         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
71         lowlevelrobustlock.sym.
72         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
73         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
74         definitions.
75         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
76         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
77         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
78         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
79         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
80
81 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
82
83         * allocatestack.c (allocate_stack): Initialize robust_list.
84         * init.c (__pthread_initialize_minimal_internal): Likewise.
85         * descr.h (struct xid_command): Pretty printing.
86         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
87         robust_list.  Adjust macros.
88         * pthread_create.c (start_thread): Adjust robust_list handling.
89         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
90         but the owner for all robust mutex types.
91         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
92         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
93         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
94
95         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
96         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
97
98 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
99
100         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
101         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
102
103 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
104
105         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
106         Return status.
107         (lll_futex_timed_wait): Define.
108
109 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
110
111         * tst-cancel4.c: Test ppoll.
112
113 2006-01-18  Andreas Jaeger  <aj@suse.de>
114
115         [BZ #2167]
116         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
117         (pthread_mutex_t): Follow changes for other archs.  Based on patch
118         by Jim Gifford <patches@jg555.com>.
119
120 2006-01-13  Richard Henderson  <rth@redhat.com>
121
122         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
123
124 2006-01-10  Roland McGrath  <roland@redhat.com>
125
126         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
127         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
128         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
129         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
130         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
131         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
132         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
133         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
134         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
135         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
136
137 2006-01-09  Roland McGrath  <roland@redhat.com>
138
139         * tst-initializers1-c89.c: New file.
140         * tst-initializers1-c99.c: New file.
141         * tst-initializers1-gnu89.c: New file.
142         * tst-initializers1-gnu99.c: New file.
143         * Makefile (tests): Add them.
144         (CFLAGS-tst-initializers1-c89.c): New variable.
145         (CFLAGS-tst-initializers1-c99.c): New variable.
146         (CFLAGS-tst-initializers1-gnu89.c): New variable.
147         (CFLAGS-tst-initializers1-gnu99.c): New variable.
148
149         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
150         Use __extension__ on anonymous union definition.
151         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
152         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
153         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
154         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
155         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
156
157 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
158
159         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
160         Don't give the union a name because it changes the mangled name.
161         Instead name the struct for __data.
162         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
163         Likewise.
164         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
165         Likewise.
166
167 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
168
169         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
170         stack bias to mc_ftp field.
171
172 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
173
174         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
175         being too clever and reloading the futex value where it shouldn't.
176
177 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
178
179         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
180         correct type.
181
182 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
183
184         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
185         Add cfi directives.
186
187 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
188
189         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
190         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
191         rename in tcbhead_t.
192
193         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
194         Don't give the union a name because it changes the mangled name.
195         Instead name the struct for __data.
196         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
197         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
198         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
199         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
200         * pthread_create.c (start_thread): Adjust robust mutex free loop.
201         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
202
203 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
204
205         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
206         Return status.
207         (lll_futex_timed_wait): Define.
208         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
209         * sysdeps/pthread/aio_misc.h: New file.
210
211 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
212
213         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
214
215 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
216
217         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
218         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
219         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
220
221 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
222
223         * tst-cancel24.cc: Use C headers instead of C++ headers.
224
225 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
226
227         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
228         sparc-linux configured glibc.
229         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
230         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
231         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
232         atomic_compare_and_exchange_val_24_acq instead of
233         atomic_compare_and_exchange_val_acq.
234         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
235         instead of atomic_exchange_rel.
236         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
237         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
238         file.
239         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
240         file.
241         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
242         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
243         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
244         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
245         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
246         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
247         New file.
248         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
249         New file.
250         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
251         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
252         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
253         file.
254         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
255         file.
256         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
257
258 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
259
260         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
261         mutex initializers.
262
263 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
264
265         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
266         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
267         THREAD_COPY_POINTER_GUARD): Define.
268         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
269         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
270
271 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
272
273         * version.c: Update copyright year.
274
275 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
276
277         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
278         .eh_frame section, use cfi_* directives.
279         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
280
281 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
282
283         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
284         now.
285
286 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
287
288         * sysdeps/pthread/sigaction.c: Removed.
289         * sigaction.c: New file.
290         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
291
292 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
293
294         * Makefile (tests): Add tst-signal7.
295         * tst-signal7.c: New file.
296
297 2005-12-27  Roland McGrath  <roland@redhat.com>
298
299         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
300         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
301         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
302         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
303         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
304         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
305         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
306         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
307         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
308         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
309         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
310
311 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
312
313         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
314         and __prev field to pthread_mutex_t.
315         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
316         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
317         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
318         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
319         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
320         to pthread_mutex_t.
321
322 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
323
324         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
325         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
326         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
327         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
328         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
329         and PTHREAD_MUTEXATTR_FLAG_BITS.
330         * descr.h (struct pthread): Add robust_list field and define
331         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
332         * pthread_mutexattr_getrobust.c: New file.
333         * pthread_mutexattr_setrobust.c: New file.
334         * pthread_mutex_consistent.c: New file.
335         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
336         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
337         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
338         Adjust pthread_mutex_t initializers.
339         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
340         field to pthread_mutex_t.
341         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
342         and __prev field to pthread_mutex_t.
343         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
344         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
345         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
346         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
347         * pthread_mutexattr_gettype.c: Likewise.
348         * pthread_mutexattr_setpshared.c: Likewise.
349         * pthread_mutexattr_settype.c: Likewise.
350         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
351         Initialize mutex kind according to robust flag.
352         * pthread_mutex_lock.c: Implement local robust mutex.
353         * pthread_mutex_timedlock.c: Likewise.
354         * pthread_mutex_trylock.c: Likewise.
355         * pthread_mutex_unlock.c: Likewise.
356         * pthread_create.c (start_thread): Mark robust mutexes which remained
357         locked as dead.
358         * tst-robust1.c: New file.
359         * tst-robust2.c: New file.
360         * tst-robust3.c: New file.
361         * tst-robust4.c: New file.
362         * tst-robust5.c: New file.
363         * tst-robust6.c: New file.
364         * tst-robust7.c: New file.
365         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
366         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
367         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
368         tst-robust5, tst-robust6, and tst-robust7.
369
370         * tst-typesizes.c: New file.
371         * Makefile (tests): Add tst-typesizes.
372
373         * tst-once3.c: More debug output.
374
375 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
376
377         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
378         missing after last change.
379
380         * version.c: Update copyright year.
381
382 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
383
384         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
385         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
386         * pthread_mutex_trylock.c: Likewise.
387         * pthread_mutex_timedlock.c: Likewise.
388         * pthread_mutex_unlock.c: Likewise.
389
390 2005-12-22  Roland McGrath  <roland@redhat.com>
391
392         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
393         so that #include_next's search location is not reset to the -I..
394         directory where <nptl/...> can be found.
395
396 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
397
398         [BZ #1913]
399         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
400         Fix unwind info.  Remove useless branch prediction prefix.
401         * tst-cancel24.cc: New file.
402         * Makefile: Add rules to build and run tst-cancel24.
403
404 2005-12-21  Roland McGrath  <roland@redhat.com>
405
406         * libc-cancellation.c: Use <> rather than "" #includes.
407         * pt-cleanup.c: Likewise.
408         * pthread_create.c: Likewise.
409         * pthread_join.c: Likewise.
410         * pthread_timedjoin.c: Likewise.
411         * pthread_tryjoin.c: Likewise.
412         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
413         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
414         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
415         * unwind.c: Likewise.
416
417 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
418
419         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
420         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
421         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
422         THREAD_COPY_POINTER_GUARD): Define.
423
424 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
425
426         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
427         rather than one.
428         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
429         THREAD_COPY_POINTER_GUARD): Define.
430         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
431         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
432         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
433         THREAD_COPY_POINTER_GUARD): Define.
434         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
435         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
436         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
437         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
438         Use PTR_DEMANGLE for B0 if defined.
439
440 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
441
442         * pthread_create.c (__pthread_create_2_1): Use
443         THREAD_COPY_POINTER_GUARD if available.
444         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
445         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
446         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
447         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
448         * sysdeps/x86_64/tls.h: Likewise.
449
450 2005-12-15  Roland McGrath  <roland@redhat.com>
451
452         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
453
454 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
455
456         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
457         sysdeps/generic.
458         * errno-loc.c: New file.
459
460 2005-12-12  Roland McGrath  <roland@redhat.com>
461
462         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
463         adjustments before choosing stack size.  Update minimum stack size
464         calculation to match allocate_stack change.
465
466 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
467
468         * allocatestack.c (allocate_stack): Don't demand that there is an
469         additional full page available on the stack beside guard, TLS, the
470         minimum stack.
471
472 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
473
474         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
475         (__cleanup_fct_attribute): Use __regparm__ not regparm.
476
477         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
478         compiling 32-bit code we must define __cleanup_fct_attribute.
479
480 005-11-24  Jakub Jelinek  <jakub@redhat.com>
481
482         [BZ #1920]
483         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
484         __attribute__ instead of __attribute.
485         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
486         (__cleanup_fct_attribute): Likewise.
487
488 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
489
490         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
491         a write barrier before writing libgcc_s_getcfa.
492
493 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
494
495         * sysdeps/unix/sysv/linux/configure: Removed.
496
497 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
498
499         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
500         optional init_array/fini_array support.
501
502 2005-10-24  Roland McGrath  <roland@redhat.com>
503
504         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
505         versioned_symbol use.
506
507 2005-10-16  Roland McGrath  <roland@redhat.com>
508
509         * init.c (__pthread_initialize_minimal_internal): Even when using a
510         compile-time default stack size, apply the minimum that allocate_stack
511         will require, and round up to page size.
512
513 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
514
515         * Makefile ($(test-modules)): Remove static pattern rule.
516
517 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
518             Ulrich Drepper  <drepper@redhat.com>
519
520         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
521         alignment in callback function.
522         * Makefile: Add rules to build and run tst-align3.
523         * tst-align3.c: New file.
524
525 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
526
527         * allocatestack.c (setxid_signal_thread): Add
528         INTERNAL_SYSCALL_DECL (err).
529
530 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
531
532         * allocatestack.c (setxid_signal_thread): Need to use
533         atomic_compare_and_exchange_bool_acq.
534
535 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
536             Jakub Jelinek  <jakub@redhat.com>
537
538         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
539         CANCEL_RESTMASK.
540         (struct pthread): Move specific_used field to avoid padding.
541         Add setxid_futex field.
542         * init.c (sighandler_setxid): Reset setxid flag and release the
543         setxid futex.
544         * allocatestack.c (setxid_signal_thread): New function.  Broken
545         out of the bodies of the two loops in __nptl_setxid.  For undetached
546         threads check whether they are exiting and if yes, don't send a signal.
547         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
548         * pthread_create.c (start_thread): For undetached threads, check
549         whether setxid bit is set.  If yes, wait until signal has been
550         processed.
551
552         * allocatestack.c (STACK_VARIABLES): Initialize them.
553         * pthread_create.c (__pthread_create_2_1): Initialize pd.
554
555 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
556
557         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
558         waiters, awake all waiters on the associated mutex.
559
560 2005-09-22  Roland McGrath  <roland@redhat.com>
561
562         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
563         ../sysdeps/x86_64/hp-timing.h).
564
565 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
566
567         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
568         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
569         (lll_futex_wake_unlock): Define.
570         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
571         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
572         (lll_futex_wake_unlock): Define.
573         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
574         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
575         (lll_futex_wake_unlock): Define.
576         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
577         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
578         (lll_futex_wake_unlock): Define.
579         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
580         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
581         (lll_futex_wake_unlock): Define.
582         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
583         lll_futex_wake_unlock.
584         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
585         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
586         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
587         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
588         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
589         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
590
591 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
592
593         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
594         Fix typo in register name.
595
596 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
597
598         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
599         Use __sigfillset.  Document that sigfillset does the right thing wrt
600         to SIGSETXID.
601
602 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
603
604         [BZ #1102]
605         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
606         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
607         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
608         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
609         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
610         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
611         in the structure.
612         * Makefile (tests): Add tst-initializers1.
613         (CFLAGS-tst-initializers1.c): Set.
614         * tst-initializers1.c: New test.
615
616 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
617
618         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
619         Make sure __flags are located at offset 48 from the start of the
620         structure.
621
622 2005-07-02  Roland McGrath  <roland@redhat.com>
623
624         * Makeconfig: Comment fix.
625
626 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
627
628         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
629         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
630         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
631         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
632         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
633         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
634         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
635         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
636         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
637         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
638
639 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
640
641         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
642         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
643         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
644         fields.
645         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
646         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
647         field.  Put in sysinfo field unconditionally.
648         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
649         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
650         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
651         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
652         fields.
653         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
654         * pthread_create.c (__pthread_create_2_1): Use
655         THREAD_COPY_STACK_GUARD macro.
656         * Makefile: Add rules to build and run tst-stackguard1{,-static}
657         tests.
658         * tst-stackguard1.c: New file.
659         * tst-stackguard1-static.c: New file.
660
661 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
662
663         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
664         Invoke CGOTSETUP and CGOTRESTORE.
665         (CGOTSETUP, CGOTRESTORE): Define.
666
667 2005-05-29  Richard Henderson  <rth@redhat.com>
668
669         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
670         (tf_write, tf_writev): Use it.
671         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
672         the system minimum.
673
674 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
675
676         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
677         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
678         __librt_*_asynccancel@local.
679
680 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
681
682         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
683         all occurrences of JUMPTARGET.  Instead append @local to labels.
684
685 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
686
687         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
688         size/alignment of struct pthread rather than tcbhead_t.
689         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
690         Likewise.
691         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
692         Likewise.
693         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
694         Likewise.
695
696 2005-05-19  Richard Henderson  <rth@redhat.com>
697
698         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
699         __sync_val_compare_and_swap, not explicit _si variant.
700         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
701
702 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
703
704         [BZ #915]
705         * sysdeps/pthread/pthread.h: Avoid empty initializers.
706
707 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
708
709         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
710         .eh_frame section, use cfi_* directives.
711
712 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
713
714         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
715         of "" includes.
716
717 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
718
719         [BZ #1075]
720         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
721         aio_write blocks.
722
723 2005-04-27  Roland McGrath  <roland@redhat.com>
724
725         * Makefile (tests): Remove tst-clock2.
726
727         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
728         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
729         translating to the kernel clockid_t for our own process/thread clock.
730
731         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
732
733 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
734
735         * old_pthread_cond_init.c: Include <errno.h>.
736         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
737         process shared or uses clock other than CLOCK_REALTIME.
738         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
739
740 2005-04-13  David S. Miller  <davem@davemloft.net>
741
742         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
743         * sysdeps/sparc/sparc64/clone.S: New file.
744
745 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
746
747         [BZ #1102]
748         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
749         __inline instead of inline.
750         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
751
752 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
753
754         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
755         functionally equivalent, but shorter instructions.
756         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
757         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
758         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
759         Likewise.
760         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
761         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
762         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
763         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
764         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
765         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
766         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
767         Likewise.
768         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
769         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
770         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
771         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
772         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
773
774 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
775
776         * sysdeps/mips/Makefile: New file.
777         * sysdeps/mips/nptl-sysdep.S: New file.
778         * sysdeps/mips/tcb-offsets.sym: New file.
779         * sysdeps/mips/pthread_spin_lock.S: New file.
780         * sysdeps/mips/pthread_spin_trylock.S: New file.
781         * sysdeps/mips/pthreaddef.h: New file.
782         * sysdeps/mips/tls.h: New file.
783         * sysdeps/mips/jmpbuf-unwind.h: New file.
784         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
785         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
786         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
787         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
788         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
789         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
790         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
791         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
792         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
793         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
794
795 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
796
797         [BZ #1112]
798         * pthread_create.c (__pthread_create_2_1): Rename syscall error
799         variable to scerr.
800
801 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
802
803         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
804
805 2005-02-25  Roland McGrath  <roland@redhat.com>
806
807         * alloca_cutoff.c: Correct license text.
808         * tst-unload.c: Likewise.
809         * sysdeps/pthread/allocalim.h: Likewise.
810         * sysdeps/pthread/pt-initfini.c: Likewise.
811         * sysdeps/pthread/bits/libc-lock.h: Likewise.
812         * sysdeps/pthread/bits/sigthread.h: Likewise.
813         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
814         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
815
816 2005-02-16  Roland McGrath  <roland@redhat.com>
817
818         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
819         Use unsigned int * for ptr_nthreads.
820
821 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
822
823         [BZ #721]
824         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
825         gcc4.
826
827 2005-02-07  Richard Henderson  <rth@redhat.com>
828
829         [BZ #787]
830         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
831         argument.
832
833 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
834
835         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
836         order of arguments in invocation of atomic_add_zero.
837
838 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
839
840         [BZ #737]
841         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
842         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
843         at least gotntpoff relocation and addition.
844         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
845         Likewise.
846         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
847         Likewise.
848         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
849         Likewise.
850
851 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
852
853         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
854         entry for static tls deallocation fix.
855         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
856         also contains information whether the memory pointed to is static
857         TLS or not.
858         * sysdeps/i386/tls.h: Likewise.
859         * sysdeps/ia64/tls.h: Likewise.
860         * sysdeps/powerpc/tls.h: Likewise.
861         * sysdeps/s390/tls.h: Likewise.
862         * sysdeps/sh/tls.h: Likewise.
863         * sysdeps/sparc/tls.h: Likewise.
864         * sysdeps/x86_64/tls.h: Likewise.
865
866 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
867
868         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
869
870 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
871
872         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
873         %esp.
874         * Makefile (tests): Add tst-align2.
875         * tst-align2.c: New test.
876         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
877         -mpreferred-stack-boundary=4.
878
879 2004-12-18  Roland McGrath  <roland@redhat.com>
880
881         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
882         New file removed withdrawn for the moment.
883
884 2004-12-17  Richard Henderson  <rth@redhat.com>
885
886         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
887         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
888
889 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
890
891         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
892         Increased PTHREAD_STACK_MIN.
893
894         * tst-context1.c (stacks): Use bigger stack size.
895
896 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
897
898         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
899         * sysdeps/sparc/tcb-offsets.sym: Add TID.
900
901 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
902
903         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
904         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
905         * sysdeps/s390/tcb-offsets.sym (TID): Add.
906
907 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
908
909         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
910
911 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
912
913         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
914         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
915
916         * tst-getpid1.c: If child crashes, report this first.  Print which
917         signal.
918
919 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
920
921         * init.c (__pthread_initialize_minimal_internal): Also unblock
922         SIGSETXID.
923
924 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
925
926         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
927         _POSIX_THREAD_CPUTIME): Define to 0.
928         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
929         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
930         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
931         __timer_signal_thread_tclk): Remove.
932         (init_module): Remove their initialization.
933         (thread_cleanup): Remove their cleanup assertions.
934         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
935         __timer_signal_thread_tclk): Remove.
936         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
937         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
938         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
939
940 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
941
942         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
943         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
944
945         * Makefile (tests): Add tst-getpid2.
946         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
947         (do_test): Use it.  Use __clone2 instead of clone on ia64.
948         * tst-getpid2.c: New test.
949
950 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
951
952         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
953
954 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
955
956         * Makefile (tests): Add tst-getpid1.
957         * tst-getpid1.c: New file.
958         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
959         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
960
961 2004-12-02  Roland McGrath  <roland@redhat.com>
962
963         * Makefile (libpthread-nonshared): Variable removed.
964         ($(objpfx)libpthread_nonshared.a): Target removed.
965         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
966         These are now handled by generic magic from
967         libpthread-static-only-routines being set.
968
969 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
970
971         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
972         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
973         _POSIX_THREAD_PRIO_PROTECT): Define.
974         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
975         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
976         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
977
978 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
979
980         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
981         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
982         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
983         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
984         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
985         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
986         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
987
988 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
989
990         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
991
992         * Makefile (libpthread-routines): Add pthread_setschedprio.
993         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
994         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
995         * pthread_setschedprio.c: New file.
996
997 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
998
999         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1000         * pthread_cancel.c (pthread_create): Likewise.
1001
1002         * Makefile (libpthread-routines): Add vars.
1003         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1004         * init.c (__default_stacksize, __is_smp): Remove.
1005         * vars.c: New file.
1006         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1007         and define a wrapper macro.
1008         (PTHREAD_STATIC_FN_REQUIRE): Define.
1009         * allocatestack.c (__find_thread_by_id): Undefine.
1010         * pthread_create (__pthread_keys): Remove.
1011         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1012         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1013         PTHREAD_STATIC_FN_REQUIRE.
1014
1015 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1016
1017         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1018         parameter to REGISTER macro.
1019
1020 2004-11-17  Roland McGrath  <roland@redhat.com>
1021
1022         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1023         Make sure SIGCANCEL is blocked as well.
1024
1025 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1026
1027         * sysdeps/pthread/setxid.h: New file.
1028         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1029         (struct xid_command): Add forward decl.
1030         (struct pthread_functions): Change return type of __nptl_setxid hook
1031         to int.
1032         * pthreadP.h (__nptl_setxid): Change return type to int.
1033         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1034         calling thread, return its return value and set errno on failure.
1035         * descr.h (struct xid_command): Change id type to long array.
1036
1037         * Makefile: Add rules to build and test tst-setuid1 and
1038         tst-setuid1-static.
1039         * tst-setuid1.c: New test.
1040         * tst-setuid1-static.c: New test.
1041
1042 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1043
1044         * Makefile (tests): Add tst-exit3.
1045         * tst-exit3.c: New test.
1046
1047 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
1048
1049         * Makefile (tests): Add tst-exit2.
1050         * tst-exit2.c: New file.
1051
1052 2004-11-09  Roland McGrath  <roland@redhat.com>
1053
1054         [BZ #530]
1055         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1056         here, before calling clone.
1057         * pthread_create.c (start_thread): Don't do it here.
1058
1059 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
1060
1061         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1062
1063 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
1064
1065         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1066         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
1067         assembler warning.
1068
1069 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
1070
1071         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1072         if sched_priority is not between minprio and maxprio.
1073
1074 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1075
1076         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1077         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1078
1079         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1080         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1081
1082 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
1083
1084         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1085         not-cancelable I/O functions.
1086
1087 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1088
1089         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1090         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1091         make sure 2 is stored in the futex and we looked at the old value.
1092         Fix a few other problems to return the correct value.
1093
1094 2004-10-14  Richard Henderson  <rth@redhat.com>
1095
1096         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1097         make gcc4 happy.
1098
1099 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
1100
1101         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1102         of pthread-functions.h and pthreaddef.h.
1103         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1104
1105         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1106         Change __data.__nwaiters from int to unsigned int.
1107
1108         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1109         sysconf (_SC_THREAD_CPUTIME) returns negative value.
1110
1111         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1112         before return type.
1113
1114         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1115         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1116
1117 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
1118
1119         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
1120         test fails, remove message queue.
1121         (tf_msgsnd): Likewise.
1122
1123 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1124
1125         * tst-clock1.c: Change #ifdef to #if defined.
1126         * tst-clock2.c: Likewise.
1127         * tst-cond11.c: Likewise.
1128
1129         * sysdeps/pthread/timer_create.c (timer_create): Use
1130         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1131         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1132         THREAD_CPUTIME.
1133
1134 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1135
1136         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1137         _POSIX_THREAD_CPUTIME): Define to 0.
1138
1139 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
1140
1141         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1142         and _POSIX_THREAD_CPUTIME to zero.
1143         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1144         * tst-barrier2.c: Fix testing for POSIX feature.
1145         * tst-clock1.c: Likewise.
1146         * tst-clock2.c: Likewise.
1147         * tst-cond11.c: Likewise.
1148         * tst-cond4.c: Likewise.
1149         * tst-cond6.c: Likewise.
1150         * tst-flock2.c: Likewise.
1151         * tst-mutex4.c: Likewise.
1152         * tst-mutex9.c: Likewise.
1153         * tst-rwlock12.c: Likewise.
1154         * tst-rwlock4.c: Likewise.
1155         * tst-signal1.c: Likewise.
1156         * tst-spin2.c: Likewise.
1157         * sysdeps/pthread/posix-timer.h: Likewise.
1158         * sysdeps/pthread/timer_create.c: Likewise.
1159         * sysdeps/pthread/timer_routines.c: Likewise.
1160
1161 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
1162
1163         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1164         (__lll_mutex_timedlock_wait): Address futex correctly.
1165
1166         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1167         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1168         make sure 2 is stored in the futex and we looked at the old value.
1169         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1170         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
1171         which might very well made the code not working at all before.
1172         [BZ #417]
1173
1174 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
1175
1176         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1177         allow SIGSETXID to be sent.
1178         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1179         for SIGSETXID to be defined.
1180         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1181         SIGSETXID cannot be blocked.
1182
1183         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1184         Add __extension__ to long long types.
1185         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1186         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1187         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1188         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1189         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1190         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1191         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1192
1193 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
1194
1195         * descr.h (struct pthread): Add stopped_start field.
1196         * sysdeps/pthread/createthread.c (create_thread): Set
1197         start_stopped flag in descriptor for new thread appropriately.
1198         * pthread_create.c (start_thread): Only take lock to be stopped on
1199         startup if stopped_start flag says so.
1200
1201 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
1202
1203         * pthread_create.c (__pthread_create_2_1): Remember whether thread
1204         is created detached and if yes, do not try to free the stack in case
1205         the thread creation failed.
1206         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1207         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1208         case there has been no error.  [BZ #405]
1209
1210         * pthread_create.c (start_thread): Don't wait for scheduler data
1211         etc to be set at the beginning of the function.  The cancellation
1212         infrastructure must have been set up.  And enable async
1213         cancellation before potentially going to sleep.  [BZ #401]
1214
1215 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
1216
1217         * Versions: Remove exports for pthread_set*id_np functions.
1218         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1219         for now.
1220         * Makefile: Don't build pthread_set*id code for now.
1221
1222 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
1223
1224         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1225         internal use.
1226         * allocatestack.c (__nptl_setxid): New function.
1227         * descr.h (struct xid_command): Define type.
1228         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1229         (sighandler_setxid): New function.
1230         (__pthread_initialize_minimal): Register sighandler_setxid for
1231         SIGCANCEL.
1232         * pt-allocrtsig.c: Update comment.
1233         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
1234         Declare __nptl_setxid.
1235         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1236         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1237         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1238         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1239         and pthread_setresuid_np.
1240         * pthread_setgid_np.c: New file.
1241         * pthread_setuid_np.c: New file.
1242         * pthread_setegid_np.c: New file.
1243         * pthread_seteuid_np.c: New file.
1244         * pthread_setregid_np.c: New file.
1245         * pthread_setreuid_np.c: New file.
1246         * pthread_setresgid_np.c: New file.
1247         * pthread_setresuid_np.c: New file.
1248         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
1249         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1250         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1251         and pthread_setresuid_np.
1252         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1253         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1254         pthread_setregid, and pthread_setresgid.
1255
1256 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
1257
1258         * allocatestack.c (allocate_stack): Return EAGAIN instead of
1259         ENOMEM when out of memory.
1260
1261 2004-09-10  Roland McGrath  <roland@redhat.com>
1262
1263         [BZ #379]
1264         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1265         code, since we don't try to use the broken CLONE_STOPPED any more.
1266         * pthread_create.c (start_thread): Likewise.
1267
1268 2004-09-15  Richard Henderson  <rth@redhat.com>
1269
1270         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1271
1272 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
1273
1274         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1275         (__libc_unwind_longjmp): Delete macro and declare as function.
1276         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1277         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1278         nptl directory.
1279         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1280         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1281         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1282
1283 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
1284
1285         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1286         for __USE_XOPEN2K.
1287         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1288         types also for __USE_XOPEN2K.
1289         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1290         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1291         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1292         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1293         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1294         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1295         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1296         [BZ #320]
1297
1298 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
1299
1300         * sysdeps/pthread/pthread.h
1301         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
1302         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1303         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1304         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
1305         [BZ #375]
1306
1307 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
1308
1309         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1310         PSEUDO to be used with . prefix.
1311
1312         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1313         Use atomic_increment instead of atomic_exchange_and_add.
1314         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1315         Likewise.
1316         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1317         Likewise.
1318         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1319         Likewise.
1320
1321         * allocatestack.c (allocate_stack): Use atomic_increment_val
1322         instead of atomic_exchange_and_add.
1323         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1324         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1325         Likewise.
1326         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1327         Likewise.
1328
1329         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1330         the initialization function might throw.
1331
1332 2005-09-05  Richard Henderson  <rth@redhat.com>
1333
1334         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1335         Move definition inside libpthread, libc, librt check.  Provide
1336         definition for rtld.
1337
1338 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
1339
1340         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1341         * sysdeps/i386/jmpbuf-unwind.h: Likewise
1342         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1343         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1344         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1345         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1346         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1347         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1348         * unwind.c: Use it.
1349
1350         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1351         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1352         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1353         Likewise.
1354         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1355         Decrement __nwaiters.  If pthread_cond_destroy has been called and
1356         this is the last waiter, signal pthread_cond_destroy caller and
1357         avoid using the pthread_cond_t structure after unlock.
1358         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1359         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1360         Read clock type from the least significant bits of __nwaiters instead
1361         of __clock.
1362         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1363         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1364
1365 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
1366
1367         [BZ #342]
1368         * Makefile (tests): Add tst-cond20 and tst-cond21.
1369         * tst-cond20.c: New test.
1370         * tst-cond21.c: New test.
1371         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1372         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1373         it unsigned int.
1374         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1375         Likewise.
1376         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1377         (pthread_cond_t): Likewise.
1378         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1379         Likewise.
1380         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1381         Likewise.
1382         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1383         Likewise.
1384         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1385         (cond_nwaiters): New.
1386         (clock_bits): New.
1387         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1388         if there are waiters not signalled yet.
1389         Wait until all already signalled waiters wake up.
1390         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1391         __nwaiters.  If pthread_cond_destroy has been called and this is the
1392         last waiter, signal pthread_cond_destroy caller and avoid using
1393         the pthread_cond_t structure after unlock.
1394         (__pthread_cond_wait): Increment __nwaiters in the beginning,
1395         decrement it when leaving.  If pthread_cond_destroy has been called
1396         and this is the last waiter, signal pthread_cond_destroy caller.
1397         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1398         Likewise.  Read clock type from the least significant bits of
1399         __nwaiters instead of __clock.
1400         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1401         whether clock ID can be encoded in COND_CLOCK_BITS bits.
1402         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1403         clock type just from the last COND_CLOCK_BITS bits of value.
1404         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1405         instead of __clock, just from second bit of condattr's value.
1406
1407 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
1408
1409         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1410         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
1411         != 64.
1412         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1413
1414 2004-08-15  Roland McGrath  <roland@frob.com>
1415
1416         * pthread_atfork.c: Update copyright terms including special exception
1417         for these trivial files, which are statically linked into executables
1418         that use dynamic linking for the significant library code.
1419
1420 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
1421
1422         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1423         pthread_rwlock_rdlock.
1424         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1425         Decrease __nr_readers_queued after reacquiring lock.
1426         * sysdeps/pthread/pthread_rwlock_timedrdlock
1427         (pthread_rwlock_timedrdlock): Likewise.
1428         Reported by Bob Cook <bobcook47@hotmail.com>.
1429
1430 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
1431
1432         * tst-rwlock14.c (tf): Read main thread handle from *ARG
1433         before pthread_barrier_wait.
1434
1435 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
1436
1437         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1438         Remove unnecessary exception handling data.
1439
1440 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
1441
1442         [BZ #284]
1443         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1444         instead of clockid_t.
1445
1446 2004-07-21  Roland McGrath  <roland@redhat.com>
1447
1448         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1449
1450 2004-07-19  Roland McGrath  <roland@redhat.com>
1451
1452         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1453
1454 2004-07-02  Roland McGrath  <roland@redhat.com>
1455
1456         * configure: Don't exit.
1457
1458 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1459
1460         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1461         (__pthread_cond_timedwait): Check for invalid nanosecond in
1462         timeout value.
1463
1464 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
1465
1466         * Makefile: Add rules to build and run tst-fini1.
1467         * tst-fini1.c: New file.
1468         * tst-fini1mod.c: New file.
1469
1470 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
1471
1472         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
1473         if no cancellation support is needed.
1474         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1475         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1476         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1477         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1478         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1479         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1480         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1481         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1482         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1483
1484         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
1485         only if not already defined.
1486
1487 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
1488
1489         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
1490         constraint "m" instead of "0" for futex.
1491
1492         * shlib-versions: Add powerpc64-.*-linux.*.
1493
1494 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
1495
1496         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1497         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
1498         for valid tv_nsec.
1499         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
1500         1 billion and 64-bit tv_nsec which is valid when truncated to 32
1501         bits.
1502
1503 2004-06-29  Roland McGrath  <roland@redhat.com>
1504
1505         * Banner: NPTL no longer has its own version number.
1506         * Makefile (nptl-version): Variable removed.
1507         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
1508         using $(version), the glibc version number.
1509
1510 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1511
1512         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1513         Fix branch offset for a PLT entry.
1514         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1515         Likewise.
1516         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1517         Likewise.
1518         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1519         Likewise.
1520         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
1521         Likewise.
1522
1523 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
1524
1525         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
1526         unconditionally.
1527
1528 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
1529
1530         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1531         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
1532         instead of tv_sec.
1533         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1534         (pthread_rwlock_timedrdlock): Likewise.
1535
1536 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
1537
1538         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1539         Set __r7 to val, not mutex.
1540
1541 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
1542
1543         * Makefile: Add rules to build tst-rwlock14.
1544         * tst-rwlock14.c: New file.
1545
1546 2004-06-24  Boris Hu  <boris.hu@intel.com>
1547
1548         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
1549         check.
1550         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1551
1552 2004-06-19  Andreas Jaeger  <aj@suse.de>
1553
1554         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
1555         assembler in last patch.
1556
1557 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
1558
1559         * sysdeps/pthread/pthread_cond_timedwait.c
1560         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
1561         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1562         (__pthread_cond_timedwait): Check for invalid nanosecond in
1563         timeout value.
1564         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1565         * tst-cond19.c: New file.
1566         * Makefile: Add rules to build and run tst-cond19.
1567
1568 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
1569
1570         * tst-context1.c (GUARD_PATTERN): Defined.
1571         (tst_context_t): Define struct containing ucontext_t & guard words.
1572         (ctx): Declare as an array of tst_context_t.
1573         (fct): Verify uc_link & guard words are still valid.
1574         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
1575
1576 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1577
1578         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1579         Add __data.__futex field, reshuffle __data.__clock.
1580         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1581         (__pthread_cond_signal): Increment __futex at the same time as
1582         __wakeup_seq or __total_seq.  Pass address of __futex instead of
1583         address of low 32-bits of __wakeup_seq to futex syscall.
1584         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1585         (__pthread_cond_wait): Likewise.  Pass __futex value from before
1586         releasing internal lock to FUTEX_WAIT.
1587         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1588         (__pthread_cond_timedwait): Likewise.
1589         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1590         (FUTEX_CMP_REQUEUE): Define.
1591         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1592         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1593         Pass __futex value from before the unlock and __futex address instead
1594         of address of low 32-bits of __wakeup_seq to futex syscall.
1595         Fallback to FUTEX_WAKE all on any errors.
1596
1597 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
1598
1599         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
1600         comment typo.
1601         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
1602         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
1603         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
1604         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
1605         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
1606
1607 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1608
1609         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
1610         Add memory clobber to inline assembly.
1611         (__lll_mutex_trylock): Likewise.
1612         (__lll_mutex_cond_trylock): Likewise.
1613
1614 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1615
1616         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1617         Pass val argument as 6th system call argument in %r7.
1618
1619 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
1620
1621         * Makefile (tests): Add tst-cond16.
1622         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
1623         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
1624         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1625         Add __data.__futex field, reshuffle __data.__clock.
1626         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
1627         (__pthread_cond_signal): Increment __futex at the same time as
1628         __wakeup_seq or __total_seq.  Pass address of __futex instead of
1629         address of low 32-bits of __wakeup_seq to futex syscall.
1630         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
1631         (__pthread_cond_wait): Likewise.  Pass __futex value from before
1632         releasing internal lock to FUTEX_WAIT.
1633         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
1634         (__pthread_cond_timedwait): Likewise.
1635         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
1636         (FUTEX_CMP_REQUEUE): Define.
1637         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1638         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1639         Pass __futex value from before the unlock and __futex address instead
1640         of address of low 32-bits of __wakeup_seq to futex syscall.
1641         Fallback to FUTEX_WAKE all on any errors.
1642         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
1643         Define.
1644         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1645         internally.  Return non-zero if error, zero if success.
1646         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1647         Add __data.__futex field, reshuffle __data.__clock.
1648         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
1649         Define.
1650         (lll_futex_requeue): Add val argument, return 1 unconditionally
1651         for the time being.
1652         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1653         Add __data.__futex field, reshuffle __data.__clock.
1654         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1655         Define.
1656         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1657         internally.  Return non-zero if error, zero if success.
1658         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1659         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
1660         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1661         Define.
1662         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1663         internally.  Return non-zero if error, zero if success.
1664         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1665         Add __data.__futex field, reshuffle __data.__clock.
1666         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
1667         Define.
1668         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1669         internally.  Return non-zero if error, zero if success.
1670         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1671         Add __data.__futex field, reshuffle __data.__clock.
1672         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1673         Add __data.__futex field, reshuffle __data.__clock.
1674         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
1675         Increment __futex at the same time as __wakeup_seq or __total_seq.
1676         Pass address of __futex instead of address of low 32-bits of
1677         __wakeup_seq to futex syscall.
1678         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1679         Pass __futex value from before releasing internal lock
1680         to FUTEX_WAIT.
1681         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1682         Likewise.  Avoid unnecessary shadowing of variables.
1683         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
1684         Set __futex to 2 * __total_seq.  Pass __futex value from before the
1685         unlock and __futex address instead of address of low 32-bits of
1686         __wakeup_seq to futex_requeue macro, adjust for new return value
1687         meaning.
1688         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1689         (__pthread_cond_signal): Increment __futex at the same time as
1690         __wakeup_seq or __total_seq.  Pass address of __futex instead of
1691         address of low 32-bits of __wakeup_seq to futex syscall.
1692         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1693         (__pthread_cond_wait): Likewise.  Pass __futex value from before
1694         releasing internal lock to FUTEX_WAIT.
1695         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1696         (__pthread_cond_timedwait): Likewise.
1697         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1698         (FUTEX_CMP_REQUEUE): Define.
1699         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1700         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1701         Pass __futex value from before the unlock and __futex address instead
1702         of address of low 32-bits of __wakeup_seq to futex syscall.
1703         Fallback to FUTEX_WAKE all on any errors.
1704
1705 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1706
1707         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
1708         Add nop to align the end of critical section.
1709         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
1710
1711 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1712
1713         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1714         Add __broadcast_seq field.
1715         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
1716         all waiters as woken with woken_seq and bump broadcast counter.
1717         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
1718         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
1719         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1720         Comment typo fixes.  Avoid returning -ETIMEDOUT.
1721
1722 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
1723
1724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1725         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
1726         Reported by Kaz Kojima.
1727
1728 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
1729
1730         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
1731
1732 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
1733
1734         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
1735         __broadcast_seq with bc_seq after acquiring internal lock instead of
1736         before it.
1737
1738 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
1739
1740         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
1741         compilation.
1742         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1743         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
1744         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1745         (pthread_cond_t): Add __data.__broadcast_seq field.
1746         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1747         (FRAME_SIZE): Define.
1748         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
1749         Comment typo fixes.
1750         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
1751         Define.
1752         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
1753         typo fixes.
1754         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1755         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
1756         fixes.
1757
1758 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
1759
1760         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
1761         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1762         Add __broadcast_seq field.
1763         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1764         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1765         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1766         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1767         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1768         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
1769         all waiters as woken with woken_seq and bump broadcast counter.
1770         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
1771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
1772         __broadcast_seq field.
1773         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1774         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1775         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1776         * pthread_cond_init.c: Initialize __broadcast_seq field.
1777         * Makefile (tests): Add tst-cond17 and tst-cond18.
1778         Add .NOTPARALLEL goal.
1779         * tst-cond16.c: New file.  From Jakub.
1780         * tst-cond17.c: New file.  From Jakub.
1781         * tst-cond18.c: New file.  From Jakub.
1782
1783 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
1784
1785         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
1786         unwind info.
1787
1788         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1789         Parametrize frame size.  Correct some unwind info.
1790         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1791
1792 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
1793
1794         * tst-stack3.c: Note testing functionality beyond POSIX.
1795
1796 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
1797
1798         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
1799         Change conditional from ifdef to if.
1800
1801 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
1802
1803         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
1804         SYSDEP_CANCEL_ERROR): Define.
1805         (PSEUDO): Use it.
1806
1807 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
1808
1809         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
1810
1811 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
1812
1813         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
1814
1815 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1816
1817         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
1818         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1819         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
1820         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1821
1822 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
1823
1824         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
1825         thread has all signals blocked.
1826
1827 2004-04-18  Andreas Jaeger  <aj@suse.de>
1828
1829         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
1830         (SEM_VALUE_MAX): Add missing brace.
1831
1832 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
1833
1834         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
1835         in rt subdir.
1836         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
1837         * sysdeps/pthread/tst-mqueue8x.c: New test.
1838         * tst-cancel4.c: Update comment about message queues.
1839
1840         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
1841         return it_value { 0, 0 }.
1842         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
1843         like SIGEV_SIGNAL.
1844         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
1845         assertion for SIGEV_NONE.
1846         (thread_attr_compare): Compare all attributes, not just a partial
1847         subset.
1848
1849 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
1850
1851         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
1852
1853 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
1854
1855         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
1856         Just use a plain number.
1857         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1858         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1859         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1860         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1861         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1862         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1863         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1864
1865 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1866
1867         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
1868         frame info.
1869         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1870
1871 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
1872
1873         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
1874         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
1875         of calling sigwaitinfo.
1876
1877 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
1878
1879         * allocatestack.c (allocate_stack): Set reported_guardsize
1880         unconditionally.
1881         * pthread_getattr_np.c (pthread_getattr_np): Use
1882         reported_guardsize instead of guardsize.
1883         * descr.h (struct pthread): Add reported_guardsize field.
1884
1885 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
1886
1887         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
1888
1889 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
1890
1891         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
1892
1893 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
1894
1895         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
1896         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
1897         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
1898         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
1899         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1900         Define.
1901         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
1902         (_POSIX_MESSAGE_PASSING): Define.
1903         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
1904         (_POSIX_MESSAGE_PASSING): Define.
1905         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
1906         (_POSIX_MESSAGE_PASSING): Define.
1907
1908 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
1909
1910         * tst-context1.c (fct): Check whether correct stack is used.
1911
1912 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
1913
1914         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
1915         matching constraints for asm mem parameters.
1916
1917         * tst-clock2.c (tf): Don't define unless needed.
1918
1919 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
1920
1921         * Makefile (link-libc-static): Use $(static-gnulib) instead of
1922         $(gnulib).
1923
1924 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
1925
1926         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
1927         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
1928         * pthreadP.h: Declare __nptl_deallocate_tsd.
1929         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
1930         Adjust caller.
1931
1932         * Makefile (tests): Add tst-tsd5.
1933         * tst-tsd5.c: New file.
1934
1935 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
1936
1937         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1938         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
1939         is SHLIB_COMPAT check.
1940         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
1941         (__pthread_attr_getaffinity_old): Likewise.
1942         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1943         (__pthread_getaffinity_old): Likewise.
1944         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1945         (__pthread_setaffinity_old): Likewise.
1946
1947 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
1948
1949         * allocatestack.c (_make_stacks_executable): Call
1950         _dl_make_stack_executable first.
1951
1952 2004-03-24  Roland McGrath  <roland@redhat.com>
1953
1954         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
1955         constraint instead of "0".
1956
1957 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
1958
1959         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1960         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
1961
1962         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
1963         code to avoid warning.
1964
1965 2004-03-24  Andreas Jaeger  <aj@suse.de>
1966
1967         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1968         (__pthread_attr_setaffinity_old): Remove const.
1969
1970 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
1971
1972         * sysdeps/unix/sysv/linux/smp.h: New file.
1973         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
1974         * init.c: Define __is_smp.
1975         (__pthread_initialize_minimal_internal): Call is_smp_system to
1976         initialize __is_smp.
1977         * pthreadP.h: Declare __is_smp.
1978         Define MAX_ADAPTIVE_COUNT is necessary.
1979         * pthread_mutex_init.c: Add comment regarding __spins field.
1980         * pthread_mutex_lock.c: Implement adaptive mutex type.
1981         * pthread_mutex_timedlock.c: Likewise.
1982         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1983         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
1984         Add __spins field.
1985         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1986         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1987         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1988         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1989         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1990         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1991         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1992         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
1993         lll_mutex_cond_trylock.
1994         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1995         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1996         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1997         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1998         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1999         Define BUSY_WAIT_NOP.
2000         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2001         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2002
2003         * tst-mutex5.c: Add support for testing adaptive mutexes.
2004         * tst-mutex7.c: Likewise.
2005         * tst-mutex5a.c: New file.
2006         * tst-mutex7a.c: New file.
2007         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2008
2009         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2010         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2011         vgettimeofday call might destroy the content.
2012
2013         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2014         @pause in the loop.
2015
2016         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2017         No need to restrict type of ret.  Make it int.  Add comment.
2018
2019         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2020         Remove unnecessary setne instruction.
2021
2022 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
2023
2024         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2025         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2026         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2027         If realloc fails, break out of the loop.
2028
2029 2004-03-20  Andreas Jaeger  <aj@suse.de>
2030
2031         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2032         (__pthread_setaffinity_old): Fix interface.
2033         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2034         (__pthread_getaffinity_old): Likewise.
2035
2036         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2037         (__pthread_setaffinity_new): Remove duplicate declaration.
2038
2039 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2040
2041         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2042         the return value to a safe register.
2043         (CDISABLE): Set the function argument correctly.
2044
2045 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2046
2047         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2048         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2049         Rewrite so that only one locked memory operation per round is needed.
2050         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2051         (pthread_barrier_wait): After wakeup, release lock only when the
2052         last thread stopped using the barrier object.
2053         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2054         (__pthread_cond_wait): Don't store mutex address if the current
2055         value is ~0l.  Add correct cleanup support and unwind info.
2056         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2057         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2058         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2059         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2060         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2061         Add correct cleanup support and unwind info.
2062         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2063         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2064         information for syscall wrappers.
2065
2066 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
2067
2068         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2069         cpusetsize field, remove next.
2070         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2071         parameter for size of the CPU set.
2072         (pthread_setaffinity_np): Likewise.
2073         (pthread_attr_getaffinity_np): Likewise.
2074         (pthread_attr_setaffinity_np): Likewise.
2075         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2076         interface change, keep compatibility code.
2077         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2078         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2079         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2080         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
2081         __pthread_getaffinity_np.
2082         * Versions: Add version for changed interfaces.
2083         * tst-attr3.c: Adjust test for interface change.
2084         * pthread_getattr_np.c: Query the kernel about the affinity mask with
2085         increasing buffer sizes.
2086         * pthread_attr_destroy.c: Remove unused list handling.
2087         * pthread_attr_init.c: Likewise.
2088
2089 2004-03-17  Roland McGrath  <roland@redhat.com>
2090
2091         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2092         first argument to clock_getres so we ever enable kernel timers.
2093
2094 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
2095
2096         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2097
2098 2004-03-12  Richard Henderson  <rth@redhat.com>
2099
2100         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2101         oldvalue from CENABLE to CDISABLE.
2102
2103 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
2104
2105         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2106         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2107         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2108         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2109
2110 2004-03-11  Richard Henderson  <rth@redhat.com>
2111
2112         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2113         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2114         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2115
2116 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2117
2118         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2119         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2120         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2121
2122 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2123
2124         * forward.c (__pthread_cond_broadcast_2_0,
2125         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2126         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2127         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2128
2129 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2130
2131         * sysdeps/sh/tcb-offsets.sym: Add PID.
2132         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2133         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2134
2135 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
2136
2137         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2138         include <sysdep-cancel.h>, vfork is no cancellation point.
2139         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2140         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2141         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2142
2143 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
2144
2145         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2146         libc_hidden_def.
2147         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2148         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2149         Likewise.
2150         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2151         Likewise.
2152         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2153         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2154         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2155         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2156         of DO_CALL_VIA_BREAK.  Work around a gas problem.
2157
2158         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2159         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2160         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2161         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2162         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2163         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2164
2165         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2166         a local register for saving old PID.  Negate PID in parent upon exit.
2167
2168         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2169         tcb-offsets.h.
2170         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2171         before syscall, set to the old value in the parent afterwards.
2172         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2173         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2174         tcb-offsets.h.
2175         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2176         before syscall, set to the old value in the parent afterwards.
2177         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2178         * sysdeps/s390/tcb-offsets.sym: Add PID.
2179
2180         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2181         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2182         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2183         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2184         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2185         * sysdeps/sparc/tcb-offsets.sym: Add PID.
2186
2187 2004-03-10  Andreas Schwab  <schwab@suse.de>
2188
2189         * sysdeps/ia64/tcb-offsets.sym: Add PID.
2190         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2191         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2192
2193 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
2194
2195         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2196         * tst-cancel21.c (do_one_test): Likewise.
2197         Reported by Gordon Jin <gordon.jin@intel.com>.
2198
2199 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
2200
2201         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2202         if non-zero and set to INT_MIN if zero.
2203         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2204         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2205         (SAVE_PID, RESTORE_PID): Define.
2206         (__vfork): Use it.
2207         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2208         Use relative path to avoid including NPTL i386/vfork.S.
2209         (SAVE_PID, RESTORE_PID): Define.
2210         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2211         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2212         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2213         tst-vfork2x.
2214         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2215         * tst-vfork1.c: New test.
2216         * tst-vfork2.c: New test.
2217         * tst-vfork1x.c: New test.
2218         * tst-vfork2x.c: New test.
2219
2220 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
2221
2222         * sysdeps/i386/tcb-offsets.sym: Add PID.
2223         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2224         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2225         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2226
2227 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
2228
2229         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2230
2231 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
2232
2233         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2234         _rtld_global_ro.
2235
2236 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
2237
2238         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2239         _rtld_global_ro.
2240
2241         * tst-once4.c: Remove unnecessary macro definition.
2242
2243         * tst-mutex7.c (do_test): Limit thread stack size.
2244         * tst-once2.c (do_test): Likewise.
2245         * tst-tls3.c (do_test): Likewise.
2246         * tst-tls1.c (do_test): Likewise.
2247         * tst-signal3.c (do_test): Likewise.
2248         * tst-kill6.c (do_test): Likewise.
2249         * tst-key4.c (do_test): Likewise.
2250         * tst-join4.c (do_test): Likewise.
2251         * tst-fork1.c (do_test): Likewise.
2252         * tst-context1.c (do_test): Likewise.
2253         * tst-cond2.c (do_test): Likewise.
2254         * tst-cond10.c (do_test): Likewise.
2255         * tst-clock2.c (do_test): Likewise.
2256         * tst-cancel10.c (do_test): Likewise.
2257         * tst-basic2.c (do_test): Likewise.
2258         * tst-barrier4.c (do_test): Likewise.
2259
2260 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
2261
2262         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2263
2264 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
2265
2266         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2267         (__pthread_cond_timedwait): Optimize wakeup test.
2268         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2269         (__pthread_cond_wait): Likewise.
2270         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2271         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2272         Likewise.
2273
2274 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
2275
2276         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2277         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
2278         the atomic instruction needed.
2279         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2280         (__lll_mutex_lock_wait): Likewise.
2281
2282 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
2283
2284         * Makefile (tests): Add tst-cond14 and tst-cond15.
2285         * tst-cond14.c: New file.
2286         * tst-cond15.c: New file.
2287
2288 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
2289
2290         * sysdeps/pthread/createthread.c (create_thread): Remove use of
2291         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
2292         needs to be implemented differently to be useful.
2293
2294 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
2295
2296         * pthread_attr_setschedparam.c: Don't test priority against limits
2297         here.  Set ATTR_FLAG_SCHED_SET flag.
2298         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
2299         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
2300         from parent thread to child.  If attribute is used and scheduling
2301         parameters are not inherited, copy parameters from attribute or
2302         compute them.  Check priority value.
2303         * pthread_getschedparam.c: If the parameters aren't known yet get
2304         them from the kernel.
2305         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
2306         ATTR_FLAG_POLICY_SET flag for thread.
2307         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
2308         and ATTR_FLAG_POLICY_SET.
2309
2310         * sysdeps/pthread/createthread.c: Use tgkill if possible.
2311
2312         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2313         fail if stack address hasn't been set.  Just return 0.
2314
2315 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
2316
2317         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
2318         libpthread for the files in this list.
2319         (CFLAGS-tst-unload): Removed.
2320         * tst-unload.c (do_test): Don't use complete path for
2321         LIBPHREAD_SO.
2322
2323         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2324         tst-_res1mod2.
2325
2326 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
2327
2328         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2329         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2330         operation per round is needed.
2331         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2332         (__lll_mutex_lock_wait): Likewise.
2333
2334 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
2335
2336         * tst-cancel9.c (cleanup): Don't print to stderr.
2337
2338 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2339
2340         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2341
2342 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
2343
2344         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2345         (__syscall_error_handler2): Call CDISABLE.
2346         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2347         (__syscall_error_handler2): Call CDISABLE.
2348
2349         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2350         Release lock before the loop, don't reacquire it.
2351
2352         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2353
2354 2004-02-19  Andreas Schwab  <schwab@suse.de>
2355
2356         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2357         Fix last change.
2358
2359 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
2360
2361         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2362         (pthread_barrier_wait): After wakeup, release lock only when the
2363         last thread stopped using the barrier object.
2364         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2365         (pthread_barrier_wait): Likewise.
2366         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2367         Likewise.
2368         * Makefile (tests): Add tst-barrier4.
2369         * tst-barrier4.c: New file.
2370
2371         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2372         (__pthread_cond_timedwait): Perform timeout test while holding
2373         internal lock to prevent wakeup race.
2374         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2375         * sysdeps/pthread/pthread_cond_timedwait.c
2376         (__pthread_cond_timedwait): Likewise.
2377         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2378         (__pthread_cond_timedwait): Likewise.
2379
2380 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
2381
2382         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2383         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2384         * Makefile (tests): Add tst-rwlock13.
2385         * tst-rwlock13.c: New test.
2386
2387 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
2388
2389         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2390         (__condvar_tw_cleanup): Little optimization.
2391         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2392
2393 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
2394
2395         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2396         libpthread as "lib" parameter to SHLIB_COMPAT.
2397         (__novmx_siglongjmp): Fix typo in function name.
2398         (__novmx_longjmp): Fix typo in function name.
2399
2400 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2401
2402         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2403         __builtin_expect.
2404
2405         * sysdeps/generic/pt-longjmp.c: Moved to...
2406         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
2407
2408 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
2409
2410         * Makefile (libpthread-routines): Add pt-cleanup.
2411         * pt-longjmp.c: Removed.
2412         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2413         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2414         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2415         Version longjmp, siglongjmp for GLIBC_2.3.4.
2416         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2417
2418 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2419
2420         * sysdeps/pthread/pthread_cond_timedwait.c
2421         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
2422         Reuse code.  Add __builtin_expects.
2423
2424         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2425         (__pthread_cond_timedwait): Get internal lock in case timeout has
2426         passed before the futex syscall.
2427         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2428
2429 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
2430
2431         * allocatestack.c: Pretty printing.
2432
2433         * sysdeps/pthread/createthread.c (create_thread): Don't add
2434         CLONE_DETACHED bit if it is not necessary.
2435
2436 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
2437
2438         * pthread_getattr_np.c: Include ldsodefs.h.
2439
2440 2004-01-16  Richard Henderson  <rth@redhat.com>
2441
2442         * allocatestack.c: Don't declare __libc_stack_end.
2443         * init.c (__pthread_initialize_minimal_internal): Likewise.
2444         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
2445
2446 2004-01-15  Richard Henderson  <rth@redhat.com>
2447
2448         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2449         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2450         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2451         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2452         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2453         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2454         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2455         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
2456
2457 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
2458
2459         * init.c (pthread_functions): Make array const.
2460
2461 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
2462
2463         * allocatestack.c (__make_stacks_executable): Change interface.
2464         Check parameters.  Pass parameter on to libc counterpart.
2465         * pthreadP.h: Change declaration.
2466
2467 2004-01-13  Richard Henderson  <rth@redhat.com>
2468
2469         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
2470         prototype form.
2471         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
2472         Likewise.
2473
2474         * sysdeps/alpha/Makefile: New file.
2475         * sysdeps/alpha/tcb-offsets.sym: New file.
2476         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2477         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
2478
2479         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
2480         on powerpc version.
2481
2482 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
2483
2484         * Makefile (tests): Add tst-backtrace1.
2485         * tst-backtrace1.c: New test.
2486
2487 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
2488
2489         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
2490         register as second parameter to the REGISTER macro.
2491         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
2492         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
2493         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
2494         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
2495         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
2496         of thread register as second parameter to REGISTER macro in 64 case.
2497
2498 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
2499
2500         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
2501         (CFLAGS-getpid.o): Defined.
2502         (CFLAGS-getpid.os): Defined.
2503
2504 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
2505
2506         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
2507         returned for main thread does not overlap with any other VMA.
2508         Patch by Jakub Jelinek.
2509
2510 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
2511
2512         * tst-raise1.c: Include stdio.h.
2513
2514 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
2515
2516         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
2517         setting with __ASSUME_TGKILL || defined __NR_tgkill.
2518         If pid is 0, set it to selftid.
2519         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
2520         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
2521         != 0, return self->tid without doing a syscall.
2522         * descr.h (struct pthread): Move pid field after tid.
2523
2524         * Makefile (tests): Add tst-raise1.
2525         * tst-raise1.c: New file.
2526
2527 2003-12-23  Roland McGrath  <roland@redhat.com>
2528
2529         * tst-oddstacklimit.c: New file.
2530         * Makefile (tests): Add it.
2531         (tst-oddstacklimit-ENV): New variable.
2532
2533         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
2534         value up to page size for __default_stacksize.
2535
2536 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
2537
2538         * Makefile (tests): Add tst-eintr5.
2539         * tst-eintr5.c: New file.
2540
2541         * eintr.c (eintr_source): Prevent sending signal to self.
2542
2543         * tst-eintr2.c (tf1): Improve error message.
2544
2545 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
2546
2547         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
2548         * sysdeps/unix/sysv/linux/getpid.c: New file.
2549         * pthread_cancel.c: Add comment explaining use of PID field.
2550         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2551         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
2552         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
2553         temporarily to signal the field must not be relied on and updated
2554         by getpid().
2555         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
2556         temporarily negative.
2557         * sysdeps/unix/sysv/linux/raise.c: Likewise.
2558
2559 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
2560
2561         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
2562         (eintr_source): If ARG != NULL, use pthread_kill.
2563         * tst-eintr1.c: Adjust for this change.
2564         * tst-eintr2.c: Likewise.
2565         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
2566         * tst-eintr3.c: New file.
2567         * tst-eintr4.c: New file.
2568
2569 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
2570
2571         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
2572         if CANCELSTATE_BITMASK is set.
2573         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
2574         Likewise.
2575
2576         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
2577         (tests-reverse): Add tst-cancel23.
2578         * tst-cancel22.c: New test.
2579         * tst-cancel23.c: New test.
2580
2581 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
2582
2583         * tst-eintr1.c: Better error messages.
2584
2585         * Makefile (tests): Add tst-eintr2.
2586         * tst-eintr2.c: New file.
2587
2588 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
2589
2590         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
2591         (CFLAGS-tst-cancelx21.c): Set.
2592         * tst-cancel21.c: New test.
2593         * tst-cancelx21.c: New test.
2594
2595         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
2596         comparison operand.
2597         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
2598         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
2599         * pt-longjmp.c: Include jmpbuf-unwind.h.
2600         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
2601         _JMPBUF_UNWINDS.  Adjust compared pointers.
2602         * init.c (__pthread_initialize_minimal_internal): Initialize
2603         pd->stackblock_size.
2604         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
2605         * sysdeps/alpha/jmpbuf-unwind.h: New file.
2606         * sysdeps/i386/jmpbuf-unwind.h: New file.
2607         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
2608         * sysdeps/s390/jmpbuf-unwind.h: New file.
2609         * sysdeps/sh/jmpbuf-unwind.h: New file.
2610         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
2611         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2612         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
2613         (_JMPBUF_CFA_UNWINDS): Remove.
2614         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
2615
2616 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
2617
2618         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
2619         (CFLAGS-tst-cancelx20.c): Set.
2620         * tst-cancel20.c: New test.
2621         * tst-cancelx20.c: New test.
2622
2623 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
2624
2625         * init.c (__pthread_initialize_minimal_internal): Don't treat
2626         architectures with separate register stack special here when
2627         computing default stack size.
2628
2629 2003-12-17  Roland McGrath  <roland@redhat.com>
2630
2631         * Makefile (tst-cancelx7-ARGS): New variable.
2632         Reportd by Greg Schafer <gschafer@zip.com.au>.
2633
2634 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
2635
2636         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
2637         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
2638         (tst-stack3-ENV): Set.
2639         ($(objpfx)tst-stack3-mem): New.
2640         * tst-stack3.c: New test.
2641
2642 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
2643
2644         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
2645         Add unwind directives.  Drop unused .regstk directive.
2646         (_fini_EPILOG_BEGINS): Add unwind directives.
2647
2648 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
2649
2650         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2651         Assume parameter is a pointer.
2652         (lll_futex_wake): Likewise.
2653         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
2654         Likewise.
2655         (lll_futex_wake): Likewise.
2656         Reported by Boris Hu.
2657         * sysdeps/unix/sysv/linux/unregister-atfork.c
2658         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
2659
2660         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
2661
2662 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
2663
2664         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
2665         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
2666         __rtld_lock_initialize for ld.so lock.
2667         Patch in part by Adam Li <adam.li@intel.com>.
2668
2669 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
2670
2671         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
2672         in $(gnulib).  Also, remove stale comment.
2673
2674 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
2675
2676         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
2677         advantage of new syscall stub and optimize accordingly.
2678
2679         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
2680         from SYS_futex, to match expectations of
2681         sysdep.h:DO_INLINE_SYSCALL.
2682         (lll_futex_clobbers): Remove.
2683         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
2684         (lll_futex_wake): Likewise.
2685         (lll_futex_requeue): Likewise.
2686         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
2687         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
2688         Jelinek).
2689         (__lll_mutex_lock): Likewise.
2690         (__lll_mutex_cond_lock): Likewise.
2691         (__lll_mutex_timed_lock): Likewise.
2692         (__lll_mutex_unlock): Likewise.
2693         (__lll_mutex_unlock_force): Likewise.
2694
2695         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
2696         comes before the include of <sysdep.h>.
2697         (THREAD_SELF_SYSINFO): New macro.
2698         (THREAD_SYSINFO): Likewise.
2699         (INIT_SYSINFO): New macro.
2700         (TLS_INIT_TP): Call INIT_SYSINFO.
2701
2702         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
2703
2704         * sysdeps/pthread/createthread.c (create_thread): Use
2705         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
2706         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
2707         THREAD_SELF_SYSINFO instead of open code.
2708         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
2709         (THREAD_SYSINFO): Likewise.
2710
2711         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
2712
2713         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
2714
2715 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
2716
2717         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
2718         instead of .init.  Patch by David Mosberger.
2719
2720 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
2721
2722         * sysdeps/pthread/configure.in: Remove broken declaration in C
2723         cleanup handling check.
2724
2725 2003-11-30  Andreas Jaeger  <aj@suse.de>
2726
2727         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
2728         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2729         Likewise.
2730
2731 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
2732
2733         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
2734         * pthread_attr_destroy.c: Include shlib-compat.h.
2735         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
2736         is set in iattr->flags.
2737         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
2738
2739 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
2740
2741         * Makefile (distribute): Add tst-cleanup4aux.c.
2742
2743         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
2744         include.
2745
2746 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
2747
2748         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
2749         pthread_cond_signal.
2750
2751         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
2752         store mutex address if the current value is ~0l.
2753         * sysdeps/pthread/pthread_cond_timedwait.c
2754         (__pthread_cond_timedwait): Likewise.
2755         * sysdeps/pthread/pthread_cond_broadcast.c
2756         (__pthread_cond_broadcast): Don't use requeue for pshared
2757         condvars.
2758
2759         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2760         (__pthread_cond_wait): Don't store mutex address if the current
2761         value is ~0l.
2762         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2763         (__pthread_cond_timedwait): Likewise.
2764         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2765         (__pthread_cond_broadcast): Don't use requeue for pshared
2766         condvars.
2767
2768         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
2769         element with ~0l for pshared condvars, with NULL otherwise.
2770
2771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2772         (__pthread_cond_wait): Don't store mutex address if the current
2773         value is ~0l.
2774         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2775         (__pthread_cond_timedwait): Likewise.
2776         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2777         (__pthread_cond_broadcast): Don't use requeue for pshared
2778         condvars.
2779
2780         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
2781         * tst-cond12.c: New file.
2782         * tst-cond13.c: New file.
2783
2784 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
2785
2786         * sysdeps/pthread/configure.in: Make missing forced unwind support
2787         fatal.
2788
2789 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
2790
2791         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
2792
2793 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
2794
2795         * Makefile: Add magic to clean up correctly.
2796
2797 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
2798
2799         * unwind.c (FRAME_LEFT): Define.
2800         (unwind_stop): Handle old style cleanups here.
2801         (__pthread_unwind): Handle old style cleanups only if
2802         !HAVE_FORCED_UNWIND.
2803         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
2804         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
2805         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
2806         ($(objpfx)tst-cleanupx4): Likewise.
2807         * tst-cleanup4.c: New test.
2808         * tst-cleanup4aux.c: New.
2809         * tst-cleanupx4.c: New test.
2810
2811 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
2812
2813         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
2814         lll_mutex_*lock macros to skip atomic operations on some archs.
2815
2816 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
2817
2818         * sysdeps/pthread/tst-timer.c (main): Initialize
2819         sigev2.sigev_value as well.
2820
2821 2003-10-15  Roland McGrath  <roland@redhat.com>
2822
2823         * sysdeps/pthread/configure.in: Barf if visibility attribute support
2824         is missing.
2825         * sysdeps/pthread/configure: Regenerated.
2826
2827 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2828
2829         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
2830         locking macros.  No distinction between normal and mutex locking
2831         anymore.
2832         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
2833         Merge bits from lowlevelmutex.S we still need.
2834         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
2835         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
2836         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
2837         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
2838         new mutex implementation.
2839         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
2840         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
2841         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2842         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2843         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2844         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2845         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2846         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2847         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2848         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
2849         symbol for entry point to avoid cancellation.
2850
2851 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
2852
2853         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
2854         changes.
2855         (SAVE_OLDTYPE_0): Fix a typo.
2856
2857 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
2858
2859         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
2860         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
2861
2862 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
2863
2864         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
2865         correct offset.
2866
2867 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
2868
2869         * Makefile (tests): Add tst-cancel19.
2870         * tst-cancel19.c: New test.
2871
2872 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
2873
2874         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
2875         restoring of the old cancellation type.
2876
2877 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
2878
2879         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
2880
2881 2003-09-27  Wolfram Gloger  <wg@malloc.de>
2882
2883         * sysdeps/pthread/malloc-machine.h: New file
2884
2885 2003-09-24  Roland McGrath  <roland@redhat.com>
2886
2887         * allocatestack.c (__make_stacks_executable): Don't ignore return
2888         value from _dl_make_stack_executable.
2889
2890 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
2891
2892         * allocatestack.c (__make_stacks_executable): Also change
2893         permission of the currently unused stacks.
2894
2895         * allocatestack.c (change_stack_perm): Split out from
2896         __make_stacks_executable.
2897         (allocate_stack): If the required permission changed between the time
2898         we started preparing the stack and queueing it, change the permission.
2899         (__make_stacks_executable): Call change_stack_perm.
2900
2901         * Makefile: Build tst-execstack-mod locally.
2902         * tst-execstack-mod.c: New file.
2903
2904 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
2905
2906         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
2907
2908 2003-09-23  Roland McGrath  <roland@redhat.com>
2909
2910         * tst-execstack.c: New file.
2911         * Makefile (tests): Add it.
2912         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
2913         (LDFLAGS-tst-execstack): New variable.
2914
2915         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
2916         whether to use PROT_EXEC for stack mmap.
2917         (__make_stacks_executable): New function.
2918         * pthreadP.h: Declare it.
2919         * init.c (__pthread_initialize_minimal_internal): Set
2920         GL(dl_make_stack_executable_hook) to that.
2921
2922 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
2923
2924         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
2925         recommendation from AMD re avoidance of lock prefix.
2926
2927 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
2928
2929         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
2930         lll_futex_timed_wait instead of lll_futex_wait.
2931         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
2932         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
2933         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
2934         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
2935         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
2936         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
2937         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
2938         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
2939         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
2940         Completely revamp the locking macros.  No distinction between
2941         normal and mutex locking anymore.
2942         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2943         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
2944         __lll_lock_timedwait): Fix prototypes.
2945         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
2946         __lll_lock_timedwait): Likewise.
2947         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
2948         macros, add __builtin_expect.
2949         (lll_mutex_timedlock): Likewise.  Fix return value.
2950         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
2951         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
2952         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
2953         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
2954         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
2955         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
2956         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
2957         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
2958
2959 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
2960
2961         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2962         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
2963         operation if possible.
2964
2965         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
2966         like jumping over the lock prefix.
2967
2968 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
2969
2970         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
2971         locking macros.  No distinction between normal and mutex locking
2972         anymore.
2973         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2974         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2975         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2976         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
2977         locking.  Merge bits from lowlevelmutex.S we still need.
2978         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2979         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2980         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
2981         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
2982         * Makefile (routines): Remove libc-lowlevelmutex.
2983         (libpthread-rountines): Remove lowlevelmutex.
2984         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
2985         for new mutex implementation.
2986         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2987         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2988         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2989         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2990         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2991         Likewise.
2992         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2993         Likewise.
2994         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2995         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2996         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
2997         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2998         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2999         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3000         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3001         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3002         Likewise.
3003         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3004         Likewise.
3005         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3006         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3007         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3008         Don't use requeue.
3009         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3010         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3011
3012 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
3013
3014         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3015         in parameters of asm with output parameters.
3016
3017         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3018         type of DECR parameter to int.
3019         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3020
3021 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
3022
3023         * tst-attr3.c (tf, do_test): Print stack start/end/size and
3024         guardsize for each thread.
3025
3026 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3027
3028         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3029         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3030         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3031
3032         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3033         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3034         NULL.
3035         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3036         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3037         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3038         (pthread_getaffinity_np): Add hidden_def.
3039
3040         * Makefile (tests): Add tst-attr3.
3041         * tst-attr3.c: New test.
3042
3043         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3044
3045 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3046
3047         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3048         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3049
3050 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3051
3052         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3053         * tst-align.c: Include tst-stack-align.h.
3054         (tf, do_test): Use TEST_STACK_ALIGN macro.
3055
3056 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
3057
3058         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3059         variable.
3060
3061 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
3062
3063         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3064         stack-related values for the initial thread.
3065
3066 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3067
3068         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3069
3070 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
3071
3072         * pthread_mutex_lock.c: Minor code rearrangements.
3073
3074 2003-09-05  Roland McGrath  <roland@redhat.com>
3075
3076         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3077         Instead, include ../nptl_db/db_info.c to do its magic.
3078         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3079         (__pthread_pthread_key_2ndlevel_size): Likewise.
3080         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3081         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3082         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3083         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3084         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3085         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3086         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3087         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3088         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3089         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3090         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3091         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3092         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3093         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3094         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3095         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3096         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3097
3098 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
3099
3100         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3101         of pthread_t to be compatible with LT.
3102         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3103         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3104         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3105         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3106         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3107         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3108         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3109
3110 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
3111
3112         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3113
3114 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
3115
3116         * unwind-forcedunwind.c: Move to...
3117         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3118         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3119         * sysdeps/pthread/jmpbuf-unwind.h: New file.
3120         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3121         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3122         * unwind.c: Include jmpbuf-unwind.h.
3123         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3124
3125 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
3126
3127         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3128         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3129         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3130         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3131         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3132         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3133         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3134         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3135         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3136         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3137         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3138         function.
3139         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3140         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3141         * Makefile (tests): Add tst-stack2.
3142         * tst-stack2.c: New test.
3143         * tst-stack1.c: Include limits.h and sys/param.h.
3144         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3145
3146         * pthread_condattr_setpshared.c: Include errno.h.
3147         (pthread_condattr_setpshared): Return EINVAL if pshared
3148         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3149
3150         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3151         defined symbol for entry point to avoid cancellation.
3152         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3153         Likewise.
3154         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3155         Likewise.
3156         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3157         Likewise.
3158         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3159         Likewise.
3160         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3161         Likewise.
3162         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3163         __close_nocancel, __read_nocancel, __write_nocancel,
3164         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
3165         libpthread.so or librt.so, define to corresponding function
3166         without _nocancel suffix.
3167         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3168         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3169         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3170
3171         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3172
3173 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
3174
3175         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3176         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3177
3178         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3179         in subsections has a symbol associated with it.
3180
3181         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3182         defined symbol for entry point to avoid cancellation.
3183         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3184
3185 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3186
3187         * Makefile (tests): Add tst-tls5.
3188         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3189         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3190         ($(objpfx)tst-tls5): New.
3191         ($(objpfx)tst-tls6.out): Likewise.
3192         (tests): Depend on $(objpfx)tst-tls6.out.
3193         * tst-tls3.c: Include stdint.h and pthreaddef.h.
3194         (do_test): Check pthread_self () return value alignment.
3195         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3196         (tf): Check pthread_self () return value alignment.
3197         * tst-tls5.c: New test.
3198         * tst-tls5.h: New.
3199         * tst-tls5mod.c: New.
3200         * tst-tls5moda.c: New.
3201         * tst-tls5modb.c: New.
3202         * tst-tls5modc.c: New.
3203         * tst-tls5modd.c: New.
3204         * tst-tls5mode.c: New.
3205         * tst-tls5modf.c: New.
3206         * tst-tls6.sh: New test.
3207
3208         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3209         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3210         * init.c (pthread_functions): Initialize them.
3211         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3212         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3213         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3214         pthread_cond_timedwait@@GLIBC_2.3.2.
3215
3216 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3217
3218         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3219         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3220         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3221         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3222         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3223         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3224
3225         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3226
3227         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3228         _POSIX_THREAD_PRIORITY_SCHEDULING.
3229         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3230
3231 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
3232
3233         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3234         nested function, use static inline function from libio.h.
3235         Code by Richard Henderson.
3236
3237         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3238         weak.
3239
3240 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
3241
3242         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3243         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3244         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3245         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3246         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3247         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3248         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3249         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3250         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3251         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3252         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3253         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3254         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3255         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3256         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3257         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3258         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3259         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3260         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3261         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3262         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3263         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3264         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3265         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3266         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3267         * sysdeps/sparc/tls.h: New file.
3268         * sysdeps/sparc/tcb-offsets.sym: New file.
3269         * sysdeps/sparc/Makefile: New file.
3270         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3271         * init.c [__sparc__] (__NR_set_tid_address): Define.
3272
3273 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
3274
3275         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3276         _IO_release_lock): Define.
3277
3278 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
3279
3280         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3281         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
3282
3283 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
3284
3285         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3286         (__pthread_cleanup_class): Add missing return types of member
3287         functions.
3288
3289 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
3290
3291         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3292         (lll_mutex_unlock_force): Add memory barrier between store and futex
3293         syscall.
3294
3295 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
3296
3297         * tst-cancel4.c (do_test): Also unlink tempfname and remove
3298         tempmsg in first loop.
3299
3300 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
3301
3302         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3303         _POSIX_THREAD_PRIORITY_SCHEDULING.
3304         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3305
3306 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3307
3308         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
3309         (__rtld_lock_default_lock_recursive,
3310         __rtld_lock_default_unlock_recursive): Define.
3311         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3312         __rtld_lock_unlock_recursive): Define using
3313         GL(_dl_rtld_*lock_recursive).
3314         * init.c (__pthread_initialize_minimal_internal): Initialize
3315         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3316         Lock GL(_dl_load_lock) the same number of times as
3317         GL(_dl_load_lock) using non-mt implementation was nested.
3318
3319         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3320         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3321
3322 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
3323
3324         * tst-cancel17.c (do_test): Make len2 maximum of page size and
3325         PIPE_BUF.
3326
3327 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3328
3329         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3330
3331 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
3332
3333         * sysdeps/pthread/createthread.c (do_clone): Move error handling
3334         to first syscall error check.  Move syscall error check for tkill
3335         into __ASSUME_CLONE_STOPPED #ifdef.
3336
3337 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
3338
3339         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3340         is not defined, do explicit synchronization.
3341         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
3342         is not defined also unlock pd->lock for non-debugging case in case
3343         it is necessary.
3344         * pthread_create.c (start_thread): Always get and release pd->lock
3345         if __ASSUME_CLONE_STOPPED is not defined.
3346         (start_thread_debug): Removed.  Adjust users.
3347         * allocatestack.c (allocate_stack): Always initialize lock if
3348         __ASSUME_CLONE_STOPPED is not defined.
3349         * Makefile (tests): Add tst-sched1.
3350         * tst-sched1.c: New file.
3351
3352         * sysdeps/pthread/createthread.c (do_clone): Only use
3353         sched_setschduler and pass correct parameters.
3354
3355 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3356
3357         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3358         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3359         PTHREAD_STACK_MIN in comments.
3360
3361 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3362
3363         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3364         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3365         argument.
3366         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3367         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3368         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3369         (__pthread_cleanup_upto): Fix prototype.
3370         (_longjmp_unwind): Adjust caller.
3371         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3372         Change second argument to const struct pointer.
3373         * tst-sem8.c (main): Remove unused s2 and s3 variables.
3374         * tst-sem9.c (main): Likewise.
3375         * unwind.c: Include string.h for strlen prototype.
3376
3377 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
3378
3379         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3380         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3381         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3382         Define HAVE_CMOV.
3383         Patch by Nicholas Miell <nmiell@attbi.com>.
3384
3385 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
3386
3387         * init.c (__pthread_initialize_minimal_internal): Initialize
3388         GL(dl_init_static_tls).
3389         * pthreadP.h (__pthread_init_static_tls): New prototype.
3390         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3391         New functions.
3392         * Makefile (tests): Add tst-tls4.
3393         (modules-names): Add tst-tls4moda and tst-tls4modb.
3394         ($(objpfx)tst-tls4): Link against libdl and libpthread.
3395         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3396         tst-tls4modb.so.
3397         * tst-tls4.c: New file.
3398         * tst-tls4moda.c: New file.
3399         * tst-tls4modb.c: New file.
3400
3401 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
3402
3403         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3404         before __timer_dealloc.
3405         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3406         Don't call list_unlink.
3407
3408 2003-07-29  Roland McGrath  <roland@redhat.com>
3409
3410         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3411
3412 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
3413
3414         * tst-cancel17.c (do_test): Check if aio_cancel failed.
3415         Don't reuse struct aiocb A if it failed.
3416         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3417         not just one byte, as that does not block.
3418
3419 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
3420
3421         * sysdeps/pthread/unwind-resume.c: New file.
3422         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3423         unwind-resume in csu subdir.
3424         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3425         exceptions.
3426         (librt-sysdep_routines, librt-shared-only-routines): Add
3427         rt-unwind-resume.
3428         * sysdeps/pthread/rt-unwind-resume.c: New file.
3429         * unwind-forcedunwind.c: New file.
3430         * Makefile (libpthread-routines): Add unwind-forcedunwind.
3431         (libpthread-shared-only-routines): Likewise.
3432         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3433         * pthreadP.h (pthread_cancel_init): New prototype.
3434         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3435
3436         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3437         attr argument const struct pthread_attr *.
3438
3439         * res.c (__res_state): Return __resp.
3440         * descr.h: Include resolv.h.
3441         (struct pthread): Add res field.
3442         * pthread_create.c: Include resolv.h.
3443         (start_thread): Initialize __resp.
3444         * Makefile (tests): Add tst-_res1.
3445         (module-names): Add tst-_res1mod1, tst-_res1mod2.
3446         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3447         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3448         libpthread.
3449         * tst-_res1.c: New file.
3450         * tst-_res1mod1.c: New file.
3451         * tst-_res1mod2.c: New file.
3452
3453 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
3454
3455         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
3456
3457         * Makefile: Define various *-no-z-defs variables for test DSOs
3458         which has undefined symbols.
3459
3460 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
3461
3462         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3463         Retry if the stwcx fails to store once_control.
3464
3465 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
3466
3467         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
3468         pthread_attr_setaffinity.
3469         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
3470         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
3471         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
3472         * pthread_attr_destroy.c: Free cpuset element if allocated.
3473         * pthread_create.c: Pass iattr as additional parameter to
3474         create_thread.
3475         * sysdeps/pthread/createthread.c: If attribute is provided and
3476         a new thread is created with affinity set or scheduling parameters,
3477         start thread with CLONE_STOPPED.
3478         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
3479         pthread_attr_setaffinity.
3480         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add