]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
* posix/tst-execle1.c (do_test): Add a const.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
bfffffae
UD
12005-12-27 Jakub Jelinek <jakub@redhat.com>
2
3 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4 and __prev field to pthread_mutex_t.
5 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
9 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
10 to pthread_mutex_t.
11
1bcfb5a5
UD
122005-12-26 Ulrich Drepper <drepper@redhat.com>
13
14 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
15 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
16 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
17 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
18 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
19 and PTHREAD_MUTEXATTR_FLAG_BITS.
20 * descr.h (struct pthread): Add robust_list field and define
21 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
22 * pthread_mutexattr_getrobust.c: New file.
23 * pthread_mutexattr_setrobust.c: New file.
24 * pthread_mutex_consistent.c: New file.
25 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
26 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
27 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
28 Adjust pthread_mutex_t initializers.
29 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
30 field to pthread_mutex_t.
31 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
32 and __prev field to pthread_mutex_t.
33 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
34 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
35 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
36 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
37 * pthread_mutexattr_gettype.c: Likewise.
38 * pthread_mutexattr_setpshared.c: Likewise.
39 * pthread_mutexattr_settype.c: Likewise.
40 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
41 Initialize mutex kind according to robust flag.
42 * pthread_mutex_lock.c: Implement local robust mutex.
43 * pthread_mutex_timedlock.c: Likewise.
44 * pthread_mutex_trylock.c: Likewise.
45 * pthread_mutex_unlock.c: Likewise.
46 * pthread_create.c (start_thread): Mark robust mutexes which remained
47 locked as dead.
48 * tst-robust1.c: New file.
49 * tst-robust2.c: New file.
50 * tst-robust3.c: New file.
51 * tst-robust4.c: New file.
52 * tst-robust5.c: New file.
53 * tst-robust6.c: New file.
54 * tst-robust7.c: New file.
55 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
56 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
57 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
58 tst-robust5, tst-robust6, and tst-robust7.
59
60 * tst-typesizes.c: New file.
61 * Makefile (tests): Add tst-typesizes.
62
63 * tst-once3.c: More debug output.
64
9333ed0d
UD
652005-12-24 Ulrich Drepper <drepper@redhat.com>
66
d4d138a4
UD
67 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
68 missing after last change.
69
bfffffae 70 * version.c: Update copyright year.
9333ed0d 71
dcc73a8d
UD
722005-12-23 Ulrich Drepper <drepper@redhat.com>
73
74 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
75 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
76 * pthread_mutex_trylock.c: Likewise.
77 * pthread_mutex_timedlock.c: Likewise.
78 * pthread_mutex_unlock.c: Likewise.
79
879f3ca6
RM
802005-12-22 Roland McGrath <roland@redhat.com>
81
82 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
83 so that #include_next's search location is not reset to the -I..
84 directory where <nptl/...> can be found.
85
077a0da7
UD
862005-12-22 Ulrich Drepper <drepper@redhat.com>
87
88 [BZ #1913]
89 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
90 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
91 * tst-cancel24.cc: New file.
92 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 93
8dea90aa
RM
942005-12-21 Roland McGrath <roland@redhat.com>
95
96 * libc-cancellation.c: Use <> rather than "" #includes.
97 * pt-cleanup.c: Likewise.
98 * pthread_create.c: Likewise.
99 * pthread_join.c: Likewise.
100 * pthread_timedjoin.c: Likewise.
101 * pthread_tryjoin.c: Likewise.
102 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
103 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
104 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
105 * unwind.c: Likewise.
106
8da21f96
UD
1072005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
108
109 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
110 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
111 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
112 THREAD_COPY_POINTER_GUARD): Define.
113
00c2b3b9
UD
1142005-12-19 Jakub Jelinek <jakub@redhat.com>
115
116 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
117 rather than one.
118 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
119 THREAD_COPY_POINTER_GUARD): Define.
120 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
121 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
122 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
123 THREAD_COPY_POINTER_GUARD): Define.
124 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
125 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
126 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
127 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
128 Use PTR_DEMANGLE for B0 if defined.
129
827b7087
UD
1302005-12-17 Ulrich Drepper <drepper@redhat.com>
131
132 * pthread_create.c (__pthread_create_2_1): Use
133 THREAD_COPY_POINTER_GUARD if available.
134 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
135 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
136 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
137 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
138 * sysdeps/x86_64/tls.h: Likewise.
139
2826ac7e
RM
1402005-12-15 Roland McGrath <roland@redhat.com>
141
142 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
143
b6ab06ce
UD
1442005-12-13 Ulrich Drepper <drepper@redhat.com>
145
146 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
147 sysdeps/generic.
148 * errno-loc.c: New file.
149
f0d1a3b5
RM
1502005-12-12 Roland McGrath <roland@redhat.com>
151
152 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
153 adjustments before choosing stack size. Update minimum stack size
154 calculation to match allocate_stack change.
155
db13ddbc
UD
1562005-12-12 Ulrich Drepper <drepper@redhat.com>
157
158 * allocatestack.c (allocate_stack): Don't demand that there is an
159 additional full page available on the stack beside guard, TLS, the
160 minimum stack.
161
088f460f
UD
1622005-11-24 Ulrich Drepper <drepper@redhat.com>
163
164 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
165 (__cleanup_fct_attribute): Use __regparm__ not regparm.
166
167 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
168 compiling 32-bit code we must define __cleanup_fct_attribute.
169
16feadf2
UD
170005-11-24 Jakub Jelinek <jakub@redhat.com>
171
172 [BZ #1920]
173 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
174 __attribute__ instead of __attribute.
175 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
176 (__cleanup_fct_attribute): Likewise.
177
e6e493bb
UD
1782005-11-17 Jakub Jelinek <jakub@redhat.com>
179
180 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
181 a write barrier before writing libgcc_s_getcfa.
182
8e635611
UD
1832005-11-06 Ulrich Drepper <drepper@redhat.com>
184
185 * sysdeps/unix/sysv/linux/configure: Removed.
186
ce33ee7c
UD
1872005-11-05 Ulrich Drepper <drepper@redhat.com>
188
189 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
190 optional init_array/fini_array support.
191
20d511e0
RM
1922005-10-24 Roland McGrath <roland@redhat.com>
193
194 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
195 versioned_symbol use.
196
fe60d146
RM
1972005-10-16 Roland McGrath <roland@redhat.com>
198
199 * init.c (__pthread_initialize_minimal_internal): Even when using a
200 compile-time default stack size, apply the minimum that allocate_stack
201 will require, and round up to page size.
202
0faa1cf5
RM
2032005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
204
205 * Makefile ($(test-modules)): Remove static pattern rule.
206
f9126cc2
UD
2072005-10-14 Jakub Jelinek <jakub@redhat.com>
208 Ulrich Drepper <drepper@redhat.com>
209
210 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
211 alignment in callback function.
212 * Makefile: Add rules to build and run tst-align3.
213 * tst-align3.c: New file.
214
015a5d22
RM
2152005-10-03 Jakub Jelinek <jakub@redhat.com>
216
217 * allocatestack.c (setxid_signal_thread): Add
218 INTERNAL_SYSCALL_DECL (err).
219
b71ce910
UD
2202005-10-02 Jakub Jelinek <jakub@redhat.com>
221
222 * allocatestack.c (setxid_signal_thread): Need to use
223 atomic_compare_and_exchange_bool_acq.
224
dff9a7a1
UD
2252005-10-01 Ulrich Drepper <drepper@redhat.com>
226 Jakub Jelinek <jakub@redhat.com>
227
228 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
229 CANCEL_RESTMASK.
230 (struct pthread): Move specific_used field to avoid padding.
231 Add setxid_futex field.
232 * init.c (sighandler_setxid): Reset setxid flag and release the
233 setxid futex.
234 * allocatestack.c (setxid_signal_thread): New function. Broken
235 out of the bodies of the two loops in __nptl_setxid. For undetached
236 threads check whether they are exiting and if yes, don't send a signal.
237 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
238 * pthread_create.c (start_thread): For undetached threads, check
239 whether setxid bit is set. If yes, wait until signal has been
240 processed.
241
242 * allocatestack.c (STACK_VARIABLES): Initialize them.
243 * pthread_create.c (__pthread_create_2_1): Initialize pd.
244
560b4709
UD
2452004-09-02 Jakub Jelinek <jakub@redhat.com>
246
247 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
248 waiters, awake all waiters on the associated mutex.
249
5eac4760
RM
2502005-09-22 Roland McGrath <roland@redhat.com>
251
252 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
253 ../sysdeps/x86_64/hp-timing.h).
254
a3615024
UD
2552005-08-29 Jakub Jelinek <jakub@redhat.com>
256
257 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
258 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
259 (lll_futex_wake_unlock): Define.
260 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
261 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
262 (lll_futex_wake_unlock): Define.
263 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
264 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
265 (lll_futex_wake_unlock): Define.
266 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
267 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
268 (lll_futex_wake_unlock): Define.
269 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
270 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
271 (lll_futex_wake_unlock): Define.
272 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
273 lll_futex_wake_unlock.
274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
275 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
276 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
277 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
278 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
279 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
280
bf017034
UD
2812005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
282
283 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
284 Fix typo in register name.
285
fd4af664
UD
2862005-08-23 Ulrich Drepper <drepper@redhat.com>
287
8558d715
UD
288 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
289 Use __sigfillset. Document that sigfillset does the right thing wrt
290 to SIGSETXID.
fd4af664 291
3fd1bc67
UD
2922005-07-11 Jakub Jelinek <jakub@redhat.com>
293
44d75caf 294 [BZ #1102]
3fd1bc67
UD
295 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
296 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
297 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
298 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
299 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
300 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
301 in the structure.
302 * Makefile (tests): Add tst-initializers1.
303 (CFLAGS-tst-initializers1.c): Set.
304 * tst-initializers1.c: New test.
305
553185e2
UD
3062005-07-11 Jakub Jelinek <jakub@redhat.com>
307
308 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
309 Make sure __flags are located at offset 48 from the start of the
310 structure.
311
8df08cb2
RM
3122005-07-02 Roland McGrath <roland@redhat.com>
313
314 * Makeconfig: Comment fix.
315
253eb3a0
UD
3162005-07-05 Jakub Jelinek <jakub@redhat.com>
317
318 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
319 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
320 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
321 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
322 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
323 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
324 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
325 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
326 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
327 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
328
bb6e8ca3
UD
3292005-06-25 Jakub Jelinek <jakub@redhat.com>
330
331 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
332 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
333 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
334 fields.
335 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
336 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
337 field. Put in sysinfo field unconditionally.
338 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
339 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
340 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
341 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
342 fields.
343 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
344 * pthread_create.c (__pthread_create_2_1): Use
345 THREAD_COPY_STACK_GUARD macro.
346 * Makefile: Add rules to build and run tst-stackguard1{,-static}
347 tests.
348 * tst-stackguard1.c: New file.
349 * tst-stackguard1-static.c: New file.
350
99c7f870
UD
3512005-06-14 Alan Modra <amodra@bigpond.net.au>
352
353 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
354 Invoke CGOTSETUP and CGOTRESTORE.
355 (CGOTSETUP, CGOTRESTORE): Define.
356
8074c5c5
RM
3572005-05-29 Richard Henderson <rth@redhat.com>
358
359 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
360 (tf_write, tf_writev): Use it.
361 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
362 the system minimum.
363
c179df4e
UD
3642005-05-23 Jakub Jelinek <jakub@redhat.com>
365
366 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
367 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
368 __librt_*_asynccancel@local.
369
b0e196a4
UD
3702005-05-17 Alan Modra <amodra@bigpond.net.au>
371
372 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
373 all occurrences of JUMPTARGET. Instead append @local to labels.
374
f7d78e18
UD
3752005-05-20 Jakub Jelinek <jakub@redhat.com>
376
377 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
378 size/alignment of struct pthread rather than tcbhead_t.
379 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
380 Likewise.
381 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
382 Likewise.
383 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
384 Likewise.
385
363dd976
UD
3862005-05-19 Richard Henderson <rth@redhat.com>
387
388 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
389 __sync_val_compare_and_swap, not explicit _si variant.
390 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
391
1ad9da69
UD
3922005-05-03 Ulrich Drepper <drepper@redhat.com>
393
394 [BZ #915]
395 * sysdeps/pthread/pthread.h: Avoid empty initializers.
396
5085cd1f
UD
3972005-05-03 Jakub Jelinek <jakub@redhat.com>
398
399 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
400 .eh_frame section, use cfi_* directives.
401
ad529081
UD
4022005-04-27 Jakub Jelinek <jakub@redhat.com>
403
404 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
405 of "" includes.
406
dea99685
UD
4072005-04-27 Ulrich Drepper <drepper@redhat.com>
408
c06aad09 409 [BZ #1075]
dea99685
UD
410 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
411 aio_write blocks.
412
84060bad
RM
4132005-04-27 Roland McGrath <roland@redhat.com>
414
5e2d8ac8
RM
415 * Makefile (tests): Remove tst-clock2.
416
84060bad
RM
417 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
418 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
419 translating to the kernel clockid_t for our own process/thread clock.
420
421 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
422
4a035b9d
RM
4232005-04-15 Jakub Jelinek <jakub@redhat.com>
424
425 * old_pthread_cond_init.c: Include <errno.h>.
426 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
427 process shared or uses clock other than CLOCK_REALTIME.
428 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
429
edac0e8f
UD
4302005-04-13 David S. Miller <davem@davemloft.net>
431
432 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
433 * sysdeps/sparc/sparc64/clone.S: New file.
434
613d8d52
RM
4352005-04-05 Jakub Jelinek <jakub@redhat.com>
436
44d75caf 437 [BZ #1102]
613d8d52
RM
438 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
439 __inline instead of inline.
440 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
441
ee618985
UD
4422005-03-31 Jakub Jelinek <jakub@redhat.com>
443
444 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
445 functionally equivalent, but shorter instructions.
446 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
447 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
448 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
449 Likewise.
450 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
451 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
452 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
453 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
455 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
456 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
457 Likewise.
458 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
459 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
460 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
461 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
462 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
463
f850220b
AJ
4642005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
465
466 * sysdeps/mips/Makefile: New file.
467 * sysdeps/mips/nptl-sysdep.S: New file.
468 * sysdeps/mips/tcb-offsets.sym: New file.
469 * sysdeps/mips/pthread_spin_lock.S: New file.
470 * sysdeps/mips/pthread_spin_trylock.S: New file.
471 * sysdeps/mips/pthreaddef.h: New file.
472 * sysdeps/mips/tls.h: New file.
473 * sysdeps/mips/jmpbuf-unwind.h: New file.
474 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
475 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
476 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
477 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
478 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
479 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
480 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
481 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
482 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
483 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
484
1e6da2b0
UD
4852005-03-23 Ulrich Drepper <drepper@redhat.com>
486
c06aad09 487 [BZ #1112]
1e6da2b0
UD
488 * pthread_create.c (__pthread_create_2_1): Rename syscall error
489 variable to scerr.
490
5233d576
RM
4912005-03-10 Jakub Jelinek <jakub@redhat.com>
492
493 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
494
3053ff11
RM
4952005-02-25 Roland McGrath <roland@redhat.com>
496
497 * alloca_cutoff.c: Correct license text.
498 * tst-unload.c: Likewise.
499 * sysdeps/pthread/allocalim.h: Likewise.
500 * sysdeps/pthread/pt-initfini.c: Likewise.
501 * sysdeps/pthread/bits/libc-lock.h: Likewise.
502 * sysdeps/pthread/bits/sigthread.h: Likewise.
503 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
504 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
505
9cfe5381
RM
5062005-02-16 Roland McGrath <roland@redhat.com>
507
508 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
509 Use unsigned int * for ptr_nthreads.
510
7de00121
RM
5112005-02-14 Alan Modra <amodra@bigpond.net.au>
512
20d511e0 513 [BZ #721]
7de00121
RM
514 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
515 gcc4.
516
4bae262d
UD
5172005-02-07 Richard Henderson <rth@redhat.com>
518
613d8d52 519 [BZ #787]
4bae262d
UD
520 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
521 argument.
522
75df54b7
RM
5232004-11-03 Marcus Brinkmann <marcus@gnu.org>
524
525 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
526 order of arguments in invocation of atomic_add_zero.
527
ea9c93cc
UD
5282005-01-26 Jakub Jelinek <jakub@redhat.com>
529
9cfe5381 530 [BZ #737]
ea9c93cc
UD
531 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
532 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
533 at least gotntpoff relocation and addition.
534 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
535 Likewise.
536 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
537 Likewise.
538 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
539 Likewise.
540
9dcafc55
UD
5412005-01-06 Ulrich Drepper <drepper@redhat.com>
542
543 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
544 entry for static tls deallocation fix.
545 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
546 also contains information whether the memory pointed to is static
547 TLS or not.
548 * sysdeps/i386/tls.h: Likewise.
549 * sysdeps/ia64/tls.h: Likewise.
550 * sysdeps/powerpc/tls.h: Likewise.
551 * sysdeps/s390/tls.h: Likewise.
552 * sysdeps/sh/tls.h: Likewise.
553 * sysdeps/sparc/tls.h: Likewise.
554 * sysdeps/x86_64/tls.h: Likewise.
555
a71c152c
UD
5562004-12-27 Ulrich Drepper <drepper@redhat.com>
557
558 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
559
d143c49e
UD
5602004-12-21 Jakub Jelinek <jakub@redhat.com>
561
562 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
563 %esp.
564 * Makefile (tests): Add tst-align2.
565 * tst-align2.c: New test.
566 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
567 -mpreferred-stack-boundary=4.
568
50130ded
RM
5692004-12-18 Roland McGrath <roland@redhat.com>
570
571 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
572 New file removed withdrawn for the moment.
573
cbc53df0
RH
5742004-12-17 Richard Henderson <rth@redhat.com>
575
576 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
577 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 578
fb9d5c73
UD
5792004-12-16 Ulrich Drepper <drepper@redhat.com>
580
03332aa6
UD
581 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
582 Increased PTHREAD_STACK_MIN.
583
fb9d5c73
UD
584 * tst-context1.c (stacks): Use bigger stack size.
585
e853ea00
UD
5862004-12-16 Jakub Jelinek <jakub@redhat.com>
587
588 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
589 * sysdeps/sparc/tcb-offsets.sym: Add TID.
590
f23673fc
UD
5912004-12-15 Jakub Jelinek <jakub@redhat.com>
592
593 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
594 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
595 * sysdeps/s390/tcb-offsets.sym (TID): Add.
596
917fbe70
UD
5972004-12-15 Ulrich Drepper <drepper@redhat.com>
598
599 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
600
1f9d7c27
UD
6012004-12-14 Ulrich Drepper <drepper@redhat.com>
602
603 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
604 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
605
606 * tst-getpid1.c: If child crashes, report this first. Print which
607 signal.
608
bf7c04cd
UD
6092004-12-09 Ulrich Drepper <drepper@redhat.com>
610
611 * init.c (__pthread_initialize_minimal_internal): Also unblock
612 SIGSETXID.
613
6142004-12-01 Jakub Jelinek <jakub@redhat.com>
615
616 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
617 _POSIX_THREAD_CPUTIME): Define to 0.
618 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
619 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
620 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
621 __timer_signal_thread_tclk): Remove.
622 (init_module): Remove their initialization.
623 (thread_cleanup): Remove their cleanup assertions.
624 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
625 __timer_signal_thread_tclk): Remove.
626 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 627 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
628 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
629
484cc801
UD
6302004-12-07 Jakub Jelinek <jakub@redhat.com>
631
632 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
633 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
634
635 * Makefile (tests): Add tst-getpid2.
636 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
637 (do_test): Use it. Use __clone2 instead of clone on ia64.
638 * tst-getpid2.c: New test.
639
2da9a6a1
UD
6402004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
641
642 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
643
1ff241b8
UD
6442004-12-04 Ulrich Drepper <drepper@redhat.com>
645
646 * Makefile (tests): Add tst-getpid1.
647 * tst-getpid1.c: New file.
648 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
649 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
650
3f488b9c
RM
6512004-12-02 Roland McGrath <roland@redhat.com>
652
653 * Makefile (libpthread-nonshared): Variable removed.
654 ($(objpfx)libpthread_nonshared.a): Target removed.
655 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
656 These are now handled by generic magic from
657 libpthread-static-only-routines being set.
658
597ce09c
UD
6592004-11-27 Ulrich Drepper <drepper@redhat.com>
660
661 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
662 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
663 _POSIX_THREAD_PRIO_PROTECT): Define.
664 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
665 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
666 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
667
60e4523a
UD
6682004-11-26 Jakub Jelinek <jakub@redhat.com>
669
670 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
671 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
672 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
673 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
674 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
675 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
676 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
677
f1f2cafc
UD
6782004-11-24 Ulrich Drepper <drepper@redhat.com>
679
bca2d208
UD
680 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
681
f1f2cafc
UD
682 * Makefile (libpthread-routines): Add pthread_setschedprio.
683 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
684 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
685 * pthread_setschedprio.c: New file.
686
b639d0c9
UD
6872004-11-20 Jakub Jelinek <jakub@redhat.com>
688
ef2bb413
UD
689 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
690 * pthread_cancel.c (pthread_create): Likewise.
691
b639d0c9
UD
692 * Makefile (libpthread-routines): Add vars.
693 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
694 * init.c (__default_stacksize, __is_smp): Remove.
695 * vars.c: New file.
696 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
697 and define a wrapper macro.
698 (PTHREAD_STATIC_FN_REQUIRE): Define.
699 * allocatestack.c (__find_thread_by_id): Undefine.
700 * pthread_create (__pthread_keys): Remove.
701 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
702 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
703 PTHREAD_STATIC_FN_REQUIRE.
704
3defcff3
UD
7052004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
706
707 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
708 parameter to REGISTER macro.
709
ec188f92
RM
7102004-11-17 Roland McGrath <roland@redhat.com>
711
712 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
713 Make sure SIGCANCEL is blocked as well.
714
ccd8de9a
UD
7152004-11-10 Jakub Jelinek <jakub@redhat.com>
716
717 * sysdeps/pthread/setxid.h: New file.
718 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
719 (struct xid_command): Add forward decl.
720 (struct pthread_functions): Change return type of __nptl_setxid hook
721 to int.
722 * pthreadP.h (__nptl_setxid): Change return type to int.
723 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
724 calling thread, return its return value and set errno on failure.
725 * descr.h (struct xid_command): Change id type to long array.
726
727 * Makefile: Add rules to build and test tst-setuid1 and
728 tst-setuid1-static.
729 * tst-setuid1.c: New test.
730 * tst-setuid1-static.c: New test.
731
ed2ced8a
UD
7322004-11-10 Jakub Jelinek <jakub@redhat.com>
733
734 * Makefile (tests): Add tst-exit3.
735 * tst-exit3.c: New test.
736
948603ee
UD
7372004-11-09 Ulrich Drepper <drepper@redhat.com>
738
739 * Makefile (tests): Add tst-exit2.
740 * tst-exit2.c: New file.
741
ba5ffd2a
RM
7422004-11-09 Roland McGrath <roland@redhat.com>
743
744 [BZ #530]
745 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
746 here, before calling clone.
747 * pthread_create.c (start_thread): Don't do it here.
748
c4d7bd39
RM
7492004-11-02 Jakub Jelinek <jakub@redhat.com>
750
751 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
752
543fb0c8
UD
7532004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
754
755 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
756 Set ETIMEDOUT to errno when time is up. Tweak to avoid
757 assembler warning.
758
a1fbd858
UD
7592004-10-28 Jakub Jelinek <jakub@redhat.com>
760
761 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
762 if sched_priority is not between minprio and maxprio.
763
c2a4357a
UD
7642004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
765
766 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
767 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
768
769 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
770 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
771
78d8d211
UD
7722004-10-24 Ulrich Drepper <drepper@redhat.com>
773
774 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
775 not-cancelable I/O functions.
776
dd28590f
UD
7772004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
778
779 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
780 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
781 make sure 2 is stored in the futex and we looked at the old value.
782 Fix a few other problems to return the correct value.
783
f8c97af7
RH
7842004-10-14 Richard Henderson <rth@redhat.com>
785
786 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
787 make gcc4 happy.
788
3feb8efa
UD
7892004-10-06 Jakub Jelinek <jakub@redhat.com>
790
791 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
792 of pthread-functions.h and pthreaddef.h.
793 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
794
795 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
796 Change __data.__nwaiters from int to unsigned int.
797
798 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
799 sysconf (_SC_THREAD_CPUTIME) returns negative value.
800
801 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
802 before return type.
803
804 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
805 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
806
67060ef5
UD
8072004-10-06 Ulrich Drepper <drepper@redhat.com>
808
809 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
810 test fails, remove message queue.
811 (tf_msgsnd): Likewise.
812
f38a3086
UD
8132004-10-05 Jakub Jelinek <jakub@redhat.com>
814
815 * tst-clock1.c: Change #ifdef to #if defined.
816 * tst-clock2.c: Likewise.
817 * tst-cond11.c: Likewise.
818
2c03b6db
UD
819 * sysdeps/pthread/timer_create.c (timer_create): Use
820 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
821 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
822 THREAD_CPUTIME.
823
6ab5f50d
UD
8242004-10-05 Jakub Jelinek <jakub@redhat.com>
825
826 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
827 _POSIX_THREAD_CPUTIME): Define to 0.
828
e4bb4853
UD
8292004-10-04 Ulrich Drepper <drepper@redhat.com>
830
831 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
832 and _POSIX_THREAD_CPUTIME to zero.
833 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
834 * tst-barrier2.c: Fix testing for POSIX feature.
835 * tst-clock1.c: Likewise.
836 * tst-clock2.c: Likewise.
837 * tst-cond11.c: Likewise.
838 * tst-cond4.c: Likewise.
839 * tst-cond6.c: Likewise.
840 * tst-flock2.c: Likewise.
841 * tst-mutex4.c: Likewise.
842 * tst-mutex9.c: Likewise.
843 * tst-rwlock12.c: Likewise.
844 * tst-rwlock4.c: Likewise.
845 * tst-signal1.c: Likewise.
846 * tst-spin2.c: Likewise.
847 * sysdeps/pthread/posix-timer.h: Likewise.
848 * sysdeps/pthread/timer_create.c: Likewise.
849 * sysdeps/pthread/timer_routines.c: Likewise.
850
c1b48791
UD
8512004-10-01 Ulrich Drepper <drepper@redhat.com>
852
927f0673
UD
853 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
854 (__lll_mutex_timedlock_wait): Address futex correctly.
855
c1b48791 856 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 857 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
858 make sure 2 is stored in the futex and we looked at the old value.
859 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
860 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
861 which might very well made the code not working at all before.
7b87aca6 862 [BZ #417]
c1b48791 863
e9f4e844
UD
8642004-09-28 Ulrich Drepper <drepper@redhat.com>
865
4f21c95d
UD
866 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
867 allow SIGSETXID to be sent.
868 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
869 for SIGSETXID to be defined.
870 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
871 SIGSETXID cannot be blocked.
872
e9f4e844
UD
873 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
874 Add __extension__ to long long types.
875 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
876 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
877 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
878 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
879 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
880 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
881 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
882
5f66b766
UD
8832004-09-25 Ulrich Drepper <drepper@redhat.com>
884
885 * descr.h (struct pthread): Add stopped_start field.
886 * sysdeps/pthread/createthread.c (create_thread): Set
887 start_stopped flag in descriptor for new thread appropriately.
888 * pthread_create.c (start_thread): Only take lock to be stopped on
889 startup if stopped_start flag says so.
890
362038b0
UD
8912004-09-24 Ulrich Drepper <drepper@redhat.com>
892
3f80a99b
UD
893 * pthread_create.c (__pthread_create_2_1): Remember whether thread
894 is created detached and if yes, do not try to free the stack in case
895 the thread creation failed.
896 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
897 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
898 case there has been no error. [BZ #405]
899
362038b0
UD
900 * pthread_create.c (start_thread): Don't wait for scheduler data
901 etc to be set at the beginning of the function. The cancellation
902 infrastructure must have been set up. And enable async
903 cancellation before potentially going to sleep. [BZ #401]
904
65f0beb9
UD
9052004-09-20 Ulrich Drepper <drepper@redhat.com>
906
3c12b91a 907 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
908 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
909 for now.
910 * Makefile: Don't build pthread_set*id code for now.
911
2edb61e3
UD
9122004-09-19 Ulrich Drepper <drepper@redhat.com>
913
914 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
915 internal use.
916 * allocatestack.c (__nptl_setxid): New function.
917 * descr.h (struct xid_command): Define type.
918 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
919 (sighandler_setxid): New function.
920 (__pthread_initialize_minimal): Register sighandler_setxid for
921 SIGCANCEL.
922 * pt-allocrtsig.c: Update comment.
923 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
924 Declare __nptl_setxid.
925 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
926 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
927 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
928 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
929 and pthread_setresuid_np.
930 * pthread_setgid_np.c: New file.
931 * pthread_setuid_np.c: New file.
932 * pthread_setegid_np.c: New file.
933 * pthread_seteuid_np.c: New file.
934 * pthread_setregid_np.c: New file.
935 * pthread_setreuid_np.c: New file.
936 * pthread_setresgid_np.c: New file.
937 * pthread_setresuid_np.c: New file.
938 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
939 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
940 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
941 and pthread_setresuid_np.
942 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
943 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
944 pthread_setregid, and pthread_setresgid.
945
1ab1fa6f
UD
9462004-09-18 Ulrich Drepper <drepper@redhat.com>
947
948 * allocatestack.c (allocate_stack): Return EAGAIN instead of
949 ENOMEM when out of memory.
950
ae9e6b36
RM
9512004-09-10 Roland McGrath <roland@redhat.com>
952
953 [BZ #379]
954 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
955 code, since we don't try to use the broken CLONE_STOPPED any more.
956 * pthread_create.c (start_thread): Likewise.
957
424bd2f8
RH
9582004-09-15 Richard Henderson <rth@redhat.com>
959
960 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
961
17b8a52d
UD
9622004-09-01 David Mosberger <davidm@hpl.hp.com>
963
964 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
965 (__libc_unwind_longjmp): Delete macro and declare as function.
966 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
967 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
968 nptl directory.
969 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
970 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
971 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
972
ccc63b07
UD
9732004-09-12 Ulrich Drepper <drepper@redhat.com>
974
975 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
976 for __USE_XOPEN2K.
977 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
978 types also for __USE_XOPEN2K.
979 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
980 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
981 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
982 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
983 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
984 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
985 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
986 [BZ #320]
987
31f93b3b
UD
9882004-09-08 Ulrich Drepper <drepper@redhat.com>
989
990 * sysdeps/pthread/pthread.h
991 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
992 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
993 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
994 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
995 [BZ #375]
996
e0329987
UD
9972004-09-07 Ulrich Drepper <drepper@redhat.com>
998
590b40f7
UD
999 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1000 PSEUDO to be used with . prefix.
1001
67254a97
UD
1002 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1003 Use atomic_increment instead of atomic_exchange_and_add.
1004 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1005 Likewise.
1006 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1007 Likewise.
1008 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1009 Likewise.
1010
1011 * allocatestack.c (allocate_stack): Use atomic_increment_val
1012 instead of atomic_exchange_and_add.
1013 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1014 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1015 Likewise.
1016 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1017 Likewise.
1018
e0329987
UD
1019 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1020 the initialization function might throw.
1021
42d86dd6 10222005-09-05 Richard Henderson <rth@redhat.com>
e0329987 1023
42d86dd6
RH
1024 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1025 Move definition inside libpthread, libc, librt check. Provide
1026 definition for rtld.
1027
73f7c32c
UD
10282004-09-02 Ulrich Drepper <drepper@redhat.com>
1029
f76c8499
UD
1030 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1031 * sysdeps/i386/jmpbuf-unwind.h: Likewise
1032 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1033 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1034 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1035 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1036 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1037 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1038 * unwind.c: Use it.
1039
73f7c32c
UD
1040 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1041 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1042 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1043 Likewise.
1044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1045 Decrement __nwaiters. If pthread_cond_destroy has been called and
1046 this is the last waiter, signal pthread_cond_destroy caller and
1047 avoid using the pthread_cond_t structure after unlock.
1048 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1050 Read clock type from the least significant bits of __nwaiters instead
1051 of __clock.
1052 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1053 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1054
10552004-08-31 Jakub Jelinek <jakub@redhat.com>
1056
1057 [BZ #342]
1058 * Makefile (tests): Add tst-cond20 and tst-cond21.
1059 * tst-cond20.c: New test.
1060 * tst-cond21.c: New test.
1061 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1062 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1063 it unsigned int.
1064 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1065 Likewise.
1066 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1067 (pthread_cond_t): Likewise.
1068 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1069 Likewise.
1070 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1071 Likewise.
1072 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1073 Likewise.
1074 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1075 (cond_nwaiters): New.
1076 (clock_bits): New.
1077 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1078 if there are waiters not signalled yet.
1079 Wait until all already signalled waiters wake up.
1080 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1081 __nwaiters. If pthread_cond_destroy has been called and this is the
1082 last waiter, signal pthread_cond_destroy caller and avoid using
1083 the pthread_cond_t structure after unlock.
1084 (__pthread_cond_wait): Increment __nwaiters in the beginning,
1085 decrement it when leaving. If pthread_cond_destroy has been called
1086 and this is the last waiter, signal pthread_cond_destroy caller.
1087 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1088 Likewise. Read clock type from the least significant bits of
1089 __nwaiters instead of __clock.
1090 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1091 whether clock ID can be encoded in COND_CLOCK_BITS bits.
1092 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1093 clock type just from the last COND_CLOCK_BITS bits of value.
1094 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1095 instead of __clock, just from second bit of condattr's value.
1096
409f7493
UD
10972004-08-30 Jakub Jelinek <jakub@redhat.com>
1098
1099 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1100 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
1101 != 64.
1102 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1103
92c6ccd1
RM
11042004-08-15 Roland McGrath <roland@frob.com>
1105
1106 * pthread_atfork.c: Update copyright terms including special exception
1107 for these trivial files, which are statically linked into executables
1108 that use dynamic linking for the significant library code.
1109
4d004cfb
UD
11102004-08-09 Jakub Jelinek <jakub@redhat.com>
1111
1112 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1113 pthread_rwlock_rdlock.
1114 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1115 Decrease __nr_readers_queued after reacquiring lock.
1116 * sysdeps/pthread/pthread_rwlock_timedrdlock
1117 (pthread_rwlock_timedrdlock): Likewise.
1118 Reported by Bob Cook <bobcook47@hotmail.com>.
1119
90595fb6
RM
11202004-08-11 Jakub Jelinek <jakub@redhat.com>
1121
1122 * tst-rwlock14.c (tf): Read main thread handle from *ARG
1123 before pthread_barrier_wait.
1124
fa46f7ab
UD
11252004-08-07 Ulrich Drepper <drepper@redhat.com>
1126
1127 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1128 Remove unnecessary exception handling data.
1129
15ef4b55
UD
11302004-07-23 Jakub Jelinek <jakub@redhat.com>
1131
1132 [BZ #284]
1133 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1134 instead of clockid_t.
1135
4fb907b7
RM
11362004-07-21 Roland McGrath <roland@redhat.com>
1137
1138 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1139
11402004-07-19 Roland McGrath <roland@redhat.com>
1141
1142 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1143
8f73811b
RM
11442004-07-02 Roland McGrath <roland@redhat.com>
1145
1146 * configure: Don't exit.
1147
290639c3
UD
11482004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1149
1150 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1151 (__pthread_cond_timedwait): Check for invalid nanosecond in
1152 timeout value.
1153
8e5aaad9
UD
11542004-07-07 Ulrich Drepper <drepper@redhat.com>
1155
1156 * Makefile: Add rules to build and run tst-fini1.
1157 * tst-fini1.c: New file.
1158 * tst-fini1mod.c: New file.
1159
ce6e047f
UD
11602004-07-05 Ulrich Drepper <drepper@redhat.com>
1161
1162 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
1163 if no cancellation support is needed.
1164 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1165 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1166 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1167 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1168 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1169 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1170 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1171 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1172 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1173
1174 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
1175 only if not already defined.
1176
9b9ef823
UD
11772004-07-05 Jakub Jelinek <jakub@redhat.com>
1178
2dd18ce2
UD
1179 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
1180 constraint "m" instead of "0" for futex.
1181
9b9ef823
UD
1182 * shlib-versions: Add powerpc64-.*-linux.*.
1183
38205402
UD
11842004-07-04 Jakub Jelinek <jakub@redhat.com>
1185
1186 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1187 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
1188 for valid tv_nsec.
1189 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
1190 1 billion and 64-bit tv_nsec which is valid when truncated to 32
1191 bits.
1192
78a9c837
RM
11932004-06-29 Roland McGrath <roland@redhat.com>
1194
1195 * Banner: NPTL no longer has its own version number.
1196 * Makefile (nptl-version): Variable removed.
1197 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
1198 using $(version), the glibc version number.
1199
d3d35527
UD
12002004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1201
1202 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1203 Fix branch offset for a PLT entry.
1204 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1205 Likewise.
1206 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1207 Likewise.
1208 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1209 Likewise.
1210 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
1211 Likewise.
1212
346f18ae
UD
12132004-06-28 Jakub Jelinek <jakub@redhat.com>
1214
1215 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
1216 unconditionally.
1217
f3a19754
UD
12182004-06-28 Jakub Jelinek <jakub@redhat.com>
1219
1220 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1221 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
1222 instead of tv_sec.
1223 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1224 (pthread_rwlock_timedrdlock): Likewise.
1225
539842a4
UD
12262004-06-22 Jakub Jelinek <jakub@redhat.com>
1227
1228 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1229 Set __r7 to val, not mutex.
1230
46f4c578
UD
12312004-06-27 Ulrich Drepper <drepper@redhat.com>
1232
1233 * Makefile: Add rules to build tst-rwlock14.
1234 * tst-rwlock14.c: New file.
1235
12362004-06-24 Boris Hu <boris.hu@intel.com>
1237
1238 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
1239 check.
1240 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1241
9898e99c
AJ
12422004-06-19 Andreas Jaeger <aj@suse.de>
1243
1244 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
1245 assembler in last patch.
1246
7c3164bc
UD
12472004-06-17 Ulrich Drepper <drepper@redhat.com>
1248
1249 * sysdeps/pthread/pthread_cond_timedwait.c
1250 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
1251 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1252 (__pthread_cond_timedwait): Check for invalid nanosecond in
1253 timeout value.
1254 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1255 * tst-cond19.c: New file.
1256 * Makefile: Add rules to build and run tst-cond19.
1257
72e61500
UD
12582004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
1259
1260 * tst-context1.c (GUARD_PATTERN): Defined.
1261 (tst_context_t): Define struct containing ucontext_t & guard words.
1262 (ctx): Declare as an array of tst_context_t.
1263 (fct): Verify uc_link & guard words are still valid.
1264 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
1265
7c370086
UD
12662004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1267
1268 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1269 Add __data.__futex field, reshuffle __data.__clock.
1270 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1271 (__pthread_cond_signal): Increment __futex at the same time as
1272 __wakeup_seq or __total_seq. Pass address of __futex instead of
1273 address of low 32-bits of __wakeup_seq to futex syscall.
1274 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1275 (__pthread_cond_wait): Likewise. Pass __futex value from before
1276 releasing internal lock to FUTEX_WAIT.
1277 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1278 (__pthread_cond_timedwait): Likewise.
1279 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1280 (FUTEX_CMP_REQUEUE): Define.
1281 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1282 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1283 Pass __futex value from before the unlock and __futex address instead
1284 of address of low 32-bits of __wakeup_seq to futex syscall.
1285 Fallback to FUTEX_WAKE all on any errors.
1286
a9e526e7
RM
12872004-06-08 Jakub Jelinek <jakub@redhat.com>
1288
1289 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
1290 comment typo.
1291 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
1292 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
1293 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
1294 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
1295 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
1296
f1847a84
RM
12972004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1298
1299 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
1300 Add memory clobber to inline assembly.
1301 (__lll_mutex_trylock): Likewise.
1302 (__lll_mutex_cond_trylock): Likewise.
1303
f7c81e1a
UD
13042004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
1305
1306 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1307 Pass val argument as 6th system call argument in %r7.
1308
75fccede
UD
13092004-05-21 Jakub Jelinek <jakub@redhat.com>
1310
1311 * Makefile (tests): Add tst-cond16.
1312 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
1313 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
1314 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1315 Add __data.__futex field, reshuffle __data.__clock.
1316 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
1317 (__pthread_cond_signal): Increment __futex at the same time as
1318 __wakeup_seq or __total_seq. Pass address of __futex instead of
1319 address of low 32-bits of __wakeup_seq to futex syscall.
1320 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
1321 (__pthread_cond_wait): Likewise. Pass __futex value from before
1322 releasing internal lock to FUTEX_WAIT.
1323 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
1324 (__pthread_cond_timedwait): Likewise.
1325 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
1326 (FUTEX_CMP_REQUEUE): Define.
1327 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1328 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1329 Pass __futex value from before the unlock and __futex address instead
1330 of address of low 32-bits of __wakeup_seq to futex syscall.
1331 Fallback to FUTEX_WAKE all on any errors.
1332 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
1333 Define.
1334 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1335 internally. Return non-zero if error, zero if success.
1336 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1337 Add __data.__futex field, reshuffle __data.__clock.
1338 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
1339 Define.
1340 (lll_futex_requeue): Add val argument, return 1 unconditionally
1341 for the time being.
1342 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1343 Add __data.__futex field, reshuffle __data.__clock.
1344 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1345 Define.
1346 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1347 internally. Return non-zero if error, zero if success.
1348 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1349 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
1350 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1351 Define.
1352 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1353 internally. Return non-zero if error, zero if success.
1354 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1355 Add __data.__futex field, reshuffle __data.__clock.
1356 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
1357 Define.
1358 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1359 internally. Return non-zero if error, zero if success.
1360 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1361 Add __data.__futex field, reshuffle __data.__clock.
1362 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1363 Add __data.__futex field, reshuffle __data.__clock.
1364 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
1365 Increment __futex at the same time as __wakeup_seq or __total_seq.
1366 Pass address of __futex instead of address of low 32-bits of
1367 __wakeup_seq to futex syscall.
1368 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1369 Pass __futex value from before releasing internal lock
1370 to FUTEX_WAIT.
1371 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1372 Likewise. Avoid unnecessary shadowing of variables.
1373 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
1374 Set __futex to 2 * __total_seq. Pass __futex value from before the
1375 unlock and __futex address instead of address of low 32-bits of
1376 __wakeup_seq to futex_requeue macro, adjust for new return value
1377 meaning.
1378 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1379 (__pthread_cond_signal): Increment __futex at the same time as
1380 __wakeup_seq or __total_seq. Pass address of __futex instead of
1381 address of low 32-bits of __wakeup_seq to futex syscall.
1382 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1383 (__pthread_cond_wait): Likewise. Pass __futex value from before
1384 releasing internal lock to FUTEX_WAIT.
1385 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1386 (__pthread_cond_timedwait): Likewise.
1387 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1388 (FUTEX_CMP_REQUEUE): Define.
1389 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1390 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1391 Pass __futex value from before the unlock and __futex address instead
1392 of address of low 32-bits of __wakeup_seq to futex syscall.
1393 Fallback to FUTEX_WAKE all on any errors.
1394
13952004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1396
1397 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
1398 Add nop to align the end of critical section.
1399 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
1400
fbf86dda
UD
14012004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1402
1403 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1404 Add __broadcast_seq field.
1405 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
1406 all waiters as woken with woken_seq and bump broadcast counter.
1407 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
1408 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
1409 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1410 Comment typo fixes. Avoid returning -ETIMEDOUT.
1411
14122004-06-01 Ulrich Drepper <drepper@redhat.com>
1413
1414 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1415 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
1416 Reported by Kaz Kojima.
1417
ffdd5e50
UD
14182004-05-25 Jakub Jelinek <jakub@redhat.com>
1419
1420 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
1421
3abc82c8
UD
14222004-05-21 Jakub Jelinek <jakub@redhat.com>
1423
1424 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
1425 __broadcast_seq with bc_seq after acquiring internal lock instead of
1426 before it.
1427
893a3511
UD
14282004-05-18 Jakub Jelinek <jakub@redhat.com>
1429
1430 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
1431 compilation.
1432 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1433 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
1434 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1435 (pthread_cond_t): Add __data.__broadcast_seq field.
1436 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1437 (FRAME_SIZE): Define.
1438 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
1439 Comment typo fixes.
1440 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
1441 Define.
1442 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
1443 typo fixes.
1444 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1445 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
1446 fixes.
1447
14482004-05-18 Ulrich Drepper <drepper@redhat.com>
1449
1450 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
1451 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1452 Add __broadcast_seq field.
1453 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1454 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1455 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1456 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1457 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1458 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
1459 all waiters as woken with woken_seq and bump broadcast counter.
1460 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
1461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
1462 __broadcast_seq field.
1463 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1464 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1465 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1466 * pthread_cond_init.c: Initialize __broadcast_seq field.
1467 * Makefile (tests): Add tst-cond17 and tst-cond18.
1468 Add .NOTPARALLEL goal.
1469 * tst-cond16.c: New file. From Jakub.
1470 * tst-cond17.c: New file. From Jakub.
1471 * tst-cond18.c: New file. From Jakub.
1472
4123718e
UD
14732004-05-16 Ulrich Drepper <drepper@redhat.com>
1474
1475 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
1476 unwind info.
1477
1478 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1479 Parametrize frame size. Correct some unwind info.
1480 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1481
2d7ae210
UD
14822004-05-04 Jakub Jelinek <jakub@redhat.com>
1483
1484 * tst-stack3.c: Note testing functionality beyond POSIX.
1485
50c2b6d7
UD
14862004-05-04 Jakub Jelinek <jakub@redhat.com>
1487
1488 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
1489 Change conditional from ifdef to if.
1490
27b02589
UD
14912004-04-23 Jakub Jelinek <jakub@redhat.com>
1492
1493 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
1494 SYSDEP_CANCEL_ERROR): Define.
1495 (PSEUDO): Use it.
1496
4bb8fc33
UD
14972004-05-01 Jakub Jelinek <jakub@redhat.com>
1498
1499 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
1500
f9a06dc1
UD
15012004-04-20 Jakub Jelinek <jakub@redhat.com>
1502
1503 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
1504
d3b52028
UD
15052004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1506
1507 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
1508 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1509 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
1510 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1511
a5dd0a6c
UD
15122004-04-19 Ulrich Drepper <drepper@redhat.com>
1513
1514 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
1515 thread has all signals blocked.
1516
620c3354
AJ
15172004-04-18 Andreas Jaeger <aj@suse.de>
1518
1519 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
1520 (SEM_VALUE_MAX): Add missing brace.
1521
1683daeb
UD
15222004-04-17 Jakub Jelinek <jakub@redhat.com>
1523
1524 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
1525 in rt subdir.
1526 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
1527 * sysdeps/pthread/tst-mqueue8x.c: New test.
1528 * tst-cancel4.c: Update comment about message queues.
1529
1530 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
1531 return it_value { 0, 0 }.
1532 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
1533 like SIGEV_SIGNAL.
1534 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
1535 assertion for SIGEV_NONE.
1536 (thread_attr_compare): Compare all attributes, not just a partial
1537 subset.
1538
15392004-04-17 Jakub Jelinek <jakub@redhat.com>
1540
1541 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
1542
f532641d
UD
15432004-04-17 Ulrich Drepper <drepper@redhat.com>
1544
1545 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
1546 Just use a plain number.
1547 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1548 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1549 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1550 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1551 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1552 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1553 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1554
7eb7fdda
UD
15552004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1556
53392906
UD
1557 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
1558 frame info.
1559 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 1560
d7ba1313
UD
15612004-04-15 Jakub Jelinek <jakub@redhat.com>
1562
1563 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
1564 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
1565 of calling sigwaitinfo.
1566
5adac0e4
UD
15672004-04-16 Ulrich Drepper <drepper@redhat.com>
1568
1569 * allocatestack.c (allocate_stack): Set reported_guardsize
1570 unconditionally.
1571 * pthread_getattr_np.c (pthread_getattr_np): Use
1572 reported_guardsize instead of guardsize.
1573 * descr.h (struct pthread): Add reported_guardsize field.
1574
f93fa7d4
UD
15752004-04-13 Jakub Jelinek <jakub@redhat.com>
1576
1577 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
1578
1b82c6c7
UD
15792004-04-12 Ulrich Drepper <drepper@redhat.com>
1580
1581 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
1582
15832004-04-08 Jakub Jelinek <jakub@redhat.com>
1584
1585 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
1586 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
1587 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
1588 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
1589 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1590 Define.
1591 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
1592 (_POSIX_MESSAGE_PASSING): Define.
1593 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
1594 (_POSIX_MESSAGE_PASSING): Define.
1595 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
1596 (_POSIX_MESSAGE_PASSING): Define.
1597
e6eb894e
UD
15982004-04-04 Ulrich Drepper <drepper@redhat.com>
1599
1600 * tst-context1.c (fct): Check whether correct stack is used.
1601
1e084487
UD
16022004-04-03 Ulrich Drepper <drepper@redhat.com>
1603
4e73e115
UD
1604 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
1605 matching constraints for asm mem parameters.
1606
1e084487
UD
1607 * tst-clock2.c (tf): Don't define unless needed.
1608
feca5e0b
UD
16092004-03-30 H.J. Lu <hongjiu.lu@intel.com>
1610
1611 * Makefile (link-libc-static): Use $(static-gnulib) instead of
1612 $(gnulib).
1613
3fa21fd8
UD
16142004-03-30 Ulrich Drepper <drepper@redhat.com>
1615
1616 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
1617 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
1618 * pthreadP.h: Declare __nptl_deallocate_tsd.
1619 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
1620 Adjust caller.
1621
1622 * Makefile (tests): Add tst-tsd5.
1623 * tst-tsd5.c: New file.
1624
8e32efa6
UD
16252004-03-29 Ulrich Drepper <drepper@redhat.com>
1626
1627 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1628 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
1629 is SHLIB_COMPAT check.
1630 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
1631 (__pthread_attr_getaffinity_old): Likewise.
1632 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1633 (__pthread_getaffinity_old): Likewise.
1634 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1635 (__pthread_setaffinity_old): Likewise.
1636
eec8b6ca
UD
16372004-03-26 Ulrich Drepper <drepper@redhat.com>
1638
1639 * allocatestack.c (_make_stacks_executable): Call
1640 _dl_make_stack_executable first.
1641
db2f05ba
RM
16422004-03-24 Roland McGrath <roland@redhat.com>
1643
1644 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
1645 constraint instead of "0".
1646
6abbc501
UD
16472004-03-24 Ulrich Drepper <drepper@redhat.com>
1648
68dc4dcb
UD
1649 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1650 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
1651
6abbc501
UD
1652 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
1653 code to avoid warning.
1654
865e14d9
AJ
16552004-03-24 Andreas Jaeger <aj@suse.de>
1656
1657 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1658 (__pthread_attr_setaffinity_old): Remove const.
1659
16b06b70
UD
16602004-03-23 Ulrich Drepper <drepper@redhat.com>
1661
2c0b891a
UD
1662 * sysdeps/unix/sysv/linux/smp.h: New file.
1663 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
1664 * init.c: Define __is_smp.
1665 (__pthread_initialize_minimal_internal): Call is_smp_system to
1666 initialize __is_smp.
1667 * pthreadP.h: Declare __is_smp.
1668 Define MAX_ADAPTIVE_COUNT is necessary.
1669 * pthread_mutex_init.c: Add comment regarding __spins field.
1670 * pthread_mutex_lock.c: Implement adaptive mutex type.
1671 * pthread_mutex_timedlock.c: Likewise.
1672 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1673 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
1674 Add __spins field.
1675 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1676 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1677 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1678 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1679 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1680 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1681 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1682 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
1683 lll_mutex_cond_trylock.
1684 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1685 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1686 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1687 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1688 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1689 Define BUSY_WAIT_NOP.
1690 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1691 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1692
1693 * tst-mutex5.c: Add support for testing adaptive mutexes.
1694 * tst-mutex7.c: Likewise.
1695 * tst-mutex5a.c: New file.
1696 * tst-mutex7a.c: New file.
1697 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
1698
565699e4
UD
1699 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1700 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 1701 vgettimeofday call might destroy the content.
565699e4 1702
7fe1586f
UD
1703 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
1704 @pause in the loop.
1705
e408880b
UD
1706 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
1707 No need to restrict type of ret. Make it int. Add comment.
1708
16b06b70
UD
1709 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
1710 Remove unnecessary setne instruction.
1711
61645263
UD
17122004-03-22 Jakub Jelinek <jakub@redhat.com>
1713
1714 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1715 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
1716 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
1717 If realloc fails, break out of the loop.
1718
e3d4c585
AJ
17192004-03-20 Andreas Jaeger <aj@suse.de>
1720
1721 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1722 (__pthread_setaffinity_old): Fix interface.
1723 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1724 (__pthread_getaffinity_old): Likewise.
1725
1726 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1727 (__pthread_setaffinity_new): Remove duplicate declaration.
1728
3abb1ff7
UD
17292004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1730
1731 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
1732 the return value to a safe register.
1733 (CDISABLE): Set the function argument correctly.
1734
07bd2a3f
UD
17352004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1736
1737 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
1738 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1739 Rewrite so that only one locked memory operation per round is needed.
1740 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1741 (pthread_barrier_wait): After wakeup, release lock only when the
1742 last thread stopped using the barrier object.
1743 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1744 (__pthread_cond_wait): Don't store mutex address if the current
1745 value is ~0l. Add correct cleanup support and unwind info.
1746 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1747 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1748 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
1749 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
1750 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1751 Add correct cleanup support and unwind info.
1752 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1753 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
1754 information for syscall wrappers.
1755
14c35863
UD
17562004-03-18 Ulrich Drepper <drepper@redhat.com>
1757
1758 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
1759 cpusetsize field, remove next.
1760 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
1761 parameter for size of the CPU set.
1762 (pthread_setaffinity_np): Likewise.
1763 (pthread_attr_getaffinity_np): Likewise.
1764 (pthread_attr_setaffinity_np): Likewise.
1765 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
1766 interface change, keep compatibility code.
1767 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
1768 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
1769 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
1770 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
1771 __pthread_getaffinity_np.
1772 * Versions: Add version for changed interfaces.
1773 * tst-attr3.c: Adjust test for interface change.
1774 * pthread_getattr_np.c: Query the kernel about the affinity mask with
1775 increasing buffer sizes.
1776 * pthread_attr_destroy.c: Remove unused list handling.
1777 * pthread_attr_init.c: Likewise.
1778
8e115d80
RM
17792004-03-17 Roland McGrath <roland@redhat.com>
1780
1781 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
1782 first argument to clock_getres so we ever enable kernel timers.
1783
e3b22ad3
UD
17842004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
1785
1786 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
1787
841153fa
RH
17882004-03-12 Richard Henderson <rth@redhat.com>
1789
e3b22ad3
UD
1790 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
1791 oldvalue from CENABLE to CDISABLE.
841153fa 1792
932dfea7
UD
17932004-03-12 Ulrich Drepper <drepper@redhat.com>
1794
1795 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
1796 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1797 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1798 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1799
9852f6dc
RH
18002004-03-11 Richard Henderson <rth@redhat.com>
1801
1802 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
1803 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
1804 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1805
43513fb7
UD
18062004-03-11 Jakub Jelinek <jakub@redhat.com>
1807
1808 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
1809 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
1810 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
1811
18122004-03-11 Jakub Jelinek <jakub@redhat.com>
1813
1814 * forward.c (__pthread_cond_broadcast_2_0,
1815 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
1816 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
1817 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
1818
8a3e10e0
UD
18192004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1820
1821 * sysdeps/sh/tcb-offsets.sym: Add PID.
1822 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
1823 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1824
6d3a2bec
UD
18252004-03-10 Ulrich Drepper <drepper@redhat.com>
1826
1827 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
1828 include <sysdep-cancel.h>, vfork is no cancellation point.
1829 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
1830 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
1831 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
1832
d3a4a571
UD
18332004-03-10 Jakub Jelinek <jakub@redhat.com>
1834
73b4ce64
UD
1835 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
1836 libc_hidden_def.
1837 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1838 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1839 Likewise.
1840 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1841 Likewise.
1842 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1843 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1844 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
1845 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
1846 of DO_CALL_VIA_BREAK. Work around a gas problem.
1847
d682a515
UD
1848 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
1849 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1850 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
1851 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1852 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
1853 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
1854
1855 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
1856 a local register for saving old PID. Negate PID in parent upon exit.
1857
d3a4a571
UD
1858 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
1859 tcb-offsets.h.
1860 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
1861 before syscall, set to the old value in the parent afterwards.
1862 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1863 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
1864 tcb-offsets.h.
1865 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
1866 before syscall, set to the old value in the parent afterwards.
1867 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1868 * sysdeps/s390/tcb-offsets.sym: Add PID.
1869
1870 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
1871 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1872 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
1873 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1874 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
1875 * sysdeps/sparc/tcb-offsets.sym: Add PID.
1876
18772004-03-10 Andreas Schwab <schwab@suse.de>
1878
1879 * sysdeps/ia64/tcb-offsets.sym: Add PID.
1880 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1881 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
1882
3f2fb223 18832004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 1884
3f2fb223
UD
1885 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
1886 * tst-cancel21.c (do_one_test): Likewise.
1887 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 1888
8b9d6054
UD
18892004-02-09 Jakub Jelinek <jakub@redhat.com>
1890
1891 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
1892 if non-zero and set to INT_MIN if zero.
1893 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
1894 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
1895 (SAVE_PID, RESTORE_PID): Define.
1896 (__vfork): Use it.
1897 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
1898 Use relative path to avoid including NPTL i386/vfork.S.
1899 (SAVE_PID, RESTORE_PID): Define.
1900 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
1901 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
1902 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
1903 tst-vfork2x.
1904 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
1905 * tst-vfork1.c: New test.
1906 * tst-vfork2.c: New test.
1907 * tst-vfork1x.c: New test.
1908 * tst-vfork2x.c: New test.
1909
02287d05
UD
19102004-03-08 Ulrich Drepper <drepper@redhat.com>
1911
c072ef6d 1912 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 1913 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 1914 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 1915 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 1916
d4acd24b
UD
19172004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
1918
1919 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
1920
8acb4b81
UD
19212004-03-08 H.J. Lu <hongjiu.lu@intel.com>
1922
1923 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
1924 _rtld_global_ro.
1925
4d1a02ef
UD
19262004-03-07 Ulrich Drepper <drepper@redhat.com>
1927
001836c8 1928 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 1929 _rtld_global_ro.
001836c8 1930
4d1a02ef
UD
1931 * tst-once4.c: Remove unnecessary macro definition.
1932
1933 * tst-mutex7.c (do_test): Limit thread stack size.
1934 * tst-once2.c (do_test): Likewise.
1935 * tst-tls3.c (do_test): Likewise.
1936 * tst-tls1.c (do_test): Likewise.
1937 * tst-signal3.c (do_test): Likewise.
1938 * tst-kill6.c (do_test): Likewise.
1939 * tst-key4.c (do_test): Likewise.
1940 * tst-join4.c (do_test): Likewise.
1941 * tst-fork1.c (do_test): Likewise.
1942 * tst-context1.c (do_test): Likewise.
1943 * tst-cond2.c (do_test): Likewise.
1944 * tst-cond10.c (do_test): Likewise.
1945 * tst-clock2.c (do_test): Likewise.
1946 * tst-cancel10.c (do_test): Likewise.
1947 * tst-basic2.c (do_test): Likewise.
1948 * tst-barrier4.c (do_test): Likewise.
1949
aa420660
UD
19502004-03-05 Ulrich Drepper <drepper@redhat.com>
1951
1952 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
1953
cff08c81
UD
19542004-03-01 Ulrich Drepper <drepper@redhat.com>
1955
1956 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1957 (__pthread_cond_timedwait): Optimize wakeup test.
1958 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1959 (__pthread_cond_wait): Likewise.
1960 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1961 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1962 Likewise.
1963
b7fe377c
UD
19642004-02-29 Ulrich Drepper <drepper@redhat.com>
1965
1966 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1967 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
1968 the atomic instruction needed.
1969 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1970 (__lll_mutex_lock_wait): Likewise.
1971
4c771a3b
UD
19722004-02-28 Ulrich Drepper <drepper@redhat.com>
1973
1974 * Makefile (tests): Add tst-cond14 and tst-cond15.
1975 * tst-cond14.c: New file.
1976 * tst-cond15.c: New file.
1977
a2c33d5a
UD
19782004-02-27 Ulrich Drepper <drepper@redhat.com>
1979
1980 * sysdeps/pthread/createthread.c (create_thread): Remove use of
1981 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
1982 needs to be implemented differently to be useful.
1983
261eada2
UD
19842004-02-26 Ulrich Drepper <drepper@redhat.com>
1985
14ffbc83
UD
1986 * pthread_attr_setschedparam.c: Don't test priority against limits
1987 here. Set ATTR_FLAG_SCHED_SET flag.
1988 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
1989 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
1990 from parent thread to child. If attribute is used and scheduling
1991 parameters are not inherited, copy parameters from attribute or
1992 compute them. Check priority value.
1993 * pthread_getschedparam.c: If the parameters aren't known yet get
1994 them from the kernel.
1995 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
1996 ATTR_FLAG_POLICY_SET flag for thread.
1997 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
1998 and ATTR_FLAG_POLICY_SET.
1999
2000 * sysdeps/pthread/createthread.c: Use tgkill if possible.
2001
261eada2
UD
2002 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2003 fail if stack address hasn't been set. Just return 0.
2004
701d185c
UD
20052004-02-25 Ulrich Drepper <drepper@redhat.com>
2006
25b8e63c
UD
2007 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
2008 libpthread for the files in this list.
2009 (CFLAGS-tst-unload): Removed.
2010 * tst-unload.c (do_test): Don't use complete path for
2011 LIBPHREAD_SO.
2012
701d185c
UD
2013 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2014 tst-_res1mod2.
2015
a8fd5a02
UD
20162004-02-22 Ulrich Drepper <drepper@redhat.com>
2017
2018 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2019 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2020 operation per round is needed.
2021 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2022 (__lll_mutex_lock_wait): Likewise.
2023
dd0b7b19
UD
20242004-02-20 Ulrich Drepper <drepper@redhat.com>
2025
2026 * tst-cancel9.c (cleanup): Don't print to stderr.
2027
5990e1fe
UD
20282004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2029
2030 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2031
33ab3b66
UD
20322004-02-20 Jakub Jelinek <jakub@redhat.com>
2033
1be3130e
UD
2034 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2035 (__syscall_error_handler2): Call CDISABLE.
2036 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2037 (__syscall_error_handler2): Call CDISABLE.
2038
8ba5025a
UD
2039 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2040 Release lock before the loop, don't reacquire it.
8ba5025a 2041
33ab3b66
UD
2042 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2043
11986c68
UD
20442004-02-19 Andreas Schwab <schwab@suse.de>
2045
2046 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2047 Fix last change.
2048
dc391246
UD
20492004-02-18 Ulrich Drepper <drepper@redhat.com>
2050
37c054c7
UD
2051 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2052 (pthread_barrier_wait): After wakeup, release lock only when the
2053 last thread stopped using the barrier object.
2054 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2055 (pthread_barrier_wait): Likewise.
2056 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2057 Likewise.
2058 * Makefile (tests): Add tst-barrier4.
2059 * tst-barrier4.c: New file.
dc391246
UD
2060
2061 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2062 (__pthread_cond_timedwait): Perform timeout test while holding
2063 internal lock to prevent wakeup race.
2064 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2065 * sysdeps/pthread/pthread_cond_timedwait.c
2066 (__pthread_cond_timedwait): Likewise.
2067 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2068 (__pthread_cond_timedwait): Likewise.
2069
4a08113c
UD
20702004-02-18 Jakub Jelinek <jakub@redhat.com>
2071
2072 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2073 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2074 * Makefile (tests): Add tst-rwlock13.
2075 * tst-rwlock13.c: New test.
2076
71b1675e
UD
20772004-02-16 Ulrich Drepper <drepper@redhat.com>
2078
2079 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2080 (__condvar_tw_cleanup): Little optimization.
2081 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2082
cd9fdc72
UD
20832004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
2084
2085 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2086 libpthread as "lib" parameter to SHLIB_COMPAT.
2087 (__novmx_siglongjmp): Fix typo in function name.
2088 (__novmx_longjmp): Fix typo in function name.
2089
82038750
UD
20902004-02-13 Ulrich Drepper <drepper@redhat.com>
2091
b078c591
UD
2092 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2093 __builtin_expect.
2094
82038750
UD
2095 * sysdeps/generic/pt-longjmp.c: Moved to...
2096 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
2097
e2982bf0
UD
20982004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
2099
2100 * Makefile (libpthread-routines): Add pt-cleanup.
2101 * pt-longjmp.c: Removed.
2102 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2103 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2104 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2105 Version longjmp, siglongjmp for GLIBC_2.3.4.
2106 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2107
3730d95c
UD
21082004-02-13 Ulrich Drepper <drepper@redhat.com>
2109
219304ec
UD
2110 * sysdeps/pthread/pthread_cond_timedwait.c
2111 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
2112 Reuse code. Add __builtin_expects.
2113
3730d95c
UD
2114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2115 (__pthread_cond_timedwait): Get internal lock in case timeout has
2116 passed before the futex syscall.
2117 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2118
5673ccc1
UD
21192004-01-20 Ulrich Drepper <drepper@redhat.com>
2120
debddf64
UD
2121 * allocatestack.c: Pretty printing.
2122
5673ccc1
UD
2123 * sysdeps/pthread/createthread.c (create_thread): Don't add
2124 CLONE_DETACHED bit if it is not necessary.
2125
6bae8725
UD
21262004-01-16 Ulrich Drepper <drepper@redhat.com>
2127
2128 * pthread_getattr_np.c: Include ldsodefs.h.
2129
ff151400
RH
21302004-01-16 Richard Henderson <rth@redhat.com>
2131
6bae8725
UD
2132 * allocatestack.c: Don't declare __libc_stack_end.
2133 * init.c (__pthread_initialize_minimal_internal): Likewise.
2134 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 2135
ba683832
RH
21362004-01-15 Richard Henderson <rth@redhat.com>
2137
2138 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2139 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2140 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2141 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2142 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2143 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2144 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2145 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
2146
630d93a7
UD
21472004-01-14 Ulrich Drepper <drepper@redhat.com>
2148
219304ec 2149 * init.c (pthread_functions): Make array const.
630d93a7 2150
d1fc817e
UD
21512004-01-13 Ulrich Drepper <drepper@redhat.com>
2152
2153 * allocatestack.c (__make_stacks_executable): Change interface.
2154 Check parameters. Pass parameter on to libc counterpart.
2155 * pthreadP.h: Change declaration.
2156
dc927809
RH
21572004-01-13 Richard Henderson <rth@redhat.com>
2158
10677727
UD
2159 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
2160 prototype form.
2161 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
2162 Likewise.
2163
d1fc817e
UD
2164 * sysdeps/alpha/Makefile: New file.
2165 * sysdeps/alpha/tcb-offsets.sym: New file.
2166 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2167 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 2168
d1fc817e
UD
2169 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
2170 on powerpc version.
dc927809 2171
249a3d0c
UD
21722004-01-08 Jakub Jelinek <jakub@redhat.com>
2173
2174 * Makefile (tests): Add tst-backtrace1.
2175 * tst-backtrace1.c: New test.
2176
763c0490
RM
21772003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
2178
2179 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
2180 register as second parameter to the REGISTER macro.
2181 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
2182 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
2183 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
2184 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
2185 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
2186 of thread register as second parameter to REGISTER macro in 64 case.
2187
c7baafd5
UD
21882004-01-03 Ulrich Drepper <drepper@redhat.com>
2189
2190 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
2191 (CFLAGS-getpid.o): Defined.
2192 (CFLAGS-getpid.os): Defined.
2193
25ac0258
UD
21942003-12-31 Ulrich Drepper <drepper@redhat.com>
2195
2196 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
2197 returned for main thread does not overlap with any other VMA.
2198 Patch by Jakub Jelinek.
2199
795985e4
UD
22002003-12-29 Jakub Jelinek <jakub@redhat.com>
2201
2202 * tst-raise1.c: Include stdio.h.
2203
cb5b9388
UD
22042003-12-23 Jakub Jelinek <jakub@redhat.com>
2205
2206 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
2207 setting with __ASSUME_TGKILL || defined __NR_tgkill.
2208 If pid is 0, set it to selftid.
2209 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
2210 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
2211 != 0, return self->tid without doing a syscall.
2212 * descr.h (struct pthread): Move pid field after tid.
2213
2214 * Makefile (tests): Add tst-raise1.
2215 * tst-raise1.c: New file.
2216
432aaf5b
RM
22172003-12-23 Roland McGrath <roland@redhat.com>
2218
2219 * tst-oddstacklimit.c: New file.
2220 * Makefile (tests): Add it.
2221 (tst-oddstacklimit-ENV): New variable.
2222
2223 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
2224 value up to page size for __default_stacksize.
2225
33ebea17
UD
22262003-12-21 Ulrich Drepper <drepper@redhat.com>
2227
2228 * Makefile (tests): Add tst-eintr5.
2229 * tst-eintr5.c: New file.
2230
2231 * eintr.c (eintr_source): Prevent sending signal to self.
2232
2233 * tst-eintr2.c (tf1): Improve error message.
2234
bbe35eb5
UD
22352003-12-20 Ulrich Drepper <drepper@redhat.com>
2236
2237 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
2238 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
2239 * pthread_cancel.c: Add comment explaining use of PID field.
2240 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2241 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
2242 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
2243 temporarily to signal the field must not be relied on and updated
2244 by getpid().
2245 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
2246 temporarily negative.
2247 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 2248
4efdd8d3
UD
22492003-12-19 Ulrich Drepper <drepper@redhat.com>
2250
2251 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
2252 (eintr_source): If ARG != NULL, use pthread_kill.
2253 * tst-eintr1.c: Adjust for this change.
2254 * tst-eintr2.c: Likewise.
2255 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
2256 * tst-eintr3.c: New file.
2257 * tst-eintr4.c: New file.
2258
22592003-12-19 Jakub Jelinek <jakub@redhat.com>
2260
2261 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
2262 if CANCELSTATE_BITMASK is set.
2263 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
2264 Likewise.
2265
2266 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
2267 (tests-reverse): Add tst-cancel23.
2268 * tst-cancel22.c: New test.
2269 * tst-cancel23.c: New test.
2270
675620f7
UD
22712003-12-18 Ulrich Drepper <drepper@redhat.com>
2272
2273 * tst-eintr1.c: Better error messages.
2274
2275 * Makefile (tests): Add tst-eintr2.
2276 * tst-eintr2.c: New file.
2277
22782003-12-18 Jakub Jelinek <jakub@redhat.com>
2279
2280 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
2281 (CFLAGS-tst-cancelx21.c): Set.
2282 * tst-cancel21.c: New test.
2283 * tst-cancelx21.c: New test.
2284
2285 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
2286 comparison operand.
2287 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
2288 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
2289 * pt-longjmp.c: Include jmpbuf-unwind.h.
2290 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
2291 _JMPBUF_UNWINDS. Adjust compared pointers.
2292 * init.c (__pthread_initialize_minimal_internal): Initialize
2293 pd->stackblock_size.
2294 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
2295 * sysdeps/alpha/jmpbuf-unwind.h: New file.
2296 * sysdeps/i386/jmpbuf-unwind.h: New file.
2297 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
2298 * sysdeps/s390/jmpbuf-unwind.h: New file.
2299 * sysdeps/sh/jmpbuf-unwind.h: New file.
2300 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
2301 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 2302 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
2303 (_JMPBUF_CFA_UNWINDS): Remove.
2304 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
2305
23062003-12-12 Jakub Jelinek <jakub@redhat.com>
2307
2308 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
2309 (CFLAGS-tst-cancelx20.c): Set.
2310 * tst-cancel20.c: New test.
2311 * tst-cancelx20.c: New test.
2312
2d951ab6
UD
23132003-12-17 Ulrich Drepper <drepper@redhat.com>
2314
2315 * init.c (__pthread_initialize_minimal_internal): Don't treat
2316 architectures with separate register stack special here when
2317 computing default stack size.
2318
f8a3a2e7
RM
23192003-12-17 Roland McGrath <roland@redhat.com>
2320
2321 * Makefile (tst-cancelx7-ARGS): New variable.
2322 Reportd by Greg Schafer <gschafer@zip.com.au>.
2323
e796f92f
UD
23242003-12-17 Jakub Jelinek <jakub@redhat.com>
2325
2326 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
2327 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
2328 (tst-stack3-ENV): Set.
2329 ($(objpfx)tst-stack3-mem): New.
2330 * tst-stack3.c: New test.
2331
092eb73c
UD
23322003-12-10 David Mosberger <davidm@hpl.hp.com>
2333
2334 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
2335 Add unwind directives. Drop unused .regstk directive.
2336 (_fini_EPILOG_BEGINS): Add unwind directives.
2337
ff48874d
UD
23382003-12-11 Ulrich Drepper <drepper@redhat.com>
2339
2340 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2341 Assume parameter is a pointer.
2342 (lll_futex_wake): Likewise.
20945457
UD
2343 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
2344 Likewise.
2345 (lll_futex_wake): Likewise.
ff48874d
UD
2346 Reported by Boris Hu.
2347 * sysdeps/unix/sysv/linux/unregister-atfork.c
2348 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
2349
2350 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
2351
1d9d0b80
UD
23522003-12-10 Ulrich Drepper <drepper@redhat.com>
2353
2354 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
2355 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
2356 __rtld_lock_initialize for ld.so lock.
2357 Patch in part by Adam Li <adam.li@intel.com>.
2358
c776b3d7
UD
23592003-12-02 David Mosberger <davidm@hpl.hp.com>
2360
2361 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
2362 in $(gnulib). Also, remove stale comment.
2363
23642003-11-12 David Mosberger <davidm@hpl.hp.com>
2365
2366 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
2367 advantage of new syscall stub and optimize accordingly.
2368
2369 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
2370 from SYS_futex, to match expectations of
2371 sysdep.h:DO_INLINE_SYSCALL.
2372 (lll_futex_clobbers): Remove.
2373 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
2374 (lll_futex_wake): Likewise.
2375 (lll_futex_requeue): Likewise.
2376 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
2377 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
2378 Jelinek).
2379 (__lll_mutex_lock): Likewise.
2380 (__lll_mutex_cond_lock): Likewise.
2381 (__lll_mutex_timed_lock): Likewise.
2382 (__lll_mutex_unlock): Likewise.
2383 (__lll_mutex_unlock_force): Likewise.
2384
2385 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
2386 comes before the include of <sysdep.h>.
2387 (THREAD_SELF_SYSINFO): New macro.
2388 (THREAD_SYSINFO): Likewise.
2389 (INIT_SYSINFO): New macro.
2390 (TLS_INIT_TP): Call INIT_SYSINFO.
2391
2392 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
2393
2394 * sysdeps/pthread/createthread.c (create_thread): Use
2395 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
2396 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
2397 THREAD_SELF_SYSINFO instead of open code.
2398 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
2399 (THREAD_SYSINFO): Likewise.
2400
2401 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
2402
2403 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
2404
57d20ee7
UD
24052003-12-06 Ulrich Drepper <drepper@redhat.com>
2406
2407 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
2408 instead of .init. Patch by David Mosberger.
2409
67aeab2a
AJ
24102003-11-30 Thorsten Kukuk <kukuk@suse.de>
2411
2412 * sysdeps/pthread/configure.in: Remove broken declaration in C
2413 cleanup handling check.
2414
8ca203e6
AJ
24152003-11-30 Andreas Jaeger <aj@suse.de>
2416
2417 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
2418 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2419 Likewise.
2420
46bf9de7
UD
24212003-11-27 Jakub Jelinek <jakub@redhat.com>
2422
2423 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
2424 * pthread_attr_destroy.c: Include shlib-compat.h.
2425 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
2426 is set in iattr->flags.
2427 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
2428
1d9b73ab
UD
24292003-11-21 Jakub Jelinek <jakub@redhat.com>
2430
2431 * Makefile (distribute): Add tst-cleanup4aux.c.
2432
2433 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
2434 include.
2435
53f9084e
UD
24362003-11-21 Ulrich Drepper <drepper@redhat.com>
2437
1d9b73ab
UD
2438 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
2439 pthread_cond_signal.
2440
e42a990e
UD
2441 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
2442 store mutex address if the current value is ~0l.
2443 * sysdeps/pthread/pthread_cond_timedwait.c
2444 (__pthread_cond_timedwait): Likewise.
2445 * sysdeps/pthread/pthread_cond_broadcast.c
2446 (__pthread_cond_broadcast): Don't use requeue for pshared
2447 condvars.
2448
2449 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2450 (__pthread_cond_wait): Don't store mutex address if the current
2451 value is ~0l.
2452 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2453 (__pthread_cond_timedwait): Likewise.
2454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2455 (__pthread_cond_broadcast): Don't use requeue for pshared
2456 condvars.
2457
2458 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
2459 element with ~0l for pshared condvars, with NULL otherwise.
2460
2461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2462 (__pthread_cond_wait): Don't store mutex address if the current
2463 value is ~0l.
2464 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2465 (__pthread_cond_timedwait): Likewise.
2466 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2467 (__pthread_cond_broadcast): Don't use requeue for pshared
2468 condvars.
2469
bf68b236 2470 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 2471 * tst-cond12.c: New file.
bf68b236 2472 * tst-cond13.c: New file.
53f9084e 2473
9780c971
UD
24742003-11-17 Ulrich Drepper <drepper@redhat.com>
2475
2476 * sysdeps/pthread/configure.in: Make missing forced unwind support
2477 fatal.
2478
74e12fbc
UD
24792003-11-11 Ulrich Drepper <drepper@redhat.com>
2480
2481 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
2482
c685b2b0
UD
24832003-11-06 Ulrich Drepper <drepper@redhat.com>
2484
2485 * Makefile: Add magic to clean up correctly.
2486
44e94149
UD
24872003-11-05 Jakub Jelinek <jakub@redhat.com>
2488
2489 * unwind.c (FRAME_LEFT): Define.
2490 (unwind_stop): Handle old style cleanups here.
2491 (__pthread_unwind): Handle old style cleanups only if
2492 !HAVE_FORCED_UNWIND.
2493 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
2494 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
2495 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
2496 ($(objpfx)tst-cleanupx4): Likewise.
2497 * tst-cleanup4.c: New test.
2498 * tst-cleanup4aux.c: New.
2499 * tst-cleanupx4.c: New test.
2500
c28422b5
UD
25012003-11-04 Ulrich Drepper <drepper@redhat.com>
2502
2503 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
2504 lll_mutex_*lock macros to skip atomic operations on some archs.
2505
27176677
UD
25062003-11-03 Ulrich Drepper <drepper@redhat.com>
2507
2508 * sysdeps/pthread/tst-timer.c (main): Initialize
2509 sigev2.sigev_value as well.
2510
026395a2
RM
25112003-10-15 Roland McGrath <roland@redhat.com>
2512
2513 * sysdeps/pthread/configure.in: Barf if visibility attribute support
2514 is missing.
2515 * sysdeps/pthread/configure: Regenerated.
2516
fa3cbe3d
UD
25172003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2518
2519 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
2520 locking macros. No distinction between normal and mutex locking
2521 anymore.
2522 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
2523 Merge bits from lowlevelmutex.S we still need.
2524 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
2525 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
2526 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
2527 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
2528 new mutex implementation.
2529 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
2530 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
2531 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2532 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2533 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2534 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2535 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2536 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2537 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2538 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
2539 symbol for entry point to avoid cancellation.
2540
e700a908
UD
25412003-10-07 Jakub Jelinek <jakub@redhat.com>
2542
2543 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
2544 changes.
2545 (SAVE_OLDTYPE_0): Fix a typo.
2546
c70a86b6
UD
25472003-10-03 Ulrich Drepper <drepper@redhat.com>
2548
2549 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
2550 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
2551
134abcb5
UD
25522003-10-02 Ulrich Drepper <drepper@redhat.com>
2553
2554 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
2555 correct offset.
2556
b77ca0e8
UD
25572003-10-02 Jakub Jelinek <jakub@redhat.com>
2558
2559 * Makefile (tests): Add tst-cancel19.
2560 * tst-cancel19.c: New test.
2561
4d961dc7
UD
25622003-10-02 Ulrich Drepper <drepper@redhat.com>
2563
2564 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
2565 restoring of the old cancellation type.
2566
1d5b20ad 25672003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 2568
1d5b20ad
UD
2569 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
2570
4106a403
RM
25712003-09-27 Wolfram Gloger <wg@malloc.de>
2572
4d961dc7 2573 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 2574
fca9d8e4
RM
25752003-09-24 Roland McGrath <roland@redhat.com>
2576
2577 * allocatestack.c (__make_stacks_executable): Don't ignore return
2578 value from _dl_make_stack_executable.
2579
c9c60884
UD
25802003-09-24 Ulrich Drepper <drepper@redhat.com>
2581
69c9fa04
UD
2582 * allocatestack.c (__make_stacks_executable): Also change
2583 permission of the currently unused stacks.
2584
279f1143
UD
2585 * allocatestack.c (change_stack_perm): Split out from
2586 __make_stacks_executable.
2587 (allocate_stack): If the required permission changed between the time
2588 we started preparing the stack and queueing it, change the permission.
2589 (__make_stacks_executable): Call change_stack_perm.
2590
c9c60884
UD
2591 * Makefile: Build tst-execstack-mod locally.
2592 * tst-execstack-mod.c: New file.
2593
54ee14b3
UD
25942003-09-23 Jakub Jelinek <jakub@redhat.com>
2595
2596 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
2597
25982003-09-23 Roland McGrath <roland@redhat.com>
2599
2600 * tst-execstack.c: New file.
2601 * Makefile (tests): Add it.
2602 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
2603 (LDFLAGS-tst-execstack): New variable.
2604
2605 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
2606 whether to use PROT_EXEC for stack mmap.
2607 (__make_stacks_executable): New function.
2608 * pthreadP.h: Declare it.
2609 * init.c (__pthread_initialize_minimal_internal): Set
2610 GL(dl_make_stack_executable_hook) to that.
2611
365b1602
UD
26122003-09-22 Ulrich Drepper <drepper@redhat.com>
2613
2614 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
2615 recommendation from AMD re avoidance of lock prefix.
2616
39358e8b
UD
26172003-09-22 Jakub Jelinek <jakub@redhat.com>
2618
2619 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
2620 lll_futex_timed_wait instead of lll_futex_wait.
2621 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
2622 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
2623 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
2624 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
2625 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
2626 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
2627 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
2628 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
2629 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
2630 Completely revamp the locking macros. No distinction between
2631 normal and mutex locking anymore.
2632 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2633 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
2634 __lll_lock_timedwait): Fix prototypes.
2635 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
2636 __lll_lock_timedwait): Likewise.
2637 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
2638 macros, add __builtin_expect.
2639 (lll_mutex_timedlock): Likewise. Fix return value.
2640 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
2641 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
2642 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
2643 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
2644 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
2645 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
2646 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
2647 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
2648
9d08fbbb
UD
26492003-09-22 Ulrich Drepper <drepper@redhat.com>
2650
c0df57e1
UD
2651 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2652 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
2653 operation if possible.
2654
9d08fbbb
UD
2655 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
2656 like jumping over the lock prefix.
2657
71451de2
UD
26582003-09-21 Ulrich Drepper <drepper@redhat.com>
2659
2660 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
2661 locking macros. No distinction between normal and mutex locking
2662 anymore.
3a226d33 2663 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
2664 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2665 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
2666 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
2667 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 2668 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 2669 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 2670 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 2671 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
2672 * Makefile (routines): Remove libc-lowlevelmutex.
2673 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
2674 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
2675 for new mutex implementation.
2676 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2677 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2678 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2679 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2680 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2681 Likewise.
2682 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2683 Likewise.
2684 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2685 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2686 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
2687 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2688 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2689 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2690 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2691 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2692 Likewise.
2693 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2694 Likewise.
2695 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2696 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2698 Don't use requeue.
2699 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 2700 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 2701
8f31c0ef
UD
27022003-09-20 Ulrich Drepper <drepper@redhat.com>
2703
56a4aa98
UD
2704 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
2705 in parameters of asm with output parameters.
2706
8f31c0ef
UD
2707 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
2708 type of DECR parameter to int.
2709 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
2710
8b8074da
UD
27112003-09-18 Jakub Jelinek <jakub@redhat.com>
2712
2713 * tst-attr3.c (tf, do_test): Print stack start/end/size and
2714 guardsize for each thread.
2715
65af7e61
UD
27162003-09-17 Jakub Jelinek <jakub@redhat.com>
2717
9ba96eda
UD
2718 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
2719 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2720 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
2721
06f6ca90
UD
2722 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2723 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
2724 NULL.
2725 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
2726 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
2727 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2728 (pthread_getaffinity_np): Add hidden_def.
2729
2730 * Makefile (tests): Add tst-attr3.
2731 * tst-attr3.c: New test.
2732
65af7e61
UD
2733 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
2734
3402852c
UD
27352003-09-15 Jakub Jelinek <jakub@redhat.com>
2736
2737 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
2738 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
2739
a4db3439
UD
27402003-09-17 Jakub Jelinek <jakub@redhat.com>
2741
2742 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
2743 * tst-align.c: Include tst-stack-align.h.
2744 (tf, do_test): Use TEST_STACK_ALIGN macro.
2745
27462003-09-17 Ulrich Drepper <drepper@redhat.com>
2747
2748 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
2749 variable.
2750
92ce4676
UD
27512003-09-16 Ulrich Drepper <drepper@redhat.com>
2752
2753 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
2754 stack-related values for the initial thread.
2755
e07bb02a
UD
27562003-09-15 Jakub Jelinek <jakub@redhat.com>
2757
2758 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
2759
d087b5dc
UD
27602003-09-11 Ulrich Drepper <drepper@redhat.com>
2761
2762 * pthread_mutex_lock.c: Minor code rearrangements.
2763
7f08f55a
RM
27642003-09-05 Roland McGrath <roland@redhat.com>
2765
2766 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
2767 Instead, include ../nptl_db/db_info.c to do its magic.
2768 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
2769 (__pthread_pthread_key_2ndlevel_size): Likewise.
2770 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
2771 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
2772 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
2773 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
2774 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
2775 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
2776 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
2777 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
2778 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
2779 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
2780 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
2781 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
2782 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
2783 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
2784 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
2785 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
2786 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
2787
806e4a4a
UD
27882003-09-08 Ulrich Drepper <drepper@redhat.com>
2789
2790 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
2791 of pthread_t to be compatible with LT.
2792 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2793 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2794 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2795 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2796 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
2797 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2798 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2799
17f83e56
UD
28002003-09-04 Ulrich Drepper <drepper@redhat.com>
2801
2802 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
2803
58e8ec84
UD
28042003-09-04 Jakub Jelinek <jakub@redhat.com>
2805
2806 * unwind-forcedunwind.c: Move to...
2807 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
2808 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
2809 * sysdeps/pthread/jmpbuf-unwind.h: New file.
2810 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
2811 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
2812 * unwind.c: Include jmpbuf-unwind.h.
2813 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
2814
abf1cf21
JJ
28152003-09-02 Jakub Jelinek <jakub@redhat.com>
2816
4a244f0d
UD
2817 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
2818 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
2819 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
2820 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
2821 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
2822 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
2823 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
2824 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
2825 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
2826 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
2827 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
2828 function.
2829 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
2830 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
2831 * Makefile (tests): Add tst-stack2.
2832 * tst-stack2.c: New test.
2833 * tst-stack1.c: Include limits.h and sys/param.h.
2834 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
2835
e29ef647
UD
2836 * pthread_condattr_setpshared.c: Include errno.h.
2837 (pthread_condattr_setpshared): Return EINVAL if pshared
2838 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
2839
5777d565
UD
2840 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
2841 defined symbol for entry point to avoid cancellation.
2842 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
2843 Likewise.
2844 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2845 Likewise.
2846 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
2847 Likewise.
2848 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
2849 Likewise.
2850 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2851 Likewise.
2852 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
2853 __close_nocancel, __read_nocancel, __write_nocancel,
2854 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
2855 libpthread.so or librt.so, define to corresponding function
2856 without _nocancel suffix.
2857 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
2858 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
2859 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
2860
abf1cf21
JJ
2861 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
2862
8348dcc8
UD
28632003-09-02 Ulrich Drepper <drepper@redhat.com>
2864
2865 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 2866 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
2867
2868 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
2869 in subsections has a symbol associated with it.
2870
2871 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
2872 defined symbol for entry point to avoid cancellation.
2873 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
2874
c874a32e
UD
28752003-09-01 Jakub Jelinek <jakub@redhat.com>
2876
2877 * Makefile (tests): Add tst-tls5.
2878 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
2879 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
2880 ($(objpfx)tst-tls5): New.
2881 ($(objpfx)tst-tls6.out): Likewise.
2882 (tests): Depend on $(objpfx)tst-tls6.out.
2883 * tst-tls3.c: Include stdint.h and pthreaddef.h.
2884 (do_test): Check pthread_self () return value alignment.
2885 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
2886 (tf): Check pthread_self () return value alignment.
2887 * tst-tls5.c: New test.
2888 * tst-tls5.h: New.
2889 * tst-tls5mod.c: New.
2890 * tst-tls5moda.c: New.
2891 * tst-tls5modb.c: New.
2892 * tst-tls5modc.c: New.
2893 * tst-tls5modd.c: New.
2894 * tst-tls5mode.c: New.
2895 * tst-tls5modf.c: New.
2896 * tst-tls6.sh: New test.
2897
c503d3dc
UD
2898 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
2899 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
2900 * init.c (pthread_functions): Initialize them.
2901 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
2902 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
2903 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
2904 pthread_cond_timedwait@@GLIBC_2.3.2.
2905
48614753
JJ
29062003-09-01 Jakub Jelinek <jakub@redhat.com>
2907
56a1b877
JJ
2908 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
2909 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
2910 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
2911 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
2912 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
2913 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
2914
2915 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2916
48614753
JJ
2917 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
2918 _POSIX_THREAD_PRIORITY_SCHEDULING.
2919 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
2920
28c97261
UD
29212003-08-31 Ulrich Drepper <drepper@redhat.com>
2922
eef80cf8
UD
2923 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
2924 nested function, use static inline function from libio.h.
2925 Code by Richard Henderson.
2926
28c97261
UD
2927 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
2928 weak.
2929
cd2fbe58
UD
29302003-08-30 Jakub Jelinek <jakub@redhat.com>
2931
2932 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
2933 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
2934 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
2935 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
2936 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
2937 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
2938 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
2939 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
2940 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
2941 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
2942 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
2943 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
2944 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
2945 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
2946 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2947 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
2948 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
2949 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
2950 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
2951 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
2952 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
2953 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
2954 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
2955 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
2956 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
2957 * sysdeps/sparc/tls.h: New file.
2958 * sysdeps/sparc/tcb-offsets.sym: New file.
2959 * sysdeps/sparc/Makefile: New file.
2960 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
2961 * init.c [__sparc__] (__NR_set_tid_address): Define.
2962
feda52c0
UD
29632003-08-29 Jakub Jelinek <jakub@redhat.com>
2964
2965 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
2966 _IO_release_lock): Define.
2967
7c868816
JJ
29682003-08-29 Jakub Jelinek <jakuB@redhat.com>
2969
0261d33f 2970 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
2971 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
2972
68b9e1ae
UD
29732003-08-27 Ulrich Drepper <drepper@redhat.com>
2974
2975 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
2976 (__pthread_cleanup_class): Add missing return types of member
2977 functions.
2978
13b3edfc
UD
29792003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
2980
2981 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2982 (lll_mutex_unlock_force): Add memory barrier between store and futex
2983 syscall.
2984
bb606fbe
UD
29852003-08-25 Ulrich Drepper <drepper@redhat.com>
2986
2987 * tst-cancel4.c (do_test): Also unlink tempfname and remove
2988 tempmsg in first loop.
2989
ee4e5a3d
UD
29902003-08-18 Ulrich Drepper <drepper@redhat.com>
2991
2992 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2993 _POSIX_THREAD_PRIORITY_SCHEDULING.
2994 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2995
334fcf2a
UD
29962003-08-07 Jakub Jelinek <jakub@redhat.com>
2997
2998 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
2999 (__rtld_lock_default_lock_recursive,
3000 __rtld_lock_default_unlock_recursive): Define.
3001 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3002 __rtld_lock_unlock_recursive): Define using
3003 GL(_dl_rtld_*lock_recursive).
3004 * init.c (__pthread_initialize_minimal_internal): Initialize
3005 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3006 Lock GL(_dl_load_lock) the same number of times as
3007 GL(_dl_load_lock) using non-mt implementation was nested.
3008
3009 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3010 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3011
a30fb2df
UD
30122003-08-06 Jakub Jelinek <jakub@redhat.com>
3013
3014 * tst-cancel17.c (do_test): Make len2 maximum of page size and
3015 PIPE_BUF.
3016
ce0d30a0
JJ
30172003-08-07 Jakub Jelinek <jakub@redhat.com>
3018
3019 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3020
9c988b83
UD
30212003-08-03 Jakub Jelinek <jakub@redhat.com>
3022
3023 * sysdeps/pthread/createthread.c (do_clone): Move error handling
3024 to first syscall error check. Move syscall error check for tkill
3025 into __ASSUME_CLONE_STOPPED #ifdef.
3026
5c5252bd
UD
30272003-08-02 Ulrich Drepper <drepper@redhat.com>
3028
f1205aa7
UD
3029 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3030 is not defined, do explicit synchronization.
3031 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
3032 is not defined also unlock pd->lock for non-debugging case in case
3033 it is necessary.
3034 * pthread_create.c (start_thread): Always get and release pd->lock
3035 if __ASSUME_CLONE_STOPPED is not defined.
3036 (start_thread_debug): Removed. Adjust users.
3037 * allocatestack.c (allocate_stack): Always initialize lock if
3038 __ASSUME_CLONE_STOPPED is not defined.
3039 * Makefile (tests): Add tst-sched1.
3040 * tst-sched1.c: New file.
3041
5c5252bd
UD
3042 * sysdeps/pthread/createthread.c (do_clone): Only use
3043 sched_setschduler and pass correct parameters.
3044
973d66e4
UD
30452003-07-31 Jakub Jelinek <jakub@redhat.com>
3046
3047 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3048 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3049 PTHREAD_STACK_MIN in comments.
3050
d347a4ab
UD
30512003-07-31 Jakub Jelinek <jakub@redhat.com>
3052
3053 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3054 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3055 argument.
3056 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3057 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3058 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3059 (__pthread_cleanup_upto): Fix prototype.
3060 (_longjmp_unwind): Adjust caller.
3061 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3062 Change second argument to const struct pointer.
3063 * tst-sem8.c (main): Remove unused s2 and s3 variables.
3064 * tst-sem9.c (main): Likewise.
3065 * unwind.c: Include string.h for strlen prototype.
3066
1b26e9a5
UD
30672003-07-31 Ulrich Drepper <drepper@redhat.com>
3068
3069 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3070 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3071 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3072 Define HAVE_CMOV.
3073 Patch by Nicholas Miell <nmiell@attbi.com>.
3074
adc12574
UD
30752003-07-30 Jakub Jelinek <jakub@redhat.com>
3076
3077 * init.c (__pthread_initialize_minimal_internal): Initialize
3078 GL(dl_init_static_tls).
3079 * pthreadP.h (__pthread_init_static_tls): New prototype.
3080 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3081 New functions.
3082 * Makefile (tests): Add tst-tls4.
3083 (modules-names): Add tst-tls4moda and tst-tls4modb.
3084 ($(objpfx)tst-tls4): Link against libdl and libpthread.
3085 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3086 tst-tls4modb.so.
3087 * tst-tls4.c: New file.
3088 * tst-tls4moda.c: New file.
3089 * tst-tls4modb.c: New file.
3090
a7f6c66e
RM
30912003-06-19 Daniel Jacobowitz <drow@mvista.com>
3092
3093 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3094 before __timer_dealloc.
3095 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3096 Don't call list_unlink.
3097
172ce013
RM
30982003-07-29 Roland McGrath <roland@redhat.com>
3099
3100 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3101
7b787f85
UD
31022003-07-25 Jakub Jelinek <jakub@redhat.com>
3103
3104 * tst-cancel17.c (do_test): Check if aio_cancel failed.
3105 Don't reuse struct aiocb A if it failed.
3106 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3107 not just one byte, as that does not block.
3108
0e9d6240
UD
31092003-07-22 Jakub Jelinek <jakub@redhat.com>
3110
9d79e037
UD
3111 * sysdeps/pthread/unwind-resume.c: New file.
3112 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3113 unwind-resume in csu subdir.
3114 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3115 exceptions.
3116 (librt-sysdep_routines, librt-shared-only-routines): Add
3117 rt-unwind-resume.
3118 * sysdeps/pthread/rt-unwind-resume.c: New file.
3119 * unwind-forcedunwind.c: New file.
3120 * Makefile (libpthread-routines): Add unwind-forcedunwind.
3121 (libpthread-shared-only-routines): Likewise.
3122 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3123 * pthreadP.h (pthread_cancel_init): New prototype.
3124 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3125
3126 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3127 attr argument const struct pthread_attr *.
3128
0e9d6240
UD
3129 * res.c (__res_state): Return __resp.
3130 * descr.h: Include resolv.h.
3131 (struct pthread): Add res field.
3132 * pthread_create.c: Include resolv.h.
3133 (start_thread): Initialize __resp.
3134 * Makefile (tests): Add tst-_res1.
3135 (module-names): Add tst-_res1mod1, tst-_res1mod2.
3136 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3137 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3138 libpthread.
3139 * tst-_res1.c: New file.
3140 * tst-_res1mod1.c: New file.
3141 * tst-_res1mod2.c: New file.
3142
1a379ea0
UD
31432003-07-21 Ulrich Drepper <drepper@redhat.com>
3144
7e939b21
UD
3145 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
3146
1a379ea0
UD
3147 * Makefile: Define various *-no-z-defs variables for test DSOs
3148 which has undefined symbols.
3149
ca86a763
UD
31502003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
3151
3152 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3153 Retry if the stwcx fails to store once_control.
3154
80f536db
UD
31552003-07-20 Ulrich Drepper <drepper@redhat.com>
3156
3157 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
3158 pthread_attr_setaffinity.
3159 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
3160 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
3161 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
3162 * pthread_attr_destroy.c: Free cpuset element if allocated.
3163 * pthread_create.c: Pass iattr as additional parameter to
3164 create_thread.
3165 * sysdeps/pthread/createthread.c: If attribute is provided and
3166 a new thread is created with affinity set or scheduling parameters,
3167 start thread with CLONE_STOPPED.
3168 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
3169 pthread_attr_setaffinity.
3170 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
3171 cpuset element.
3172
73299943
UD
31732003-07-15 Ulrich Drepper <drepper@redhat.com>
3174
3175 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
3176
da35d15e
UD
31772003-07-14 Ulrich Drepper <drepper@redhat.com>
3178
3179 * sysdeps/pthread/configure.in: Require CFI directives also for
3180 ppc and s390.
3181
75540d8a
UD
31822003-07-15 Jakub Jelinek <jakub@redhat.com>
3183
3184 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3185 Add cfi directives.
3186
4a17085f
UD
31872003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3188
3189 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
3190 CLEANUP_JMP_BUF.
3191 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
3192 registers as variables. Call __pthread_mutex_unlock_usercnt.
3193 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3194 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
3195 not self pointer in __writer. Compare with TID to determine
3196 deadlocks.
3197 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3198 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3199 Likewise.
3200 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3201 Likewise.
3202 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
3203 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
3204 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
3205 macros also when compiling librt.
3206
6080ecdf
UD
32072003-07-11 Jakub Jelinek <jakub@redhat.com>
3208
3209 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
3210 -fasynchronous-unwind-tables.
3211 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3212 (PSEUDO): Add cfi directives.
3213 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
3214 Likewise.
3215 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3216 Likewise.
3217
da0c02ee
UD
32182003-07-08 Jakub Jelinek <jakub@redhat.com>
3219
3220 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
3221 __pthread_unregister_cancel): Add prototypes and hidden_proto.
3222 * unwind.c (__pthread_unwind_next): Add hidden_def.
3223 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
3224 Likewise.
3225 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3226 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3227 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3228 Likewise.
3229 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
3230 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3231 Likewise.
3232 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
3233 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
3234 __pthread_unregister_cancel and __pthread_unwind_next.
3235
57a5ea02
UD
32362003-07-04 Jakub Jelinek <jakub@redhat.com>
3237
3238 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
3239 different symbol for the cancellation syscall wrapper and
3240 non-cancellation syscall wrapper.
3241 (PSEUDO_END): Define.
3242
d810b358
UD
32432003-07-05 Richard Henderson <rth@redhat.com>
3244
3245 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
3246 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
3247 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3248 return actual return value from the syscall, not 0.
d810b358 3249
db54f488
UD
32502003-07-07 Ulrich Drepper <drepper@redhat.com>
3251
3252 * descr.h (struct pthread): Add pid field.
3253 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
3254 (__reclaim_stacks): Likewise.
3255 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
3256 also check for PID of the signal source.
3257 (__pthread_initialize_minimal_internal): Also initialize pid field
3258 of initial thread's descriptor.
3259 * pthread_cancel.c: Use tgkill instead of tkill if possible.
3260 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3261 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
3262 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3263 * sysdeps/unix/sysv/linux/raise.c: Likewise.
3264
5e497a41
UD
32652003-07-05 Ulrich Drepper <drepper@redhat.com>
3266
3267 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
3268 Fix use of parameter.
3269 (__libc_cleanup_pop): Likewise.
3270
86a0c4fa
UD
32712003-07-04 Ulrich Drepper <drepper@redhat.com>
3272
3273 * init.c (sigcancel_handler): Change parameters to match handler
3274 for SA_SIGACTION. Check signal number and code to recognize
3275 invalid invocations.
3276
bdbecaa3
RM
32772003-07-03 Roland McGrath <roland@redhat.com>
3278
3279 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
3280 Apply sizeof (struct pthread) bias to r13 value.
3281
56421b23
UD
32822003-07-03 Ulrich Drepper <drepper@redhat.com>
3283
fbd90f6c
UD
3284 * sysdeps/pthread/configure.in: Require CFI directives.
3285
56421b23
UD
3286 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
3287 definition.
3288 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
3289 libpthread compilation.
3290 * unwind.c (__pthread_unwind): Add hidden_def.
3291 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
3292
ca2b4cd7
UD
32932003-07-01 Ulrich Drepper <drepper@redhat.com>
3294
3295 * libc-cancellation.c (__libc_cleanup_routine): Define.
3296 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
3297 (__pthread_cleanup_pop): Define.
3298
f036e569
UD
32992003-07-01 Richard Henderson <rth@redhat.com>
3300
3301 * sysdeps/alpha/elf/pt-initfini.c: New file.
3302 * sysdeps/alpha/pthread_spin_lock.S: New file.
3303 * sysdeps/alpha/pthread_spin_trylock.S: New file.
3304 * sysdeps/alpha/pthreaddef.h: New file.
3305 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
3306 * sysdeps/alpha/tls.h: New file.
3307 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
3308 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
3309 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
3310 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
3311 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
3312 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
3313 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
3314 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
3315 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
3316 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
3317
3b985826
UD
33182003-07-01 Ulrich Drepper <drepper@redhat.com>
3319
3320 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
3321 cleanup support and unwind info.
3322
3a4d1e1e
UD
33232003-06-30 Ulrich Drepper <drepper@redhat.com>
3324
3325 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3326 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
3327 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
3328 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
3329 * tst-once3.c: Add cleanup handler and check it is called.
3330 * tst-once4.c: Likewise.
3331 * tst-oncex3.c: New file.
3332 * tst-oncex4.c: New file.
3333 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
3334
e479cc8e
UD
33352003-06-29 Ulrich Drepper <drepper@redhat.com>
3336
3337 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
3338
7d7ff54c
UD
33392003-06-27 Ulrich Drepper <drepper@redhat.com>
3340
483e95d0
UD
3341 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
3342 (tf_msgsnd): Likewise.
3343
7d7ff54c
UD
3344 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
3345 premature returns a bit more.
3346
7539c7ec
UD
33472003-06-26 Ulrich Drepper <drepper@redhat.com>
3348
3349 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
3350 definition to the front.
3351
3352 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
3353 the cleanup functions to make the names unique. Fix dwarf opcode
3354 un unwind table.
3355 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
3356 functions to make the names unique. Fix CFA offset for two blocks.
3357
0af6a1d9
UD
33582003-06-25 Ulrich Drepper <drepper@redhat.com>
3359
3360 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
3361 missing closing braces.
3362 Patch by Christophe Saout <christophe@saout.de>.
3363
eef4a9f3
RM
33642003-06-24 Roland McGrath <roland@redhat.com>
3365
3366 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
3367
4165d44d
UD
33682003-06-24 Ulrich Drepper <drepper@redhat.com>
3369
7f8f7b9d
UD
3370 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
3371 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
3372
4165d44d
UD
3373 * pthreadP.h: Declare __find_thread_by_id.
3374 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
3375 * pthread_clock_gettime.c: Allow using other thread's clock.
3376 * pthread_clock_settime.c: Likewise.
3377 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
3378 * Makefile: Add rules to build and run tst-clock2.
3379 * tst-clock2.c: New file.
3380
67b78ef9
UD
33812003-06-23 Ulrich Drepper <drepper@redhat.com>
3382
3383 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
3384 to use exception-based cleanup handler.
3385 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3386
3387 * tst-cond8.c (ch): Announce that we are done.
3388
3389 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
3390
3391 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
3392 Also test aio_suspend with timeout value.
3393
61623643
UD
33942003-06-22 Ulrich Drepper <drepper@redhat.com>
3395
3a4f2043
UD
3396 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
3397 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
3398 attribute_hidden.
3399
61623643
UD
3400 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
3401 (__pthread_mutex_lock_internal): Likewise.
3402 (__pthread_mutex_unlock_internal): Likewise.
3403 (__pthread_mutex_unlock_usercnt): Declare.
3404 * pthread_mutex_destroy.c: Always fail if used in any way.
3405 * pthread_mutex_init.c: Update comment.
3406 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
3407 * pthread_mutex_timedlock.c: Adjust __nusers.
3408 * pthread_mutex_trylock.c: Adjust __nusers.
3409 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
3410 and public interfaces are wrapper with pass additional parameter.
3411 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
3412 parameter zero.
3413 * tst-mutex8.c: New file.
3414 * Makefile (tests): Add tst-mutex8.
3415 * sysdeps/pthread/pthread_cond_timedwait.c: Call
3416 __pthread_mutex_unlock_usercnt.
3417 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3419 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3421 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3422 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
3423 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3424 Add __nusers.
3425 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3426 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3427 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3428 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3429 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3430
3431 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
3432 * pthread_mutex_timedlock.c: Likewise.
3433 * pthread_mutex_trylock.c: Adjust __nusers.
3434 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
3435 * tst-mutex9.c: New file.
3436 * Makefile (tests): Add tst-mutex9.
3437 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
3438 * sysdeps/ia64/tls.h: Likewise.
3439 * sysdeps/powerpc/tls.h: Likewise.
3440 * sysdeps/s390/tls.h: Likewise.
3441 * sysdeps/sh/tls.h: Likewise.
3442 * sysdeps/x86_64/tls.h: Likewise.
3443 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3444 Change type of __owner.
3445 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3446 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3447 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3448 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3449 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3450
9bdabb94
UD
34512003-06-19 Jakub Jelinek <jakub@redhat.com>
3452
3453 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
3454 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
3455
3456 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
3457 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
3458 instead of nr to lll_futex_wake. Only set errno and return -1
3459 if err < 0.
3460
3461 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
3462 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3463 return actual return value from the syscall, not 0.
3464
f6c93bd9
UD
34652003-06-18 Ulrich Drepper <drepper@redhat.com>
3466
ca343e73
UD
3467 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
3468 find a random value.
3469 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
3470 errno==EIDRM.
3471
50441a98
UD
3472 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
3473 compat_timer_settime.
3474 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
3475 compat_timer_gettime.
3476 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 3477 compat_timer_getoverrun.
50441a98
UD
3478 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
3479 compat_timer_delete.
3480
f6c93bd9
UD
3481 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
3482 error-checking mutex detect busy mutexes.
3483
047aec8f
UD
34842003-06-17 Ulrich Drepper <drepper@redhat.com>
3485
1d53508d
UD
3486 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
3487 Add ax to clobber list.
3488 (lll_mutex_cond_lock): Likewise.
3489 (lll_mutex_unlock): Likewise.
3490 (lll_lock): Likewise.
3491 (lll_unlock): Likewise.
3492
f23b30e2
UD
3493 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
3494 * tst-cancel18.c: New file.
3495 * tst-cancelx18.c: New file.
3496
3497 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
3498 and tcdrain.
3499
3500 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
3501 * tst-cancel17.c: New file.
3502 * tst-cancelx17.c: New file.
3503
3504 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
3505 * sysdeps/unix/sysv/linux/sigwait.c: New file.
3506 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
3507
047aec8f
UD
3508 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
3509
bbde8527
UD
35102003-06-16 Jakub Jelinek <jakub@redhat.com>
3511
3512 * sysdeps/pthread/createthread.c (create_thread): Set
3513 header.multiple_threads unconditionally.
3514 * allocatestack.c (allocate_stack): Likewise.
3515 * descr.h (struct pthread): Add header.multiple_threads
3516 unconditionally.
3517 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
3518 Define for librt. #error if neither libpthread, libc nor librt.
3519 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
3520 Likewise.
3521 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
3522 CDISABLE): Likewise.
3523 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
3524 CDISABLE): Likewise.
3525 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
3526 CDISABLE): Likewise.
3527 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
3528 CDISABLE): Likewise. Access header.multiple_threads outside of
3529 libc and libpthread.
3530 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
3531 Likewise.
3532 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
3533 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
3534
26676450
UD
35352003-06-17 Ulrich Drepper <drepper@redhat.com>
3536
3537 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
3538 Also test early cancellation before the thread reaches the cancellation
3539 point.
3540
3541 * Makefile: Compile forward.c with exceptions.
3542
3543 * sysdeps/unix/sysv/linux/sleep.c: New file.
3544
301a6724
UD
35452003-06-16 Ulrich Drepper <drepper@redhat.com>
3546
0e0deb03
UD
3547 * Makefile: Add CFLAGS definition to compile function wrappers
3548 duplicated from libc with exceptions.
3549 * tst-cancel4.c: Also check cancellation handlers.
3550
301a6724
UD
3551 * Makefile: Add rules to build and run tst-cancel16 and
3552 tst-cancelx16. Add missing CFLAGS definitions.
3553 * tst-cancel16.c: New file.
3554 * tst-cancelx16.c: New file.
3555
7a114794
UD
35562003-06-15 Ulrich Drepper <drepper@redhat.com>
3557
452aea84
UD
3558 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3559 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
3560 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
3561 (DL_SYSINFO_IMPLEMENTATION): Likewise.
3562
7a114794
UD
3563 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
3564 (LIBC_CANCEL_RESET): Likewise.
3565 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
3566 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
3567 librt-cancellation.
3568 (CFLAGS-libcrt-cancellation.c): Define.
3569 * sysdeps/pthread/librt-cancellation.c: New file.
3570 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
3571 macros also when compiling librt.
3572 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3573 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3574 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3575 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3576 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3577 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3578 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3579
3580 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
3581 compat_timer_create.
3582
8ba1d429
UD
35832003-06-14 Ulrich Drepper <drepper@redhat.com>
3584
cc8fb6f3
UD
3585 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
3586
8ba1d429
UD
3587 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
3588 __register_atfork.
3589 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
3590 Add libc_hidden_def.
3591
d4f100e2
RM
35922003-06-13 Roland McGrath <roland@redhat.com>
3593
3594 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
3595 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
3596
dd9423a6
UD
35972003-06-11 Ulrich Drepper <drepper@redhat.com>
3598
3599 * allocatestack.c (queue_stack): Always inline.
3600 * ptreadhP.h (__do_cancel): Likewise.
3601
ed24330d
JJ
36022003-06-10 Jakub Jelinek <jakub@redhat.com>
3603
3604 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
3605 a typo.
3606
06120d79
UD
36072003-06-10 Ulrich Drepper <drepper@redhat.com>
3608
3609 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3610 (__pthread_cond_signal): Remove incorrect second addition for
3611 cond_lock!=0.
3612
b1720346
UD
36132003-06-09 Ulrich Drepper <drepper@redhat.com>
3614
5b318f85
UD
3615 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3616 (__pthread_cond_signal): Use correct futex pointer in
3617 __lll_mutex_lock_wait call.
3618
b1720346
UD
3619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3620 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
3621
3e36c37d
UD
36222003-06-08 Ulrich Drepper <drepper@redhat.com>
3623
ecf7955d
UD
3624 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
3625 cancelable.
ed24330d 3626 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
3627 Likewise.
3628
3e36c37d
UD
3629 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
3630 hand-written CFI generation code. Since ENTRY/END also initiated
3631 CFI frames this caused two CFI sets to be generated.
3632
7726edc2
UD
36332003-06-07 Ulrich Drepper <drepper@redhat.com>
3634
3635 * cleanup_routine.c: New file.
3636 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
3637 * sysdeps/pthread/pthread.h: Add support for fully exception-based
3638 cleanup handling.
3639 * Makefile (libpthread-routines): Add cleanup_routine.
3640 Add more CFLAGS variables to compile with exceptions. Add comments
3641 why which file needs unwind tables.
3642 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
3643 tests.
3644 * tst-cancelx1.c: New file.
3645 * tst-cancelx2.c: New file.
3646 * tst-cancelx3.c: New file.
3647 * tst-cancelx4.c: New file.
3648 * tst-cancelx5.c: New file.
3649 * tst-cancelx6.c: New file.
3650 * tst-cancelx7.c: New file.
3651 * tst-cancelx8.c: New file.
3652 * tst-cancelx9.c: New file.
3653 * tst-cancelx10.c: New file.
3654 * tst-cancelx11.c: New file.
3655 * tst-cancelx12.c: New file.
3656 * tst-cancelx13.c: New file.
3657 * tst-cancelx14.c: New file.
3658 * tst-cancelx15.c: New file.
3659 * tst-cleanupx0.c: New file.
3660 * tst-cleanupx0.expect: New file.
3661 * tst-cleanupx1.c: New file.
3662 * tst-cleanupx2.c: New file.
3663 * tst-cleanupx3.c: New file.
3664
3665 * tst-cleanup0.c: Make standard compliant.
3666 * tst-cleanup1.c: Likewise.
3667
3668 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
3669 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3670 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3671 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3672 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3673 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3674 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
3675 CLEANUP_JMP_BUF.
3676 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3677 * tst-cancel12.c: New file.
3678 * tst-cancel13.c: New file.
3679 * tst-cancel14.c: New file.
3680 * tst-cancel15.c: New file.
3681 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
3682 and tst-cancel15.
3683
3684 * tst-cancel1.c: Add some comments.
3685
3686 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
3687 timeout correctly.
3688
7a8a8e21
UD
36892003-06-06 Ulrich Drepper <drepper@redhat.com>
3690
3691 * Makefile (CFLAGS-pthread_cancel.c): Define.
3692
4ad0bbf4
UD
36932003-06-05 Ulrich Drepper <drepper@redhat.com>
3694
3695 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
3696 Change type of __writer element to int.
3697 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3698 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3699 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3700 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3701 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3702 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
3703 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3704 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
3705 Compare with TID to determine deadlocks.
3706 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
3707 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
3708 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
3709 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3710 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3711 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3712 Likewise.
3713 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3714 Likewise.
3715 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3716 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3717 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3718 Likewise.
3719 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3720 Likewise.
3721 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3722 * Makefile (tests): Add tst-rwlock12.
3723 * tst-rwlock12.c: New file.
3724
332faa96
JJ
37252003-06-05 Jakub Jelinek <jakub@redhat.com>
3726
3727 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
3728 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
3729 Remove bogus hidden_proto.
3730 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
3731 Likewise.
3732 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
3733 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
3734 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
3735 ___lll_mutex_timedlock): Likewise.
3736
29d9e2fd
UD
37372003-06-04 Ulrich Drepper <drepper@redhat.com>
3738
3739 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3740 (__pthread_cond_signal): Add some code to eventually handle
3741 cond_lock!=0.
3742
6f1acb30
UD
37432003-06-01 Ulrich Drepper <drepper@redhat.com>
3744
3745 * Makefile (tests): Add tst-exec4.
3746 (tst-exec4-ARGS): Define.
3747 * tst-exec4.c: New file.
3748
49b65043
UD
37492003-05-31 Ulrich Drepper <drepper@redhat.com>
3750
31195be2
UD
3751 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
3752 Also fail if tv_nsec < 0.
3753 (__lll_timedwait_tid): Likewise.
3754 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3755 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
3756 Likewise.
3757 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
3758 Likewise.
3759 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
3760 Likewise.
3761 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
3762 Likewise.
80b54217
UD
3763 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
3764 Likewise.
3765 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
3766 Likewise.
31195be2 3767
dcfc8224
UD
3768 * Makefile (tests): Add tst-sem8 and tst-sem9.
3769 * tst-sem8.c: New file.
3770 * tst-sem9.c: New file.
3771 * sem_open.c: Fix creation of in_use record if the file exists but
3772 no internal record.
3773
49b65043
UD
3774 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
3775 definitions.
3776
3777 * sysdeps/pthread/timer_create.c (timer_create): In case
3778 evp==NULL, assign timer ID to sival_ptr.
3779
3780 * descr.h (struct pthread_unwind_buf): Change type of prev element to
3781 struct pthread_unwind_buf *.
3782 (struct pthread): Likewise for cleanup_jmp_buf element.
3783
3784 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
3785 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
3786 * unwind.c (__pthread_unwind_next): Likewise.
3787
50794a45
UD
37882003-05-30 Ulrich Drepper <drepper@redhat.com>
3789
5d4f57bd
UD
3790 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3791 (lll_futex_timed_wait): Use int for futex value parameter.
3792 (lll_futex_wake): Likewise.
3793 (lll_futex_requeue): Likewise.
3794
3795 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
3796 Replace one memory operation with one register operation.
3797
3798 * tst-join4.c (do_test): Fix error message.
3799
7ab7ea33
UD
3800 * tst-rwlock6.c (do_test): Use correct format specifier.
3801
3802 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3803 (__lll_mutex_lock_wait): Replace one memory operation with one
3804 register operation.
3805 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
3806 (__lll_mutex_lock_wait): Likewise.
3807
50794a45
UD
3808 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3809 (__lll_mutex_cond_lock): Add one to value parameter of
3810 __lll_lock_wait to reflect reality in the futex syscall.
3811 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3812 (lll_mutex_cond_lock): Likewise.
3813
5a70784e
JJ
38142003-05-30 Jakub Jelinek <jakub@redhat.com>
3815
3816 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
3817 New function.
3818 (lll_mutex_cond_lock): Define.
3819
e7c5ac68
UD
38202003-05-29 Ulrich Drepper <drepper@redhat.com>
3821
586d1748
UD
3822 * Makefile (tests): Add tst-signal6.
3823 * tst-signal6.c: New file.
3824
b8ba4a27
UD
3825 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
3826 (__lll_mutex_unlock_force): New function
3827 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
3828
65d46efe
UD
3829 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3830 (__lll_mutex_unlock_force): New function.
3831 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
3832
3833 * tst-rwlock7.c (do_test): Use correct format specifier.
3834
e7c5ac68
UD
3835 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
3836 Find break parameter in correct asm argument.
3837
284bdc42
UD
38382003-05-27 Jakub Jelinek <jakub@redhat.com>
3839
3840 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
3841 Remove out4.
3842 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
3843 error occured.
3844 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3845 Add __mutex.
3846 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
3847 lll_futex_requeue, lll_mutex_unlock_force): Define.
3848
e7c5ac68
UD
38492003-05-30 Jakub Jelinek <jakub@redhat.com>
3850
3851 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3852 (pthread_cond_t): Add __mutex.
3853 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
3854 lll_futex_requeue, lll_mutex_unlock_force): Define.
3855
ea2630c6
UD
38562003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3857
3858 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
3859 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 3860 Add __mutex field.
ea2630c6
UD
3861 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
3862 Define.
3863 (lll_futex_wait, lll_futex_wake): Define.
3864 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
3865 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
3866 FUTEX_REQUEUE instead of FUTEX_WAIT.
3867 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3868 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
3869 mutex which was used in condvar structure. Call
3870 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
3871 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3872
3873 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
3874 include tcb-offsets.h. Read wakeup value in locked region.
3875 Use the value of gbr register as THREAD_ID.
3876 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3877 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3878 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3879
3880 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
3881 macros.
3882
5a77f150
UD
38832003-05-28 Ulrich Drepper <drepper@redhat.com>
3884
3885 * sysdeps/pthread/pthread_cond_broadcast.c
3886 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
3887
7661d9f7
UD
38882003-05-26 Ulrich Drepper <drepper@redhat.com>
3889
3890 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
3891 typo in register name.
3892 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
3893 correctly. Actually use requeue. Little optimization.
3894 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
3895 mutex address early. Handle cancellation state as 32-bit value.
3896 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3897 Remove unnecessary label.
3898
69431c9a
UD
38992003-05-25 Ulrich Drepper <drepper@redhat.com>
3900
3901 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
3902 instead of FUTEX_WAIT.
3903 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
3904 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3905 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3906 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3907 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3908 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
3909 used in condvar structure. Call __pthread_mutex_cond_lock instead
3910 of __pthread_mutex_lock_internal.
3911 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3912 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3913 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3914 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
3915 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3916 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3917 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
3918 Add pthread_mutex_cond_lock.
3919 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
3920 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
3921 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
3922 lll_mutex_cond_lock.
3923 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3924 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 3925 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 3926 Add __mutex field.
248a3490 3927 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
3928 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3929
3930 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
3931 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3932
3933 * pthreadP.h: Declare __pthread_mutex_cond_lock.
3934 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
3935 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
3936 macro don't define aliases.
3937
3938 * cancellation.c: Remove __pthread_enable_asynccancel_2.
3939 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
3940 * sysdeps/pthread/pthread_cond_timedwait.c: Use
3941 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
3942 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3943 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3944 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3945 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3946 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3947
fddfebbd
UD
39482003-05-17 Ulrich Drepper <drepper@redhat.com>
3949
3950 * sem_open.c: Fix one endless loop. Implement correct semantics
3951 wrt opening the same semaphore more then once.
3952 * sem_close.c: Adjust for sem_open change.
3953 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
3954 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
3955 * Makefile (tests): Add tst-sem7.
3956 * tst-sem7.c: New file.
3957
1eefffb0
RM
39582003-05-16 Roland McGrath <roland@redhat.com>
3959
3960 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
3961 uninitialized variable braino.
3962
6e66dc78
UD
39632003-05-16 Ulrich Drepper <drepper@redhat.com>
3964
23ae6451
UD
3965 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
3966 test for syscall availability.
3967
3968 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
3969 __no_posix_timers to -1 if the syscalls don't exist.
3970
7ac5b8e2
UD
3971 * pthread_join.c (pthread_join): Set tid field of the joined
3972 thread to -1. This isn't necessary but helps to recognize some
3973 error conditions with almost no cost.
3974
3975 * allocatestack.c (FREE_P): Also negative values indicate an
3976 unused stack.
3977
6e66dc78
UD
3978 * unwind.c: Include <unistd.h>.
3979
855dba3c
UD
39802003-05-14 Ulrich Drepper <drepper@redhat.com>
3981
3982 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
3983
81f3ac4c
UD
39842003-05-14 Jakub Jelinek <jakub@redhat.com>
3985
3986 * Makefile (crti-objs, crtn-objs): New variables.
3987 (omit-deps, extra-objs): Add crtn.
3988 ($(objpfx)libpthread.so): Depend on both crti and crtn
3989 and links to them in multidir.
3990 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
3991
7158eae4
UD
39922003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
3993
3994 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3995 (lll_mutex_unlock): Use atomic_exchange_rel.
3996
edf205d5
UD
39972003-05-11 Ulrich Drepper <drepper@redhat.com>
3998
3999 * cond-perf.c (cons): Add missing locking around setting of alldone.
4000
a3f979a7
UD
40012003-05-10 Ulrich Drepper <drepper@redhat.com>
4002
4003 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4004 related macros.
4005 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4006
880867a4
UD
40072003-05-09 Ulrich Drepper <drepper@redhat.com>
4008
949ec764
UD
4009 * tst-sem6.c: New file.
4010 * Makefile (tests): Add tst-sem6.
4011
4012 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4013 Use atomic_exchange_rel instead of atomic_exchange.
4014 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4015 Likewise.
4016
4017 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4018 code for lll_futex_wait and lll_futex_wake in static apps. Use
4019 vsyscall is possible.
4020
4021 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4022 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4023 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4024 pthread_setaffinity_np.
4025 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4026 and pthread_setaffinity_np.
4027 * Makefile (libpthread-routines): Add pthread_getaffinity and
4028 pthread_setaffinity.
4029
880867a4
UD
4030 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4031 use it in case mmap to allocate the stack fails.
4032 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4033 ARCH_MAP_FLAGS here.
4034 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4035 ARCH_RETRY_MMAP.
4036
92d83c72
UD
40372003-05-08 Ulrich Drepper <drepper@redhat.com>
4038
4039 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4040 handler implementation. It is now lockless in fork().
4041 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4042 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4043 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
4044 declare the __fork_*_lists.
4045 (struct fork_handler): Include pointers to all three functions.
4046 Add next, refcntr and need_signal elements.
4047 (__fork_handlers): New declaration.
4048 (__register_atfork_malloc): Remove declaration.
4049 (HAVE_register_atfork_malloc): Remove definition.
4050 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4051 __pthread_child_handler variable.
4052 (__libc_pthread_init): Use __register_atfork instead of explicitly
4053 adding to the list.
4054 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4055 and lll_futex_wake.
4056 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4057
4058 * unwind.c (unwind_cleanup): Print error message and then abort. This
4059 function must never be reached.
4060
4061 * cond-perf.c: New file.
4062
be4d8038
UD
40632003-05-05 Ulrich Drepper <drepper@redhat.com>
4064
4065 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4066
c6696b79
RM
40672003-05-04 Roland McGrath <roland@redhat.com>
4068
4069 * Makefile ($(objpfx)../libc.so): New target.
4070
7da168bf
UD
40712003-05-02 Ulrich Drepper <drepper@redhat.com>
4072
4073 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4074 (pthread_condattr_t): Size is only an int, don't use long for
4075 alignment.
4076 (pthread_mutexattr_t): Likewise.
7da168bf
UD
4077 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4078 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4079 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4080
9a7178d6
UD
40812003-05-01 Ulrich Drepper <drepper@redhat.com>
4082
4083 * sysdeps/i386/tls.h: Define THREAD_ID.
4084 * sysdeps/ia64/tls.h: Likewise.
4085 * sysdeps/powerpc/tls.h: Likewise.
4086 * sysdeps/s390/tls.h: Likewise.
4087 * sysdeps/sh/tls.h: Likewise.
4088 * sysdeps/x86_64/tls.h: Likewise.
4089 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4090 record ownership.
4091 * pthread_mutex_timedlock.c: Likewise.
4092 * pthread_mutex_trylock.c: Likewise.
4093 * pthread_mutex_unlock.c: Likewise.
4094 * pthread_rwlock_trywrlock.c: Likewise.
4095 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4096 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4097 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4098 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4099
4100 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4101 flag.
4102
a234e27d
UD
41032003-04-29 Jakub Jelinek <jakub@redhat.com>
4104
4105 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4106 (__SIZEOF_PTHREAD_COND_T): Define to 48.
4107 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4108 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4109 Make __align long long instead of long.
4110 (pthread_rwlock_t): Formatting.
4111 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4112 (pthread_rwlock_t): Formatting.
4113 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4114 (pthread_cond_t): Make __align long long instead of long.
4115 (pthread_rwlock_t): Move __flags field to the same position as in
4116 linuxthreads.
4117
f025c136
UD
41182003-04-30 Ulrich Drepper <drepper@redhat.com>
4119
4120 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4121 * tst-rwlock7.c (do_test): Likewise.
4122
7531ab9e
RM
41232003-04-26 Roland McGrath <roland@redhat.com>
4124
4125 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4126
299601a1
UD
41272003-04-22 Jakub Jelinek <jakub@redhat.com>
4128
299601a1
UD
4129 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4130 sizeof (struct pthread).
4131 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 4132 1 struct pthread.
299601a1
UD
4133 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
4134 to 0.
4135 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
4136 struct pthread.
4137 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
4138 to 32-bit bytes.
4139 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
4140 tcbp.
4141 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
4142 unneccessarily.
4143 (NO_TLS_OFFSET): Define.
299601a1
UD
4144 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
4145 add TLS_TCB_SIZE unnecessarily.
299601a1 4146
950094f8
RM
41472003-04-22 Roland McGrath <roland@redhat.com>
4148
4149 * Makeconfig (shared-thread-library): Reverse link order to work
4150 around linker bug.
4151
dc2f6455
UD
41522003-04-22 Ulrich Drepper <drepper@redhat.com>
4153
4154 * semaphore.h: Fix typo in comment.
4155
e7608d77
UD
41562003-04-21 Ulrich Drepper <drepper@redhat.com>
4157
6a87ee19
UD
4158 * sysdeps/pthread/sigfillset.c: New file.
4159
e7608d77
UD
4160 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
4161 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
4162 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
4163 * sysdeps/pthread/sigaction.c: Likewise.
4164 * sysdeps/pthread/sigprocmask.c: New file.
4165 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
4166 __SIGRTMIN+1.
4167 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4168 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
4169 in this case.
4170
0b3df49e
UD
41712003-04-19 Ulrich Drepper <drepper@redhat.com>
4172
58a7a325
UD
4173 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4174 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
4175
0b3df49e
UD
4176 * sysdeps/unix/sysv/linux/unregister-atfork.c
4177 (__unregister_atfork): Don't free memory not allocated dynamically.
4178
4179 * semaphore.h: Remove __THROW marker from cancellation points.
4180 * nptl/sysdeps/pthread/pthread.h: Likewise.
4181
7d74651e
UD
41822003-04-18 Ulrich Drepper <drepper@redhat.com>
4183
76a67697
UD
4184 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
4185 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
4186 __THROW.
4187
dd9d6538
JJ
41882003-04-16 Jakub Jelinek <jakub@redhat.com>
4189
4190 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
4191
4ab6f47c
RM
41922003-04-15 Roland McGrath <roland@redhat.com>
4193
4194 * forward.c (__pthread_unwind): Tweak to avoid warning.
4195
162434a6
UD
41962003-04-15 Ulrich Drepper <drepper@redhat.com>
4197
4198 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
4199
35909161
UD
42002003-04-14 Ulrich Drepper <drepper@redhat.com>
4201
18ddd3aa 4202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
4203 overflow CFA advance instructions.
4204 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4205
18a8e730
UD
42062003-04-14 Jakub Jelinek <jakub@redhat.com>
4207
bd4f43b4
UD
4208 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
4209 * sysdeps/i386/pthread_spin_lock.c: Likewise.
4210 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
4211 defined.
4212
18a8e730
UD
4213 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
4214 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
4215 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
4216 DW_CFA_advance_loc for .Laddl-.Lsubl.
4217
08c765fa
UD
42182003-04-13 Ulrich Drepper <drepper@redhat.com>
4219
18a8e730
UD
4220 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
4221 position-independent unwind data for static libraries.
4222 Add missing unwind info. Add comments.
4223
ad2be852
UD
4224 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
4225 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4226 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
4227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4228
177d1ad3
UD
42292003-04-12 Ulrich Drepper <drepper@redhat.com>
4230
08c765fa
UD
4231 * Makefile: Make sure all cancellation points are compiled with
4232 exception and asynchronous unwind tables.
4233
177d1ad3
UD
4234 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
4235 which mishandles loading of global object addresses in PIC.
4236 (THREAD_SETMEM_NC): Likewise.
4237
09d65ff3
UD
42382003-04-11 Ulrich Drepper <drepper@redhat.com>
4239
4240 * pthread.h: Define new data structure for cleanup buffer. Declare
4241 new cleanup handler interfaces.
4242 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
4243 (struct pthread): Add cleanup_jmp_buf pointer. Define
4244 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
4245 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
4246 it. Declare old cleanup handler installation functions.
4247 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
4248 handling.
4249 * cleanup_defer.c: Likewise.
4250 * cleanup_compat.c: New file. Old cleanup code.
4251 * cleanup_def_compat.c: New file. Old cleanup code.
4252 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
4253 if own thread descriptor.
4254 * unwind.c: New file.
4255 * forward.c: Add __pthread_unwind.
4256 * init.c (pthread_functions): Add __pthread_unwind.
4257 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
4258 Add ptr___pthread_unwind.
4259 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
4260 and unwind function.
4261 * Makefile (libpthread-routines): Add cleanup_compat,
4262 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
4263 table generation if necessary.
4264 * version.c: Record whether unwind support is compiled in.
4265 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
4266 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
4267 handler interfaces.
4268 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
4269 complication to generate unwind information for syscall wrappers.
68107ec0 4270 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
4271 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4272 __cleanup_fct_attribute.
4273
4274 * Makefile: Add rules to build and run tst-cleanup0.
4275 * tst-cleanup0.c: New file.
4276 * tst-cleanup0.expect: New file.
4277
4278 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
4279 caller. Optimize to avoid often unecessary local variable.
4280
0dc44b51
RM
42812003-04-11 Roland McGrath <roland@redhat.com>
4282
4283 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
4284 sets variable `multidir'; include that.
4285 (generated): Add it.
4286 ($(objpfx)$(multidir)/crti.o): New target.
4287 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
4288
84a80719
UD
42892003-04-11 Ulrich Drepper <drepper@redhat.com>
4290
4291 * tst-attr2.c (do_test): Add cast to avoid warning.
4292 * tst-mutex4.c (do_test): Likewise.
4293
88ff4759
UD
42942003-04-10 Ulrich Drepper <drepper@redhat.com>
4295
4296 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
4297 in child.
4298
b2041097
UD
42992003-04-09 Ulrich Drepper <drepper@redhat.com>
4300
4301 * Makefile (tests): Add tst-detach1.
4302 * tst-detach1.c: New file.
4303
f9657e88
UD
43042003-04-08 Ulrich Drepper <drepper@redhat.com>
4305
9afe4964
UD
4306 * sysdeps/pthread/pthread.h: Remove duplicate
4307 pthread_cleanup_{push,pop} definitions.
4308
f9657e88
UD
4309 * tst-barrier2.c: Eliminate warnings.
4310 * tst-cancel4.c: Likewise.
4311 * tst-cond4.c: Likewise.
4312 * tst-cond6.c: Likewise.
4313 * tst-detach1.c: Likewise.
4314 * tst-rwlock4.c: Likewise.
4315 * tst-rwlock6.c: Likewise.
4316 * tst-rwlock7.c: Likewise.
4317 * tst-sem3.c: Likewise.
4318 * tst-spin2.c: Likewise.
4319 * tst-umask1.c: Likewise.
4320
69b35e86
UD
43212003-04-07 Ulrich Drepper <drepper@redhat.com>
4322
4323 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
4324
c70ad7d7
UD
43252003-04-06 Ulrich Drepper <drepper@redhat.com>
4326
4327 * descr.h (struct pthread): Move cancelhandling member to the front.
4328
54e0138f
UD
43292003-04-05 Ulrich Drepper <drepper@redhat.com>
4330
4331 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
4332 malloc_parent, and malloc_child statically.
4333 (__register_atfork_malloc): New function.
4334 (free_mem): Don't free any of the malloc_* variables on the list.
4335 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
4336 Define HAVE_register_atfork_malloc.
4337
b22d701b
UD
43382003-04-04 Ulrich Drepper <drepper@redhat.com>
4339
4340 * sysdeps/pthread/createthread.c (create_thread): Add some more
4341 comments explaining when to set multiple_threads and when not.
4342
4343 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4344 THREAD_ATOMIC_BIT_SET if not already defined.
4345 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4346 THREAD_ATOMIC_BIT_SET:
4347 * sysdeps/x86_64/tls.h: Likewise.
4348 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
4349 THREAD_ATOMIC_CMPXCHG_VAL.
4350 (_pthread_cleanup_pop_restore): Likewise.
4351 * cancellation.c (__pthread_enable_asynccancel): Likewise.
4352 (__pthread_enable_asynccancel_2): Likewise.
4353 (__pthread_disable_asynccancel): Likewise.
4354 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
4355 (__libc_disable_asynccancel): Likewise.
4356 * init.c (sigcancel_handler): Likewise.
4357 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
4358 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
4359
86246935
UD
43602003-04-03 Ulrich Drepper <drepper@redhat.com>
4361
4362 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
4363 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
4364 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
4365 * Makefile (tests): Add tst-cancel11.
4366 * tst-cancel11.c: New file.
4367
6b4686a5
UD
43682003-04-01 Ulrich Drepper <drepper@redhat.com>
4369
4370 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
4371 round, not the first. Use specific_used flag instead of local
4372 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
4373 (__free_tcb): Don't call deallocate_tsd here.
4374 (start_thread): Call deallocate_tsd here.
4375 * pthread_setspecific.c: Set specific_used flag really only when
4376 needed.
0d73a73b 4377 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 4378 * tst-tsd3.c: New file.
0d73a73b 4379 * tst-tsd4.c: New file.
6b4686a5 4380
42b2395d
UD
43812003-03-31 Ulrich Drepper <drepper@redhat.com>
4382
211d90c5
UD
4383 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
4384 Use atomic_exchange_and_add instead of __lll_add.
4385 (__lll_mutex_timedlock): Likewise.
4386 Patch by Ian Wienand.
4387
43882003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
4389
4390 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4391 (SINGLE_THREAD_P): Fix typo.
4392 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
4393
43942003-03-31 Ulrich Drepper <drepper@redhat.com>
4395
4396 * Makefile (tests): Add tst-align.
4397 * tst-align.c: New file.
4398 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 4399
42b2395d
UD
4400 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
4401 function correctly.
4402
211d90c5
UD
4403 * tst-tsd2.c: Add casts to avoid warnings.
4404
163b180f
UD
44052003-03-30 Ulrich Drepper <drepper@redhat.com>
4406
4407 * descr.h (struct pthread): Move most often used elements to the front.
4408
ea473bad
UD
44092003-03-29 Ulrich Drepper <drepper@redhat.com>
4410
4411 * Makefile (libpthread-routines): Add pthread_atfork.
4412 (libpthread-static-only-routines): Add pthread_atfork.
4413
dd731d53
UD
44142003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4415
4416 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
4417 of TLS_DTV_AT_TP.
4418 (INSTALL_DTV): Add parens.
4419 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
4420 Use passed descr instead of THREAD_SELF.
4421 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
4422 (__lll_mutex_timedlock_wait): Correct expected value after
4423 spurious wakeup.
4424 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
4425 Release lock before waking up the waiters.
4426 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
4427 criteria. Reorderstruct passed to cleanup handler. Fix
4428 handling of cancellation and failung pthread_mutex_unlock call.
4429 Use __pthread_enable_asynccancel_2 instead of
4430 __pthread_enable_asynccancel.
4431 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4432 Return result of lock re-get if it fails.
4433 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
4434 for __pthread_cleanup_push.
4435 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
4436 completely broken rwlock implementation.
4437 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4438 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4439 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4440 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4441 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4442 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
4443 versioned_symbol macro.
4444 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
4445 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
4446
c75d02f0
UD
44472003-03-27 Ulrich Drepper <drepper@redhat.com>
4448
5f5004df
UD
4449 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
4450 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
4451 and __helper_tid.
4452 (struct timer): Remove th and bar field.
4453 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
4454 debugging code. Create only one helper thread.
4455 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
4456 helper thread.
4457 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4458 Renamed. Define statically. Use thread info from siginfo.
4459 (__helper_once): New variable.
4460 (__helper_tid): New variable.
4461 (__reset_helper_control): New function.
4462 (__start_helper_thread): New function.
4463
18d009ca
UD
4464 * pthread_create.c (start_thread): Don't use setjmp inside
4465 __builtin_expect to work around gcc bug.
4466
c75d02f0
UD
4467 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
4468 timer_delete syscall fails, but not with ENOSYS, set
4469 __no_posix_timers.
4470
4471 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
4472 (timer_settime): Fix typo.
28cf3058
UD
4473 * sysdeps/unix/sysv/linux/timer_getoverr.c
4474 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 4475
049ac259
JJ
44762003-03-27 Jakub Jelinek <jakub@redhat.com>
4477
4478 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
4479 offset of cleanupbuf.__prev.
4480
f93d39dd
JJ
44812003-03-26 Jakub Jelinek <jakub@redhat.com>
4482
4483 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
4484 of included file.
4485
f064e4c5
UD
44862003-03-26 Ulrich Drepper <drepper@redhat.com>
4487
4488 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
4489 NULL provide default definition to syscall.
4490
83e886a3
RM
44912003-03-25 Roland McGrath <roland@redhat.com>
4492
4493 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
4494 (timer_id2ptr): Fix typo.
4495
09402f5b
UD
44962003-03-25 Ulrich Drepper <drepper@redhat.com>
4497
4498 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
4499 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
4500 * sysdeps/ia64/pthreaddef.h: Likewise.
4501 * sysdeps/powerpc/pthreaddef.h: Likewise.
4502 * sysdeps/s390/pthreaddef.h: Likewise.
4503 * sysdeps/sh/pthreaddef.h: Likewise.
4504 * sysdeps/x86_64/pthreaddef.h: Likewise.
4505 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
4506 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
4507 being changed.
4508 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4509 SIGTIMER is not unblocked.
4510 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
4511 RT signal taken.
4512 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
4513 be send.
4514 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
4515 pass pointer through as ID.
4516 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
4517 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
4518 * sysdeps/unix/sysv/linux/timer_create.c: New file.
4519 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
4520 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
4521 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
4522 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
4523 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
4524 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
4525 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
4526 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
4527 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
4528 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
4529 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
4530 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
4531 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
4532 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
4533 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
4534 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
4535 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
4536 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
4537 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
4538 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
4539 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
4540 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
4541 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
4542 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
4543 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
4544 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
4545 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
4546 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
4547 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
4548 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
4549
4550 * pthreadP.h: Remove FRAME_LEFT definition.
4551 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
4552 already left frame. Programs which have this problem are not POSIX
4553 compliant.
4554 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
4555
5e826ab5
UD
45562003-03-24 Ulrich Drepper <drepper@redhat.com>
4557
4558 * sysdeps/pthread/tst-timer.c: Check return values of the
4559 functions we test.
4560
b910f788
RM
45612003-03-23 Roland McGrath <roland@redhat.com>
4562
3045a1fe
RM
4563 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
4564 * tst-tls3mod.c: Likewise.
4565 * tst-tls1.c: Likewise.
4566 * tst-tls2.c: Likewise.
4567
85047fe3
RM
4568 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
4569 undefined behavior.
4570
b910f788
RM
4571 * tst-join5.c (tf1, tf2): Add a cast.
4572
4573 * Makeconfig (includes): Append -I$(..)nptl to this variable.
4574
4575 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
4576 Don't test anything.
4577 * tst-cond4.c: Likewise.
4578 * tst-cond6.c: Likewise.
4579 * tst-flock2.c: Likewise.
4580 * tst-mutex4.c: Likewise.
4581 * tst-rwlock4.c: Likewise.
4582 * tst-signal1.c: Likewise.
4583 * tst-spin2.c: Likewise.
4584 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
4585
4586 * tst-mutex4.c: Use test-skeleton.c.
4587 * tst-spin2.c: Likewise.
4588 * tst-sysconf.c: Likewise.
4589 * tst-barrier2.c: Likewise.
4590 * tst-cond4.c: Likewise.
4591 * tst-cond6.c: Likewise.
4592 * tst-rwlock4.c: Likewise.
4593 * tst-unload.c: Likewise.
4594 * tst-flock2.c (do_test): Use return instead of exit.
4595
4baa087a
RM
45962003-03-22 Jakub Jelinek <jakub@redhat.com>
4597
4598 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
4599
5a3ab2fc
UD
46002003-03-21 Ulrich Drepper <drepper@redhat.com>
4601
9f07eae2
UD
4602 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4603 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
4604 instead of __lll_compare_and_swap.
4605 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4606 Likewise.
4607 Removed definition if __lll_compare_and_swap.
4608
5a3ab2fc
UD
4609 * cancellation.c: Adjust for new form of compare&exchange macros.
4610 * cleanup_defer.c: Likewise.
4611 * init.c: Likewise.
4612 * libc-cancellation.c: Likewise.
4613 * old_pthread_cond_broadcast.c: Likewise.
4614 * old_pthread_cond_signal.c: Likewise.
4615 * old_pthread_cond_timedwait.c: Likewise.
4616 * old_pthread_cond_wait.c: Likewise.
4617 * pthread_cancel.c: Likewise.
4618 * pthread_create.c: Likewise.
4619 * pthread_detach.c: Likewise.
4620 * pthread_join.c: Likewise.
4621 * pthread_key_delete.c: Likewise.
4622 * pthread_setcancelstate.c: Likewise.
4623 * pthread_setcanceltype.c: Likewise.
4624 * pthread_timedjoin.c: Likewise.
4625 * pthread_tryjoin.c: Likewise.
4626 * sysdeps/pthread/createthread.c: Likewise.
4627
b1aea098
UD
46282003-03-20 Ulrich Drepper <drepper@redhat.com>
4629
4630 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 4631 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
4632 definitions. Replace uses with calls to atomic_* functions.
4633 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4634 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
4635 __lll_test_and_set calls with atomic_exchange_and_add and
4636 atomic_exchange calls respectively.
4637 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4638 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4639 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
4640 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4641 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
4642 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
4643 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
4644
4645 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
4646 returns the old value.
4647
100a7100
RM
46482003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
4649
4650 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
4651 int for variable OLDVAL and correct inline assembler contraint.
4652 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
4653 type int for variable OLD.
4654
4655 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
4656 only for s390-32.
4657 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4658 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
4659 instead of multiple_threads field in the TCB.
4660
95767b36
UD
46612003-03-19 Ulrich Drepper <drepper@redhat.com>
4662
4009bf40
UD
4663 * sysdeps/i386/i686/bits/atomic.h: Removed.
4664 * sysdeps/i386/i586/bits/atomic.h: Removed.
4665 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
4666 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
4667 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
4668 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
4669 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
4670 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
4671 * atomic.h: Removed. Moved to glibc.
4672
560a784f
UD
4673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
4674 support for clock selection.
4675
95767b36
UD
4676 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
4677 signalling waiters.
4678
043ad426
RM
46792003-03-18 Roland McGrath <roland@redhat.com>
4680
94659495
RM
4681 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
4682 Add __lll_rel_instr first. Add memory clobber.
4683 (lll_mutex_unlock): Use __lll_test_and_set.
4684 From Paul Mackerras <paulus@samba.org>.
4685
4686 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
4687 unconditionally.
4688 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4689 (SINGLE_THREAD_P): Add `header.' prefix.
4690 From Paul Mackerras <paulus@samba.org>.
4691
043ad426
RM
4692 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
4693 pthread_timedjoin_np to ...
4694 (libpthread: GLIBC_2.3.3): ... here.
4695 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
4696
4697 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4698 Avoid shadowing VAL variable.
4699
4700 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
4701 New macro.
4702
86a9ee5e
UD
47032003-03-18 Ulrich Drepper <drepper@redhat.com>
4704
ac9e0aa1
UD
4705 * Makefile (tests): Add tst-cond11.
4706 * tst-cond11.c: New file.
4707
a14b373c
UD
4708 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
4709 struct passed to cleanup handler to eliminate one more
4710 instruction.
4711 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4712
24a49f38
UD
4713 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4714 (pthrad_cond_t): Replace __unused field with __clock.
4715
4716 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
4717 waken all waiters in cleanup handler.
4718 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4719 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4720
86a9ee5e
UD
4721 * pthread_condattr_getclock.c: New file.
4722 * pthread_condattr_setclock.c: New file.
4723 * sysdeps/pthread/pthread.h: Declare these new functions.
4724 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
4725 * Makefile (libpthread-routines): Add the new functions.
4726 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
4727 Renamed field to value. Document use of the bits.
4728 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
4729 change.
4730 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 4731 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
4732 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
4733 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4734 Add __clock field.
4735 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4736 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4737 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4738 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4739 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4740 Implement clock selection.
4741 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4742 * pthread-errnos.sym: Add ENOSYS.
4743 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4744 _POSIX_CLOCK_SELECTION.
4745 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4746
4747 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
4748 invalid .size directive.
4749
98054a05
RM
47502003-03-17 Roland McGrath <roland@redhat.com>
4751
4752 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4753 Formatting tweaks.
4754
001bea71
UD
47552003-03-17 Ulrich Drepper <drepper@redhat.com>
4756
4773086e
UD
4757 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
4758 Use __lll_add instead of spelling it out. Use protected symbol names.
4759 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
4760 Use __lll_add.
4761 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
4762 Renamed from lll_compare_and_swap. Use new name where necessary.
4763 (__lll_add): Defined.
4764 (__lll_dec_if_positive): Defined.
4765 (__lll_test_and_set): Defined.
4766 * sysdeps/ia64/pthread_spin_init.c: Removed.
4767 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
4768 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
4769 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
4770 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
4771 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
4772 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
4773 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
4774 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
4775 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4776 __sync_lock_release_si.
4777 Patch by Jakub Jelinek.
4778
4779 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4780 Fix timeout handling.
4781 (__lll_timedwait_tid): Likewise.
4782 (lll_unlock_wake_cb): Wake up other waiters if necessary.
4783 Patch by Jakub Jelinek.
4784
4785 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
4786
de4471dd
RM
47872003-03-17 Roland McGrath <roland@redhat.com>
4788
4789 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
4790 * sysdeps/pthread/pthread_spin_init.c: New file.
4791 * sysdeps/pthread/pthread_spin_unlock.c: New file.
4792 * sysdeps/powerpc/Makefile: New file.
4793 * sysdeps/powerpc/pthread_spin_lock.c: New file.
4794 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
4795 * sysdeps/powerpc/pthreaddef.h: New file.
4796 * sysdeps/powerpc/tcb-offsets.sym: New file.
4797 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
4798 * sysdeps/powerpc/tls.h: New file.
4799 * sysdeps/powerpc/bits/atomic.h: New file.
4800 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
4801 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
4802 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 4803
de4471dd
RM
4804 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
4805 * sysdeps/unix/sysv/linux/sem_post.c: New file.
4806 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
4807 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
4808 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
4809 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
4810 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
4811 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
4812 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
4813 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
4814 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
4815 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
4816 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
4817 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
4818 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
4819
4820 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
4821 not gettimeofday.
4822 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
4823 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
4824 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
4825 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
4826 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4827
5778033f
UD
48282003-03-17 Ulrich Drepper <drepper@redhat.com>
4829
4830 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
4831 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4832 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4834 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
4835
796038f8
RM
48362003-03-16 Roland McGrath <roland@redhat.com>
4837
4838 * tst-fork4.c: Include <string.h>.
4839 * tst-signal2.c: Likewise.
4840 * tst-mutex5.c (do_test): exit -> return.
4841 * tst-mutex2.c: Include <stdlib.h>.
4842
51d0678c
UD
48432003-03-16 Ulrich Drepper <drepper@redhat.com>
4844
5778033f
UD
4845 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4846 (__lll_mutex_timedlock_wait): Correct expected value after
4847 spurious wakeup. Otherwise we would never wait again.
4848
b6e2f87a
UD
4849 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
4850 zone versus inline asm stupidity. Use correct instructions.
4851
51d0678c
UD
4852 * tst-rwlock6.c: Add some more status output.
4853
8112cc70
RM
48542003-03-15 Roland McGrath <roland@redhat.com>
4855
4856 * sysdeps/pthread/configure.in: New file.
4857 * sysdeps/pthread/configure: New file (generated).
4858
49773c19
UD
48592003-03-15 Ulrich Drepper <drepper@redhat.com>
4860
4861 * allocatestack.c (allocate_stack): Store the exact stack size of
4862 user allocated stacks.
4863
eec0ca9f
JJ
48642003-03-15 Jakub Jelinek <jakub@redhat.com>
4865
4866 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4867 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
4868 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
4869 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
4870 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4871 Use `header.' prefix.
4872 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
4873
a87731e2
UD
48742003-03-15 Ulrich Drepper <drepper@redhat.com>
4875
4876 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
4877 __builtin_frame_address, use stack pointer.
4878
4879 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
4880 instead of __builtin_frame_pointer.
4881
e22a221d
UD
48822003-03-14 Ulrich Drepper <drepper@redhat.com>
4883
92ed3daf
UD
4884 * tst-basic1.c (do_test): Add cast to avoid warning.
4885 * tst-basic2.c (do_test): Likewise.
4886
9b89567d
UD
4887 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
4888 amount of stack correction.
4889
e22a221d
UD
4890 * tst-fork4.c: Use test-skeleton.c.
4891
2e49caba
RM
48922003-03-14 Roland McGrath <roland@redhat.com>
4893
4894 * init.c: Fix typo "#eli" for "#else".
4895
415ef7d8
RM
48962003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
4897
4898 * allocatestack.c (__stack_user): Use hidden_data_def.
4899 * pthread_create.c (__pthread_keys): Likewise.
4900
4901 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
4902
52287505
RM
49032003-03-14 Roland McGrath <roland@redhat.com>
4904
415ef7d8
RM
4905 * tst-fork4.c: New file.
4906 * Makefile (tests): Add it.
4907
52287505
RM
4908 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
4909 we always define the padding space.
4910 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
4911 stopped supporting its own extensions fully.
4912 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
4913 struct also called `header', so `header.multiple_threads' is the field
4914 name to use on all machines.
4915 * allocatestack.c (allocate_stack): Use `header.' prefix.
4916 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4917 * pthread_create.c (__pthread_create_2_1): Likewise.
4918 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
4919 (THREAD_SELF): Likewise.
4920 * sysdeps/x86_64/tls.h: Likewise.
4921 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
4922 (SINGLE_THREAD_P): Likewise.
4923 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
4924 (SINGLE_THREAD_P): Likewise.
4925 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4926 (SINGLE_THREAD_P): Likewise.
4927
4928 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
4929 value directly.
4930
c44bf9aa
UD
49312003-03-14 Ulrich Drepper <drepper@redhat.com>
4932
e22a221d
UD
4933 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
4934 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
4935
0eb18281
UD
4936 * pthread_create.c (start_thread): setjmp is expected to return 0.
4937
c44bf9aa
UD
4938 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
4939 (THREAD_GETMEM_NC): Likewise.
4940
564cd8b6
UD
49412003-03-13 Ulrich Drepper <drepper@redhat.com>
4942
4943 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
4944 and the size of the stack which must be allocated is a multiple,
4945 allocate one more page.
4946 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
4947 MULTI_PAGE_ALIASING.
4948
6461e577
RM
49492003-03-13 Roland McGrath <roland@redhat.com>
4950
4951 * pthread_create.c (start_thread): Set EXITING_BIT after the
4952 event-reporting (and destructors), not before.
4953
b5ec5617
UD
49542003-03-13 Jakub Jelinek <jakub@redhat.com>
4955
6461e577
RM
4956 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
4957 lll_futex_wake): Declare register variables as long int instead of
4958 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
4959 Make syscall arguments clobbered by the syscall.
4960 (lll_futex_wait): Define using lll_futex_timed_wait.
4961
4962 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
4963 to void *.
4964
4965 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
4966 PPID if [! NDEBUG].
4967
4968 * allocatestack.c (nptl_ncreated): Only declare if
4969 COLORING_INCREMENT != 0.
4970
4971 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
4972 (__libc_enable_asynccancel_2): Remove prototype.
4973
b5ec5617
UD
4974 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
4975 ctid to match kernel.
4976
d0369fb8
UD
49772003-03-12 Ulrich Drepper <drepper@redhat.com>
4978
7588880f
UD
4979 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
4980 libc_multiple_threads.
4981 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
4982 __libc_multiple_threads to...
4983 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
4984
4985 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
4986 versioning.
4987 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4988 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4989
4990 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
4991 (__pthread_once_internal): Define.
4992
4993 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
4994 macros instead of .symver directly.
4995 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4996 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4997
d0369fb8
UD
4998 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
4999 * sysdeps/x86_64/tcb-offsets.sym: New file.
5000 * sysdeps/x86_64/Makefile: New file.
5001
5002 * sysdeps/i386/tcb-offsets.sym: Add SELF.
5003 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5004 to access own pthread_t in TCB.
5005 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5006 Likewise.
5007 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5008 Likewise.
5009 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5010
0bb2ac85
RM
50112003-03-12 Roland McGrath <roland@redhat.com>
5012
5013 * pthread-errnos.sym: New file.
5014 * Makefile (gen-as-const-headers): New variable, list that file.
5015 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5016 header <pthread-errnos.h> instead of defining errno values here.
5017 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5018 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5019 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5020 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5021 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5022 Likewise.
5023 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5024 Likewise.
5025 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5026 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5027 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5028 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5029 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5030 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5031 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5032 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5033 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5034 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5035 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5036 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5037 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5038 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5039 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5040 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5041 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5042 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5043 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5044 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5045 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5046 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5047 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5048 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5049 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5050 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5051 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5052
5053 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5054 CLONE_CHILD_SETTID worked.
5055
35e148cb
UD
50562003-03-12 Ulrich Drepper <drepper@redhat.com>
5057
d0369fb8
UD
5058 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5059 file.
5060 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5061 file.
5062
5063 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5064 (pthread_cond_t): Add padding.
5065
da49194d
UD
5066 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5067 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5068 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5069
35e148cb
UD
5070 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5071 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5072 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5073 (__pthread_rwlock_timedrdlock): Likewise.
5074 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5075 (__pthread_rwlock_wrlock): Likewise.
5076 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5077 (__pthread_rwlock_rdlock): Likewise.
5078
5079 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5080
5081 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5082 result of lock re-get if it fails.
5083
3e976b96
UD
50842003-03-11 Ulrich Drepper <drepper@redhat.com>
5085
5a03acfe
UD
5086 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5087 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5088 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5090 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5091 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5092 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5093 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5094 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5095 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5096
5097 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5098 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5099
5100 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5101 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5102 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5103 (create_thread): Likewise.
5104 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5105 * init.c (__pthread_initialize_minimal_internal): Initialize
5106 __libc_multiple_threads_ptr if necessary.
5107 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
5108 __pthread_multiple_threads and __libc_multiple_threads_ptr.
5109 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5110 __libc_multiple_threads.
5111 (__libc_pthread_init): Return pointer to __libc_pthread_init if
5112 necessary.
5113
5114 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5115 (THREAD_SETMEM_NC): Likewise.
5116
5117 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5118 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5119 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5120 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5121
5122 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5123 Eliminate one entire instruction.
5124
32a589b1
UD
5125 * cancellation.c (__pthread_enable_asynccancel_2): New function.
5126 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5127 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5128 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5129 instead of __pthread_enable_asynccancel.
5130 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5131 (__pthread_cond_wait): Likewise.
5132 * sysdeps/pthread/pthread_cond_timedwait.c
5133 (__pthread_cond_timedwait): Likewise.
5134 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5135
3e976b96
UD
5136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5137 (__condvar_cleanup): Wake up all waiters in case we got signaled
5138 after being woken up but before disabling asynchronous
5139 cancellation.
5140 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5142 (__condvar_cleanup): Likewise.
5143
5144 * init.c (__NR_set_tid_address): If already defined, don't redefine.
5145 Make it an error if architecture has no #if case. Add x86-64.
5146
5147 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
5148 pt-initfini.s generation.
5149
5150 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
5151 (TLS_INIT_TP): Fix typo.
5152
6c477888
UD
51532003-03-11 Jakub Jelinek <jakub@redhat.com>
5154
5155 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
5156 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
5157
5158 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
5159 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5160 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
5161 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
5162 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
5163 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5164 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5165 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5166
ea694823
UD
51672003-03-11 Ulrich Drepper <drepper@redhat.com>
5168
6c477888
UD
5169 * sysdeps/pthread/pthread_cond_timedwait.c
5170 (__pthread_cond_timedwait): Return the result of the final
5171 locking. If it succeeds, the regular function return value.
5172
5173 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
5174 Return result of the final locking.
5175 * version.c (__nptl_main): Work around problems with the strange
5176 INTERNAL_SYSCALL macro on ppc32.
5177 * init.c (__pthread_initialize_minimal_internal): Unblock
5178 SIGCANCEL in case the parent blocked it.
5179 Reported by Paul Mackerras <paulus@samba.org>.
5180
ea694823
UD
5181 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
5182 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
5183 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
5184
b33e6163
RM
51852003-03-11 Jakub Jelinek <jakub@redhat.com>
5186
5187 * sysdeps/pthread/pthread_cond_timedwait.c
5188 (__pthread_cond_timedwait): Unlock and fail if
5189 __pthread_mutex_unlock_internal failed.
5190
5191 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
5192 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
5193 Use ARCH_CLONE.
5194 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
5195 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
5196 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
5197 ALLOCATE_STACK): New macros.
5198 (TLS_TPADJ): New macro.
5199 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
5200 (allocate_stack): Handle TLS_DTV_AT_TP and
5201 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
5202 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
5203 Don't set PD->self.
5204 * init.c [__ia64__] (__NR_set_tid_address): Define.
5205
5206 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
5207 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
5208 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
5209 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
5210 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
5211 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
5212 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
5213 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
5214 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
5215 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
5216 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
5217 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
5218 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
5219 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
5220 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
5221 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
5222 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
5223 * sysdeps/ia64/bits/atomic.h: New file.
5224 * sysdeps/ia64/Makefile: New file.
5225 * sysdeps/ia64/pthread_spin_init.c: New file.
5226 * sysdeps/ia64/pthread_spin_lock.c: New file.
5227 * sysdeps/ia64/pthread_spin_trylock.c: New file.
5228 * sysdeps/ia64/pthread_spin_unlock.c: New file.
5229 * sysdeps/ia64/pthreaddef.h: New file.
5230 * sysdeps/ia64/tcb-offsets.sym: New file.
5231 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
5232 * sysdeps/ia64/tls.h: New file.
5233
5234 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
5235 to syscall instead of no arguments.
5236
2b30b2e5
UD
52372003-03-10 Ulrich Drepper <drepper@redhat.com>
5238
db5f2fc9
UD
5239 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
5240 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
5241 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
5242 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
5243
5244 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
5245 unused code.
5246
6a4263e3
UD
5247 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
5248
3de7c2a9
UD
5249 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5250 lowlevelbarrier.sym.
5251 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
5252 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
5253 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 5254 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 5255
2a544d82
UD
5256 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5257 (__lll_mutex_lock_wait): Reverse order of first two parameters.
5258 (__lll_mutex_timedlock_wait): Likewise.
5259 (lll_mutex_lock): Adjust asm for that.
5260 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
5261 (lll_lock): Adjust asm for operand order change.
5262 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
5263 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
5264
ec06436c
UD
5265 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
5266 Reverse order of parameters.
5267 (__lll_timedwait_tid): Remove regparms attribute.
5268 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
5269 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
5270
3273832c
UD
5271 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5272 (__lll_timedwait_tid): Remove one unnecessary instruction.
5273
51f32ab8
UD
5274 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
5275 __lll_mutex_timedlock_wait only for NOT_IN_libc.
5276 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
5277 lowlevelmutex.S.
5278
5279 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
5280 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
5281 for NOT_IN_libc.
5282 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
5283 lowlevellock.S.
5284
fad48d9e
UD
5285 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
5286 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
5287 for libc.so.
5288 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
5289 define LOCK here (if UP is not defined). The actual code is in
5290 lowlevelmutex.S.
5291
9356d063
UD
5292 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
5293 LOCK is already defined. Don't define lll_unlock_wake_cb and
5294 __lll_timedwait_tid for libc.so.
5295 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
5296 define LOCK here (if UP is not defined). The actual code is in
5297 lowlevellock.S.
5298
ebf0cbc5 5299 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
5300 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
5301 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
5302 instead of lowlevelsem.h.
5303 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5304 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5305 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 5306
c915e5ad
UD
5307 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5308 lowlevelrwlock.sym.
5309 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
5310 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 5311 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 5312
4c3c2e8a
UD
5313 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
5314 register loading.
5315 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
5316 last changed. D'oh.
5317
2b30b2e5
UD
5318 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
5319
5320 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
5321 of __libc_locking_needed.
5322 (lll_trylock): Initialize %eax to zero.
5323
2b30b2e5
UD
5324 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
5325 pthread_cond_t definition.
5326
e48f9638
RM
53272003-03-10 Roland McGrath <roland@redhat.com>
5328
5329 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
5330 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
5331 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
5332 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
5333 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
5334
5335 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
5336 Instead of setting PD->multiple_threads, set globals
5337 __pthread_multiple_threads and __libc_multiple_threads.
5338 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5339 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
5340 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
5341
5342 * descr.h (struct pthread): Conditionalize first member on
5343 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
5344 containing an anonymous tcbhead_t. Move `list' member out.
5345 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
5346 * allocatestack.c: Remove use of `header.data.' prefix.
5347 * pthread_create.c: Likewise.
5348 * init.c (__pthread_initialize_minimal_internal): Likewise.
5349 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5350 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
5351 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
5352 * sysdeps/x86_64/tls.h: Likewise.
5353 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5354 (SINGLE_THREAD_P): Likewise.
5355 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5356 (SINGLE_THREAD_P): Likewise.
5357 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
5358 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
5359
c37cae9e
UD
53602003-03-09 Ulrich Drepper <drepper@redhat.com>
5361
d38c777e
RM
5362 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
5363
7b44a5e0 5364 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 5365 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 5366
c2e5e085
UD
5367 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
5368 leftovers from the ia32 code.
5369
5370 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
5371 memory load.
5372 (clear_once_control): Don't load %esi.
5373
5374 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
5375 handling.
5376
5377 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
5378
cd4b2a55
UD
5379 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
5380 * sysdeps/unix/sysv/linux/createthread.c: ...here.
5381
c37cae9e
UD
5382 * Makefile (tests): Add tst-cond10.
5383 * tst-cond10.c: New file.
5384
d130a341
UD
53852003-03-08 Ulrich Drepper <drepper@redhat.com>
5386
ccf1d573
UD
5387 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
5388 * tst-signal3.c (do_test): Likewise.
5389 * tst-sem5.c (do_test): Likewise.
5390 * tst-kill6.c (do_test): Likewise.
5391 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
5392
5393 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
5394 of inc/dec.
5395 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
5396 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
5397 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5398 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5399 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5400 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5401 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5402 Likewise.
5403 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5404 Likewise.
5405 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5406 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5407 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5408 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5409 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5410 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5411 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5412 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5413
d130a341
UD
5414 * allocatestack.c (allocate_stack): If mprotect() fails free the
5415 TLS memory.
5416
bc6389ad
UD
54172003-03-07 Ulrich Drepper <drepper@redhat.com>
5418
41d4d223
UD
5419 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
5420
5421 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
5422 lll_wake_tid. This was used only to work around kernel limits in
5423 the early days.
5424 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5425 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
5426 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5427 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
5428
bc6389ad
UD
5429 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
5430 (__pthread_initialize_minimal_internal): Change initialization of
5431 __static_tls_align_m1 appropriately.
5432 * pthreadP.h (__static_tls_align_m1): Renamed from
5433 __static_tls_align.
5434 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
5435 instead of __static_tls_align-1.
5436
cc775edf
UD
54372003-03-04 Ulrich Drepper <drepper@redhat.com>
5438
0de28d5c 5439 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 5440
518b5308
UD
5441 * pthread_create.c: Define __pthread_keys using nocommon
5442 attribute, not by placing it explicitly in bss.
5443 Remove DEFINE_DEALLOC definition. Not needed anymore.
5444
5445 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
5446 Use it in mmap call to allocate stacks.
5447
5448 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
5449
cc775edf
UD
5450 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
5451 result of the thread function.
5452
4f6f0a8f
UD
54532003-03-03 Ulrich Drepper <drepper@redhat.com>
5454
f04a2721
UD
5455 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
5456 version is just fine.
5457
4f6f0a8f
UD
5458 * sysdeps/unix/sysv/linux/libc_pthread_init.c
5459 (__pthread_child_handler): Renamed from pthread_child_handler,
5460 exported, and marked hidden. Change all users.
5461 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
5462 free __pthread_child_handler from child list.
5463
7ce5c164
UD
54642003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
5465
5466 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
5467
5468 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5469 Fix handling of cancellation and failing pthread_mutex_unlock call.
5470 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5471 (__pthread_cond_wait): Likewise.
5472
5473 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5474 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
5475 lll_futex_timed_wait call.
5476 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5477 (pthread_rwlock_timedwrlock): Likewise.
5478
5479 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
5480 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
5481 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
5482
5483 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
5484 check of lll_futex_wake return value.
5485
ea6a015b
RM
54862003-03-03 Roland McGrath <roland@redhat.com>
5487
5488 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
5489
5490 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5491 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
5492 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
5493
4adacf57
UD
54942003-03-02 Ulrich Drepper <drepper@redhat.com>
5495
1be3d664
UD
5496 * sysdeps/pthread/timer_create.c (timer_create): Return correct
5497 error for CPU clocks.
5498
885bafa1
UD
5499 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5500 _POSIX_MONOTONIC_CLOCK.
5501 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5502
4adacf57
UD
5503 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
5504 recent kernels.
5505
86bfff4d
UD
55062003-03-01 Ulrich Drepper <drepper@redhat.com>
5507
5508 * descr.h (struct pthread): Move cleanup field to the front.
5509
d1149385
RM
55102003-03-01 Roland McGrath <roland@redhat.com>
5511
5512 * sem_open.c (sem_open): Braino fix.
5513
bd8bb78b
UD
55142003-03-01 Ulrich Drepper <drepper@redhat.com>
5515
748bec08
UD
5516 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
5517 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
5518 __pthread_cleanup_pop functionality.
5519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5520
bd8bb78b
UD
5521 * descr.h (struct pthread): Move tid field to the front now that
5522 it is often used.
5523
5524 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
5525 (__lll_mutex_timedlock_wait): Remove.
5526 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
5527 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5528 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
5529 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5530 (lll_unlock_wake_cb): Don't save and restore %esi.
5531 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
5532 %esi.
5533 (__lll_timedwait_tid): Add alignment.
5534 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
5535 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
5536 %esi.
5537 (__lll_timedwait_tid): Removed.
5538 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5539 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
5540 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5541 (pthread_barrier_wait): Don't save, load, and restore %esi for
5542 last thread.
5543 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5544 (__pthread_cond_signal): Don't save, load, and restore %esi.
5545 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
5546 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
5547 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5548 Don't save, load, and restore %esi.
5549
d2637c70
UD
55502003-02-27 Ulrich Drepper <drepper@redhat.com>
5551
567fb22a
UD
5552 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
5553 Release lock before waking up the waiters.
5554
427f5fa1
UD
5555 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
5556
a2d83cfb
UD
5557 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
5558 (reader_thread): Likewise.
5559
d2637c70
UD
5560 * sysdeps/pthread/pthread_rwlock_unlock.c
5561 (__pthread_rwlock_unlock): Release internal lock early. Don't try
5562 to wake up readers if there are none.
5563
5564 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
5565 Release internal lock before wake threads.
5566
b1531183
UD
55672003-02-26 Ulrich Drepper <drepper@redhat.com>
5568
dbf6131c
UD
5569 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
5570 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
5571 predefined.
5572 * tst-rwlock9.c: Likewise.
5573 * tst-rwlock10.c: New file.
5574 * tst-rwlock11.c: New file.
5575
695799fe
UD
5576 * Makefile (tests): Add tst-dlsym1.
5577 * tst-dlsym1.c: New file.
5578
b1531183
UD
5579 * init.c (__pthread_initialize_minimal_internal): Set
5580 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
5581 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
5582
3724f268
UD
55832003-02-24 Ulrich Drepper <drepper@redhat.com>
5584
3857ca78
UD
5585 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
5586
80d80779
UD
5587 * tst-cond2.c: Fix sychronization with child.
5588
86371308
UD
5589 * tst-rwlock8.c (reader_thread): Remove unused variable.
5590
ffeb4481
UD
5591 * Makefile: Add rules to build and run tst-tls3.
5592 * tst-tls3.c: New file.
5593 * tst-tls3mod.c: New file.
5594
3724f268
UD
5595 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
5596 * tst-rwlock8.c: New file.
5597 * tst-rwlock9.c: New file.
5598 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
5599 complete broken rwlock implementation.
5600 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5601 Likewise.
5602 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5603 Likewise.
5604 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5605 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
5606 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
5607 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
5608 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5609 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
5610 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 5611
8915cc40
RM
56122003-02-23 Roland McGrath <roland@redhat.com>
5613
5614 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
5615
fd1a0d0c
UD
56162003-02-23 Ulrich Drepper <drepper@redhat.com>
5617
ecf28959
UD
5618 * Makefile (tests): Add tst-context1.
5619 * tst-context1.c: New file.
5620
5e47b76b
UD
5621 * Makefile (tests): Add tst-tls1 and tst-tls2.
5622 * tst-tls1.c: New file.
5623 * tst-tls2.c: New file.
5624
5a6bbb41
UD
5625 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
5626 for failed cmpxchg.
5627
fd1a0d0c
UD
5628 * pthread_create.c (start_thread): Set EXITING_BIT early.
5629
5630 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
5631 (THREAD_GETMEM_NC): Likewise.
5632
757f9fcb
UD
56332003-02-22 Ulrich Drepper <drepper@redhat.com>
5634
b1b8e747
UD
5635 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
5636 off 3 more bytes by using offset-less instructions when possible.
5637
c780aa21 5638 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
5639
5640 * eintr.c (eintr_source): Add unnecessary return but the compiler
5641 insists.
5642
5643 * tst-kill3.c: Include <unistd.h>.
5644
5148559c
RM
56452003-02-21 Roland McGrath <roland@redhat.com>
5646
5647 * pthread_create.c (start_thread): Call __libc_thread_freeres.
5648
ab2d98e3
UD
56492003-02-21 Ulrich Drepper <drepper@redhat.com>
5650
71028edd
UD
5651 * Makefile (tests): Add tst-eintr1.
5652 (distribute): Add eintr.c.
5653 * tst-eintr1.c: New file.
5654 * eintr.c: New file.
5655
e814f748
UD
5656 * pthread_cancel.c (pthread_cancel): Use tkill directly.
5657
5658 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
5659 Disallow sending SIGCANCEL.
5660
ab2d98e3 5661 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 5662 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
5663 * tst-kill1.c: New file.
5664 * tst-kill2.c: New file.
5665 * tst-kill3.c: New file.
5666 * tst-kill5.c: New file.
9c03686d 5667 * tst-kill6.c: New file.
e814f748
UD
5668 * tst-basic7.c: Renamed to...
5669 * tst-kill4.c: ...this.
ab2d98e3 5670
59fed0e2
RM
56712003-02-21 Roland McGrath <roland@redhat.com>
5672
5673 * Makefile (install-lib-ldscripts): New variable.
5674
49dc759f
UD
56752003-02-21 Ulrich Drepper <drepper@redhat.com>
5676
8c2e9a29
UD
5677 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
5678 * pthread_cancel.c: Use INVALID_TD_P.
5679 * pthread_detach.c: Likewise.
5680 * pthread_getschedparam.c: Likewise.
5681 * pthread_setschedparam.c: Likewise.
5682 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
5683 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5684 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
5685 * pthread_timedjoin.c: Likewise.
5686
5687 * tst-basic7.c: Include <signal.h>.
5688
49dc759f
UD
5689 * pthread_join.c (pthread_join): Limited checking for invalid
5690 descriptors.
5691 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
5692
df5803bf
UD
56932003-02-20 Ulrich Drepper <drepper@redhat.com>
5694
c5acd3d7
UD
5695 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
5696 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
5697 * Makefile (tests): Add tst-key4.
5698 * tst-key4.c: New file.
5699
729924a0
UD
57002003-02-18 Ulrich Drepper <drepper@redhat.com>
5701
2f7dc594
UD
5702 * Makefile (tests): Add tst-basic7.
5703 * tst-basic7.c: New file.
5704
ba25bb0f
UD
5705 * pthread_create.c (deallocate_tsd): Mark as internal_function.
5706 Add some more __builtin_expect.
5707
12fd3c5f 5708 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 5709
5430d926
UD
57102003-02-17 Ulrich Drepper <drepper@redhat.com>
5711
b0db7fbe
UD
5712 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
5713 _POSIX_THREAD_PRIORITY_SCHEDULING.
5714 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
5715 _XOPEN_REALTIME_THREADS.
5716 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5717
5718 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
5719 kernel returns EINVAL for PID <= 0, work around it.
5720
ecfda9bd
UD
5721 * Makefile (tests): Add tst-signal5.
5722 * tst-signal5.c: New file.
5723
7d78ab99
UD
5724 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
5725 and LOGIN_NAME_MAX.
5726
371a2972
UD
5727 * tst-cancel1.c (tf): Block all signals.
5728
5430d926
UD
5729 * Makefile (tests): Add tst-basic6.
5730 * tst-basic6.c: New file.
5731
5732 * tst-basic1.c: Add test for process ID.
5733
5734 * Makefile (tests): Add tst-cancel10.
5735 * tst-cancel10.c: New file.
5736
5737 * Makefile (tests): Add tst-signal4.
5738 * tst-signal4.c: New file.
5739
5740 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
5741 __sigismember instead of sigismember. Add __builtin_expect.
5742
1564916a
UD
57432003-02-16 Ulrich Drepper <drepper@redhat.com>
5744
179ff175
UD
5745 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
5746 pthread_setcancelstate, and pthread_rwlock_setpshared.
5747
e4335f9a
UD
5748 * tst-cancel7.c (do_test): Make sure the pid file exists before
5749 canceling the thread.
5750
0a37669a
UD
5751 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
5752 pthread_rwlock_timedrdlock tests.
5753 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
5754 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5755 Check for invalid tv_nsec field.
5756 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5757 Likewise.
5758
5759 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
5760 recursive mutex of overflow.
5761
5762 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
5763
e4335f9a 5764 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
5765 going into an endless loop.
5766 * Makefile (tests): Add tst-cancel9.
5767 * tst-cancel9.c: New file.
5768
5769 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
5770
b270b548
UD
57712003-02-15 Ulrich Drepper <drepper@redhat.com>
5772
1c82b97f
UD
5773 * tst-mutex5.c (do_test): Add more timedlock tests.
5774
b2f05465 5775 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
5776 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
5777
e798b60f
UD
5778 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5779 use INLINE_SYSCALL. Error number is returned, not -1.
5780
90491dc4
UD
5781 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
5782 and __deallocate_stack with internal_function.
5783 * pthread_create.c: Adjust definitions appropriately.
5784 * allocatestack.c: Likewise.
5785
5786 * pthread_join.c: Add one more __builtin_expect.
5787 * pthread_timedjoin.c: Likewise.
5788
5789 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
5790 not data of sequence number does not match.
5791 Add one __builtin_expect.
5792
c6247c9d
UD
5793 * Makefile (tests): Add tst-clock1.
5794 * tst-clock1.c: New file.
5795
b270b548
UD
5796 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
5797 negative arguments.
5798 * Makefile (tests): Add tst-basic5.
5799 * tst-basic5.c: New file.
5800
700bf7af
UD
58012003-02-14 Ulrich Drepper <drepper@redhat.com>
5802
757de559
UD
5803 * Makefile (tests): Add tst-basic4.
5804 * tst-basic4.c: New file.
5805
47202270
UD
5806 * pthreadP.h: Add declaraction for __nptl_nthreads.
5807 * pthread_create.c: Define __nptl_nthreads
5808 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 5809 after thread is done. If then zero, call exit(0).
47202270
UD
5810 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5811 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
5812 * init.c (pthread_functions): Initialize ptr_nthreads.
5813 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
5814 (__reclaim_stacks): Decrement __nptl_nthreads.
5815 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
5816 Define.
5817 * Makefile (tests): Add tst-basic3.
5818 * tst-basic3.c: New file.
5819
e320ef46
UD
5820 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
5821 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
5822 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
5823 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
5824 if asynchronous canceling is enabled.
5825 * pthread_join.c (pthread_join): When recognizing circular joins,
5826 take into account the other thread might be already canceled.
5827 * Makefile (tests): Add tst-join5.
5828 * tst-join5.c: New file.
5829
700bf7af
UD
5830 * Makefile (tests): Add tst-join4.
5831 * tst-join4.c: New file.
5832
58332003-02-13 Ulrich Drepper <drepper@redhat.com>
5834
5835 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
5836
dac0f772
UD
58372003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
5838
5839 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
5840 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
5841 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
5842 warning.
5843 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
5844 to avoid warning.
5845 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
5846 error if lll_futex_wake failed.
5847
e8cda341
UD
58482003-02-13 Ulrich Drepper <drepper@redhat.com>
5849
a7720b5e
UD
5850 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
5851 handling of cancellation and failung pthread_mutex_unlock call.
5852 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5853 * Makefile (tests): Add tst-cond8 and tst-cond9.
5854 * tst-cond8.c: New file.
5855 * tst-cond9.c: New file.
5856
a1ea4c06
UD
5857 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
5858
5859 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
5860 non-standard initializers with __USE_GNU.
5861
e8cda341
UD
5862 * Makefile (tests): Add tst-cleanup3.
5863 * tst-cleanup3.c: New file.
5864
2067577c
UD
58652003-02-12 Ulrich Drepper <drepper@redhat.com>
5866
89e78a95
UD
5867 * Makefile (tests): Add tst-attr1 and tst-attr2.
5868 * tst-attr1.c: New file.
5869 * tst-attr2.c: New file.
5870
dfdd294a
UD
5871 * Makefile: Add rules to build and run tst-atfork2 test.
5872 * tst-atfork2.c: New file.
5873 * tst-atfork2mod.c: New file.
5874
5875 * sysdeps/unix/sysv/linux/unregister-atfork.c
5876 (__unregister_atfork): Free the memory allocated for the handlers
5877 after removing them from the lists.
5878
5879 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
5880 cleanup function.
5881
5882 * tst-atfork1.c (do_test): Wait for the child we forked.
5883 Report error in child.
5884
5885 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
5886
2067577c
UD
5887 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
5888
2a8a8a84
UD
58892003-02-10 Ulrich Drepper <drepper@redhat.com>
5890
d9dd121e
UD
5891 * Makefile (tests): Add tst-cancel8.
5892 * tst-cancel8.c: New file.
5893
2a8a8a84
UD
5894 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
5895 clearing of control variable.
defd1870 5896 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 5897 * tst-once3.c: New file.
defd1870 5898 * tst-once4.c: New file.
2a8a8a84 5899
a54e8d33
UD
59002003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
5901
5902 * sysdeps/sh/Makefile: New file.
5903 * sysdeps/sh/bits/atomic.h: New file.
5904 * sysdeps/sh/pthread_spin_init.c: New file.
5905 * sysdeps/sh/pthread_spin_lock.c: New file.
5906 * sysdeps/sh/pthread_spin_trylock.S: New file.
5907 * sysdeps/sh/pthread_spin_unlock.S: New file.
5908 * sysdeps/sh/pthreaddef.h: New file.
5909 * sysdeps/sh/tcb-offsets.sym: New file.
5910 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
5911 * sysdeps/sh/tls.h: New file.
5912 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
5913 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
5914 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
5915 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
5916 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
5917 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
5918 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
5919 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
5920 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
5921 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
5922 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
5923 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
5924 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
5925 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
5926 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
5927 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
5928 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
5929 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
5930 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
5931 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
5932 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
5933 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
5934 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
5935 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
5936 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
5937 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
5938 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
5939 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
5940 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
5941 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
5942
696e556e
UD
59432003-02-08 Ulrich Drepper <drepper@redhat.com>
5944
5945 * tst-cond2.c: Rearrange code to not rely on behavior undefined
5946 according to POSIX.
5947
5948 * tst-basic2.c (do_test): Lock mutex before creating the thread.
5949
fef710d6
UD
59502003-02-07 Ulrich Drepper <drepper@redhat.com>
5951
c6180643
UD
5952 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
5953 (TLS_GET_FS): New #define.
5954 (TLS_SET_FS): New #define.
5955 Correct value of __NR_set_thread_area.
5956
fef710d6
UD
5957 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
5958
11090a99
UD
59592003-02-06 Ulrich Drepper <drepper@redhat.com>
5960
65c68990
UD
5961 * Makefile (tests): Add tst-popen1.
5962 * tst-popen1.c: New file.
5963
11090a99
UD
5964 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
5965 but inactive generalization.
5966 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5967 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5968 Minor optimization, remove one instruction.
5969 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5970
a88c9263
UD
59712003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
5972
5973 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
5974
59752003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
5976
5977 * init.c (__NR_set_tid_address): Add #ifdef for s390.
5978 * sysdeps/pthread/pthread_barrier_wait.c: New file.
5979 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
5980 * sysdeps/pthread/pthread_cond_signal.c: New file.
5981 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
5982 * sysdeps/pthread/pthread_cond_wait.c: New file.
5983 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
5984 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
5985 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
5986 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
5987 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
5988 * sysdeps/s390/Makefile: New file.
5989 * sysdeps/s390/bits/atomic.h: New file.
5990 * sysdeps/s390/pthread_spin_init.c: New file.
5991 * sysdeps/s390/pthread_spin_lock.c: New file.
5992 * sysdeps/s390/pthread_spin_trylock.c: New file.
5993 * sysdeps/s390/pthread_spin_unlock.c: New file.
5994 * sysdeps/s390/pthreaddef.h: New file.
5995 * sysdeps/s390/tcb-offsets.sym: New file.
5996 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
5997 * sysdeps/s390/tls.h: New file.
5998 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
5999 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6000 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6001 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6002 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6003 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6004 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6005 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6006 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6007 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6008 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6009 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6010 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6011 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6012 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6013 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6014 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6015 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6016 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6017 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6018 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6019 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6020 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6021
6f1cff95
UD
60222003-02-04 Ulrich Drepper <drepper@redhat.com>
6023
ec609a8e
UD
6024 * atomic.h: Add a couple more default implementations.
6025 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
6026 __arch_compare_and_exchange_32_acq in return value definition. It
6027 always exists.
6028 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 6029 Add missing atomic_ prefixes.
e3ec8904 6030
6f1cff95
UD
6031 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6032 thread library is available, use correct value to mark initialized
6033 once variable.
6034
4f088329
UD
60352003-02-03 Ulrich Drepper <drepper@redhat.com>
6036
6f1cff95
UD
6037 * allocatestack.c (allocate_stack): Use __getpagesize instead of
6038 __sysconf to determine pagesize.
6039
3e4fc359 6040 * pthread_create.c: Include <atomic.h>.
4f088329
UD
6041 * allocatestack.c (allocate_stack): Implement coloring of the
6042 allocated stack memory. Rename pagesize to pagesize_m1. It's the
6043 size minus one. Adjust users.
3e4fc359 6044 * sysdeps/i386/i686/Makefile: New file.
4f088329 6045
2f42e8be
UD
60462003-02-02 Ulrich Drepper <drepper@redhat.com>
6047
4301f7e2
UD
6048 * allocatestack.c: Improve comment throughout the file.
6049
2f42e8be 6050 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 6051 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
6052 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6053 (__lll_lock_wait): Likewise.
6054 (lll_unlock_wake_cb): Removed.
6055
4a7d6545
UD
60562003-01-31 Ulrich Drepper <drepper@redhat.com>
6057
6058 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6059 _POSIX_THREAD_PRIORITY_SCHEDULING.
6060
886d5973
UD
60612003-01-30 Jakub Jelinek <jakub@redhat.com>
6062
6063 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6064 Fix return type of ptr___pthread_getspecific.
6065
e474ca78
UD
60662003-01-29 Ulrich Drepper <drepper@redhat.com>
6067
6068 * Makefile (tests): Add tst-umask1.
6069 (tst-umask1-ARGS): Define.
6070 * tst-umask1.c: New file.
6071
e6ebd2e4
UD
60722003-01-28 Ulrich Drepper <drepper@redhat.com>
6073
6cf26f41
UD
6074 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
6075 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6076 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6077 pthread_rwlock_unlock.
6078 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6079 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6080 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6081 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6082 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6083 New file.
6084 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6085 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6086 New file.
6087 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6088 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6089 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6090 New file.
6091 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6092 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6093 New file.
6094 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6095 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6096 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6097 New file.
6098 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6099 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6100 New file.
6101 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6102
1d087a7e
UD
6103 * Makefile (libpthread-routines): Remove lowlevelcond and
6104 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6105 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6106 and pthread_cond_broadcast.
4a99d160
UD
6107 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6108 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6109 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6110 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6111 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6112 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6113 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6114 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6115 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6116 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6117 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6120 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6121 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6122 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6123 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6124 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6125 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6126 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6127 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6128 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6129 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6130 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6131 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6132 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
6133 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
6134 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
6135 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
6136 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
6137 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 6138
e6ebd2e4
UD
6139 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
6140 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
6141 of the code is moved to ...
6142 * sysdeps/pthread/createthread.c: ...here. New file.
6143
a15698cb
UD
61442003-01-27 Ulrich Drepper <drepper@redhat.com>
6145
0566b130
UD
6146 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
6147 (__new_sem_post): Clear %eax before returning.
6148 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
6149
e6fb8846
UD
6150 * Makefile (tests): Add tst-cleanup2.
6151 * tst-cleanup2.c: New file.
6152
a15698cb
UD
6153 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6154 Interpret first parameter correctly.
6155
8824b0a1
UD
61562003-01-17 Ulrich Drepper <drepper@redhat.com>
6157
6158 * Makefile (headers): Add bits/semaphore.h.
6159
850dcfca
UD
61602003-01-16 Jakub Jelinek <jakub@redhat.com>
6161
6162 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
6163 if not SHARED.
6164
574b892e
UD
61652003-01-14 Ulrich Drepper <drepper@redhat.com>
6166
a8d87c92
UD
6167 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
6168 must be used and mapping failed.
6169 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
6170
574b892e
UD
6171 * Makefile (CFLAGS-pthread_self.os): Define this, not
6172 CFLAGS-pthread_self.c.
6173
fb48047a
UD
61742003-01-13 Ulrich Drepper <drepper@redhat.com>
6175
47805511
UD
6176 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
6177 lll_unlock_wake_cb.
6178
fb48047a
UD
6179 * Makefile (libpthread-routines): Add version. Add rules to build
6180 version.os and banner.h.
6181 * version.c: New file.
6182
115bb61d
UD
61832003-01-13 Jakub Jelinek <jakub@redhat.com>
6184
6185 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
6186 the alias unconditional.
6187 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
6188
61892003-01-13 Ulrich Drepper <drepper@redhat.com>
6190
6191 * Makefile (CFLAGS-pthread_self.c): New definition.
6192
6aca81bb
UD
61932003-01-06 Jakub Jelinek <jakub@redhat.com>
6194
6195 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
6196 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
6197 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
6198 * init.c (__pthread_initialize_minimal_internal): Likewise.
6199
e9c7764e
UD
62002003-01-07 Jakub Jelinek <jakub@redhat.com>
6201
b5facfda
UD
6202 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
6203
e9c7764e
UD
6204 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6205 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6206 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6207 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6208 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6209 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6210
bef1e42f
UD
62112003-01-06 Jakub Jelinek <jakub@redhat.com>
6212
6213 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
6214 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
6215 * tst-cancel-wrappers.sh: Remove all exceptions.
6216
bbd17455
UD
62172003-01-05 Ulrich Drepper <drepper@redhat.com>
6218
a73ab6df
UD
6219 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
6220 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
6221
bbd17455
UD
6222 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
6223 Use __libc_pthread_functions array if SHARED.
6224
6225 * pthreadP.h: Move pthread_cond_2_0_t definition to...
6226 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
6227
6228 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
6229 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
6230 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
6231 __libc_ptf_call instead of __libc_maybe_call.
6232 (PTF): New #define.
6233 (__libc_cleanup_region_start): Wrap function name with PTF call.
6234 (__libc_cleanup_region_end): Likewise.
6235 (__libc_cleanup_end): Likewise.
6236
6237 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
6238 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
6239 * pthread_key_create.c: Add __pthread_key_create_internal alias.
6240 * pthreadP.h: Add prototypes.
6241
6242 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
6243 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
6244 __pthread_rwlock_unlock aliases.
6245 * pthreadP.h: Add prototypes for new aliases.
6246
6247 * pthreadP.h (struct pthead_functions): Moved to...
6248 * sysdeps/pthread/pthread-functions.h: ...here. New file.
6249 * init.c (pthread_functions): Add initializers for new elements.
6250
6251 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
6252 __pthread_cleanup_pop_restore aliases.
6253 * pthreadP.h: Add prototypes.
6254
6255 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
6256 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
6257 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
6258 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
6259 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6260 * pthreadP.h: Adjust prototypes and callers.
6261
d27a78be
UD
62622003-01-04 Ulrich Drepper <drepper@redhat.com>
6263
b74121ae
UD
6264 * Makefile (tests): Add tst-cancel7.
6265 (tst-cancel7-ARGS): New variable.
bbd17455 6266 * tst-cancel7.c: New file.
b74121ae 6267
29bc410c
UD
6268 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
6269 around gcc defficiencies.
6270 * old_pthread_cond_signal.c: Likewise.
6271 * old_pthread_cond_timedwait.c: Likewise.
6272 * old_pthread_cond_wait.c: Likewise.
6273
d27a78be
UD
6274 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
6275
733f25e6
UD
62762003-01-03 Ulrich Drepper <drepper@redhat.com>
6277
7edb2ae3
UD
6278 * Makefile (tests): Add tst-cond7.
6279 * tst-cond7.c: New file.
6280
b1151300
UD
6281 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6282 (condvar_cleanup): Get condvar address from the right place.
6283
733f25e6
UD
6284 * atomic.h: Correct definitions of atomic_full_barrier,
6285 atomic_read_barrier, atomic_write_barrier.
6286
6287 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
6288 race-free.
6289 * old_pthread_cond_signal.c: Likewise.
6290 * old_pthread_cond_timedwait.c: Likewise.
6291 * old_pthread_cond_wait.c: Likewise.
6292
686b7223
UD
62932003-01-03 Jakub Jelinek <jakub@redhat.com>
6294
6295 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
6296
0e07706e
UD
62972003-01-03 Ulrich Drepper <drepper@redhat.com>
6298
997256dd
UD
6299 * pthreadP.h (pthread_cond_2_0_t): New type.
6300 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
6301 Use new type for the 2.0 condvar function prototypes.
6302 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
6303 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
6304 parameter.
6305 * old_pthread_cond_destroy.c: Likewise.
6306 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
6307 * old_pthread_cond_signal.c: Likewise.
6308 * old_pthread_cond_timedwait.c: Likewise.
6309 * old_pthread_cond_wait.c: Likewise.
6310
842d2817
UD
6311 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6312 (__pthread_cond_wait): Don't save cancellation mode and seq value
6313 in same location.
6314
0e07706e
UD
6315 * herrno.c (__h_errno_location): Don't define as weak.
6316
bf293afe
UD
63172003-01-02 Jakub Jelinek <jakub@redhat.com>
6318
6319 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
6320 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
6321 and pthread_cond_wait.
6322 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
6323 Renamed to...
6324 (__pthread_cond_broadcast_2_0): ... this.
6325 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
6326 Renamed to...
6327 (__pthread_cond_destroy_2_0): ... this.
6328 * old_pthread_cond_init.c (__old_pthread_cond_init):
6329 Renamed to...
6330 (__pthread_cond_init_2_0): ... this.
6331 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
6332 Renamed to...
6333 (__pthread_cond_signal_2_0): ... this.
6334 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
6335 Renamed to...
6336 (__pthread_cond_wait_2_0): ... this.
6337 * pthread_cond_destroy.c: Include shlib-compat.h.
6338 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
6339 * pthread_cond_init.c: Include shlib-compat.h.
6340 (pthread_cond_init): Change strong_alias into versioned_symbol.
6341 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
6342 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
6343 fields.
6344 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
6345 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
6346 __pthread_cond_wait_2_0): New prototypes.
6347 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
6348 __old_pthread_cond_init, __old_pthread_cond_signal,
6349 __old_pthread_cond_wait): Removed.
6350 * init.c: Include shlib-compat.h.
6351 (pthread_functions): Guard ptr___pthread_attr_init_2_0
6352 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
6353 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
6354 ptr___pthread_cond_*_2_0 fields.
6355 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
6356 pthread_cond_*@GLIBC_2.0 compatibility symbols.
6357
6358 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
6359 LIBC_SIGACTION was not yet defined.
6360 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
6361 [!defined LIBC_SIGACTION] (__sigaction): New function and
6362 libc_hidden_weak.
6363 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
6364 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
6365
63662003-01-02 Jakub Jelinek <jakub@redhat.com>
6367
6368 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
6369
05df18c3
UD
63702003-01-02 Ulrich Drepper <drepper@redhat.com>
6371
6372 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6373 New, larger type definition.
6374 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
6375 implementation.
6376 * Versions [libpthread]: Add definitions for new pthread_cond_*
6377 interfaces for version GLIBC_2.3.2.
6378 * pthread_cond_init.c: Update initialization for new type definition.
6379 * Makefile (libpthread-routines): Remove pthread_cond_wait,
6380 pthread_cond_timedwait, pthread_cond_signal, and
6381 pthread_cond_broadcast. Add old_pthread_cond_init,
6382 old_pthread_cond_destroy, old_pthread_cond_wait,
6383 old_pthread_cond_timedwait, old_pthread_cond_signal, and
6384 old_pthread_cond_broadcast.
6385 * old_pthread_cond_broadcast.c: New file.
6386 * old_pthread_cond_destroy.c: New file.
6387 * old_pthread_cond_init.c: New file.
6388 * old_pthread_cond_signal.c: New file.
6389 * old_pthread_cond_timedwait.c: New file.
6390 * old_pthread_cond_wait.c: New file.
6391 * pthreadP.h: Add prototypes for the compatibility interfaces.
6392
6393 * pthread_cond_destroy.c: Don't include <errno.h>.
6394
fd8979e4
UD
63952003-01-01 Ulrich Drepper <drepper@redhat.com>
6396
6397 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
6398 unnecessary zero offset when addressing MUTEX.
6399
6d6ee629
UD
64002002-12-31 Ulrich Drepper <drepper@redhat.com>
6401
6402 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6403 __register_atfork.
6404 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
6405 for __register_atfork.
6406
a4baf360
UD
64072002-12-31 Jakub Jelinek <jakub@redhat.com>
6408
6409 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
6410 instead of ASSEMBLER test macro.
6411
6412 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
6413 __libc_current_sigrtmax): Add libc_hidden_def.
6414
6415 * sysdeps/pthread/list.h: Remove assert.h include.
6416
e9395a94
UD
64172002-12-31 Ulrich Drepper <drepper@redhat.com>
6418
6419 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
6420 __pthread_initialize_minimal_internal not
6421 __pthread_initialize_minimal.
6422
89d6e444
UD
64232002-12-30 Ulrich Drepper <drepper@redhat.com>
6424
416d2de6
UD
6425 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
6426 __pthread_initialize_minimal as hidden.
6427
89d6e444
UD
6428 * init.c (__pthread_initialize_minimal_internal): Don't mark as
6429 constructor.
6430
64312002-12-31 Jakub Jelinek <jakub@redhat.com>
6432
6433 * Makefile ($(inst_libdir)/libpthread.so): Depend on
6434 $(common-objpfx)format.lds, include that into the output script.
6435 Fix comment.
6436 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
6437
8cac677c
UD
64382002-12-28 Andreas Jaeger <aj@suse.de>
6439
6440 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
6441 nsec resolution changes.
6442 (xstat64_conv): Likewise.
6443 (xstat32_conv): Likewise.
6444 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
6445 struct kernel_stat.
6446 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
6447 structs stat and stat64.
6448 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 6449 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 6450
49e9f864
UD
64512002-12-30 Jakub Jelinek <jakub@redhat.com>
6452
6453 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
6454 argument.
6455 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
6456 (pthread_exit): Use strong_alias to avoid warnings.
6457 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
6458 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
6459 ptr___pthread_attr_init_2_*.
6460 * init.c (pthread_functions): Adjust.
6461
bab09b26
UD
64622002-12-29 Ulrich Drepper <drepper@redhat.com>
6463
598d7a42
UD
6464 * forward.c: Make all functions available by default again. It
6465 caused too much trouble.
6466
bab09b26
UD
6467 * pt-siglongjmp.c: Removed.
6468
3b7ed871
UD
64692002-12-28 Jakub Jelinek <jakub@redhat.com>
6470
6471 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
6472 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
6473 * sysdeps/i386/Makefile: New file.
6474 * sysdeps/i386/tcb-offsets.sym: New file.
6475 * sysdeps/pthread/tcb-offsets.h: New file.
6476 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
6477 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
6478
6479 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
6480 __register_atfork...
6481 (GLIBC_2.3.2): ...here.
6482
64832002-12-28 Ulrich Drepper <drepper@redhat.com>
6484
6485 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
6486 pthread_attr_setstackaddr with __attribute_deprecated__.
6487
270d9d47
UD
64882002-12-27 Jakub Jelinek <jakub@redhat.com>
6489
6490 * pt-system.c (system): Remove cancellation handling.
6491 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
6492 cancellation routines.
6493
131fd126
UD
64942002-12-28 Ulrich Drepper <drepper@redhat.com>
6495
afb2e954
UD
6496 * descr.h: Include <dl-sysdep.h>.
6497 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
6498 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
6499 (MULTIPLE_THREADS_OFFSET): Adjust offset.
6500 (SYSINFO_OFFSEET): Likewise.
6501
65022002-12-27 Jakub Jelinek <jakub@redhat.com>
6503
6504 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
6505 Define.
6506 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
6507 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
6508 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
6509 (USE_DL_SYSINFO): Undef.
6510
65112002-12-22 Jakub Jelinek <jakub@redhat.com>
6512
6513 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
6514 $(common-objpfx)libc.so.
6515 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
6516 it is bigger than pipe buffer size even on arches with bigger
6517 page size.
6518 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
6519
a218c9cf
UD
65202002-12-25 Ulrich Drepper <drepper@redhat.com>
6521
6522 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
6523 correct errno access for case that USE___THREAD is not defined.
6524
015a2dc9
UD
65252002-12-24 Ulrich Drepper <drepper@redhat.com>
6526
6527 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
6528 Patch by Marijn Ros <marijn@mad.scientist.com>.
6529
5220f9ac
RM
65302002-12-22 Roland McGrath <roland@redhat.com>
6531
6532 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
6533
1561bf63
UD
65342002-12-20 Ulrich Drepper <drepper@redhat.com>
6535
6536 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
6537
3325198e
UD
65382002-12-19 Ulrich Drepper <drepper@redhat.com>
6539
057c823f
UD
6540 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
6541 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
6542 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
6543
097eca29
UD
6544 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
6545 of int $0x80.
6546 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6547 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
6548 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
6549 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6550 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6551 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
6552 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
6553 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6554
6555 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
6556 sysenter.
6557 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6558
6559 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
6560
5f5843e3
UD
6561 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
6562 in new TCB.
6563 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
6564 that sysinfo is properly initialized.
6565 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
6566 to 1 only for ld.so.
6567
3325198e
UD
6568 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
6569 RTLD_CORRECT_DYNAMIC_WEAK.
6570
74e8f2dc
UD
65712002-12-19 Jakub Jelinek <jakub@redhat.com>
6572
6573 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
6574 Use return 0 as 6th argument to FORWARD4.
6575 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
6576
df45b31e
UD
65772002-12-18 Ulrich Drepper <drepper@redhat.com>
6578
6579 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
6580 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
6581 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
6582 (INIT_SYSINFO): New #define.
6583 (TLS_TP_INIT): Use INIT_SYSINFO.
6584 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
6585 At test to make sure SYSINFO_OFFSET value is correct.
6586 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
6587
3d539579
UD
65882002-12-18 Jakub Jelinek <jakub@redhat.com>
6589
6590 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
6591 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
6592 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
6593 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
6594 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
6595 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
6596 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
6597
d7913e0e
UD
65982002-12-18 Ulrich Drepper <drepper@redhat.com>
6599
f051627f
UD
6600 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
6601 macro instead of using int $0x80 directly.
6602
d7913e0e
UD
6603 * sysdeps/pthread/bits/stdio-lock.h: New file.
6604 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
6605 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
6606 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
6607 * Makefile (routines): Add libc-lowlevelmutex.
6608
6609 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
6610 __i686.get_pc_thunk.dx.
6611
f077a4a9
UD
66122002-12-17 Jakub Jelinek <jakub@redhat.com>
6613
6614 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
6615 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
6616 ($(objpfx)tst-cancel-wrappers.out): New rule.
6617 * tst-cancel-wrappers.sh: New test.
6618 * tst-locale1.c: Include signal.h.
6619 (uselocale): Test static linking of __libc_current_sigrt*.
6620
66212002-12-17 Ulrich Drepper <drepper@redhat.com>
6622
6623 * Makefile (tests): Add tst-cancel6.
6624 * tst-cancel6.c: New file
6625
bd499a3b
UD
66262002-12-17 Jakub Jelinek <jakub@redhat.com>
6627
6628 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
6629 Define meaningfully for assembler as well.
6630 * pthreadP.h (struct pthread_functions): Remove
6631 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
6632 and ptr_pthread_attr_init_2_1 fields.
6633 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
6634 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
6635 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
6636 (FORWARD3): Define using FORWARD4.
6637 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
6638 versions.
6639 * pt-system.c: Remove duplicate stdlib.h include.
6640
0a1063f4
UD
66412002-12-16 Ulrich Drepper <drepper@redhat.com>
6642
87d60668
UD
6643 * sem_init.c: Define sem_init@GLIBC_2.0.
6644 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
6645 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
6646
0a1063f4
UD
6647 * flockfile.c: Moved to...
6648 * sysdeps/pthread/flockfile.c: ...here. New file.
6649 * funlockfile.c: Moved to...
6650 * sysdeps/pthread/funlockfile.c: ...here. New file.
6651 * ftrylockfile.c: Moved to...
6652 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
6653
9634cf9d
UD
66542002-12-16 Jakub Jelinek <jakub@redhat.com>
6655
6656 * libc-cancellation.c: Guard both function with
6657 #if !defined NOT_IN_libc.
6658 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
6659 automatically provided pthread wrappers.
6660 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
6661 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
6662 nor in libpthread.
6663 * pt-open.c: Removed.
6664 * pt-fcntl.c: Removed.
6665 * pt-fsync.c: Removed.
6666 * pt-lseek.c: Removed.
6667 * pt-msgrcv.c: Removed.
6668 * pt-msgsnd.c: Removed.
6669 * pt-msync.c: Removed.
6670 * pt-nanosleep.c: Removed.
6671 * pt-open64.c: Removed.
6672 * pt-pause.c: Removed.
6673 * pt-pread.c: Removed.
6674 * pt-pread64.c: Removed.
6675 * pt-pwrite.c: Removed.
6676 * pt-pwrite64.c: Removed.
6677 * pt-read.c: Removed.
6678 * pt-recv.c: Removed.
6679 * pt-recvfrom.c: Removed.
6680 * pt-recvmsg.c: Removed.
6681 * pt-send.c: Removed.
6682 * pt-sendto.c: Removed.
6683 * pt-sigtimedwait.c: Removed.
6684 * pt-sigwait.c: Removed.
6685 * pt-wait.c: Removed.
6686 * pt-waitpid.c: Removed.
6687 * pt-write.c: Removed.
6688 * pt-accept.c: Removed.
6689 * pt-close.c: Removed.
6690 * pt-connect.c: Removed.
6691 * pt-lseek64.c: Removed.
6692 * pt-sendmsg.c: Removed.
6693 * pt-tcdrain.c: Removed.
6694
6ee8d334
UD
66952002-12-15 Ulrich Drepper <drepper@redhat.com>
6696
81fa9371
UD
6697 * init.c (__pthread_initialize_minimal_internal): Renamed from
6698 __pthread_initialize_minimal. Make old name an alias. This
6699 converts a normal relocation into a relative relocation.
6700
f3015aa5
UD
6701 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
6702
4cbc1950
UD
6703 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
6704 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
6705 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
6706 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
6707 pt-sigwaitinfo, pt-waitid, and pt-writev.
6708 * pt-creat.c: Removed.
6709 * pt-poll.c: Removed.
6710 * pt-pselect.c: Removed.
6711 * pt-readv.c: Removed.
6712 * pt-select.c: Removed.
6713 * pt-sigpause.c: Removed.
6714 * pt-sigsuspend.c: Removed.
6715 * pt-sigwaitinfo.c: Removed.
6716 * pt-waitid.c: Removed.
6717 * pt-writev.c: Removed.
6718
8454830b
UD
6719 * init.c (pthread_functions): New variable.
6720 (__pthread_initialize_minimal): Pass pointer to pthread_functions
6721 (or NULL) to __libc_pthread_init.
6722 * forward.c: Rewrite to use __libc:pthread_functions array to get
6723 function addresses.
6724 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
6725 prototype.
6726 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
6727 Take new parameter. Copy content of variable pointed to by it
6728 to __libc_pthread_init.
6729
6730 * pthreadP.h (struct pthread_functions): New type.
6731 (__libc_pthread_init): Declare.
6732
6733 * pthread_attr_destroy.c: Add namespace protected alias.
6734 * pthread_attr_getdetachstate.c: Likewise.
6735 * pthread_attr_getinheritsched.c: Likewise.
6736 * pthread_attr_getschedparam.c: Likewise.
6737 * pthread_attr_getschedpolicy.c: Likewise.
6738 * pthread_attr_getscope.c: Likewise.
6739 * pthread_attr_setdetachstate.c: Likewise.
6740 * pthread_attr_setinheritsched.c: Likewise.
6741 * pthread_attr_setschedparam.c: Likewise.
6742 * pthread_attr_setschedpolicy.c: Likewise.
6743 * pthread_attr_setscope.c: Likewise.
6744 * pthread_cond_broadcast.c: Likewise.
6745 * pthread_cond_destroy.c: Likewise.
6746 * pthread_cond_init.c: Likewise.
6747 * pthread_cond_signal.c: Likewise.
6748 * pthread_cond_wait.c: Likewise.
6749 * pthread_condattr_destroy.c: Likewise.
6750 * pthread_condattr_init.c: Likewise.
6751 * pthread_equal.c: Likewise.
6752 * pthread_exit.c: Likewise.
6753 * pthread_getschedparam.c: Likewise.
6754 * pthread_self.c: Likewise.
6755 * pthread_setcancelstate.c: Likewise.
6756 * pthread_setschedparam.c: Likewise.
6757 * pthread_mutex_destroy.c: Likewise.
6758 * pthread_mutex_init.c: Likewise.
6759 * pthreadP.h: Add prototypes for the aliases.
6760
0d5f4929
UD
6761 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
6762 multiple_threads member in correct TCB to 1.
6763
6ee8d334
UD
6764 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
6765 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
6766 member of thread decriptor, otherwise return unconditionally 1.
6767
2fb6444d
UD
67682002-12-14 Ulrich Drepper <drepper@redhat.com>
6769
6770 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
6771 regular Linux version. Remove file.
6772 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
6773 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
6774 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
6775 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
6776 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
6777 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
6778 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
6779 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
6780 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
6781 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
6782 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
6783 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
6784 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
6785 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
6786 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
6787 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
6788 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
6789 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
6790 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
6791 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
6792 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
6793 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
6794 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
6795 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
6796 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
6797 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
6798 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
6799 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
6800 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
6801 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
6802
86b2dc40
UD
68032002-12-14 Jakub Jelinek <jakub@redhat.com>
6804
6805 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
6806 * sysdeps/unix/sysv/linux/open.c: Removed.
6807 * sysdeps/unix/sysv/linux/fsync.c: Removed.
6808 * sysdeps/unix/sysv/linux/lseek.c: Removed.
6809 * sysdeps/unix/sysv/linux/msync.c: Removed.
6810 * sysdeps/unix/sysv/linux/read.c: Removed.
6811 * sysdeps/unix/sysv/linux/close.c: Removed.
6812 * sysdeps/unix/sysv/linux/creat.c: Removed.
6813 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
6814 * sysdeps/unix/sysv/linux/pause.c: Removed.
6815 * sysdeps/unix/sysv/linux/select.c: Removed.
6816 * sysdeps/unix/sysv/linux/write.c: Removed.
6817
9d263d72
UD
68182002-12-14 Ulrich Drepper <drepper@redhat.com>
6819
6820 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
6821 element in TCB to see whether locking is needed.
6822
6823 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
6824 MULTIPLE_THREADS_OFFSET value is correct.
6825
6826 * sysdeps/unix/sysv/linux/close.c: New file.
6827 * sysdeps/unix/sysv/linux/connect.S: New file.
6828 * sysdeps/unix/sysv/linux/creat.c: New file.
6829 * sysdeps/unix/sysv/linux/fsync.c: New file.
6830 * sysdeps/unix/sysv/linux/llseek.c: New file.
6831 * sysdeps/unix/sysv/linux/lseek.c: New file.
6832 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
6833 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
6834 * sysdeps/unix/sysv/linux/msync.c: New file.
6835 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
6836 * sysdeps/unix/sysv/linux/open.c: New file.
6837 * sysdeps/unix/sysv/linux/open64.c: New file.
6838 * sysdeps/unix/sysv/linux/pause.c: New file.
6839 * sysdeps/unix/sysv/linux/poll.c: New file.
6840 * sysdeps/unix/sysv/linux/pread.c: New file.
6841 * sysdeps/unix/sysv/linux/pread64.c: New file.
6842 * sysdeps/unix/sysv/linux/pselect.c: New file.
6843 * sysdeps/unix/sysv/linux/pwrite.c: New file.
6844 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
6845 * sysdeps/unix/sysv/linux/readv.c: New file.
6846 * sysdeps/unix/sysv/linux/recv.S: New file.
6847 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
6848 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
6849 * sysdeps/unix/sysv/linux/select.c: New file.
6850 * sysdeps/unix/sysv/linux/send.S: New file.
6851 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
6852 * sysdeps/unix/sysv/linux/sendto.S: New file.
6853 * sysdeps/unix/sysv/linux/sigpause.c: New file.
6854 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
6855 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6856 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6857 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6858 * sysdeps/unix/sysv/linux/system.c: New file.
6859 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
6860 * sysdeps/unix/sysv/linux/wait.c: New file.
6861 * sysdeps/unix/sysv/linux/waitid.c: New file.
6862 * sysdeps/unix/sysv/linux/waitpid.c: New file.
6863 * sysdeps/unix/sysv/linux/writev.c: New file.
6864 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
6865
6866 * pt-readv.c: Fix comment.
6867
68682002-12-14 Jakub Jelinek <jakub@redhat.com>
6869
6870 * tst-cleanup1.c: Include stdlib.h.
6871
6872 * tst-cancel5.c: New test.
6873 * Makefile (tests): Add tst-cancel5.
6874 (tst-cancel5): Link against libc.so libpthread.so in that order.
6875
9ae0909b
UD
68762002-12-13 Ulrich Drepper <drepper@redhat.com>
6877
b7bdd9c4
UD
6878 * forward.c (test_loaded): Prevent recursive calls.
6879
9ae0909b
UD
6880 * Makefile (routines): Add libc-cancellation.
6881 * libc-cancellation.c: New file.
6882 * descr.h (struct pthread): Add multiple_threads field.
6883 * allocatestack.c (allocate_stack): Initialize multiple_header field of
6884 new thread descriptor to 1.
6885 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
6886 Initialize multiple_thread field after successful thread creation.
6887 * cancellation.c (__do_cancel): Move to pthreadP.h.
6888 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
6889 (__pthread_disable_asynccancel): Add internal_function attribute.
6890 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
6891 * pthread_setcancelstate.c: Likewise.
6892 * pthread_setcanceltype.c: Likewise.
6893 * pthread_exit.c: Likewise.
6894 * pthreadP.h (CANCELLATION_P): Likewise.
6895 (__do_cancel): Define as static inline.
6896 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
6897 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
6898 declarations.
6899 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
6900 fields. Define MULTIPLE_THREADS_OFFSET.
6901 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
6902 declaration.
6903 * sysdeps/unix/sysv/linux/accept.S: New file.
6904 * sysdeps/unix/sysv/linux/read.c: New file.
6905 * sysdeps/unix/sysv/linux/write.c: New file.
6906 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
6907 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
6908 initialization of __libc_locking_needed.
6909 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
6910 __libc_locking_needed, use multiple_threads field in TCB.
6911 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6912
22f20674
UD
69132002-12-12 Ulrich Drepper <drepper@redhat.com>
6914
2ad2e1e7
UD
6915 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
6916 version.
6917 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
6918
22f20674
UD
6919 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
6920 access to __libc_locking_needed for PIC.
6921
aa80bf86
UD
69222002-12-12 Jakub Jelinek <jakub@redhat.com>
6923
6924 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
6925 declare for libc.so.
6926 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
6927 expression.
6928 (__libc_lock_lock): Put into statement expression.
6929 (__libc_lock_unlock): Remove trailing semicolon.
6930 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
6931
24021373
RM
69322002-12-12 Roland McGrath <roland@redhat.com>
6933
6934 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
6935 "m" constraint to refer to __libc_locking_needed. Declare it here.
6936
14e7aece
UD
69372002-12-12 Ulrich Drepper <drepper@redhat.com>
6938
6939 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
6940 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
6941 Initialize __libc_locking_needed.
6942 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
6943 instead of __register_pthread_fork_handler.
6944 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
6945 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
6946 fork-gen with libc_pthread_init.
6947 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
6948 of __register_pthread_fork_handler.
6949 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
6950 of __register_pthread_fork_handler.
6951 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
6952 __libc_locking_needed to determine whether lock prefix can be avoided.
6953 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6954
85631c8e
UD
69552002-12-11 Ulrich Drepper <drepper@redhat.com>
6956
da63009e
UD
6957 * Makefile (tests): Add tst-cleanup1.
6958 * tst-cleanup1.c: New file.
6959 * cancellation.c (__cleanup_thread): Removed.
6960 (__do_cancel): Remove call to __cleanup_thread.
6961 * pthreadP.h: Remove __cleanup_thread prorotype.
6962
000160a2
UD
6963 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6964 Remember function and argument even if cancellation handler
6965 function is not available.
6966 (__libc_cleanup_region_end): Execute registered function directly if
6967 pthread functions are not available.
6968 (__libc_cleanup_end): Likewise.
6969
85631c8e
UD
6970 * init.c (__pthread_initialize_minimal): Fix initialization in
6971 static lib by preventing gcc from being too clever.
6972
dce8f2b6
UD
69732002-12-10 Ulrich Drepper <drepper@redhat.com>
6974
34a075be
UD
6975 * init.c (__pthread_initialize_minimal): Remove unneccesary
6976 sigaddset call.
6977
dce8f2b6
UD
6978 * Makefile (tests): We can run tst-locale2 now.
6979
e5e45b53
UD
69802002-12-09 Ulrich Drepper <drepper@redhat.com>
6981
6982 * Versions: Remove duplicated sigwait entry.
6983
bdb04f92
UD
69842002-12-08 Ulrich Drepper <drepper@redhat.com>
6985
1e506629
UD
6986 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
6987 inside libpthread.
6988
a3957dd5
UD
6989 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
6990
bdb04f92
UD
6991 * pthreadP.h: Declare __pthread_enable_asynccancel and
6992 __pthread_disable_asynccancel.
6993 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
6994 (CANCEL_RESET): Use __pthread_disable_asynccancel.
6995 * cancellation.c (__pthread_enable_asynccancel): New function.
6996 (__pthread_disable_asynccancel): New function.
6997 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
6998 * pt-close.c: Likewise.
6999 * pt-connect.c: Likewise.
7000 * pt-creat.c: Likewise.
7001 * pt-fcntl.c: Likewise.
7002 * pt-fsync.c: Likewise.
7003 * pt-lseek.c: Likewise.
7004 * pt-lseek64.c: Likewise.
7005 * pt-msgrcv.c: Likewise.
7006 * pt-msgsnd.c: Likewise.
7007 * pt-msync.c: Likewise.
7008 * pt-nanosleep.c: Likewise.
7009 * pt-open.c: Likewise.
7010 * pt-open64.c: Likewise.
7011 * pt-pause.c: Likewise.
7012 * pt-poll.c: Likewise.
7013 * pt-pread.c: Likewise.
7014 * pt-pread64.c: Likewise.
7015 * pt-pselect.c: Likewise.
7016 * pt-pwrite.c: Likewise.
7017 * pt-pwrite64.c: Likewise.
7018 * pt-read.c: Likewise.
7019 * pt-readv.c: Likewise.
7020 * pt-recv.c: Likewise.
7021 * pt-recvfrom.c: Likewise.
7022 * pt-recvmsg.c: Likewise.
7023 * pt-select.c: Likewise.
7024 * pt-send.c: Likewise.
7025 * pt-sendmsg.c: Likewise.
7026 * pt-sendto.c: Likewise.
7027 * pt-sigpause.c: Likewise.
7028 * pt-sigsuspend.c: Likewise.
7029 * pt-sigtimedwait.c: Likewise.
7030 * pt-sigwait.c: Likewise.
7031 * pt-sigwaitinfo.c: Likewise.
7032 * pt-system.c: Likewise.
7033 * pt-tcdrain.c: Likewise.
7034 * pt-wait.c: Likewise.
7035 * pt-waitid.c: Likewise.
7036 * pt-waitpid.c: Likewise.
7037 * pt-write.c: Likewise.
7038 * pt-writev.c: Likewise.
a3957dd5
UD
7039 * pthread_join.c: Likewise.
7040 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
7041
7042 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7043 (__xpg_sigpause): New function.
7044 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7045
6ccb3834
UD
70462002-12-07 Ulrich Drepper <drepper@redhat.com>
7047
09efc3ba
UD
7048 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7049
7050 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7051 _GI_pthread_cleanup_pop to pthreadP.h.
7052
7053 * ftrylockfile.c: Use _IO_lock_trylock instead of
7054 pthread_mutex_trylock.
7055
7056 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7057 (CANCEL_RESET): Likewise.
7058 (__pthread_setcanceltype_): Declare.
7059 (__pthread_mutex_lock_internal): Declare.
7060 (__pthread_mutex_unlock_internal): Declare.
7061 (__pthread_once_internal): Declare.
7062 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7063 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7064
7065 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7066 and pthread_mutex_unlock.
7067 * pthread_cond_wait.c: Likewise.
7068 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7069 * pthread_mutex_unlock.c: Likewise.
7070
7071 * pthread_setcanceltype.c: Add additional alias
7072 __pthread_setcanceltype.
7073
7074 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7075 * sem_open.c (sem_open): Likewise.
7076 Use __libc_open, __libc_write, and __libc_close instead of
7077 open, write, and close respectively.
7078
7079 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7080 Rewrite as statement expression since it must return a value.
7081
7082 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7083 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7084 __pthread_kill.
7085
7086 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7087 alias __pthread_once_internal.
7088
6ccb3834
UD
7089 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7090
d3c9f895
UD
70912002-12-06 Ulrich Drepper <drepper@redhat.com>
7092
4614167a
UD
7093 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7094 * tst-stdio1.c: New file.
7095 * tst-stdio2.c: New file.
7096
a4548cea
UD
7097 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7098
d3c9f895
UD
7099 * Makefile (tests): Comment out tst-locale2 for now.
7100 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7101
7102 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7103 -D_IO_MTSAFE_IO.
7104 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7105 Use _IO_lock_init instead of explicit assignment.
7106
7107 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7108 Define __libc_lock_* and __libc_lock_recursive macros with
7109 lowlevellock macros, not pthread mutexes.
7110
7111 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
7112 of pthread_mutex_lock.
7113 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
7114 instead of pthread_mutex_unlock.
7115
fde89ad0
RM
71162002-12-06 Roland McGrath <roland@redhat.com>
7117
7118 * allocatestack.c (__stack_user): Use uninitialized defn.
7119 * init.c (__pthread_initialize_minimal): Initialize it here.
7120
11767d47
RM
71212002-12-05 Roland McGrath <roland@redhat.com>
7122
fde89ad0
RM
7123 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7124 string.
7125 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7126
11767d47
RM
7127 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7128 missing & here too.
7129
440d8bc2
UD
71302002-12-05 Ulrich Drepper <drepper@redhat.com>
7131
7132 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7133 lowlevellock.
7134 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
7135 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
7136 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
7137 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
7138 for __libc_lock_* macros.
7139 * Makefile (routines): Add libc-lowlevellock.
7140
71412002-10-09 Roland McGrath <roland@redhat.com>
7142
7143 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
7144 Under [__PIC__], call the function via the pointer fetched for
7145 comparison rather than a call by name that uses the PLT.
7146 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
7147 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
7148 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
7149 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
7150 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
7151
d5ed0118
RM
71522002-12-04 Roland McGrath <roland@redhat.com>
7153
7154 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
7155
7156 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
7157 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
7158
7159 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
7160
eaa4099f
UD
71612002-12-04 Ulrich Drepper <drepper@redhat.com>
7162
7163 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
7164 a completely opaque, non-integer type.
7165 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7166
33b5d0cc
UD
71672002-12-05 Jakub Jelinek <jakub@redhat.com>
7168
7169 * sysdeps/i386/tls.h: Include stdlib.h.
7170 * sysdeps/x86_64/tls.h: Likewise.
7171
7a5cdb30
UD
71722002-12-04 Ulrich Drepper <drepper@redhat.com>
7173
c4a6d859
UD
7174 * Makefile (tests): Add tst-locale2.
7175 (tests-static): Likewise.
7176 * tst-locale2.c: New file.
7177
7a5cdb30
UD
7178 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
7179 volatile and add memory clobbers to lock operations.
7180
d82d5d12
UD
71812002-12-03 Ulrich Drepper <drepper@redhat.com>
7182
69cae3cf
UD
7183 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
7184 * sysdeps/i386/i486/bits/atomic.h: New file.
7185 * sysdeps/i386/i586/bits/atomic.h: New file.
7186 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
7187 include i486 version.
7188 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
7189 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 7190 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 7191
e4044c01
UD
7192 * allocatestack.c (get_cached_stack): Don't crash if we first
7193 found a stack with a larger size then needed.
7194 Reported by Hui Huang <hui.huang@sun.com>.
7195
d82d5d12
UD
7196 * Makefile (tests): Add tst-sysconf.
7197 * tst-sysconf.c: New file.
7198
7199 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
7200 PTHREAD_THREADS_MAX.
7201
fa9a4ff0
RM
72022002-12-02 Roland McGrath <roland@redhat.com>
7203
7204 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
7205 Declare using hidden_proto instead of attribute_hidden, so there are
7206 non-.hidden static symbols for gdb to find.
7207 (__pthread_keys): Likewise.
7208 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
7209 * allocatestack.c (__stack_user): Likewise.
7210 * pthread_create.c (__pthread_keys): Likewise.
7211 (__nptl_threads_events, __nptl_last_event): Make these static instead
7212 of hidden.
7213 * pthread_key_create.c (__pthread_pthread_keys_max,
7214 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
7215
91949a33
UD
72162002-12-02 Ulrich Drepper <drepper@redhat.com>
7217
c22b52fa
UD
7218 * Makefile (tests): Add tst-locale1. If buid-static is yes link
7219 statically.
7220 * tst-locale1.c: New file.
7221
beb6aa41
UD
7222 * pthread_cond_timedwait.c: Include <stdlib.h>.
7223
91949a33
UD
7224 * Makefile (tests): Add tst-fork2 and tst-fork3.
7225 * tst-fork2.c: New file.
7226 * tst-fork3.c: New file.
7227
654dff90
UD
72282002-11-28 Ulrich Drepper <drepper@redhat.com>
7229
cb0e76b4
UD
7230 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
7231
7232 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
7233 require it to 200112L.
7234
7235 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
7236 instruction only if HAVE_CMOV is defined.
7237 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
7238
975aa229
UD
7239 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
7240
654dff90
UD
7241 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
7242
7243 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
7244
7245 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
7246
a3931336
UD
72472002-11-27 Ulrich Drepper <drepper@redhat.com>
7248
c10c099c
UD
7249 * sysdeps/x86_64/bits/atomic.h: New file.
7250
7251 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
7252 16-bit operations.
7253
dca99d27
UD
7254 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
7255 possible since gettid cannot fail.
7256
f78deea6
UD
7257 * sysdeps/x86_64/pthreaddef.h: New file.
7258
7259 * sysdeps/i386/pthreaddef.h (gettid): Removed.
7260
7261 * sysdeps/x86_64/pthread_spin_init.c: New file.
7262 * sysdeps/x86_64/pthread_spin_lock.c: New file.
7263 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
7264 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
7265
7266 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
7267 Add missing lock prefix. Minute optimization.
7268
7269 * tst-spin2.c (main): Also check successful trylock call.
7270
7271 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
7272 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
7273
7274 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
7275 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
7276
7277 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
7278 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
7279 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
7280
7281 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
7282 value in case of an error.
7283
a3931336
UD
7284 * sysdeps/x86_64/tls.h: New file.
7285
76a50749
UD
72862002-11-26 Ulrich Drepper <drepper@redhat.com>
7287
117c452c
UD
7288 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
7289 takes the array member name and the index as parameters.
7290 (THREAD_SETMEM_NC): Likewise.
7291 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
7292 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
7293 interfaces.
7294
7295 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
7296 to decide which code to use.
7297 (THREAD_SETMEM_NC): Likewise.
7298
76a50749
UD
7299 * allocatestack.c (queue_stack): Don't remove stack from list here.
7300 Do it in the caller. Correct condition to prematurely terminate
7301 loop to free stacks.
7302 (__deallocate_stack): Remove stack from list here.
7303
73042002-11-26 Ulrich Drepper <drepper@redhat.com>
7305
7306 * Makefile (tests): Add tst-stack1.
7307 * tst-stack1.c: New file.
7308
7309 * allocatestack.c (allocate_stack): Initialize the TCB on a user
7310 provided stack.
7311
7312 * pthread_attr_getstack.c: Return bottom of the thread area.
7313
73142002-11-25 Ulrich Drepper <drepper@redhat.com>
7315
7316 * Makefile (libpthread-routines): Add pt-allocrtsig and
7317 pthread_kill_other_threads.
7318 * pt-allocrtsig.c: New file.
7319 * pthread_kill_other_threads.c: New file.
7320 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
7321 all three functions.
7322 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7323 allocrtsig.
7324 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
7325 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
7326 and __libc_allocate_rtsig_private.
7327 * Versions (libpthread): Export pthread_kill_other_threads_np,
7328 __libc_current_sigrtmin, and __libc_current_sigrtmax.
7329
73302002-11-24 Ulrich Drepper <drepper@redhat.com>
7331
7332 * allocatestack.c (allocate_stack): stackaddr in attribute points to
7333 the end of the stack. Adjust computations.
7334 When mprotect call fails dequeue stack and free it.
7335 * pthread_attr_setstack.c: Store top of the stack in stackaddr
7336 attribute.
7337 * pthread_getattr_np.c: Likewise.
7338
7339 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
7340 surprises.
7341
73422002-11-23 Ulrich Drepper <drepper@redhat.com>
7343
7344 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
7345 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
7346
73472002-11-22 Ulrich Drepper <drepper@redhat.com>
7348
7349 * pthread_getspecific.c: Optimize access to first 2nd-level array.
7350 * pthread_setspecific.c: Likewise.
7351
73522002-11-21 Ulrich Drepper <drepper@redhat.com>
7353
7354 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
7355 definitions. Get them from the official place.
7356 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
7357
7358 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
7359 Use new CLONE_ flags in clone() calls.
7360
7361 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
7362 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
7363
7364 * Versions: Add pthread_* functions for libc.
7365 * forward.c: New file.
7366
7367 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
7368 errno-loc.
7369 * herrno.c: New file.
7370 * res.c: New file.
7371
7372 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
7373 sem_trywait, and sem_timedwait. Add herrno and res.
7374 * sem_init.c: Don't initialize lock and waiters members.
7375 * sem_open.c: Likewise.
7376 * sem_post.c: Removed.
7377 * sem_wait.c: Removed.
7378 * sem_trywait.c: Removed.
7379 * sem_timedwait.c: Removed.
7380 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
7381 Includes full implementations of sem_post, sem_wait, sem_trywait,
7382 and sem_timedwait.
7383 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
7384 for new implementation.
7385 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
7386 and waiters fields.
7387
7388 * tst-sem3.c: Improve error message.
7389 * tst-signal3.c: Likewise.
7390
7391 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
7392 to tell the kernel about the termination futex and to initialize tid
7393 member. Don't initialize main_thread.
7394 * descr.h (struct pthread): Remove main_thread member.
7395 * cancelllation.c (__do_cancel): Remove code handling main thread.
7396 The main thread is not special anymore.
7397
7398 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
7399 size of the stacks to stack_cache_actsize.
7400
7401 * pt-readv.c: Add missing "defined".
7402 * pt-sigwait.c: Likewise.
7403 * pt-writev.c: Likewise.
7404
74052002-11-09 Ulrich Drepper <drepper@redhat.com>
7406
7407 * Versions: Export __connect from libpthread.
7408 Patch by Luca Barbieri <ldb@ldb.ods.org>.
7409
7410 * Makefile (libpthread-routines): Add pt-raise.
7411 * sysdeps/unix/sysv/linux/raise.c: New file.
7412 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
7413 * sysdeps/generic/pt-raise.c: New file.
7414
7415 * pthread_cond_init.c: Initialize all data elements of the condvar
7416 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
7417
7418 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
7419 * pthread_create.c: Likewise.
7420
7421 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
7422 * tst-key1.c: New file.
7423 * tst-key2.c: New file.
7424 * tst-key3.c: New file.
7425
7426 * Versions: Export pthread_detach for version GLIBC_2.0.
7427 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
7428
74292002-11-08 Ulrich Drepper <drepper@redhat.com>
7430
7431 * pthread_key_create.c: Terminate search after an unused key was found.
7432 Patch by Luca Barbieri <ldb@ldb.ods.org>.
7433
7434 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
7435 Patch by Luca Barbieri <ldb@ldb.ods.org>.
7436
74372002-10-10 Ulrich Drepper <drepper@redhat.com>
7438
7439 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
7440 dynamic lookup for errno in PIC.
7441
7442 * allocatestack.c (get_cached_stack): Rearrange code slightly to
7443 release the stack lock as soon as possible.
7444 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
7445 the static TLS block.
7446 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
7447
7448 * cancellation.c: Renamed from cancelation.c.
7449 * Makefile: Adjust accordingly.
7450 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
7451 * cleanup_defer.c: Use CANCELLATION_P.
7452 * pthread_testcancel.c: Likewise.
7453 * descr.h: Fix spelling in comments.
7454 * init.c: Likewise.
7455 * pthread_getattr_np.c: Likewise.
7456 * pthread_getschedparam.c: Likewise.
7457 * pthread_setschedparam.c: Likewise.
7458 * Versions: Likewise.
7459
7460 * pt-pselect.c: New file.
7461 * Makefile (libpthread-routines): Add pt-pselect.
7462 * Versions: Add pselect.
7463
7464 * tst-cancel4.c: New file.
7465 * Makefile (tests): Add tst-cancel4.
7466
74672002-10-09 Ulrich Drepper <drepper@redhat.com>
7468
7469 * pthread_mutex_lock.c: Always record lock ownership.
7470 * pthread_mutex_timedlock.c: Likewise.
7471 * pthread_mutex_trylock.c: Likewise.
7472
7473 * pt-readv.c: New file.
7474 * pt-writev.c: New file.
7475 * pt-creat.c: New file.
7476 * pt-msgrcv.c: New file.
7477 * pt-msgsnd.c: New file.
7478 * pt-poll.c: New file.
7479 * pt-select.c: New file.
7480 * pt-sigpause.c: New file.
7481 * pt-sigsuspend.c: New file.
7482 * pt-sigwait.c: New file.
7483 * pt-sigwaitinfo.c: New file.
7484 * pt-waitid.c: New file.
7485 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
7486 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
7487 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
7488 * Versions: Add all the new functions.
7489
7490 * tst-exit1.c: New file.
7491 * Makefile (tests): Add tst-exit1.
7492
7493 * sem_timedwait.c: Minor optimization for more optimal fastpath.
7494
74952002-10-08 Ulrich Drepper <drepper@redhat.com>
7496
7497 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
7498
7499 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
7500 call. pthread_join is an official cancellation point.
7501 * pthread_timedjoin.c: Likewise.
7502
7503 * pthread_cond_wait.c: Revert order in which internal lock are dropped
7504 and the condvar's mutex are retrieved.
7505 * pthread_cond_timedwait.c: Likewise.
7506 Reported by dice@saros.East.Sun.COM.
7507
75082002-10-07 Ulrich Drepper <drepper@redhat.com>
7509
7510 * pthreadP.h: Cut out all type definitions and move them...
7511 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
7512 * pthreadP.h: Include <internaltypes.h>.
7513
7514 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
7515 performance tweaks.
7516
7517 * sem_trywait.c: Shuffle #includes around to get right order.
7518 * sem_timedwait.c: Likewise.
7519 * sem_post.c: Likewise.
7520 * sem_wait.c: Likewise.
7521
7522 * nptl 0.3 released.
7523
7524 * Makefile (tests): Add tst-signal3.
7525 * tst-signal3.c: New file.
7526
75272002-10-05 Ulrich Drepper <drepper@redhat.com>
7528
7529 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
7530 the asms modify the sem object.
7531 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
7532
7533 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
7534 the actual members.
7535 * pthreadP.h (struct sem): New type. Actual semaphore type.
7536 * semaphoreP.h: Include pthreadP.h.
7537 * sem_getvalue.c: Adjust to sem_t change.
7538 * sem_init.c: Likewise.
7539 * sem_open.c: Likewise.
7540 * sem_post.c: Likewise.
7541 * sem_timedwait.c: Likewise.
7542 * sem_trywait.c: Likewise.
7543 * sem_wait.c: Likewise.
7544
75452002-10-04 Ulrich Drepper <drepper@redhat.com>
7546
7547 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
7548 * tst-basic2.c: New file.
7549 * tst-exec1.c: New file.
7550 * tst-exec2.c: New file.
7551 * tst-exec3.c: New file.
7552
7553 * tst-fork1.c: Remove extra */.
7554
7555 * nptl 0.2 released. The API for IA-32 is complete.