]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Optimize x86-64 pthread_cond_wait.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
30b1954a
UD
12009-07-18 Ulrich Drepper <drepper@redhat.com>
2
3 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4 (__pthread_cond_wait): Convert to using exception handler instead of
5 registered unwind buffer.
6
d52c96e7
UD
72009-07-17 Ulrich Drepper <drepper@redhat.com>
8
f351f2b7
UD
9 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
10 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
11 use absolute timeout.
12
0adae468
UD
13 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
14 handling of uncontested semaphore.
15
d52c96e7
UD
16 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
17 (__condvar_cleanup): Rewrite to use cfi directives instead of
18 hand-coded unwind tables.
63601ccd
UD
19 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
20 Likewise.
c3c2f3cf 21 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
aee2665a
UD
22 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
23 Likewise.
d52c96e7 24
bfdb73e1
UD
252009-06-12 Ulrich Drepper <drepper@redhat.com>
26
27 * Makefile (libpthread-routines): Add pthread_sigqueue.
28 * Versions: Add pthread_sigqueue for GLIBC_2.11.
29 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
30 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
31
1828530f
BK
322009-06-11 Ulrich Drepper <drepper@redhat.com>
33
34 [BZ #10262]
35 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
36 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
37 cannot be assumed.
38 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
39
a5b8b56d
UD
402009-05-16 Ulrich Drepper <drepper@redhat.com>
41
e20c4ef0
UD
42 * libc-cancellation.c: Move __libc_cleanup_routine to...
43 * libc-cleanup.c: ...here. New file.
44 * Makefile (routines): Add libc-cleanup.
45
cba0ca79
UD
46 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
47 test.
48 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
49 * sysdeps/pthread/librt-cancellation.c: Likewise.
50
a5b8b56d
UD
51 [BZ #9924]
52 * nptl-init.c: Renamed from init.c.
53 * Makefile: Change all occurences of init.c to nptl-init.c.
54
1a7f254b
UD
552009-05-15 Ulrich Drepper <drepper@redhat.com>
56
9437b427
UD
57 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
58 to test when deciding on the delay.
59 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
60 * pthread_cancel.c: Close race between deciding on sending a signal
61 and setting the CANCELING_BIT bit.
62
1a7f254b
UD
63 * cancellation.c (__pthread_disable_asynccancel): Don't return if
64 thread is canceled.
65 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
66
d5c157a9
UD
672009-04-27 Ulrich Drepper <drepper@redhat.com>
68
69 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
70 is available.
71 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
72 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
73 * sysdeps/i386/tls.h: Likewise.
74 (tcbhead_t): Add __private_tm member.
75
f521be31
UD
762009-04-26 Ulrich Drepper <drepper@redhat.com>
77
5efe8650
UD
78 * sem_open.c (sem_open): Rewrite initialization of initsem to
79 avoid warnings.
80
f521be31
UD
81 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
82 Avoid warning by using may_alias attribute on ptrhack.
83
d301a6e1
UD
842009-04-22 Ulrich Drepper <drepper@redhat.com>
85
5497de87 86 [BZ #10090]
d301a6e1
UD
87 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
88 Check policy and priority for validity.
89 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
90
71a5bd3e
UD
912009-03-15 Ulrich Drepper <drepper@redhat.com>
92
93 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
94 (__pthread_cond_timedwait): Change to use cfi directives instead of
95 hand-coded unwind sections.
96
30991b8b
UD
972009-03-10 Ulrich Drepper <drepper@redhat.com>
98
99 * init.c (nptl_freeres): Compile only for SHARED.
100
9920a6b8
JJ
1012009-03-09 Jakub Jelinek <jakub@redhat.com>
102
103 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
104 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
105 FUTEX_BITSET_MATCH_ANY.
106
e965d514
RM
1072009-02-27 Roland McGrath <roland@redhat.com>
108
109 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
110 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
111
6cbe890a
UD
1122009-02-26 Ulrich Drepper <drepper@redhat.com>
113
114 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
115 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
116 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
117 200112L to 200809L.
118
77db439e
UD
1192009-02-25 Ulrich Drepper <drepper@redhat.com>
120
121 * sysdeps/pthread/pthread.h: The robust mutex functions are in
122 POSIX 2008.
123
5be0a688
UD
1242009-02-24 Ulrich Drepper <drepper@redhat.com>
125
126 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
127 Unify name of include protector macro.
128
4c869eb6
UD
1292009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
130
131 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
132 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
133
cca50323
UD
1342009-01-29 Ulrich Drepper <drepper@redhat.com>
135
7f901dd7
UD
136 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
137 pointer variables.
138
cca50323
UD
139 * allocatestack.c (__free_stacks): Renamed from free_stacks.
140 (__free_stack_cache): Removed. Change callers to call __free_stacks.
141 * init.c (nptl_freeres): New function.
142 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
143 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
144 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
145 variable.
146 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
147 load DSO. Assign last.
148 (__unwind_freeres): New function.
149
150 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
151 for better debugging. No need to use stack_list_add here.
152
a7bd183f
UD
1532009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
154
155 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
156 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
157 instead of computing relative timeout.
158 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
159 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
160
563ee1cb
UD
1612009-01-25 Ulrich Drepper <drepper@redhat.com>
162
163 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
164
f25c7b08
UD
1652009-01-08 Ulrich Drepper <drepper@redhat.com>
166
167 * sysdeps/pthread/list.h (list_add): Initialize new element first.
168 (list_add_tail): Removed.
169
40de0fe3
JJ
1702009-01-07 Ulrich Drepper <drepper@redhat.com>
171
172 * (in_flight_stack): New variable.
173 (stack_list_del): New function. Use instead of list_del.
174 (stack_list_add): New function. Use instead of list_add when adding to
175 stack_cache and stack_used lists.
176 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
177 when the fork call interrupted another thread.
178
3c612057
UD
1792009-01-04 Ulrich Drepper <drepper@redhat.com>
180
181 * init.c (__pthread_initialize_minimal_internal): Optimize test
182 FUTEX_CLOCK_REALTIME a bit.
183
19834b42
UD
1842009-01-03 Ulrich Drepper <drepper@redhat.com>
185
186 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
187 only passing five parameters to FUTEX_WAIT_BITSET call.
188
189 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a9fa090b 190 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
19834b42
UD
191 instead of computing relative timeout.
192
7dd650d7
UD
1932009-01-02 Ulrich Drepper <drepper@redhat.com>
194
cbd8aeb8
UD
195 * init.c (__pthread_initialize_minimal_internal): Check for
196 FUTEX_CLOCK_REALTIME flag.
197 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
a9fa090b 198 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
cbd8aeb8
UD
199 relative timeout.
200
7dd650d7
UD
201 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
202 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
203 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
204 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
205 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
206 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
207
217d45cd
UD
2082008-12-09 Ulrich Drepper <drepper@redhat.com>
209
210 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
211 loop body instead of ; to avoid gcc warnings.
212 (pthread_cleanup_pop_restore_np): Likewise.
213 Patch by Caolán McNamara <caolanm@redhat.com>.
214
6de79a49
UD
2152008-12-09 Jakub Jelinek <jakub@redhat.com>
216
217 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
218 fast path here, for robust/PI/PP mutexes call
219 __pthread_mutex_lock_full. Don't use switch, instead use a series
220 of ifs according to their probability.
221 (__pthread_mutex_lock_full): New function.
222 * pthread_mutex_unlock.c: Include assert.h.
223 (__pthread_mutex_unlock_usercnt): Handle only the
224 fast path here, for robust/PI/PP mutexes call
225 __pthread_mutex_unlock_full. Don't use switch, instead use a series
226 of ifs according to their probability.
227 (__pthread_mutex_unlock_full): New function.
228 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
229 (__pthread_mutex_lock_full): Define.
230
71bb2639
UD
2312008-12-08 Ulrich Drepper <drepper@redhat.com>
232
233 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
234 implementation. Add necessary padding and.
235 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
236 words.
237
247626f3
UD
2382008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
239
240 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
241 and FUTEX_WAKE_BITSET.
242
da5ac135
UD
2432008-12-02 Ulrich Drepper <drepper@redhat.com>
244
245 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
246 and FUTEX_WAKE_BITSET.
247 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
248 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
249 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
250 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
251
c0439b95
RM
2522008-11-25 Roland McGrath <roland@redhat.com>
253
254 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
255 Subdirectories moved to ports repository as
256 sysdeps/.../nptl subdirectories.
257
0e54a725
UD
2582008-11-12 Jakub Jelinek <jakub@redhat.com>
259
260 [BZ #7008]
261 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
262 of old value.
263 * pthread_cond_init.c (__pthread_cond_init): Fix
264 cond->__data.__nwaiters initialization.
265 * Makefile (tests): Add tst-cond23.
266 * tst-cond23.c: New test.
267
4b23f9bd
JJ
2682008-11-07 Jakub Jelinek <jakub@redhat.com>
269
270 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
271 arguments.
272 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
273 arguments.
274
efac1fce
UD
2752008-11-01 Ulrich Drepper <drepper@redhat.com>
276
277 [BZ #6955]
278 * pthread_mutex_lock.c: Add support for private PI mutexes.
279 * pthread_mutex_timedlock.c: Likewise.
280 * pthread_mutex_trylock.c: Likewise.
281 * pthread_mutex_unlock.c: Likewise.
282 Patch mostly by Ben Jackson <ben@ben.com>.
283
bf837fa3
UD
2842008-10-31 Ulrich Drepper <drepper@redhat.com>
285
286 [BZ #6843]
287 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
288 Increase stack size for helper thread.
289
208bc836
UD
2902008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
291
292 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
293 assembly with a clobber list for access registers a0 and a1.
294
17f8b4a9
UD
2952008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
296
297 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
298 to force runp->refcntr to be read from memory.
299
2458c748
AJ
3002008-09-08 Richard Guenther <rguenther@suse.de>
301
302 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
303 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
304 lll_timedlock, lll_robust_timedlock, lll_unlock,
305 lll_robust_unlock): Promote private to int.
306
965805e8
UD
3072008-08-15 Ulrich Drepper <drepper@redhat.com>
308
309 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
310 ARCH_RETRY_MMAP definitions.
311 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
312 Define MAP_STACK when not defined.
313 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
314 handling of ARCH_RETRY_MMAP.
315
bd7f4857
UD
3162008-07-30 Ulrich Drepper <drepper@redhat.com>
317
318 * tst-align2.c (f): Print message that f is reached.
319
619cc2f6
UD
3202008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
321
322 [BZ #6740]
323 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
324 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
325
8ccf22f9
UD
3262008-07-25 Ulrich Drepper <drepper@redhat.com>
327
328 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
329 SOCK_CLOEXEC if possible.
330
3312008-05-29 Ulrich Drepper <drepper@redhat.com>
332
333 * Makefile (tests): Add tst-rwlock2a.
334 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
335 * tst-rwlock2a.c: New file.
336
5a337776
UD
3372008-06-12 Ulrich Drepper <drepper@redhat.com>
338
339 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
340
e4d6e7f5
UD
3412008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
342
343 * sysdeps/pthread/pthread.h: Fix typo in comment.
344
d6296e88
UD
3452008-05-28 Ulrich Drepper <drepper@redhat.com>
346
347 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
348 of CPU set to the kernel.
349
62605cbf
UD
3502008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
351
352 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
353 cfi directives.
354 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
355 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
356 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
357 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
358 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
359 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
360
3612008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
362
363 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
364 cfi directives.
365 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
366 Likewise.
367 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
368 Likewise.
369 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
370 Likewise.
371
4b2c85c0
UD
3722008-05-26 Ulrich Drepper <drepper@redhat.com>
373
374 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
375
b72f5692 3762008-05-20 Jakub Jelinek <jakub@redhat.com>
4b2c85c0
UD
377
378 David S. Miller <davem@davemloft.net>
3b15b590 379
b72f5692 380 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3b15b590 381
cdffaaa6
UD
3822008-05-10 Ulrich Drepper <drepper@redhat.com>
383
384 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
385 __pshared correctly.
386 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
387 Likewise.
388 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
389 Likewise.
390 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
391 Likewise.
392 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
393 Likewise.
394 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
395
2313c48f
JJ
3962008-04-14 David S. Miller <davem@davemloft.net>
397
398 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
399 (__old_sem_wait): Fix argument to lll_futex_wait().
400
2f611ada
UD
4012007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
402
403 * pthread_create.c: Require pthread_mutex_trylock and
404 pthread_key_delete for libgcc.
405
d24be489
JJ
4062008-04-08 Jakub Jelinek <jakub@redhat.com>
407
408 [BZ #6020]
409 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
410 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
411 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
412
f96853be
UD
4132008-03-27 Ulrich Drepper <drepper@redhat.com>
414
8ccf22f9 415 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
f96853be
UD
416 <linux/limits.h> has defined it.
417 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
418 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
419 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
420 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
421
354b7527
JJ
4222008-03-18 Jakub Jelinek <jakub@redhat.com>
423
424 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
425 of ASSEMBLER.
426 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
427 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
428
702ae329
UD
4292008-03-14 Ulrich Drepper <drepper@redhat.com>
430
431 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
432 HAVE_DL_DISCOVER_OSVERSION.
433 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
434 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
435
443db178
UD
4362008-03-07 Ulrich Drepper <drepper@redhat.com>
437
438 [BZ #5778]
439 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
440 _POSIX_CHOWN_RESTRICTED value to zero.
441
67fbfa5c
RM
4422008-01-31 Roland McGrath <roland@redhat.com>
443
444 * Makefile (omit-deps): Variable removed.
445
dd3113da
UD
4462008-01-30 Ulrich Drepper <drepper@redhat.com>
447
448 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
449 unnecessary addr32 prefix.
450
16cd816f
RM
4512008-01-29 Roland McGrath <roland@redhat.com>
452
453 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
454
b4b166af
UD
4552008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
456
457 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
458
4592008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
460
461 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
462 a scratch register.
463 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
464 (__lll_lock_wait_private): Fix typo.
465 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
466 (pthread_barrier_wait): Likewise. Adjust XADD use.
467 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
468 Adjust XADD use.
469 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
470 (pthread_rwlock_timedrdlock): Return correct return value.
471 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
16cd816f 472 (pthread_rwlock_timedwrlock): Likewise.
b4b166af 473
eaf95a26
UD
4742008-01-15 Ulrich Drepper <drepper@redhat.com>
475
476 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
477 thread returns the program exits with an error code.
478
ab355d9a
UD
4792008-01-10 Ulrich Drepper <drepper@redhat.com>
480
481 * pthread-errnos.sym: Add EOVERFLOW.
482 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
483 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
484 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
485 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
486
b8cca206
UD
4872007-12-14 Ulrich Drepper <drepper@redhat.com>
488
489 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
490 parameter. Passed it as permission to mmap.
491 * allocatestack.c (allocate_stack): Pass prot as second parameter
492 to ARCH_RETRY_MMAP.
493
189dce4f
UD
4942007-12-12 Ulrich Drepper <drepper@redhat.com>
495
3eb0e1c6
UD
496 * tst-basic7.c: Allocate memory for the stack.
497
189dce4f
UD
498 [BZ #5465]
499 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
500 (__pthread_cond_timedwait): Don't use VDSO.
58d11795 501 Patch by Michal Januszewski.
189dce4f 502
26e21e75
UD
5032007-12-07 Ulrich Drepper <drepper@redhat.com>
504
505 [BZ #5455]
506 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
507 Allow label before pthread_cleanup_pop.
508 (pthread_cleanup_pop_restore_np): Likewise.
509
191ec77f
UD
5102007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
511
512 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
513 Store 2 before returning ETIMEDOUT.
514
c012be6f
UD
5152007-11-23 Ulrich Drepper <drepper@redhat.com>
516
517 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
518 Store 2 before returning ETIMEDOUT.
519 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
520 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
521 (__lll_lock_wait_private): Optimize.
522 (__lll_lock_wait): Likewise.
523
77f1e09a
UD
5242007-11-20 Jakub Jelinek <jakub@redhat.com>
525
526 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
527 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
528 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
529
0f7e0ee5
UD
5302007-11-08 Ulrich Drepper <drepper@redhat.com>
531
cbed6a60
UD
532 [BZ #5240]
533 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
534 If we time out, try one last time to lock the futex to avoid
535 losing a wakeup signal.
536 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
537 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
538
0f7e0ee5
UD
539 [BZ #5245]
540 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
541 if necessary.
542
f6ed654c
UD
5432007-11-07 Ulrich Drepper <drepper@redhat.com>
544
545 [BZ #5245]
546 * allocatestack.c (allocate_stack): Change ENOMEM error in case
547 mmap failed to EAGAIN.
548 * Makefile (tests): Add tst-basic7.
549 * tst-basic7.c: New file.
550
b92e3780
UD
5512007-11-05 Ulrich Drepper <drepper@redhat.com>
552
553 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
554 Use __linkin_atfork.
555
94a749f6
UD
5562007-11-03 Mike Frysinger <vapier@gentoo.org>
557
558 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
559 missing line continuations.
560 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
561 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
562
f160a450
UD
5632007-10-28 Ulrich Drepper <drepper@redhat.com>
564
565 [BZ #5220]
566 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
567 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
568 (struct timer): Add next element.
569 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
570 enqueue timer structure into __active_timer_sigev_thread list.
571 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
572 remove timer struct from __active_timer_sigev_thread.
573 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
574 Before using timer structure make sure it is still on the
575 __active_timer_sigev_thread list. Keep lock until done.
576 Define __active_timer_sigev_thread and
577 __active_timer_sigev_thread_lock.
578
94833f11
UD
5792007-10-27 Ulrich Drepper <drepper@redhat.com>
580
581 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
582 Redefine thread_atfork for use of ATFORK_MEM.
583 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
584 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
585 function.
586 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
587 Use atomic operation when removing first element of list.
588
96c06e08
JJ
5892007-10-17 Jakub Jelinek <jakub@redhat.com>
590
591 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
592 routine instead of an alias to __new_sem_post.
593
e807818b
JJ
5942007-10-15 Jakub Jelinek <jakub@redhat.com>
595
596 * init.c (__pthread_initialize_minimal): Initialize word to appease
597 valgrind.
598
59d430c6
UD
5992007-10-10 Jakub Jelinek <jakub@redhat.com>
600
601 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
602 libc.so just clear NAME.
603 (__libc_rwlock_fini): Nop inside of libc.so.
604 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
605 all zeros.
606
221d9d8e
UD
6072007-09-02 Ulrich Drepper <drepper@redhat.com>
608
609 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
610 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
611 unlocking failed.
612 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
613
2a01ce56
UD
6142007-08-21 Ulrich Drepper <drepper@redhat.com>
615
616 [BZ #4938]
617 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
618 reclaimed stack if necessary.
619 * Makefile (tests): Add tst-tsd6.
620 * tst-tsd6.c: New file.
621
c273641b
JJ
6222007-08-21 Jakub Jelinek <jakub@redhat.com>
623
624 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
625 Add private argument.
626
fb84593c
UD
6272007-08-20 Ulrich Drepper <drepper@redhat.com>
628
629 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
630 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
631
3e8d1eab
JJ
6322007-08-16 Jakub Jelinek <jakub@redhat.com>
633
634 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
635 (__lll_robust_timedlock): Pass private as last argument to
636 __lll_robust_timedlock_wait.
637 (__lll_unlock): Fix a pasto.
638
e4720b0e
JJ
6392007-08-15 Jakub Jelinek <jakub@redhat.com>
640
641 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
642 sparc_old_sem): New structs.
643 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
644 (__sem_wait_cleanup): New function.
645 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
646 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
647 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
648 lll_futex_wait.
649 (__old_sem_wait): New function.
650 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
651 nptl/sysdeps/unix/sysv/linux/sparc version.
652 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
653 Likewise.
654 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
655 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
656 (__new_sem_trywait): Use sparc_old_sem structure.
657 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
658 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
659 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
660 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
661 lll_futex_timed_wait.
662 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
663 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
664 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
665 lll_futex_wake.
666 (__old_sem_post): New function.
667 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
668 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
669 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
670 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
671 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
672 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
673
d13f4a43
UD
6742007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
675
676 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
677 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
678 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
679 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
680 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
681 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
682 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
683 Use FUTEX_WAKE_OP.
684 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
685 kernel-features.h and tcb-offsets.h.
686 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
687 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
688 process private.
689 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
690 tcb-offsets.h.
691 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
692 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
693 process private.
694 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
695 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
696 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
697 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
698 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
699 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
700 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
701
702a9414
JJ
7022007-08-14 Jakub Jelinek <jakub@redhat.com>
703
467d1345
JJ
704 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
705 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
706 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
707 lll_futex_timed_wait.
708
702a9414
JJ
709 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
710 __lll_robust_unlock): Rewrite as macros instead of inline functions.
711 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
712 __lll_robust_unlock, __lll_wait_tid): Likewise.
713
22502ea2
UD
7142007-08-13 Jakub Jelinek <jakub@redhat.com>
715
716 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
717 Fix a pasto.
718 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
719 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
720 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
721 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
723 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
724 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
725 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
726 kernel-features.h.
727 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
728 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
729 process private. Switch DW_CFA_advance_loc1 and some
730 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
731 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
732 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
733 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
734 process private. Switch DW_CFA_advance_loc{1,2} and some
735 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
736 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
737 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
738 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
739 Likewise.
740 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
741 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
742 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
743 Likewise.
744 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
745 (__pthread_cond_broadcast): Compare %r8 instead of
746 dep_mutex-cond_*(%rdi) with $-1.
747 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
748 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
749 of oring.
750
4baf59ad
UD
7512007-08-13 Ulrich Drepper <drepper@redhat.com>
752
753 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
754
9c6f6953
UD
7552007-08-13 Jakub Jelinek <jakub@redhat.com>
756
757 * allocatestack.c: Include kernel-features.h.
758 * pthread_create.c: Likewise.
759 * pthread_mutex_init.c: Likewise.
760 * init.c: Likewise.
761 * pthread_cond_timedwait.c: Likewise.
762 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
763 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
764 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
765 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
766 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
767 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
768 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
769 Likewise.
770 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
771 Likewise.
772 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
773 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
774 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
775 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
776
974a1f0f
UD
7772007-08-12 Jakub Jelinek <jakub@redhat.com>
778
779 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
780 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
781 byte elements. One of them is the new __shared element.
782 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
783 adjust names of other padding elements.
784 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
785 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
786 byte elements. One of them is the new __shared element.
787 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
788 adjust names of other padding elements.
789 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
790 Renamed __pad1 element to __shared, adjust names of other padding
791 elements.
792 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
793 (pthread_rwlock_t): Likewise.
794 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
795 typo.
796
7972007-08-09 Anton Blanchard <anton@samba.org>
798
799 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
800
f47e2626
UD
8012007-08-12 Ulrich Drepper <drepper@redhat.com>
802
803 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
804 <kernel-features.h>.
805 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
806
5bd8a249
UD
8072007-08-11 Ulrich Drepper <drepper@redhat.com>
808
809 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
810 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
811 dealing with robust mutexes.
812 * pthread_mutex_timedlock.c: Likewise.
813 * pthread_mutex_trylock.c: Likewise.
814 * pthread_mutex_unlock.c: Likewise.
815 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
816
8172007-08-06 Jakub Jelinek <jakub@redhat.com>
818
819 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
820 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
821 (PTHREAD_MUTEX_PSHARED): Define.
822 * pthread_mutex_init.c (__pthread_mutex_init): Set
823 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
824 mutexes.
825 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
826 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
827 as second argument to lll_lock.
828 (LLL_MUTEX_TRYLOCK): Take mutex as argument
829 instead of its __data.__lock field.
830 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
831 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
832 to lll_robust_lock.
833 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
834 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
835 instead of mutex->__data.__kind directly, pass
836 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
837 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
838 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
839 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
840 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
841 to lll_timedlock, lll_robust_timedlock, lll_unlock and
842 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
843 of mutex->__data.__kind directly.
844 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
845 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
846 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
847 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
848 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
849 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
850 and lll_futex_wake.
851 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
852 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
853 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
854 directly.
855 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
856 Take mutex as argument instead of its __data.__lock field, pass
857 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
858 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
859 __data.__lock field.
860 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
861 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
862 to lll_robust_cond_lock.
863 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
864 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
865 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
866 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
867 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
868 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
869 lll_futex_wait.
870 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
871 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
872 lll_futex_wake.
873 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
874 pshared variable, pass it to lll_lock, lll_unlock,
875 lll_futex_timedwait and lll_futex_wake.
876 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
877 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
878 and lll_futex_wake.
879 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
880 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
881 macro.
882 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
883 lll_futex_wake_unlock): Likewise.
884 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
885 Likewise.
886 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
887 lll_futex_wake_unlock): Likewise.
888 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
889 Likewise.
890 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
891 lll_futex_wake_unlock): Likewise.
892 (lll_futex_wake): Fix a typo.
893 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
894 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
895 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
896 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
897 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
898 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
899 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
900 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
901 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
902 (__pthread_cond_timedwait): Likewise.
903 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
904 (__condvar_cleanup, __pthread_cond_wait): Likewise.
905
0470fa46
JJ
9062007-08-05 Jakub Jelinek <jakub@redhat.com>
907
908 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
909 Don't use CGOTSETUP and CGOTRESTORE macros.
910 (CGOTSETUP, CGOTRESTORE): Remove.
911 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
912 @local symbol.
913
64f6281c
UD
9142007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
915
916 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
917 definitions for private futexes.
918 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
919 kernel-features.h and lowlevellock.h. Use private futexes if
920 they are available.
921 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
922 (__lll_mutex_lock_wait): Rename to
923 (__lll_lock_wait): ... this. Don't compile in for libc.so.
924 (__lll_mutex_timedlock_wait): Rename to ...
925 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
926 Don't compile in for libc.so.
927 (__lll_mutex_unlock_wake): Rename to ...
928 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
929 (__lll_timedwait_tid): Use __NR_gettimeofday.
930 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
931 the header from assembler. Renamed all lll_mutex_* resp.
932 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
933 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
934 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
935 Define.
936 (__lll_lock_wait_private): Add prototype.
937 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
938 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
939 __lll_unlock_wake): Likewise.
940 (lll_lock): Add private argument. Call __lll_lock_wait_private
941 if private is constant LLL_PRIVATE.
942 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
943 lll_timedlock, lll_robust_timedlock): Add private argument.
944 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
945 if private is constant LLL_PRIVATE.
946 (lll_robust_unlock, lll_robust_dead): Add private argument.
947 (lll_lock_t): Remove.
948 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
949 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
950 lll_cond_wake, lll_cond_broadcast): Remove.
951 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
952 kernel-features.h and lowlevellock.h.
953 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
954 (LOAD_FUTEX_WAIT): Define.
955 (__lll_robust_mutex_lock_wait): Rename to ...
956 (__lll_robust_lock_wait): ... this. Add private argument.
957 Use LOAD_FUTEX_WAIT macro.
958 (__lll_robust_mutex_timedlock_wait): Rename to ...
959 (__lll_robust_timedlock_wait): ... this. Add private argument.
960 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
961 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
962 lowlevellock.h.
963 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
964 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
965 __lll_mutex_{lock,unlock}_*.
966 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
967 lowlevellock.h and pthread-errnos.h.
968 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
969 FUTEX_CMP_REQUEUE, EINVAL): Remove.
970 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
971 __lll_mutex_{lock,unlock}_*.
972 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
973 lowlevellock.h and pthread-errnos.h.
974 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
975 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
976 __lll_mutex_{lock,unlock}_*.
977 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
978 lowlevellock.h.
979 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
980 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
981 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
982 (__condvar_tw_cleanup): Likewise.
983 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
984 lowlevellock.h.
985 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
986 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
987 __lll_mutex_{lock,unlock}_*.
988 ( __condvar_w_cleanup): Likewise.
989 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
990 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
991 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
992 lowlevellock.h.
993 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
994 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
995 __lll_mutex_{lock,unlock}_*.
996 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
997 lowlevellock.h.
998 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
999 FUTEX_PRIVATE_FLAG): Remove.
1000 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1001 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1002 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1003 lowlevellock.h.
1004 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1005 FUTEX_PRIVATE_FLAG): Remove.
1006 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1007 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1008 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1009 lowlevellock.h.
1010 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1011 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1012 __lll_mutex_{lock,unlock}_*.
1013 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1014 lowlevellock.h.
1015 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1016 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1017 __lll_mutex_{lock,unlock}_*.
1018 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1019 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1020 (__new_sem_post): Use standard initial exec code sequences.
1021 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1022 lowlevellock.h.
1023 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1024 FUTEX_PRIVATE_FLAG): Remove.
1025 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1026 exec code sequences.
1027 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1028 (__new_sem_trywait): Use standard initial exec code sequences.
1029 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1030 (__new_sem_wait): Use standard initial exec code sequences.
1031
e51deae7
UD
10322007-07-31 Anton Blanchard <anton@samba.org>
1033
1034 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1035 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1036 atomic_full_barrier.
1037
10382007-07-31 Jakub Jelinek <jakub@redhat.com>
1039
1040 * allocatestack.c (stack_cache_lock): Change type to int.
1041 (get_cached_stack, allocate_stack, __deallocate_stack,
1042 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1043 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1044 as second argument to lll_lock and lll_unlock macros on
1045 stack_cache_lock.
1046 * pthread_create.c (__find_in_stack_list): Likewise.
1047 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1048 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1049 as second argument.
1050 * descr.h (struct pthread): Change lock and setxid_futex field
1051 type to int.
1052 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1053 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1054 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1055 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1056 Likewise.
1057 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1058 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1059 * pthreadP.h (__attr_list_lock): Change type to int.
1060 * pthread_attr_init.c (__attr_list_lock): Likewise.
1061 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1062 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1063 lll_{,un}lock.
1064 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1065 also for lll_futex_{wake,wait}.
1066 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1067 a pointer to const.
1068 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1069 LLL_SHARED as second argument to lll_{,un}lock.
1070 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1071 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1072 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1073 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1074 Likewise.
1075 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1076 as second argument to lll_{,un}lock macros on pd->lock.
1077 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1078 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1079 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1080 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1081 Likewise.
1082 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1083 Likewise.
1084 * pthread_once.c (once_lock): Change type to int.
1085 (__pthread_once): Pass LLL_PRIVATE as second argument to
1086 lll_{,un}lock macros on once_lock.
1087 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1088 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1089 rwlock->__data.__shared as second argument to them and similarly
1090 for lll_futex_w*.
1091 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1092 Likewise.
1093 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1094 Likewise.
1095 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1096 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1097 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1098 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1099 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1100 to lll_{,un}lock macros on __sem_mappings_lock.
1101 * sem_open.c (check_add_mapping): Likewise.
1102 (__sem_mappings_lock): Change type to int.
1103 * semaphoreP.h (__sem_mappings_lock): Likewise.
1104 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1105 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1106 instead of lll_*mutex_*, pass LLL_SHARED as last
1107 argument.
1108 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1109 pass LLL_SHARED as last argument.
1110 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1111 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1112 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1113 pass LLL_SHARED as last argument.
1114 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1115 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1116 LLL_SHARED as last argument.
1117 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1118 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1119 Similarly.
1120 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1121 __libc_lock_lock_recursive, __libc_lock_unlock,
1122 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1123 argument to lll_{,un}lock.
1124 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1125 _IO_lock_unlock): Likewise.
1126 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1127 compound literal.
1128 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1129 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1130 __fork_lock.
1131 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1132 free_mem): Likewise.
1133 (__fork_lock): Change type to int.
1134 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1135 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1136 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1137 lll_futex_wake.
1138 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1139 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1140 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1141 New function.
1142 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1143 pass it through to lll_futex_*wait, only compile in when
1144 IS_IN_libpthread.
1145 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1146 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1147 argument and pass it through to lll_futex_*wait.
1148 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1149 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1150 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1151 inline functions to __lll_* resp. __lll_robust_*.
1152 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1153 (lll_mutex_dead): Add private argument.
1154 (__lll_lock_wait_private): New prototype.
1155 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1156 __lll_robust_lock_timedwait): Add private argument to prototypes.
1157 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1158 call __lll_lock_wait_private, otherwise pass private to
1159 __lll_lock_wait.
1160 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1161 __lll_robust_timedlock): Add private argument, pass it to
1162 __lll_*wait functions.
1163 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1164 call __lll_unlock_wake_private, otherwise pass private to
1165 __lll_unlock_wake.
1166 (__lll_robust_unlock): Add private argument, pass it to
1167 __lll_robust_unlock_wake.
1168 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1169 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1170 argument, pass it through to __lll_* inline function.
1171 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1172 (lll_lock_t): Remove.
1173 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1174 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1175 lll_cond_wake, lll_cond_broadcast): Remove.
1176 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1177 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1178 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1179 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1180 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1181 the header from assembler. Renamed all lll_mutex_* resp.
1182 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1183 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1184 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1185 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1186 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1187 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1188 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1189 Remove prototype.
1190 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1191 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1192 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1193 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1194 MULTIPLE_THREADS_OFFSET as another asm operand.
1195 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1196 MULTIPLE_THREADS_OFFSET as last asm operand, call
1197 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1198 otherwise pass private as another argument to __lll_lock_wait.
1199 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1200 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1201 private as another argument to __lll_*lock_wait call.
1202 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1203 MULTIPLE_THREADS_OFFSET as another asm operand, call
1204 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1205 otherwise pass private as another argument to __lll_unlock_wake.
1206 (lll_robust_unlock): Add private argument, pass private as another
1207 argument to __lll_unlock_wake.
1208 (lll_robust_dead): Add private argument, use __lll_private_flag
1209 macro.
1210 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1211 LLL_MUTEX_LOCK_INITIALIZER.
1212 (lll_lock_t): Remove.
1213 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1214 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1215 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1216 lll_cond_wake, lll_cond_broadcast): Remove.
1217 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1218 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1219 2007-05-2{3,9} changes.
1220 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1221 kernel-features.h and lowlevellock.h.
1222 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1223 (LOAD_FUTEX_WAIT): Rewritten.
1224 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1225 define.
1226 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1227 (__lll_mutex_lock_wait): Rename to ...
1228 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1229 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1230 (__lll_mutex_timedlock_wait): Rename to ...
1231 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1232 contains private argument. Don't compile in for libc.so.
1233 (__lll_mutex_unlock_wake): Rename to ...
1234 (__lll_unlock_wake): ... this. %ecx contains private argument.
1235 Don't compile in for libc.so.
1236 (__lll_timedwait_tid): Use __NR_gettimeofday.
1237 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1238 kernel-features.h and lowlevellock.h.
1239 (LOAD_FUTEX_WAIT): Define.
1240 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1241 define.
1242 (__lll_robust_mutex_lock_wait): Rename to ...
1243 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1244 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1245 macro.
1246 (__lll_robust_mutex_timedlock_wait): Rename to ...
1247 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1248 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1249 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1250 lowlevellock.h.
1251 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1252 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1253 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1254 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1255 to __lll_lock_wait in %edx.
1256 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1257 Include lowlevellock.h and pthread-errnos.h.
1258 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1259 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1260 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1261 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1262 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1263 __lll_unlock_wake.
1264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1265 Include lowlevellock.h and pthread-errnos.h.
1266 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1267 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1268 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1269 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1270 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1271 __lll_unlock_wake.
1272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1273 Include lowlevellock.h.
1274 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1275 Don't define.
1276 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1277 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1278 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1279 __lll_unlock_wake. Use __NR_gettimeofday.
1280 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1281 Include lowlevellock.h.
1282 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1283 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1284 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1285 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1286 and __lll_unlock_wake.
1287 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1288 Include lowlevellock.h.
1289 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1290 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1291 MUTEX(%ebx) address in %edx rather than %ecx to
1292 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1293 and __lll_unlock_wake. Move return value from %ecx to %edx
1294 register.
1295 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1296 Include lowlevellock.h.
1297 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1298 Don't define.
1299 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1300 MUTEX(%ebp) address in %edx rather than %ecx to
1301 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1302 and __lll_unlock_wake. Move return value from %ecx to %edx
1303 register. Use __NR_gettimeofday.
1304 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1305 Include lowlevellock.h.
1306 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1307 Don't define.
1308 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1309 MUTEX(%ebp) address in %edx rather than %ecx to
1310 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1311 and __lll_unlock_wake. Move return value from %ecx to %edx
1312 register. Use __NR_gettimeofday.
1313 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1314 Include lowlevellock.h.
1315 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1316 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1317 MUTEX(%edi) address in %edx rather than %ecx to
1318 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1319 and __lll_unlock_wake.
1320 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1321 Include lowlevellock.h.
1322 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1323 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1324 MUTEX(%ebx) address in %edx rather than %ecx to
1325 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1326 and __lll_unlock_wake. Move return value from %ecx to %edx
1327 register.
1328 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1329 lowlevellock.h.
1330 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1331 define.
1332 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1333 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1334 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1335 lowlevellock.h.
1336 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1337 (sem_timedwait): Use __NR_gettimeofday.
1338 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1339 lowlevellock.h.
1340 (LOCK): Don't define.
1341 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1342 lowlevellock.h.
1343 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1344 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1345 are waiters.
1346 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1347 2007-05-2{3,9} changes.
1348 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1349 kernel-features.h and lowlevellock.h.
1350 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1351 (LOAD_FUTEX_WAIT): Rewritten.
1352 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1353 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1354 (__lll_mutex_lock_wait): Rename to ...
1355 (__lll_lock_wait): ... this. %esi is now private argument.
1356 Don't compile in for libc.so.
1357 (__lll_mutex_timedlock_wait): Rename to ...
1358 (__lll_timedlock_wait): ... this. %esi contains private argument.
1359 Don't compile in for libc.so.
1360 (__lll_mutex_unlock_wake): Rename to ...
1361 (__lll_unlock_wake): ... this. %esi contains private argument.
1362 Don't compile in for libc.so.
1363 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1364 kernel-features.h and lowlevellock.h.
1365 (LOAD_FUTEX_WAIT): Define.
1366 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1367 (__lll_robust_mutex_lock_wait): Rename to ...
1368 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1369 Use LOAD_FUTEX_WAIT macro.
1370 (__lll_robust_mutex_timedlock_wait): Rename to ...
1371 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1372 private, use LOAD_FUTEX_WAIT macro.
1373 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1374 lowlevellock.h.
1375 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1376 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1377 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1378 __lll_lock_wait and __lll_unlock_wake.
1379 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1380 Include lowlevellock.h and pthread-errnos.h.
1381 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1382 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1383 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1384 pass LLL_SHARED in %esi to both __lll_lock_wait and
1385 __lll_unlock_wake.
1386 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1387 Include lowlevellock.h and pthread-errnos.h.
1388 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1389 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1390 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1391 pass LLL_SHARED in %esi to both __lll_lock_wait and
1392 __lll_unlock_wake.
1393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1394 Include lowlevellock.h.
1395 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1396 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1397 pass LLL_SHARED in %esi to both __lll_lock_wait and
1398 __lll_unlock_wake.
1399 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1400 Include lowlevellock.h.
1401 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1402 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1403 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1404 and __lll_unlock_wake.
1405 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1406 Include lowlevellock.h.
1407 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1408 Don't define.
1409 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1410 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1411 and __lll_unlock_wake.
1412 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1413 Include lowlevellock.h.
1414 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1415 Don't define.
1416 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1417 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1418 and __lll_unlock_wake.
1419 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1420 Include lowlevellock.h.
1421 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1422 Don't define.
1423 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1424 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1425 and __lll_unlock_wake.
1426 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1427 Include lowlevellock.h.
1428 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1429 Don't define.
1430 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1431 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1432 and __lll_unlock_wake.
1433 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1434 Include lowlevellock.h.
1435 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1436 Don't define.
1437 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1438 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1439 and __lll_unlock_wake.
1440 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1441 lowlevellock.h.
1442 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1443 define.
1444 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1445 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1446 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1447 lowlevellock.h.
1448 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1449 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1450 lowlevellock.h.
1451 (LOCK): Don't define.
1452 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1453 lowlevellock.h.
1454 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1455 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1456 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1457 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1458 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1459 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1460 (__lll_lock_wait_private): New function.
1461 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1462 it to lll_futex_*wait. Don't compile in for libc.so.
1463 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1464 Remove.
1465 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1466 (struct sparc_pthread_barrier): Remove.
1467 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1468 struct sparc_pthread_barrier. Pass
1469 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1470 and lll_futex_wait macros.
1471 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1472 Remove.
1473 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1474 Include sparc pthread_barrier_wait.c instead of generic one.
1475
6f59d56e
UD
14762007-07-30 Jakub Jelinek <jakub@redhat.com>
1477
1475e201
UD
1478 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1479
6f59d56e
UD
1480 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1481 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1482 %ecx.
1483 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1484 (pthread_rwlock_timedwrlock): Likewise.
1485 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1486 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1487
558f0300
JJ
14882007-07-31 Jakub Jelinek <jakub@redhat.com>
1489
1490 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1491
cedb4109
UD
14922007-07-26 Jakub Jelinek <jakub@redhat.com>
1493
1494 * tst-locale2.c (useless): Add return statement.
1495
085a4412
UD
14962007-07-24 Jakub Jelinek <jakub@redhat.com>
1497
1498 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1499 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1500 * pthread_create.c (start_thread): Likewise.
1501 * init.c (sighandler_setxid): Likewise.
1502 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1503 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1504 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1505 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1506 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1507 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1508 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1509 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1510 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1511 Likewise.
1512 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1513 Likewise.
1514 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1515 Likewise.
1516 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1517 __rtld_notify): Likewise.
1518 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1519 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1520 __pthread_once): Likewise.
1521 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1522 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1523 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1524 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1525 (lll_futex_wait): Add private argument, define as wrapper around
1526 lll_futex_timed_wait.
1527 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1528 use __lll_private_flag macro.
1529 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1530 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1531 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1532 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1533 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1534 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1535 (lll_futex_wait): Add private argument, define as wrapper around
1536 lll_futex_timed_wait.
1537 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1538 use __lll_private_flag macro.
1539 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1540 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1541 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1542 Define.
1543 (lll_futex_timed_wait, lll_futex_wake): Use it.
1544 (lll_private_futex_wait, lll_private_futex_timed_wait,
1545 lll_private_futex_wake): Removed.
1546 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1547 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1548 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1549 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1550 (lll_futex_wait): Add private argument, define as wrapper around
1551 lll_futex_timed_wait.
1552 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1553 use __lll_private_flag macro.
1554 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1555 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1556 to lll_futex_*.
1557 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1558 (lll_private_futex_wait, lll_private_futex_timed_wait,
1559 lll_private_futex_wake): Removed.
1560 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1561 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1562 (lll_private_futex_wait, lll_private_futex_timed_wait,
1563 lll_private_futex_wake): Removed.
1564 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1565 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1566 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1567 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1568 (lll_futex_wait): Add private argument, define as wrapper around
1569 lll_futex_timed_wait.
1570 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1571 use __lll_private_flag macro.
1572 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1573 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1574 to lll_futex_*.
1575 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1576 Define.
1577 (lll_futex_timed_wait, lll_futex_wake): Use it.
1578 (lll_private_futex_wait, lll_private_futex_timed_wait,
1579 lll_private_futex_wake): Removed.
1580
ef0af159
JJ
15812007-07-27 Jakub Jelinek <jakub@redhat.com>
1582
1583 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1584 of the structure for sparc32.
1585
15862007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1587
1588 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1589
eb4f5909
UD
15902007-07-23 Ulrich Drepper <drepper@redhat.com>
1591
1592 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1593 code used when private futexes are assumed.
1594 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1595 Likewise.
1596
b5f13526
UD
15972007-07-23 Jakub Jelinek <jakub@redhat.com>
1598
1599 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1600 (__lll_private_flag): Define.
1601 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1602 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1603 __lll_private_flag.
1604 (lll_private_futex_wait, lll_private_futex_timedwait,
1605 lll_private_futex_wake): Define as wrapper around non-_private
1606 macros.
1607 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1608 (__lll_private_flag): Define.
1609 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1610 (lll_private_futex_wait, lll_private_futex_timedwait,
1611 lll_private_futex_wake): Define as wrapper around non-_private
1612 macros.
1613
eb7721f2
UD
16142007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1615
1616 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1617 parameter to lll_futex_wait call.
1618 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1619
1620 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1621 Replace lll_futex_wait with lll_private_futex_wait.
1622 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1623 Add LLL_SHARED parameter to lll_futex_wake().
1624
1625 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1626 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1627 lll_private_futex_wake.
1628 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1629 bit from private parm before syscall.
1630 (lll_futex_timed_wait): Likewise.
1631 (lll_futex_wake): Likewise.
1632 (lll_futex_wake_unlock): Likewise.
1633 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1634 (lll_robust_mutex_unlock): Likewise.
1635 (lll_mutex_unlock_force): Likewise.
1636 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1637
defc45f2
UD
16382007-07-23 Ulrich Drepper <drepper@redhat.com>
1639
1640 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1641 compilation when unconditionally using private futexes.
1642 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1643 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1644 Likewise.
1645 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1646 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1647
087722b8
UD
16482007-07-17 Jakub Jelinek <jakub@redhat.com>
1649
1650 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1651 Define.
1652
765c6b0c
UD
16532007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1654
1655 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1656 kernel-features.h.
1657
7d9d8bd1
RM
16582007-05-16 Roland McGrath <roland@redhat.com>
1659
1660 * init.c (__nptl_initial_report_events): New variable.
1661 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1662 to that.
1663
a4915df2
UD
16642007-06-22 Jakub Jelinek <jakub@redhat.com>
1665
1666 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1667 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1668
e4eb675d
UD
16692007-06-19 Ulrich Drepper <drepper@redhat.com>
1670
1671 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1672 implementation.
1673
ae1ad3ae
UD
16742007-06-18 Ulrich Drepper <drepper@redhat.com>
1675
1676 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1677 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1678 * pthread_mutex_timedlock.c: Likewise.
1679 * pthread_mutex_trylock.c: Likewise.
1680 * pthread_mutex_unlock.c: Likewise.
1681
89074592
UD
16822007-06-17 Andreas Schwab <schwab@suse.de>
1683
1684 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1685 sections.
1686
d4201cc4
UD
16872007-06-17 Ulrich Drepper <drepper@redhat.com>
1688
1689 * allocatestack.c (allocate_stack): Make code compile if
1690 __ASSUME_PRIVATE_FUTEX is set.
1691
339dbf0e
UD
16922007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1693
1694 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1695 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1696 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1697 (__pthread_rwlock_wrlock): Likewise.
1698 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1699 (pthread_rwlock_timedrdlock): Likewise.
1700 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1701 (pthread_rwlock_timedwrlock): Likewise.
1702 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1703 (__pthread_rwlock_unlock): Likewise.
1704
17052007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1706
1707 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1708 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1709 Split __flags into __flags, __shared, __pad1 and __pad2.
1710 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1711 futexes if they are available.
1712 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1713 in libc-lowlevellock.S allow using private futexes.
1714 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1715 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1716 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1717 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1718 lll_private_futex_timed_wait and lll_private_futex_wake.
1719 (lll_robust_mutex_unlock): Fix typo.
1720 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1721 field in futex command setup.
1722 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1723 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1724 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1725 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1726 if they are available. Remove clear_once_control.
1727 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1728 futexes if they are available.
1729 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1730 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1731 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1732 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1733 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1734 Wake only when there are waiters.
1735 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1736 support. Indicate that there are waiters. Remove unnecessary
1737 extra cancellation test.
1738 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1739 left-over duplication of __sem_wait_cleanup.
1740
26f56c1c
UD
17412007-06-07 Ulrich Drepper <drepper@redhat.com>
1742
1743 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1744 parameter to lll_futex_wait, lll_futex_timed_wait, and
1745 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1746 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1747 lll_private_futex_wake.
1748 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1749 * allocatestack.c: Adjust use of lll_futex_* macros.
1750 * init.c: Likewise.
1751 * lowlevellock.h: Likewise.
1752 * pthread_barrier_wait.c: Likewise.
1753 * pthread_cond_broadcast.c: Likewise.
1754 * pthread_cond_destroy.c: Likewise.
1755 * pthread_cond_signal.c: Likewise.
1756 * pthread_cond_timedwait.c: Likewise.
1757 * pthread_cond_wait.c: Likewise.
1758 * pthread_create.c: Likewise.
1759 * pthread_mutex_lock.c: Likewise.
1760 * pthread_mutex_setprioceiling.c: Likewise.
1761 * pthread_mutex_timedlock.c: Likewise.
1762 * pthread_mutex_unlock.c: Likewise.
1763 * pthread_rwlock_timedrdlock.c: Likewise.
1764 * pthread_rwlock_timedwrlock.c: Likewise.
1765 * pthread_rwlock_unlock.c: Likewise.
1766 * sysdeps/alpha/tls.h: Likewise.
1767 * sysdeps/i386/tls.h: Likewise.
1768 * sysdeps/ia64/tls.h: Likewise.
1769 * sysdeps/powerpc/tls.h: Likewise.
1770 * sysdeps/pthread/aio_misc.h: Likewise.
1771 * sysdeps/pthread/gai_misc.h: Likewise.
1772 * sysdeps/s390/tls.h: Likewise.
1773 * sysdeps/sh/tls.h: Likewise.
1774 * sysdeps/sparc/tls.h: Likewise.
1775 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1776 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1777 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1778 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1779 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1780 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1781 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1782 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1783 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1784 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1785 Likewise.
1786 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1787 * sysdeps/x86_64/tls.h: Likewise.
1788
ee5d5755
UD
17892007-05-29 Ulrich Drepper <drepper@redhat.com>
1790
b03b0c29
UD
1791 * pthread_getattr_np.c: No need to install a cancellation handler,
1792 this is no cancellation point.
1793 * pthread_getschedparam.c: Likewise.
1794 * pthread_setschedparam.c: Likewise.
1795 * pthread_setschedprio.c: Likewise.
1796 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1797 lll_unlock_wake_cb.
1798 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1799 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1800 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1801 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1802 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1803 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1804 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1805 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1806 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1807 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1808 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1809 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 1810
0154658d
UD
1811 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1812 whether there are more than one thread makes no sense here since
1813 we only call the slow path if the locks are taken.
1814 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1815
ee5d5755
UD
1816 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1817 COND_NWAITERS_SHIFT.
1818 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1819 COND_CLOCK_BITS.
1820 * pthread_cond_init.c: Likewise.
1821 * pthread_cond_timedwait.c: Likewise.
1822 * pthread_cond_wait.c: Likewise.
1823 * pthread_condattr_getclock.c: Likewise.
1824 * pthread_condattr_setclock.c: Likewise.
1825 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1826 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1827 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1828 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1829 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1830
991fa82b
UD
18312007-05-28 Jakub Jelinek <jakub@redhat.com>
1832
40f57573
UD
1833 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1834 unistd.h.
1835
991fa82b
UD
1836 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1837 insn suffix.
1838 (THREAD_GSCOPE_GET_FLAG): Remove.
1839 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1840 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1841 changes.
1842 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1843 (THREAD_GSCOPE_GET_FLAG): Remove.
1844 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1845 instead of THREAD_GSCOPE_GET_FLAG.
1846 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1847 it.
1848 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1849 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1850 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1851 THREAD_GSCOPE_WAIT): Define.
1852 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1853 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1854 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1855 THREAD_GSCOPE_WAIT): Define.
1856 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1857 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1858 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1859 THREAD_GSCOPE_WAIT): Define.
1860 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1861 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1862 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1863 THREAD_GSCOPE_WAIT): Define.
1864
18652007-05-24 Richard Henderson <rth@redhat.com>
1866
1867 * descr.h (struct pthread): Add header.gscope_flag.
1868 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1869 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1870 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1871 THREAD_GSCOPE_WAIT): Define.
1872
e59660bc
UD
18732007-05-27 Ulrich Drepper <drepper@redhat.com>
1874
1875 * init.c: Make it compile with older kernel headers.
1876
1877 * tst-initializers1.c: Show through exit code which test failed.
1878
1879 * pthread_rwlock_init.c: Also initialize __shared field.
1880 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1881 element in rwlock structure into four byte elements. One of them is
1882 the new __shared element.
1883 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1884 Likewise.
cd0dbd89 1885 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
1886 __shared, adjust names of other padding elements.
1887 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1888 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1889 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1890 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1891 FUTEX_PRIVATE_FLAG.
1892 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1893 futex to use private operations if possible.
1894 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1895 Likewise.
1896 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1897 Likewise.
1898 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1899 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
1900 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1901 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1902 Likewise.
1903 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1904 Likewise.
1905 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1906 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 1907
d8ff3792
UD
19082007-05-26 Ulrich Drepper <drepper@redhat.com>
1909
546346b6
UD
1910 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1911 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1912 * pthread_rwlock_timedrdlock.c: Likewise.
1913 * pthread_rwlock_tryrdlock.c: Likewise.
1914
a2dd3360
UD
1915 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1916 optimization.
1917
6df7ffad
UD
1918 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1919 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1920 duplication of __sem_wait_cleanup.
1921
1922 * allocatestack.c: Revert last change.
1923 * init.c: Likewise.
1924 * sysdeps/i386/tls.h: Likewise.
1925 * sysdeps/x86_64/tls.h: Likewise.
1926 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1927 header structure.
1928 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1929
d8ff3792
UD
1930 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1931 Add private field.
1932 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1933 * pthread_barrier_init.c: Set private flag if pshared and private
1934 futexes are supported.
1935 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1936 private field in futex command setup.
1937 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1938
3d2dd6ca
UD
19392007-05-25 Ulrich Drepper <drepper@redhat.com>
1940
42e6c665
UD
1941 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1942 support.
1943 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1944 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1945 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1946 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1947 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1948
3d2dd6ca
UD
1949 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1950 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1951 fields in the structure.
1952 (__old_sem_init): New function.
1953 * sem_open.c: Initialize all fields of the structure.
1954 * sem_getvalue.c: Adjust for renamed element.
1955 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1956 (gen-as-const-headers): Add structsem.sym.
1957 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1958 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1959 struct new_sem. Add struct old_sem.
1960 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1961 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1962 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1963 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1964 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1965 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1966 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1967 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1968 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1969 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1970 * tst-sem10.c: New file.
1971 * tst-sem11.c: New file.
1972 * tst-sem12.c: New file.
1973 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1974 of struct sem.
1975
20a4d722
JJ
19762007-05-25 Ulrich Drepper <drepper@redhat.com>
1977 Jakub Jelinek <jakub@redhat.com>
1978
1979 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1980 Move __pthread_enable_asynccancel right before futex syscall.
1981 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1982 Likewise.
1983
19842007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
1985
1986 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1987 THREAD_COPY_PRIVATE_FUTEX): Define.
1988 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1989 THREAD_COPY_PRIVATE_FUTEX): Define.
1990 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1991 * init.c (__pthread_initialize_minimal_internal): Use
1992 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
1993
1994 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1995 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1996 THREAD_GSCOPE_FLAG_WAIT): Define.
1997 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1998 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1999 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2000 PTR_DEMANGLE.
2001 (THREAD_GSCOPE_GET_FLAG): Define.
2002 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2003 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2004 instead of ->header.gscope_flag directly.
2005
5a8075b1
UD
20062007-05-23 Ulrich Drepper <drepper@redhat.com>
2007
2008 * init.c (__pthread_initialize_minimal_internal): Check whether
2009 private futexes are available.
2010 * allocatestack.c (allocate_stack): Copy private_futex field from
2011 current thread into the new stack.
2012 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2013 futexes if they are available.
2014 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2015 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2016 in libc-lowlevellock.S allow using private futexes.
2017 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2018 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2019 FUTEX_PRIVATE_FLAG.
2020 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2021 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2022 if they are available.
2023 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2024 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2025 * sysdeps/i386/tcb-offsets.sym: Likewise.
2026 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2027 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2028
6d59823c
UD
20292007-05-21 Ulrich Drepper <drepper@redhat.com>
2030
2031 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2032 Remove ptr_wait_lookup_done again.
2033 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2034 (__pthread_initialize_minimal_internal): Initialize
2035 _dl_wait_lookup_done pointer in _rtld_global directly.
2036 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2037 Remove code to code _dl_wait_lookup_done.
2038 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2039 encrypted for now.
2040
2c9718f3
JJ
20412007-05-21 Jakub Jelinek <jakub@redhat.com>
2042
2043 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2044 pthread_mutex_init failed with ENOTSUP.
2045
df94b641
UD
20462007-05-19 Ulrich Drepper <drepper@redhat.com>
2047
2048 * allocatestack.c (__wait_lookup_done): New function.
2049 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2050 Add ptr_wait_lookup_done.
2051 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2052 * pthreadP.h: Declare __wait_lookup_done.
2053 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2054 Define macros to implement reference handling of global scope.
2055 * sysdeps/x86_64/tls.h: Likewise.
2056 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2057 Initialize GL(dl_wait_lookup_done).
2058
bec51a30
UD
20592007-05-17 Ulrich Drepper <drepper@redhat.com>
2060
113ad5fc
UD
2061 [BZ #4512]
2062 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2063 is detected.
2064 * pthread_mutex_timedlock.c: Likewise.
2065 * pthread_mutex_trylock.c: Likewise.
2066 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2067
2068 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2069 * tst-robust9.c: New file.
2070 * tst-robustpi9.c: New file.
2071
bec51a30
UD
2072 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2073 unnecessary extra cancellation test.
2074
83d87915
UD
20752007-05-14 Ulrich Drepper <drepper@redhat.com>
2076
83d87915
UD
2077 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2078 extra cancellation test.
2079 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2080
3771196d
UD
20812007-05-10 Ulrich Drepper <drepper@redhat.com>
2082
341c566f
UD
2083 * descr.h (struct pthread): Rearrange members to fill hole in
2084 64-bit layout.
2085
3771196d
UD
2086 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2087 (__pthread_setaffinity_new): If syscall was successful and
2088 RESET_VGETCPU_CACHE is defined, use it before returning.
2089 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2090
7d29b542
JJ
20912007-05-10 Jakub Jelinek <jakub@redhat.com>
2092
2093 [BZ #4455]
2094 * tst-align2.c: Include stackinfo.h.
2095 * tst-getpid1.c: Likewise.
2096
16105fe0
UD
20972007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2098
29c113f0
UD
2099 [BZ #4455]
2100 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2101 * tst-getpid1.c (do_test): Likewise.
2102
16105fe0
UD
2103 [BZ #4456]
2104 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2105 (allocate_stack): Likewise.
2106
6780bc44
UD
21072007-05-07 Ulrich Drepper <drepper@redhat.com>
2108
2109 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2110 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2111 (__lll_robust_timedlock_wait): Likewise.
2112 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2113
aa75f64c
UD
21142007-05-06 Mike Frysinger <vapier@gentoo.org>
2115
15eca720 2116 [BZ #4465]
aa75f64c
UD
2117 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2118 * tst-cancel4.c (tf_fdatasync): New test.
2119
f672076e
UD
21202007-04-27 Ulrich Drepper <drepper@redhat.com>
2121
1bb5f5a1
UD
2122 [BZ #4392]
2123 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2124 check mutexes like normal mutexes.
2125
f672076e
UD
2126 [BZ #4306]
2127 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2128 Initialize the whole sigevent structure to appease valgrind.
2129
bce20b9a
UD
21302007-04-25 Ulrich Drepper <drepper@redhat.com>
2131
2132 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2133 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2134
0c786eac
UD
21352007-04-06 Ulrich Drepper <drepper@redhat.com>
2136
2137 * tst-locale1.c: Avoid warnings.
2138 * tst-locale2.c: Likewise.
2139
e1f0c5bc
UD
21402007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2141
2142 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2143 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2144
965cba04
UD
21452007-03-16 Jakub Jelinek <jakub@redhat.com>
2146
2147 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2148 __extern_always_inline where appropriate.
2149 * sysdeps/pthread/pthread.h: Likewise.
2150
a5ea509b
RH
21512007-03-13 Richard Henderson <rth@redhat.com>
2152
2153 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2154 separate cfi regions for the two subsections.
2155
00a1430e
UD
21562007-02-25 Ulrich Drepper <drepper@redhat.com>
2157
2158 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2159 new thread, don't just decrement it.
2160 Patch by Suzuki K P <suzuki@in.ibm.com>.
2161
63a2f305
UD
21622007-02-21 Ulrich Drepper <drepper@redhat.com>
2163
2164 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2165 PTHFCT_CALL definition.
2166
2484468b
UD
21672007-02-18 Ulrich Drepper <drepper@redhat.com>
2168
2169 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2170 available, don't use it.
2171
5ed61e0f
UD
21722007-02-09 Jakub Jelinek <jakub@redhat.com>
2173
2174 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2175 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2176 call into the kernel to delay.
2177
10ccaa5c
UD
21782007-01-18 Ulrich Drepper <drepper@redhat.com>
2179
f8a17855
UD
2180 * tst-initializers1.c: We want to test the initializers as seen
2181 outside of libc, so undefined _LIBC.
2182
10ccaa5c
UD
2183 * pthread_join.c (cleanup): Avoid warning.
2184
ea1533e0
UD
21852007-01-17 Ulrich Drepper <drepper@redhat.com>
2186
1476bce6
UD
2187 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2188 (__lll_timedwait_tid): Add unwind info.
2189
ea1533e0
UD
2190 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2191 function table, mangle the pointers.
2192 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2193 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2194 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2195 demangle pointers before use.
2196 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2197 demangle pointer.
2198 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2199 * sysdeps/pthread/setxid.h: Likewise.
2200
8980796b
UD
22012007-01-12 Ulrich Drepper <drepper@redhat.com>
2202
2203 * tst-rwlock7.c: Show some more information in case of correct
2204 behavior.
2205
a1d87b5d
UD
22062007-01-11 Ulrich Drepper <drepper@redhat.com>
2207
2208 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2209 (lll_futex_timed_wait): Undo part of last change, don't negate
2210 return value.
2211
11bf311e 22122007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 2213
11bf311e
UD
2214 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2215 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 2216
11bf311e 22172006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 2218
11bf311e 2219 * shlib-versions: Fix sparc64 linux target specification.
a744da90 2220
11bf311e 22212007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 2222
11bf311e
UD
2223 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2224 Adjust include path for pthread_barrier_wait.c move.
fc242bef 2225
11bf311e 22262006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 2227
11bf311e
UD
2228 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2229 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 2230
11bf311e
UD
22312006-12-06 Jakub Jelinek <jakub@redhat.com>
2232
2233 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2234 6 argument cancellable syscalls.
2235 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2236 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2237 6 argument cancellable syscalls.
2238 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 2239
66f17705
UD
22402006-12-09 Ulrich Drepper <drepper@redhat.com>
2241
2242 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2243 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2244
11bf311e
UD
22452006-10-30 Jakub Jelinek <jakub@redhat.com>
2246
2247 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2248 __sync_lock_release instead of __sync_lock_release_si.
2249
536e40e2
UD
22502006-10-29 Jakub Jelinek <jakub@redhat.com>
2251
2252 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2253 Define.
2254 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2255 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2256 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2257 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2258 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2259 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2260 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2261 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2262 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2263 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2264 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2265
11bf311e
UD
22662006-10-27 Ulrich Drepper <drepper@redhat.com>
2267
2268 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2269 * pthread_barrier_wait.c: ...here.
2270 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2271 * pthread_cond_broadcast.c: ...here.
2272 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2273 * pthread_cond_signal.c: ...here.
2274 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2275 * pthread_cond_timedwait.c: ...here.
2276 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2277 * pthread_cond_wait.c: ...here.
2278 * sysdeps/pthread/pthread_once.c: Move to...
2279 * pthread_once.c: ...here.
2280 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2281 * pthread_rwlock_rdlock.c: ...here.
2282 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2283 * pthread_rwlock_timedrdlock.c: ...here.
2284 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2285 * pthread_rwlock_timedwrlock.c: ...here.
2286 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2287 * pthread_rwlock_unlock.c: ...here.
2288 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2289 * pthread_rwlock_wrlock.c: ...here.
2290 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2291 * pthread_spin_destroy.c: ...here.
2292 * sysdeps/pthread/pthread_spin_init.c: Move to...
2293 * pthread_spin_init.c: ...here.
2294 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2295 * pthread_spin_unlock.c: ...here.
2296 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2297 * pthread_getcpuclockid.c: ...here.
2298
2299 * init.c: USE_TLS support is now always enabled.
2300 * tst-tls5.h: Likewise.
2301 * sysdeps/alpha/tls.h: Likewise.
2302 * sysdeps/i386/tls.h: Likewise.
2303 * sysdeps/ia64/tls.h: Likewise.
2304 * sysdeps/powerpc/tls.h: Likewise.
2305 * sysdeps/s390/tls.h: Likewise.
2306 * sysdeps/sh/tls.h: Likewise.
2307 * sysdeps/sparc/tls.h: Likewise.
2308 * sysdeps/x86_64/tls.h: Likewise.
2309
006a8f6f 23102006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
2311
2312 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2313 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2314 failed.
2315
2316 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2317 Define to THREAD_SELF->header.multiple_threads.
2318 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2319 Likewise.
2320 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2321 Likewise.
2322 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2323 (SINGLE_THREAD_P): Likewise.
2324 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2325 (SINGLE_THREAD_P): Likewise.
2326 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2327 (SINGLE_THREAD_P): Likewise.
2328 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2329 (SINGLE_THREAD_P): Likewise.
2330 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2331 Likewise.
2332 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2333 (SINGLE_THREAD_P): Likewise.
2334 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2335 (SINGLE_THREAD_P): Likewise.
2336 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2337 Likewise.
2338
11bf311e 23392006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 2340
11bf311e
UD
2341 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2342 by default rather than 2_3_3.
32c075e1 2343
11bf311e 23442006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 2345
11bf311e
UD
2346 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2347 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2348 atomic_* instead of catomic_* macros.
2349
23502006-10-12 Ulrich Drepper <drepper@redhat.com>
2351
2352 [BZ #3285]
2353 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2354 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2355 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2356 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2357 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2358 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2359 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2360 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2361 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2362 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2363 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2364 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2365 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2366
23672006-10-11 Ulrich Drepper <drepper@redhat.com>
2368
2369 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2370 cancelable syscalls with six parameters.
2371
2372 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2373 operations instead of atomic_*.
32c075e1 2374
11bf311e 23752006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 2376
11bf311e 2377 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 2378
11bf311e 23792006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 2380
11bf311e
UD
2381 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2382 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2383 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2384 New file.
2385 * pthread_attr_setstack.c: Allow overwriting the version number of the
2386 new symbol.
2387 * pthread_attr_setstacksize.c: Likewise.
2388 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2389 it.
2390 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2391 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 2392
457b559e
UD
23932006-09-24 Ulrich Drepper <drepper@redhat.com>
2394
2395 [BZ #3251]
2396 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2397 Patch by Petr Baudis.
2398
0466106e
UD
23992006-09-18 Jakub Jelinek <jakub@redhat.com>
2400
2401 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2402
2403 * tst-cancel2.c (tf): Loop as long as something was written.
2404
bd6d3b7d
UD
24052006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2406
2407 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2408 mutexes wake all mutexes.
2409 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2410 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2411 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2412
30aa5785
UD
24132006-09-12 Ulrich Drepper <drepper@redhat.com>
2414
2415 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2416 to guarantee the thread is always canceled.
2417
2b6a801e
UD
24182006-09-08 Jakub Jelinek <jakub@redhat.com>
2419
2420 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2421 Include stdlib.h.
2422 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2423 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2424 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2425 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2426 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 2427
346e6ad4
UD
24282006-09-08 Ulrich Drepper <drepper@redhat.com>
2429
2430 [BZ #3123]
2431 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2432 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
2433 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2434 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2435 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
2436 * Makefile (tests): Add tst-cond22.
2437 * tst-cond22.c: New file.
2438
b051fc44
UD
24392006-09-05 Ulrich Drepper <drepper@redhat.com>
2440
2441 [BZ #3124]
2442 * descr.h (struct pthread): Add parent_cancelhandling.
2443 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2444 cancelhandling value to child.
2445 * pthread_create.c (start_thread): If parent thread was canceled
2446 reset the SIGCANCEL mask.
2447 * Makefile (tests): Add tst-cancel25.
2448 * tst-cancel25.c: New file.
2449
d052233c
UD
24502006-09-05 Jakub Jelinek <jakub@redhat.com>
2451 Ulrich Drepper <drepper@redhat.com>
2452
2453 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2454 counterp if it is already zero.
2455 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2456
cd248c3f
UD
24572006-03-04 Jakub Jelinek <jakub@redhat.com>
2458 Roland McGrath <roland@redhat.com>
2459
2460 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2461 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2462 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2463 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2464 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2465 lll_robust_mutex_timedlock, lll_mutex_unlock,
2466 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2467 Add _L_*_ symbols around the subsection.
2468 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2469 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2470
24712006-03-03 Jakub Jelinek <jakub@redhat.com>
2472 Roland McGrath <roland@redhat.com>
2473
2474 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2475 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2476 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2477 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2478 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2479 lll_robust_mutex_timedlock, lll_mutex_unlock,
2480 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2481 Add _L_*_ symbols around the subsection.
2482 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2483 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2484
b80770b2
UD
24852006-08-31 Ulrich Drepper <drepper@redhat.com>
2486
2487 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2488 change because it can disturb too much existing code. If real hard
2489 reader preference is needed we'll introduce another type.
2490 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2491 (pthread_rwlock_timedwrlock): Likewise.
2492 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2493 Likewise.
2494
bee2df0b
UD
24952006-08-30 Ulrich Drepper <drepper@redhat.com>
2496
2497 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2498 reader preference.
2499 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2500 (pthread_rwlock_timedwrlock): Likewise.
2501 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2502 Likewise.
2503
d678ebc1
UD
25042006-08-25 Jakub Jelinek <jakub@redhat.com>
2505
2506 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2507 Only define ifdef SHARED.
2508
ba408f84
UD
25092006-08-23 Ulrich Drepper <drepper@redhat.com>
2510
2511 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2512 (free_stacks): ...here.
2513 (__free_stack_cache): New function.
2514 * pthreadP.h: Declare __free_stack_cache.
2515 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2516 ptr_freeres.
2517 * init.c (pthread_functions): Initialize ptr_freeres.
2518 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2519 New freeres function.
2520
376e973a
UD
25212006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2522
2523 [BZ #3018]
2524 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2525
2b34af01
UD
25262006-08-20 Ulrich Drepper <drepper@redhat.com>
2527
2528 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2529 _XOPEN_REALTIME_THREADS.
2530
89c85f87
UD
25312006-08-15 Jakub Jelinek <jakub@redhat.com>
2532
2533 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2534 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2535 HAVE_CLOCK_GETTIME_VSYSCALL.
2536 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2537
f17efcb4
UD
25382006-08-14 Jakub Jelinek <jakub@redhat.com>
2539
2540 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2541 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2542 * descr.h (struct priority_protection_data): New type.
2543 (struct pthread): Add tpp field.
2544 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2545 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2546 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2547 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2548 TPP mutexes.
2549 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2550 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2551 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2552 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2553 * tpp.c: New file.
2554 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2555 boosted by TPP.
2556 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2557 * pthread_mutexattr_getprioceiling.c
2558 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2559 in the SCHED_FIFO priority range.
2560 * pthread_mutexattr_setprioceiling.c
2561 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2562 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2563 if mutex is not TPP. Ceiling is now in __data.__lock.
2564 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2565 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2566 is now in __data.__lock. Add locking.
2567 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2568 * Makefile (libpthread-routines): Add tpp.
2569 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2570 * tst-tpp.h: New file.
2571 * tst-mutexpp1.c: New file.
2572 * tst-mutexpp6.c: New file.
2573 * tst-mutexpp10.c: New file.
2574 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2575 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2576
22bb134c
UD
25772006-08-12 Ulrich Drepper <drepper@redhat.com>
2578
2579 [BZ #2843]
2580 * pthread_join.c (pthread_join): Account for self being canceled
2581 when checking for deadlocks.
2582 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2583 (tf1): Don't print anything after pthread_join returns, this would be
2584 another cancellation point.
2585 (tf2): Likewise.
2586 * tst-join6.c: New file.
2587 * Makefile (tests): Add tst-join6.
2588
f1762c0c
UD
25892006-08-03 Ulrich Drepper <drepper@redhat.com>
2590
9c06eb66
UD
2591 [BZ #2892]
2592 * pthread_setspecific.c (__pthread_setspecific): Check
2593 out-of-range index before checking for unused key.
2594
f1762c0c
UD
2595 * sysdeps/pthread/gai_misc.h: New file.
2596
7bb1b2c9
UD
25972006-08-01 Ulrich Drepper <drepper@redhat.com>
2598
2599 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2600 file. Don't use sysctl.
2601 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2602 overwrite the file if this is likely not true.
2603
b06e7e9a
UD
26042006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2605
2606 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2607 * Makefile (tests): Add tst-getpid3.
2608 * tst-getpid3.c: New file.
2609
b894c2ea
RM
26102006-07-30 Roland McGrath <roland@redhat.com>
2611
2612 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2613
2614 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2615 (pause_not_cancel): New macro.
2616 (nanosleep_not_cancel): New macro.
2617 (sigsuspend_not_cancel): New macro.
2618 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2619 nanosleep_not_cancel macro from <not-cancel.h>.
2620 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2621 macro from <not-cancel.h>.
2622
df47504c
UD
26232006-07-28 Ulrich Drepper <drepper@redhat.com>
2624 Jakub Jelinek <jakub@redhat.com>
2625
2626 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2627 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2628 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2629 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2630 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2631 * pthread_mutex_lock.c: Likewise.
2632 * pthread_mutex_timedlock.c: Likewise.
2633 * pthread_mutex_trylock.c: Likewise.
2634 * pthread_mutex_unlock.c: Likewise.
2635 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2636 all mutexes.
2637 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2638 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2639 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2640 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2641 pthread-pi-defines.sym.
2642 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2643 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2644 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
2645 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2646 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2647 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2648 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2649 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2650 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
2651 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2652 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2653 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2654 * tst-mutex2.c: Likewise.
2655 * tst-mutex3.c: Likewise.
2656 * tst-mutex4.c: Likewise.
2657 * tst-mutex5.c: Likewise.
2658 * tst-mutex6.c: Likewise.
2659 * tst-mutex7.c: Likewise.
2660 * tst-mutex7a.c: Likewise.
2661 * tst-mutex8.c: Likewise.
2662 * tst-mutex9.c: Likewise.
2663 * tst-robust1.c: Likewise.
2664 * tst-robust7.c: Likewise.
2665 * tst-robust8.c: Likewise.
2666 * tst-mutexpi1.c: New file.
2667 * tst-mutexpi2.c: New file.
2668 * tst-mutexpi3.c: New file.
2669 * tst-mutexpi4.c: New file.
2670 * tst-mutexpi5.c: New file.
2671 * tst-mutexpi6.c: New file.
2672 * tst-mutexpi7.c: New file.
2673 * tst-mutexpi7a.c: New file.
2674 * tst-mutexpi8.c: New file.
2675 * tst-mutexpi9.c: New file.
2676 * tst-robust1.c: New file.
2677 * tst-robust2.c: New file.
2678 * tst-robust3.c: New file.
2679 * tst-robust4.c: New file.
2680 * tst-robust5.c: New file.
2681 * tst-robust6.c: New file.
2682 * tst-robust7.c: New file.
2683 * tst-robust8.c: New file.
2684 * Makefile (tests): Add the new tests.
2685
2686 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2687 * pthread_mutex_destroy.c: Remove unneeded label.
2688
f3be81a9
UD
26892006-07-01 Ulrich Drepper <drepper@redhat.com>
2690
2691 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2692 computations to compile time.
2693
c26ca5e1
UD
26942006-06-04 Ulrich Drepper <drepper@redhat.com>
2695
2696 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2697
6f8a7dff
UD
26982006-05-15 Ulrich Drepper <drepper@redhat.com>
2699
c26ca5e1 2700 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 2701
3d237e42
UD
27022006-05-11 Ulrich Drepper <drepper@redhat.com>
2703
04974d63
UD
2704 * pthread_key_create.c (__pthread_key_create): Do away with
2705 __pthread_keys_lock.
2706
2707 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2708 (__kernel_cpumask_size): Mark as hidden.
2709 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2710
3d237e42
UD
2711 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2712 * semaphoreP.h (__sem_mappings_lock): Likewise.
2713
790fc6e4
UD
27142006-05-10 Ulrich Drepper <drepper@redhat.com>
2715
2716 * pthread_atfork.c: Mark __dso_handle as hidden.
2717
be434a72
UD
27182006-05-09 Ulrich Drepper <drepper@redhat.com>
2719
2720 [BZ #2644]
2721 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2722 the reload problem. Change the one path in pthread_cancel_init
2723 which causes the problem. Force gcc to reload. Simplify callers.
2724 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2725 (_Unwind_GetBSP): Undo last patch.
2726
3142b1ac
UD
27272006-05-07 Ulrich Drepper <drepper@redhat.com>
2728
bf3635d3
UD
2729 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2730 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
2731
2732 [BZ #2644]
2733 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2734 pointers are reloaded after pthread_cancel_init calls.
2735
27488789
UD
27362006-05-01 Ulrich Drepper <drepper@redhat.com>
2737
2738 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2739 __always_inline.
2740
a6375d11
UD
27412006-04-27 Ulrich Drepper <drepper@redhat.com>
2742
2743 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2744 Allocate new object which is passed to timer_sigev_thread so that
2745 the timer can be deleted before the new thread is scheduled.
2746
16a1d952
RM
27472006-04-26 Roland McGrath <roland@redhat.com>
2748
2749 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2750
7960f2a7
UD
27512006-04-08 Ulrich Drepper <drepper@redhat.com>
2752
ab9a9ff8
UD
2753 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2754 suffix for conditional jumps.
2755 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2756 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2757 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2758 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2759 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2760 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2761
7960f2a7
UD
2762 * init.c (sigcancel_handler): Compare with correct PID even if the
2763 thread is in the middle of a fork call.
2764 (sighandler_setxid): Likewise.
2765 Reported by Suzuki K P <suzuki@in.ibm.com> .
2766
2035d91c
UD
27672006-04-07 Jakub Jelinek <jakub@redhat.com>
2768
2769 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2770
0292b0dd
UD
27712006-04-06 Ulrich Drepper <drepper@redhat.com>
2772
2773 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2774 fails [Coverity CID 105].
2775
6738b3c0
UD
27762006-04-05 Ulrich Drepper <drepper@redhat.com>
2777
2778 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2779
359157a5
RM
27802006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2781
2782 [BZ #2505]
2783 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2784 Define __lll_rel_instr using lwsync.
2785
cd277b2d
UD
27862006-03-27 Ulrich Drepper <drepper@redhat.com>
2787
2788 * allocatestack.c (allocate_stack): Always initialize robust_head.
2789 * descr.h: Define struct robust_list_head.
2790 (struct pthread): Use robust_list_head in robust mutex list definition.
2791 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2792 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2793 (__pthread_initialize_minimal_internal): Register robust_list with
2794 the kernel.
2795 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2796 Declare __set_robust_list_avail.
2797 * pthread_create.c (start_thread): Register robust_list of new thread.
2798 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2799 waiters.
2800 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2801 number of users, it's unreliable.
2802 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2803 set_robust_list syscall is available.
2804 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2805 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2806 Set robust_head.list_op_pending before trying to lock a robust mutex.
2807 * pthread_mutex_timedlock.c: Likewise.
2808 * pthread_mutex_trylock.c: Likewise.
2809 * pthread_mutex_unlock.c: Likewise for unlocking.
2810 * Makefile (tests): Add tst-robust8.
2811 * tst-robust8.c: New file.
2812
facac085
UD
28132006-03-08 Andreas Schwab <schwab@suse.de>
2814
2815 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2816 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2817
7ccbe1a1
RM
28182006-03-05 Roland McGrath <roland@redhat.com>
2819
2820 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2821 and $config_os doesn't match *linux*.
2822
043cee37
RM
28232006-03-05 David S. Miller <davem@sunset.davemloft.net>
2824
2825 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2826 Use __syscall_error.
2827 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2828 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2829 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2830 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2831 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2832 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2833
88bce79e
UD
28342006-03-02 Ulrich Drepper <drepper@redhat.com>
2835
2836 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2837
672ec465
UD
28382006-03-01 Ulrich Drepper <drepper@redhat.com>
2839
2840 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2841 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2842 mutex.
2843 (__lll_robust_timedlock_wait): Likewise.
2844 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2845 (__lll_robust_lock_wait): Likewise.
2846 (__lll_robust_timedlock_wait): Likewise.
2847 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2848 (__lll_robust_lock_wait): Likewise.
2849 (__lll_robust_timedlock_wait): Likewise.
2850
c4a4875d
RM
28512006-03-01 Jakub Jelinek <jakub@redhat.com>
2852
2853 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2854 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2855 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2856 lll_robust_mutex_unlock): Define.
2857 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2858
3192fd8e
RM
28592006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2860
2861 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2862 instead of <clone.S>.
2863
14d44b19
RM
28642006-02-27 Jakub Jelinek <jakub@redhat.com>
2865
2866 * Makefile (libpthread-routines): Add
2867 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2868 and pthread_mutex_[sg]etprioceiling.
2869 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2870 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2871 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2872 pthread_mutex_setprioceiling.
2873 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2874 PTHREAD_PRIO_PROTECT): New enum values.
2875 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2876 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2877 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2878 prototypes.
2879 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2880 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2881 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2882 Define.
2883 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2884 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2885 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2886 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2887 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2888 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2889 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2890 protocol mutexes.
2891 * pthread_mutex_getprioceiling.c: New file.
2892 * pthread_mutex_setprioceiling.c: New file.
2893 * pthread_mutexattr_getprioceiling.c: New file.
2894 * pthread_mutexattr_setprioceiling.c: New file.
2895 * pthread_mutexattr_getprotocol.c: New file.
2896 * pthread_mutexattr_setprotocol.c: New file.
2897
62f6b9b2
RM
28982006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2899
2900 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2901
e0a3ed4f
RM
29022006-02-27 Roland McGrath <roland@redhat.com>
2903
2904 * sysdeps/pthread/Subdirs: List nptl here too.
2905 * configure (libc_add_on_canonical): New variable.
2906
2907 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2908
2909 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2910 self to get main source tree's file.
2911 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2912 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2913 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2914 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2915 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2916 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2917 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2918 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2919 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2920 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2921 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2922 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2923 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2924
2925 * Makefile: Use $(sysdirs) in vpath directive.
2926
2927 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2928 (CPPFLAGS-timer_routines.c): Likewise.
2929
2930 * Makeconfig (includes): Variable removed.
2931
84cfa284
RM
29322006-02-26 Roland McGrath <roland@redhat.com>
2933
2934 * sysdeps/generic/pt-raise.c: Moved to ...
2935 * pt-raise.c: ... here.
2936 * sysdeps/generic/lowlevellock.h: Moved to ...
2937 * lowlevellock.h: ... here.
2938
c5132ca1
RM
29392006-02-23 Roland McGrath <roland@redhat.com>
2940
2941 * descr.h (struct pthread): Add final member `end_padding'.
2942 (PTHREAD_STRUCT_END_PADDING): Use it.
2943
29442006-02-20 Roland McGrath <roland@redhat.com>
2945
2946 * sysdeps/mips: Directory removed, saved in ports repository.
2947 * sysdeps/unix/sysv/linux/mips: Likewise.
2948
a93317a1
UD
29492006-02-18 Ulrich Drepper <drepper@redhat.com>
2950
2951 * tst-robust1.c: Add second mutex to check that the mutex list is
2952 handled correctly.
2953
f1740bc4
UD
29542006-02-17 Jakub Jelinek <jakub@redhat.com>
2955
2956 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2957 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2958 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2959 lll_robust_mutex_unlock): New macros.
2960 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2961 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2962 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2963 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2964 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2965
a7245bf5
UD
29662006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2967
2968 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2969 definitions.
2970 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2971
49bfc1fe
UD
29722006-02-17 Ulrich Drepper <drepper@redhat.com>
2973
2974 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2975 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2976 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2977 (lll_robust_mutex_unlock): Likewise.
2978
56e987ac
UD
29792006-02-13 Jakub Jelinek <jakub@redhat.com>
2980
2981 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2982 Set robust_list.__next rather than robust_list.
2983 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2984 (__pthread_list_t): New typedef.
2985 (pthread_mutex_t): Replace __next and __prev fields with __list.
2986 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2987 (__pthread_list_t): New typedef.
2988 (pthread_mutex_t): Replace __next and __prev fields with __list.
2989 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2990 (__pthread_list_t, __pthread_slist_t): New typedefs.
2991 (pthread_mutex_t): Replace __next and __prev fields with __list.
2992 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2993 (__pthread_list_t, __pthread_slist_t): New typedefs.
2994 (pthread_mutex_t): Replace __next and __prev fields with __list.
2995 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2996 (__pthread_list_t, __pthread_slist_t): New typedefs.
2997 (pthread_mutex_t): Replace __next and __prev fields with __list.
2998 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2999 (__pthread_slist_t): New typedef.
3000 (pthread_mutex_t): Replace __next field with __list.
3001
683040c3
UD
30022006-02-15 Ulrich Drepper <drepper@redhat.com>
3003
25bc77e6 3004 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
3005 PTHREAD_MUTEX_OWNERDEAD.
3006 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3007 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3008 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3009 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3010 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3011 to PTHREAD_MUTEX_INCONSISTENT.
3012 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3013 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3014 * pthread_mutex_trylock.c: Likewise.
3015 * pthread_mutex_timedlock.c: Likewise.
3016 * pthread_mutex_unlock.c: Likewise.
3017 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3018 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3019 lowlevelrobustlock.sym.
3020 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3021 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3022 definitions.
3023 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3024 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3025 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3026 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3027 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3028
bbf209a4
UD
30292006-02-12 Ulrich Drepper <drepper@redhat.com>
3030
b007ce7c
UD
3031 * allocatestack.c (allocate_stack): Initialize robust_list.
3032 * init.c (__pthread_initialize_minimal_internal): Likewise.
3033 * descr.h (struct xid_command): Pretty printing.
3034 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3035 robust_list. Adjust macros.
3036 * pthread_create.c (start_thread): Adjust robust_list handling.
3037 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3038 but the owner for all robust mutex types.
3039 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3040 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 3041 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
3042 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3043
bbf209a4
UD
3044 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3045 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3046
b576fca1
UD
30472006-02-08 Jakub Jelinek <jakub@redhat.com>
3048
3049 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3050 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3051
a6df7387
UD
30522006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3053
3054 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3055 Return status.
3056 (lll_futex_timed_wait): Define.
3057
7c65e900
UD
30582006-01-19 Ulrich Drepper <drepper@redhat.com>
3059
3060 * tst-cancel4.c: Test ppoll.
3061
5f9f21e8
AJ
30622006-01-18 Andreas Jaeger <aj@suse.de>
3063
cf407dfb 3064 [BZ #2167]
5f9f21e8
AJ
3065 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3066 (pthread_mutex_t): Follow changes for other archs. Based on patch
3067 by Jim Gifford <patches@jg555.com>.
3068
251278c6
UD
30692006-01-13 Richard Henderson <rth@redhat.com>
3070
3071 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3072
de59a291
RM
30732006-01-10 Roland McGrath <roland@redhat.com>
3074
3075 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3076 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3077 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3078 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3079 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3080 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3081 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3082 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3083 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 3084 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 3085
931786ee
RM
30862006-01-09 Roland McGrath <roland@redhat.com>
3087
5d42c8c3
RM
3088 * tst-initializers1-c89.c: New file.
3089 * tst-initializers1-c99.c: New file.
3090 * tst-initializers1-gnu89.c: New file.
3091 * tst-initializers1-gnu99.c: New file.
3092 * Makefile (tests): Add them.
3093 (CFLAGS-tst-initializers1-c89.c): New variable.
3094 (CFLAGS-tst-initializers1-c99.c): New variable.
3095 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3096 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3097
931786ee
RM
3098 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3099 Use __extension__ on anonymous union definition.
3100 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3101 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3102 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3103 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 3104 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 3105
8dd18431
RM
31062006-01-08 Jakub Jelinek <jakub@redhat.com>
3107
3108 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3109 Don't give the union a name because it changes the mangled name.
3110 Instead name the struct for __data.
3111 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3112 Likewise.
3113 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3114 Likewise.
3115
ae11e412
UD
31162006-01-09 Jakub Jelinek <jakub@redhat.com>
3117
3118 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3119 stack bias to mc_ftp field.
3120
c6885aa1
UD
31212006-01-07 Ulrich Drepper <drepper@redhat.com>
3122
3123 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 3124 being too clever and reloading the futex value where it shouldn't.
c6885aa1 3125
ae4ad00a
UD
31262006-01-06 Ulrich Drepper <drepper@redhat.com>
3127
3128 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3129 correct type.
3130
ced368f7
UD
31312006-01-06 Jakub Jelinek <jakub@redhat.com>
3132
3133 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3134 Add cfi directives.
3135
d804f5df
UD
31362006-01-06 Ulrich Drepper <drepper@redhat.com>
3137
cbbbb188 3138 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
3139 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3140 rename in tcbhead_t.
3141
d804f5df
UD
3142 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3143 Don't give the union a name because it changes the mangled name.
3144 Instead name the struct for __data.
3145 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3146 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3147 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3148 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3149 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3150 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3151
679d83ba
UD
31522006-01-05 Ulrich Drepper <drepper@redhat.com>
3153
3154 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3155 Return status.
3156 (lll_futex_timed_wait): Define.
3157 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3158 * sysdeps/pthread/aio_misc.h: New file.
3159
06dc5bf3
RM
31602006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3161
3162 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3163
9759bbf1
UD
31642006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3165
3166 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3167 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3168 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3169
db59b28b
UD
31702006-01-04 Ulrich Drepper <drepper@redhat.com>
3171
3172 * tst-cancel24.cc: Use C headers instead of C++ headers.
3173
b01fe5f7
UD
31742006-01-03 Jakub Jelinek <jakub@redhat.com>
3175
3176 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3177 sparc-linux configured glibc.
3178 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3179 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3180 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3181 atomic_compare_and_exchange_val_24_acq instead of
3182 atomic_compare_and_exchange_val_acq.
3183 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3184 instead of atomic_exchange_rel.
3185 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3186 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3187 file.
3188 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3189 file.
3190 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3191 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3192 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3193 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3194 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3195 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3196 New file.
3197 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3198 New file.
3199 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3200 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3201 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3202 file.
3203 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3204 file.
3205 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3206
35c2fd59
UD
32072006-01-03 Ulrich Drepper <drepper@redhat.com>
3208
3209 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3210 mutex initializers.
3211
305bb37e
UD
32122006-01-02 Jakub Jelinek <jakub@redhat.com>
3213
3214 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3215 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3216 THREAD_COPY_POINTER_GUARD): Define.
3217 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3218 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3219
cc792128
UD
32202006-01-01 Ulrich Drepper <drepper@redhat.com>
3221
3222 * version.c: Update copyright year.
3223
db0a00d3
UD
32242005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3225
3226 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3227 .eh_frame section, use cfi_* directives.
3228 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3229
b36205c4
UD
32302005-12-30 Ulrich Drepper <drepper@redhat.com>
3231
3232 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3233 now.
3234
8b4f1598
UD
32352005-12-29 Ulrich Drepper <drepper@redhat.com>
3236
3237 * sysdeps/pthread/sigaction.c: Removed.
3238 * sigaction.c: New file.
3239 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3240
fec5592d
UD
32412005-12-28 Ulrich Drepper <drepper@redhat.com>
3242
3243 * Makefile (tests): Add tst-signal7.
3244 * tst-signal7.c: New file.
3245
db169ed5
RM
32462005-12-27 Roland McGrath <roland@redhat.com>
3247
3248 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3249 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3250 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3251 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3252 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3253 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3254 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3255 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3256 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3257 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3258 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3259
bfffffae
UD
32602005-12-27 Jakub Jelinek <jakub@redhat.com>
3261
3262 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3263 and __prev field to pthread_mutex_t.
3264 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3265 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3266 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3267 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3268 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3269 to pthread_mutex_t.
3270
1bcfb5a5
UD
32712005-12-26 Ulrich Drepper <drepper@redhat.com>
3272
3273 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3274 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3275 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3276 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3277 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3278 and PTHREAD_MUTEXATTR_FLAG_BITS.
3279 * descr.h (struct pthread): Add robust_list field and define
3280 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3281 * pthread_mutexattr_getrobust.c: New file.
3282 * pthread_mutexattr_setrobust.c: New file.
3283 * pthread_mutex_consistent.c: New file.
3284 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3285 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3286 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3287 Adjust pthread_mutex_t initializers.
3288 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3289 field to pthread_mutex_t.
3290 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3291 and __prev field to pthread_mutex_t.
3292 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3293 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3294 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3295 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3296 * pthread_mutexattr_gettype.c: Likewise.
3297 * pthread_mutexattr_setpshared.c: Likewise.
3298 * pthread_mutexattr_settype.c: Likewise.
3299 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3300 Initialize mutex kind according to robust flag.
3301 * pthread_mutex_lock.c: Implement local robust mutex.
3302 * pthread_mutex_timedlock.c: Likewise.
3303 * pthread_mutex_trylock.c: Likewise.
3304 * pthread_mutex_unlock.c: Likewise.
3305 * pthread_create.c (start_thread): Mark robust mutexes which remained
3306 locked as dead.
3307 * tst-robust1.c: New file.
3308 * tst-robust2.c: New file.
3309 * tst-robust3.c: New file.
3310 * tst-robust4.c: New file.
3311 * tst-robust5.c: New file.
3312 * tst-robust6.c: New file.
3313 * tst-robust7.c: New file.
3314 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3315 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3316 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3317 tst-robust5, tst-robust6, and tst-robust7.
3318
3319 * tst-typesizes.c: New file.
3320 * Makefile (tests): Add tst-typesizes.
3321
3322 * tst-once3.c: More debug output.
3323
9333ed0d
UD
33242005-12-24 Ulrich Drepper <drepper@redhat.com>
3325
d4d138a4
UD
3326 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3327 missing after last change.
3328
bfffffae 3329 * version.c: Update copyright year.
9333ed0d 3330
dcc73a8d
UD
33312005-12-23 Ulrich Drepper <drepper@redhat.com>
3332
3333 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3334 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3335 * pthread_mutex_trylock.c: Likewise.
3336 * pthread_mutex_timedlock.c: Likewise.
3337 * pthread_mutex_unlock.c: Likewise.
3338
879f3ca6
RM
33392005-12-22 Roland McGrath <roland@redhat.com>
3340
3341 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3342 so that #include_next's search location is not reset to the -I..
3343 directory where <nptl/...> can be found.
3344
077a0da7
UD
33452005-12-22 Ulrich Drepper <drepper@redhat.com>
3346
3347 [BZ #1913]
3348 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3349 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
3350 * tst-cancel24.cc: New file.
3351 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 3352
8dea90aa
RM
33532005-12-21 Roland McGrath <roland@redhat.com>
3354
3355 * libc-cancellation.c: Use <> rather than "" #includes.
3356 * pt-cleanup.c: Likewise.
3357 * pthread_create.c: Likewise.
3358 * pthread_join.c: Likewise.
3359 * pthread_timedjoin.c: Likewise.
3360 * pthread_tryjoin.c: Likewise.
3361 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3362 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3363 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3364 * unwind.c: Likewise.
3365
8da21f96
UD
33662005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3367
3368 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3369 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3370 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3371 THREAD_COPY_POINTER_GUARD): Define.
3372
00c2b3b9
UD
33732005-12-19 Jakub Jelinek <jakub@redhat.com>
3374
3375 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3376 rather than one.
3377 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3378 THREAD_COPY_POINTER_GUARD): Define.
3379 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3380 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3381 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3382 THREAD_COPY_POINTER_GUARD): Define.
3383 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3384 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3385 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3386 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3387 Use PTR_DEMANGLE for B0 if defined.
3388
827b7087
UD
33892005-12-17 Ulrich Drepper <drepper@redhat.com>
3390
3391 * pthread_create.c (__pthread_create_2_1): Use
3392 THREAD_COPY_POINTER_GUARD if available.
3393 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3394 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3395 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3396 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3397 * sysdeps/x86_64/tls.h: Likewise.
3398
2826ac7e
RM
33992005-12-15 Roland McGrath <roland@redhat.com>
3400
3401 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3402
b6ab06ce
UD
34032005-12-13 Ulrich Drepper <drepper@redhat.com>
3404
3405 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3406 sysdeps/generic.
3407 * errno-loc.c: New file.
3408
f0d1a3b5
RM
34092005-12-12 Roland McGrath <roland@redhat.com>
3410
3411 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3412 adjustments before choosing stack size. Update minimum stack size
3413 calculation to match allocate_stack change.
3414
db13ddbc
UD
34152005-12-12 Ulrich Drepper <drepper@redhat.com>
3416
3417 * allocatestack.c (allocate_stack): Don't demand that there is an
3418 additional full page available on the stack beside guard, TLS, the
3419 minimum stack.
3420
088f460f
UD
34212005-11-24 Ulrich Drepper <drepper@redhat.com>
3422
3423 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3424 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3425
3426 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3427 compiling 32-bit code we must define __cleanup_fct_attribute.
3428
16feadf2
UD
3429005-11-24 Jakub Jelinek <jakub@redhat.com>
3430
3431 [BZ #1920]
3432 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3433 __attribute__ instead of __attribute.
3434 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3435 (__cleanup_fct_attribute): Likewise.
3436
e6e493bb
UD
34372005-11-17 Jakub Jelinek <jakub@redhat.com>
3438
3439 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3440 a write barrier before writing libgcc_s_getcfa.
3441
8e635611
UD
34422005-11-06 Ulrich Drepper <drepper@redhat.com>
3443
3444 * sysdeps/unix/sysv/linux/configure: Removed.
3445
ce33ee7c
UD
34462005-11-05 Ulrich Drepper <drepper@redhat.com>
3447
3448 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3449 optional init_array/fini_array support.
3450
20d511e0
RM
34512005-10-24 Roland McGrath <roland@redhat.com>
3452
3453 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3454 versioned_symbol use.
3455
fe60d146
RM
34562005-10-16 Roland McGrath <roland@redhat.com>
3457
3458 * init.c (__pthread_initialize_minimal_internal): Even when using a
3459 compile-time default stack size, apply the minimum that allocate_stack
3460 will require, and round up to page size.
3461
0faa1cf5
RM
34622005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3463
3464 * Makefile ($(test-modules)): Remove static pattern rule.
3465
f9126cc2
UD
34662005-10-14 Jakub Jelinek <jakub@redhat.com>
3467 Ulrich Drepper <drepper@redhat.com>
3468
3469 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3470 alignment in callback function.
3471 * Makefile: Add rules to build and run tst-align3.
3472 * tst-align3.c: New file.
3473
015a5d22
RM
34742005-10-03 Jakub Jelinek <jakub@redhat.com>
3475
3476 * allocatestack.c (setxid_signal_thread): Add
3477 INTERNAL_SYSCALL_DECL (err).
3478
b71ce910
UD
34792005-10-02 Jakub Jelinek <jakub@redhat.com>
3480
3481 * allocatestack.c (setxid_signal_thread): Need to use
3482 atomic_compare_and_exchange_bool_acq.
3483
dff9a7a1
UD
34842005-10-01 Ulrich Drepper <drepper@redhat.com>
3485 Jakub Jelinek <jakub@redhat.com>
3486
3487 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3488 CANCEL_RESTMASK.
3489 (struct pthread): Move specific_used field to avoid padding.
3490 Add setxid_futex field.
3491 * init.c (sighandler_setxid): Reset setxid flag and release the
3492 setxid futex.
3493 * allocatestack.c (setxid_signal_thread): New function. Broken
3494 out of the bodies of the two loops in __nptl_setxid. For undetached
3495 threads check whether they are exiting and if yes, don't send a signal.
3496 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3497 * pthread_create.c (start_thread): For undetached threads, check
3498 whether setxid bit is set. If yes, wait until signal has been
3499 processed.
3500
3501 * allocatestack.c (STACK_VARIABLES): Initialize them.
3502 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3503
560b4709
UD
35042004-09-02 Jakub Jelinek <jakub@redhat.com>
3505
3506 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3507 waiters, awake all waiters on the associated mutex.
3508
5eac4760
RM
35092005-09-22 Roland McGrath <roland@redhat.com>
3510
3511 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3512 ../sysdeps/x86_64/hp-timing.h).
3513
a3615024
UD
35142005-08-29 Jakub Jelinek <jakub@redhat.com>
3515
3516 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3517 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3518 (lll_futex_wake_unlock): Define.
3519 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3520 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3521 (lll_futex_wake_unlock): Define.
3522 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3523 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3524 (lll_futex_wake_unlock): Define.
3525 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3526 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3527 (lll_futex_wake_unlock): Define.
3528 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3529 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3530 (lll_futex_wake_unlock): Define.
3531 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3532 lll_futex_wake_unlock.
3533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3534 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3535 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3536 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3537 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3538 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3539
bf017034
UD
35402005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3541
3542 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3543 Fix typo in register name.
3544
fd4af664
UD
35452005-08-23 Ulrich Drepper <drepper@redhat.com>
3546
8558d715
UD
3547 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3548 Use __sigfillset. Document that sigfillset does the right thing wrt
3549 to SIGSETXID.
fd4af664 3550
3fd1bc67
UD
35512005-07-11 Jakub Jelinek <jakub@redhat.com>
3552
44d75caf 3553 [BZ #1102]
3fd1bc67
UD
3554 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3555 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3556 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3557 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3558 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3559 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3560 in the structure.
3561 * Makefile (tests): Add tst-initializers1.
3562 (CFLAGS-tst-initializers1.c): Set.
3563 * tst-initializers1.c: New test.
3564
553185e2
UD
35652005-07-11 Jakub Jelinek <jakub@redhat.com>
3566
3567 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3568 Make sure __flags are located at offset 48 from the start of the
3569 structure.
3570
8df08cb2
RM
35712005-07-02 Roland McGrath <roland@redhat.com>
3572
3573 * Makeconfig: Comment fix.
3574
253eb3a0
UD
35752005-07-05 Jakub Jelinek <jakub@redhat.com>
3576
3577 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3578 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3579 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3580 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3581 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3582 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3583 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3584 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3585 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3586 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3587
bb6e8ca3
UD
35882005-06-25 Jakub Jelinek <jakub@redhat.com>
3589
3590 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3591 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3592 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3593 fields.
3594 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3595 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3596 field. Put in sysinfo field unconditionally.
3597 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3598 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3599 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3600 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3601 fields.
3602 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3603 * pthread_create.c (__pthread_create_2_1): Use
3604 THREAD_COPY_STACK_GUARD macro.
3605 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3606 tests.
3607 * tst-stackguard1.c: New file.
3608 * tst-stackguard1-static.c: New file.
3609
99c7f870
UD
36102005-06-14 Alan Modra <amodra@bigpond.net.au>
3611
3612 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3613 Invoke CGOTSETUP and CGOTRESTORE.
3614 (CGOTSETUP, CGOTRESTORE): Define.
3615
8074c5c5
RM
36162005-05-29 Richard Henderson <rth@redhat.com>
3617
3618 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3619 (tf_write, tf_writev): Use it.
3620 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3621 the system minimum.
3622
c179df4e
UD
36232005-05-23 Jakub Jelinek <jakub@redhat.com>
3624
3625 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3626 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3627 __librt_*_asynccancel@local.
3628
b0e196a4
UD
36292005-05-17 Alan Modra <amodra@bigpond.net.au>
3630
3631 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3632 all occurrences of JUMPTARGET. Instead append @local to labels.
3633
f7d78e18
UD
36342005-05-20 Jakub Jelinek <jakub@redhat.com>
3635
3636 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3637 size/alignment of struct pthread rather than tcbhead_t.
3638 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3639 Likewise.
3640 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3641 Likewise.
3642 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3643 Likewise.
3644
363dd976
UD
36452005-05-19 Richard Henderson <rth@redhat.com>
3646
3647 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3648 __sync_val_compare_and_swap, not explicit _si variant.
3649 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3650
1ad9da69
UD
36512005-05-03 Ulrich Drepper <drepper@redhat.com>
3652
3653 [BZ #915]
3654 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3655
5085cd1f
UD
36562005-05-03 Jakub Jelinek <jakub@redhat.com>
3657
3658 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3659 .eh_frame section, use cfi_* directives.
3660
ad529081
UD
36612005-04-27 Jakub Jelinek <jakub@redhat.com>
3662
3663 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3664 of "" includes.
3665
dea99685
UD
36662005-04-27 Ulrich Drepper <drepper@redhat.com>
3667
c06aad09 3668 [BZ #1075]
dea99685
UD
3669 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3670 aio_write blocks.
3671
84060bad
RM
36722005-04-27 Roland McGrath <roland@redhat.com>
3673
5e2d8ac8
RM
3674 * Makefile (tests): Remove tst-clock2.
3675
84060bad
RM
3676 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3677 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3678 translating to the kernel clockid_t for our own process/thread clock.
3679
3680 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3681
4a035b9d
RM
36822005-04-15 Jakub Jelinek <jakub@redhat.com>
3683
3684 * old_pthread_cond_init.c: Include <errno.h>.
3685 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3686 process shared or uses clock other than CLOCK_REALTIME.
3687 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3688
edac0e8f
UD
36892005-04-13 David S. Miller <davem@davemloft.net>
3690
3691 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3692 * sysdeps/sparc/sparc64/clone.S: New file.
3693
613d8d52
RM
36942005-04-05 Jakub Jelinek <jakub@redhat.com>
3695
44d75caf 3696 [BZ #1102]
613d8d52
RM
3697 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3698 __inline instead of inline.
3699 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3700
ee618985
UD
37012005-03-31 Jakub Jelinek <jakub@redhat.com>
3702
3703 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3704 functionally equivalent, but shorter instructions.
3705 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3706 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3707 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3708 Likewise.
3709 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3710 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3711 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3712 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3713 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3714 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3715 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3716 Likewise.
3717 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3718 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3719 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3720 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3721 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3722
f850220b
AJ
37232005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3724
3725 * sysdeps/mips/Makefile: New file.
3726 * sysdeps/mips/nptl-sysdep.S: New file.
3727 * sysdeps/mips/tcb-offsets.sym: New file.
3728 * sysdeps/mips/pthread_spin_lock.S: New file.
3729 * sysdeps/mips/pthread_spin_trylock.S: New file.
3730 * sysdeps/mips/pthreaddef.h: New file.
3731 * sysdeps/mips/tls.h: New file.
3732 * sysdeps/mips/jmpbuf-unwind.h: New file.
3733 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3734 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3735 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3736 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3737 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3738 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3739 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3740 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3741 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3742 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3743
1e6da2b0
UD
37442005-03-23 Ulrich Drepper <drepper@redhat.com>
3745
c06aad09 3746 [BZ #1112]
1e6da2b0
UD
3747 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3748 variable to scerr.
3749
5233d576
RM
37502005-03-10 Jakub Jelinek <jakub@redhat.com>
3751
3752 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3753
3053ff11
RM
37542005-02-25 Roland McGrath <roland@redhat.com>
3755
3756 * alloca_cutoff.c: Correct license text.
3757 * tst-unload.c: Likewise.
3758 * sysdeps/pthread/allocalim.h: Likewise.
3759 * sysdeps/pthread/pt-initfini.c: Likewise.
3760 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3761 * sysdeps/pthread/bits/sigthread.h: Likewise.
3762 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3763 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3764
9cfe5381
RM
37652005-02-16 Roland McGrath <roland@redhat.com>
3766
3767 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3768 Use unsigned int * for ptr_nthreads.
3769
7de00121
RM
37702005-02-14 Alan Modra <amodra@bigpond.net.au>
3771
20d511e0 3772 [BZ #721]
7de00121
RM
3773 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3774 gcc4.
3775
4bae262d
UD
37762005-02-07 Richard Henderson <rth@redhat.com>
3777
613d8d52 3778 [BZ #787]
4bae262d
UD
3779 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3780 argument.
3781
75df54b7
RM
37822004-11-03 Marcus Brinkmann <marcus@gnu.org>
3783
3784 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3785 order of arguments in invocation of atomic_add_zero.
3786
ea9c93cc
UD
37872005-01-26 Jakub Jelinek <jakub@redhat.com>
3788
9cfe5381 3789 [BZ #737]
ea9c93cc
UD
3790 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3791 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3792 at least gotntpoff relocation and addition.
3793 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3794 Likewise.
3795 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3796 Likewise.
3797 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3798 Likewise.
3799
9dcafc55
UD
38002005-01-06 Ulrich Drepper <drepper@redhat.com>
3801
3802 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3803 entry for static tls deallocation fix.
3804 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3805 also contains information whether the memory pointed to is static
3806 TLS or not.
3807 * sysdeps/i386/tls.h: Likewise.
3808 * sysdeps/ia64/tls.h: Likewise.
3809 * sysdeps/powerpc/tls.h: Likewise.
3810 * sysdeps/s390/tls.h: Likewise.
3811 * sysdeps/sh/tls.h: Likewise.
3812 * sysdeps/sparc/tls.h: Likewise.
3813 * sysdeps/x86_64/tls.h: Likewise.
3814
a71c152c
UD
38152004-12-27 Ulrich Drepper <drepper@redhat.com>
3816
3817 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3818
d143c49e
UD
38192004-12-21 Jakub Jelinek <jakub@redhat.com>
3820
3821 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3822 %esp.
3823 * Makefile (tests): Add tst-align2.
3824 * tst-align2.c: New test.
3825 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3826 -mpreferred-stack-boundary=4.
3827
50130ded
RM
38282004-12-18 Roland McGrath <roland@redhat.com>
3829
3830 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3831 New file removed withdrawn for the moment.
3832
cbc53df0
RH
38332004-12-17 Richard Henderson <rth@redhat.com>
3834
3835 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3836 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 3837
fb9d5c73
UD
38382004-12-16 Ulrich Drepper <drepper@redhat.com>
3839
03332aa6
UD
3840 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3841 Increased PTHREAD_STACK_MIN.
3842
fb9d5c73
UD
3843 * tst-context1.c (stacks): Use bigger stack size.
3844
e853ea00
UD
38452004-12-16 Jakub Jelinek <jakub@redhat.com>
3846
3847 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3848 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3849
f23673fc
UD
38502004-12-15 Jakub Jelinek <jakub@redhat.com>
3851
3852 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3853 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3854 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3855
917fbe70
UD
38562004-12-15 Ulrich Drepper <drepper@redhat.com>
3857
3858 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3859
1f9d7c27
UD
38602004-12-14 Ulrich Drepper <drepper@redhat.com>
3861
3862 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3863 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3864
3865 * tst-getpid1.c: If child crashes, report this first. Print which
3866 signal.
3867
bf7c04cd
UD
38682004-12-09 Ulrich Drepper <drepper@redhat.com>
3869
3870 * init.c (__pthread_initialize_minimal_internal): Also unblock
3871 SIGSETXID.
3872
38732004-12-01 Jakub Jelinek <jakub@redhat.com>
3874
3875 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3876 _POSIX_THREAD_CPUTIME): Define to 0.
3877 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3878 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3879 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3880 __timer_signal_thread_tclk): Remove.
3881 (init_module): Remove their initialization.
3882 (thread_cleanup): Remove their cleanup assertions.
3883 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3884 __timer_signal_thread_tclk): Remove.
3885 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 3886 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
3887 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3888
484cc801
UD
38892004-12-07 Jakub Jelinek <jakub@redhat.com>
3890
3891 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3892 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3893
3894 * Makefile (tests): Add tst-getpid2.
3895 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3896 (do_test): Use it. Use __clone2 instead of clone on ia64.
3897 * tst-getpid2.c: New test.
3898
2da9a6a1
UD
38992004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3900
3901 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3902
1ff241b8
UD
39032004-12-04 Ulrich Drepper <drepper@redhat.com>
3904
3905 * Makefile (tests): Add tst-getpid1.
3906 * tst-getpid1.c: New file.
3907 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3908 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3909
3f488b9c
RM
39102004-12-02 Roland McGrath <roland@redhat.com>
3911
3912 * Makefile (libpthread-nonshared): Variable removed.
3913 ($(objpfx)libpthread_nonshared.a): Target removed.
3914 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3915 These are now handled by generic magic from
3916 libpthread-static-only-routines being set.
3917
597ce09c
UD
39182004-11-27 Ulrich Drepper <drepper@redhat.com>
3919
3920 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3921 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3922 _POSIX_THREAD_PRIO_PROTECT): Define.
3923 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3924 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3925 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3926
60e4523a
UD
39272004-11-26 Jakub Jelinek <jakub@redhat.com>
3928
3929 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3930 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3931 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3932 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3933 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3934 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3935 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3936
f1f2cafc
UD
39372004-11-24 Ulrich Drepper <drepper@redhat.com>
3938
bca2d208
UD
3939 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3940
f1f2cafc
UD
3941 * Makefile (libpthread-routines): Add pthread_setschedprio.
3942 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3943 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3944 * pthread_setschedprio.c: New file.
3945
b639d0c9
UD
39462004-11-20 Jakub Jelinek <jakub@redhat.com>
3947
ef2bb413
UD
3948 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3949 * pthread_cancel.c (pthread_create): Likewise.
3950
b639d0c9
UD
3951 * Makefile (libpthread-routines): Add vars.
3952 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3953 * init.c (__default_stacksize, __is_smp): Remove.
3954 * vars.c: New file.
3955 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3956 and define a wrapper macro.
3957 (PTHREAD_STATIC_FN_REQUIRE): Define.
3958 * allocatestack.c (__find_thread_by_id): Undefine.
3959 * pthread_create (__pthread_keys): Remove.
3960 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3961 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3962 PTHREAD_STATIC_FN_REQUIRE.
3963
3defcff3
UD
39642004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3965
3966 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3967 parameter to REGISTER macro.
3968
ec188f92
RM
39692004-11-17 Roland McGrath <roland@redhat.com>
3970
3971 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3972 Make sure SIGCANCEL is blocked as well.
3973
ccd8de9a
UD
39742004-11-10 Jakub Jelinek <jakub@redhat.com>
3975
3976 * sysdeps/pthread/setxid.h: New file.
3977 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3978 (struct xid_command): Add forward decl.
3979 (struct pthread_functions): Change return type of __nptl_setxid hook
3980 to int.
3981 * pthreadP.h (__nptl_setxid): Change return type to int.
3982 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3983 calling thread, return its return value and set errno on failure.
3984 * descr.h (struct xid_command): Change id type to long array.
3985
3986 * Makefile: Add rules to build and test tst-setuid1 and
3987 tst-setuid1-static.
3988 * tst-setuid1.c: New test.
3989 * tst-setuid1-static.c: New test.
3990
ed2ced8a
UD
39912004-11-10 Jakub Jelinek <jakub@redhat.com>
3992
3993 * Makefile (tests): Add tst-exit3.
3994 * tst-exit3.c: New test.
3995
948603ee
UD
39962004-11-09 Ulrich Drepper <drepper@redhat.com>
3997
3998 * Makefile (tests): Add tst-exit2.
3999 * tst-exit2.c: New file.
4000
ba5ffd2a
RM
40012004-11-09 Roland McGrath <roland@redhat.com>
4002
4003 [BZ #530]
4004 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4005 here, before calling clone.
4006 * pthread_create.c (start_thread): Don't do it here.
4007
c4d7bd39
RM
40082004-11-02 Jakub Jelinek <jakub@redhat.com>
4009
4010 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4011
543fb0c8
UD
40122004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4013
4014 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4015 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4016 assembler warning.
4017
a1fbd858
UD
40182004-10-28 Jakub Jelinek <jakub@redhat.com>
4019
4020 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4021 if sched_priority is not between minprio and maxprio.
4022
c2a4357a
UD
40232004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4024
4025 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4026 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4027
4028 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4029 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4030
78d8d211
UD
40312004-10-24 Ulrich Drepper <drepper@redhat.com>
4032
4033 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4034 not-cancelable I/O functions.
4035
dd28590f
UD
40362004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4037
4038 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4039 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4040 make sure 2 is stored in the futex and we looked at the old value.
4041 Fix a few other problems to return the correct value.
4042
f8c97af7
RH
40432004-10-14 Richard Henderson <rth@redhat.com>
4044
4045 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4046 make gcc4 happy.
4047
3feb8efa
UD
40482004-10-06 Jakub Jelinek <jakub@redhat.com>
4049
4050 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4051 of pthread-functions.h and pthreaddef.h.
4052 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4053
4054 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4055 Change __data.__nwaiters from int to unsigned int.
4056
4057 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4058 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4059
4060 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4061 before return type.
4062
4063 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4064 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4065
67060ef5
UD
40662004-10-06 Ulrich Drepper <drepper@redhat.com>
4067
4068 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4069 test fails, remove message queue.
4070 (tf_msgsnd): Likewise.
4071
f38a3086
UD
40722004-10-05 Jakub Jelinek <jakub@redhat.com>
4073
4074 * tst-clock1.c: Change #ifdef to #if defined.
4075 * tst-clock2.c: Likewise.
4076 * tst-cond11.c: Likewise.
4077
2c03b6db
UD
4078 * sysdeps/pthread/timer_create.c (timer_create): Use
4079 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4080 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4081 THREAD_CPUTIME.
4082
6ab5f50d
UD
40832004-10-05 Jakub Jelinek <jakub@redhat.com>
4084
4085 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4086 _POSIX_THREAD_CPUTIME): Define to 0.
4087
e4bb4853
UD
40882004-10-04 Ulrich Drepper <drepper@redhat.com>
4089
4090 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4091 and _POSIX_THREAD_CPUTIME to zero.
4092 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4093 * tst-barrier2.c: Fix testing for POSIX feature.
4094 * tst-clock1.c: Likewise.
4095 * tst-clock2.c: Likewise.
4096 * tst-cond11.c: Likewise.
4097 * tst-cond4.c: Likewise.
4098 * tst-cond6.c: Likewise.
4099 * tst-flock2.c: Likewise.
4100 * tst-mutex4.c: Likewise.
4101 * tst-mutex9.c: Likewise.
4102 * tst-rwlock12.c: Likewise.
4103 * tst-rwlock4.c: Likewise.
4104 * tst-signal1.c: Likewise.
4105 * tst-spin2.c: Likewise.
4106 * sysdeps/pthread/posix-timer.h: Likewise.
4107 * sysdeps/pthread/timer_create.c: Likewise.
4108 * sysdeps/pthread/timer_routines.c: Likewise.
4109
c1b48791
UD
41102004-10-01 Ulrich Drepper <drepper@redhat.com>
4111
927f0673
UD
4112 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4113 (__lll_mutex_timedlock_wait): Address futex correctly.
4114
c1b48791 4115 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 4116 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
4117 make sure 2 is stored in the futex and we looked at the old value.
4118 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4119 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4120 which might very well made the code not working at all before.
7b87aca6 4121 [BZ #417]
c1b48791 4122
e9f4e844
UD
41232004-09-28 Ulrich Drepper <drepper@redhat.com>
4124
4f21c95d
UD
4125 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4126 allow SIGSETXID to be sent.
4127 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4128 for SIGSETXID to be defined.
4129 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4130 SIGSETXID cannot be blocked.
4131
e9f4e844
UD
4132 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4133 Add __extension__ to long long types.
4134 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4135 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4136 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4137 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4138 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4139 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4140 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4141
5f66b766
UD
41422004-09-25 Ulrich Drepper <drepper@redhat.com>
4143
4144 * descr.h (struct pthread): Add stopped_start field.
4145 * sysdeps/pthread/createthread.c (create_thread): Set
4146 start_stopped flag in descriptor for new thread appropriately.
4147 * pthread_create.c (start_thread): Only take lock to be stopped on
4148 startup if stopped_start flag says so.
4149
362038b0
UD
41502004-09-24 Ulrich Drepper <drepper@redhat.com>
4151
3f80a99b
UD
4152 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4153 is created detached and if yes, do not try to free the stack in case
4154 the thread creation failed.
4155 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4156 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4157 case there has been no error. [BZ #405]
4158
362038b0
UD
4159 * pthread_create.c (start_thread): Don't wait for scheduler data
4160 etc to be set at the beginning of the function. The cancellation
4161 infrastructure must have been set up. And enable async
4162 cancellation before potentially going to sleep. [BZ #401]
4163
65f0beb9
UD
41642004-09-20 Ulrich Drepper <drepper@redhat.com>
4165
3c12b91a 4166 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
4167 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4168 for now.
4169 * Makefile: Don't build pthread_set*id code for now.
4170
2edb61e3
UD
41712004-09-19 Ulrich Drepper <drepper@redhat.com>
4172
4173 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4174 internal use.
4175 * allocatestack.c (__nptl_setxid): New function.
4176 * descr.h (struct xid_command): Define type.
4177 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4178 (sighandler_setxid): New function.
4179 (__pthread_initialize_minimal): Register sighandler_setxid for
4180 SIGCANCEL.
4181 * pt-allocrtsig.c: Update comment.
4182 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4183 Declare __nptl_setxid.
4184 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4185 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4186 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4187 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4188 and pthread_setresuid_np.
4189 * pthread_setgid_np.c: New file.
4190 * pthread_setuid_np.c: New file.
4191 * pthread_setegid_np.c: New file.
4192 * pthread_seteuid_np.c: New file.
4193 * pthread_setregid_np.c: New file.
4194 * pthread_setreuid_np.c: New file.
4195 * pthread_setresgid_np.c: New file.
4196 * pthread_setresuid_np.c: New file.
4197 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4198 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4199 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4200 and pthread_setresuid_np.
4201 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4202 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4203 pthread_setregid, and pthread_setresgid.
4204
1ab1fa6f
UD
42052004-09-18 Ulrich Drepper <drepper@redhat.com>
4206
4207 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4208 ENOMEM when out of memory.
4209
ae9e6b36
RM
42102004-09-10 Roland McGrath <roland@redhat.com>
4211
4212 [BZ #379]
4213 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4214 code, since we don't try to use the broken CLONE_STOPPED any more.
4215 * pthread_create.c (start_thread): Likewise.
4216
424bd2f8
RH
42172004-09-15 Richard Henderson <rth@redhat.com>
4218
4219 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4220
17b8a52d
UD
42212004-09-01 David Mosberger <davidm@hpl.hp.com>
4222
4223 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4224 (__libc_unwind_longjmp): Delete macro and declare as function.
4225 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4226 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4227 nptl directory.
4228 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4229 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4230 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4231
ccc63b07
UD
42322004-09-12 Ulrich Drepper <drepper@redhat.com>
4233
4234 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4235 for __USE_XOPEN2K.
4236 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4237 types also for __USE_XOPEN2K.
4238 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4239 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4240 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4241 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4242 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4243 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4244 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4245 [BZ #320]
4246
31f93b3b
UD
42472004-09-08 Ulrich Drepper <drepper@redhat.com>
4248
4249 * sysdeps/pthread/pthread.h
4250 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4251 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4252 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4253 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4254 [BZ #375]
4255
e0329987
UD
42562004-09-07 Ulrich Drepper <drepper@redhat.com>
4257
590b40f7
UD
4258 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4259 PSEUDO to be used with . prefix.
4260
67254a97
UD
4261 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4262 Use atomic_increment instead of atomic_exchange_and_add.
4263 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4264 Likewise.
4265 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4266 Likewise.
4267 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4268 Likewise.
4269
4270 * allocatestack.c (allocate_stack): Use atomic_increment_val
4271 instead of atomic_exchange_and_add.
4272 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4273 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4274 Likewise.
4275 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4276 Likewise.
4277
e0329987
UD
4278 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4279 the initialization function might throw.
4280
42d86dd6 42812005-09-05 Richard Henderson <rth@redhat.com>
e0329987 4282
42d86dd6
RH
4283 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4284 Move definition inside libpthread, libc, librt check. Provide
4285 definition for rtld.
4286
73f7c32c
UD
42872004-09-02 Ulrich Drepper <drepper@redhat.com>
4288
f76c8499
UD
4289 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4290 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4291 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4292 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4293 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4294 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4295 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4296 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4297 * unwind.c: Use it.
4298
73f7c32c
UD
4299 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4300 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4301 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4302 Likewise.
4303 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4304 Decrement __nwaiters. If pthread_cond_destroy has been called and
4305 this is the last waiter, signal pthread_cond_destroy caller and
4306 avoid using the pthread_cond_t structure after unlock.
4307 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4308 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4309 Read clock type from the least significant bits of __nwaiters instead
4310 of __clock.
4311 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4312 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4313
43142004-08-31 Jakub Jelinek <jakub@redhat.com>
4315
4316 [BZ #342]
4317 * Makefile (tests): Add tst-cond20 and tst-cond21.
4318 * tst-cond20.c: New test.
4319 * tst-cond21.c: New test.
4320 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4321 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4322 it unsigned int.
4323 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4324 Likewise.
4325 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4326 (pthread_cond_t): Likewise.
4327 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4328 Likewise.
4329 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4330 Likewise.
4331 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4332 Likewise.
4333 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4334 (cond_nwaiters): New.
4335 (clock_bits): New.
4336 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4337 if there are waiters not signalled yet.
4338 Wait until all already signalled waiters wake up.
4339 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4340 __nwaiters. If pthread_cond_destroy has been called and this is the
4341 last waiter, signal pthread_cond_destroy caller and avoid using
4342 the pthread_cond_t structure after unlock.
4343 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4344 decrement it when leaving. If pthread_cond_destroy has been called
4345 and this is the last waiter, signal pthread_cond_destroy caller.
4346 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4347 Likewise. Read clock type from the least significant bits of
4348 __nwaiters instead of __clock.
4349 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4350 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4351 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4352 clock type just from the last COND_CLOCK_BITS bits of value.
4353 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4354 instead of __clock, just from second bit of condattr's value.
4355
409f7493
UD
43562004-08-30 Jakub Jelinek <jakub@redhat.com>
4357
4358 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4359 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4360 != 64.
4361 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4362
92c6ccd1
RM
43632004-08-15 Roland McGrath <roland@frob.com>
4364
4365 * pthread_atfork.c: Update copyright terms including special exception
4366 for these trivial files, which are statically linked into executables
4367 that use dynamic linking for the significant library code.
4368
4d004cfb
UD
43692004-08-09 Jakub Jelinek <jakub@redhat.com>
4370
4371 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4372 pthread_rwlock_rdlock.
4373 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4374 Decrease __nr_readers_queued after reacquiring lock.
4375 * sysdeps/pthread/pthread_rwlock_timedrdlock
4376 (pthread_rwlock_timedrdlock): Likewise.
4377 Reported by Bob Cook <bobcook47@hotmail.com>.
4378
90595fb6
RM
43792004-08-11 Jakub Jelinek <jakub@redhat.com>
4380
4381 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4382 before pthread_barrier_wait.
4383
fa46f7ab
UD
43842004-08-07 Ulrich Drepper <drepper@redhat.com>
4385
4386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4387 Remove unnecessary exception handling data.
4388
15ef4b55
UD
43892004-07-23 Jakub Jelinek <jakub@redhat.com>
4390
4391 [BZ #284]
4392 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4393 instead of clockid_t.
4394
4fb907b7
RM
43952004-07-21 Roland McGrath <roland@redhat.com>
4396
4397 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4398
43992004-07-19 Roland McGrath <roland@redhat.com>
4400
4401 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4402
8f73811b
RM
44032004-07-02 Roland McGrath <roland@redhat.com>
4404
4405 * configure: Don't exit.
4406
290639c3
UD
44072004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4408
4409 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4410 (__pthread_cond_timedwait): Check for invalid nanosecond in
4411 timeout value.
4412
8e5aaad9
UD
44132004-07-07 Ulrich Drepper <drepper@redhat.com>
4414
4415 * Makefile: Add rules to build and run tst-fini1.
4416 * tst-fini1.c: New file.
4417 * tst-fini1mod.c: New file.
4418
ce6e047f
UD
44192004-07-05 Ulrich Drepper <drepper@redhat.com>
4420
4421 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4422 if no cancellation support is needed.
4423 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4424 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4425 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4426 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4427 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4428 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4429 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4430 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4431 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4432
4433 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4434 only if not already defined.
4435
9b9ef823
UD
44362004-07-05 Jakub Jelinek <jakub@redhat.com>
4437
2dd18ce2
UD
4438 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4439 constraint "m" instead of "0" for futex.
4440
9b9ef823
UD
4441 * shlib-versions: Add powerpc64-.*-linux.*.
4442
38205402
UD
44432004-07-04 Jakub Jelinek <jakub@redhat.com>
4444
4445 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4446 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4447 for valid tv_nsec.
4448 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4449 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4450 bits.
4451
78a9c837
RM
44522004-06-29 Roland McGrath <roland@redhat.com>
4453
4454 * Banner: NPTL no longer has its own version number.
4455 * Makefile (nptl-version): Variable removed.
4456 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4457 using $(version), the glibc version number.
4458
d3d35527
UD
44592004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4460
4461 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4462 Fix branch offset for a PLT entry.
4463 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4464 Likewise.
4465 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4466 Likewise.
4467 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4468 Likewise.
4469 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4470 Likewise.
4471
346f18ae
UD
44722004-06-28 Jakub Jelinek <jakub@redhat.com>
4473
4474 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4475 unconditionally.
4476
f3a19754
UD
44772004-06-28 Jakub Jelinek <jakub@redhat.com>
4478
4479 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4480 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4481 instead of tv_sec.
4482 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4483 (pthread_rwlock_timedrdlock): Likewise.
4484
539842a4
UD
44852004-06-22 Jakub Jelinek <jakub@redhat.com>
4486
4487 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4488 Set __r7 to val, not mutex.
4489
46f4c578
UD
44902004-06-27 Ulrich Drepper <drepper@redhat.com>
4491
4492 * Makefile: Add rules to build tst-rwlock14.
4493 * tst-rwlock14.c: New file.
4494
44952004-06-24 Boris Hu <boris.hu@intel.com>
4496
4497 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4498 check.
4499 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4500
9898e99c
AJ
45012004-06-19 Andreas Jaeger <aj@suse.de>
4502
4503 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4504 assembler in last patch.
4505
7c3164bc
UD
45062004-06-17 Ulrich Drepper <drepper@redhat.com>
4507
4508 * sysdeps/pthread/pthread_cond_timedwait.c
4509 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4510 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4511 (__pthread_cond_timedwait): Check for invalid nanosecond in
4512 timeout value.
4513 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4514 * tst-cond19.c: New file.
4515 * Makefile: Add rules to build and run tst-cond19.
4516
72e61500
UD
45172004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4518
4519 * tst-context1.c (GUARD_PATTERN): Defined.
4520 (tst_context_t): Define struct containing ucontext_t & guard words.
4521 (ctx): Declare as an array of tst_context_t.
4522 (fct): Verify uc_link & guard words are still valid.
4523 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4524
7c370086
UD
45252004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4526
4527 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4528 Add __data.__futex field, reshuffle __data.__clock.
4529 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4530 (__pthread_cond_signal): Increment __futex at the same time as
4531 __wakeup_seq or __total_seq. Pass address of __futex instead of
4532 address of low 32-bits of __wakeup_seq to futex syscall.
4533 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4534 (__pthread_cond_wait): Likewise. Pass __futex value from before
4535 releasing internal lock to FUTEX_WAIT.
4536 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4537 (__pthread_cond_timedwait): Likewise.
4538 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4539 (FUTEX_CMP_REQUEUE): Define.
4540 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4541 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4542 Pass __futex value from before the unlock and __futex address instead
4543 of address of low 32-bits of __wakeup_seq to futex syscall.
4544 Fallback to FUTEX_WAKE all on any errors.
4545
a9e526e7
RM
45462004-06-08 Jakub Jelinek <jakub@redhat.com>
4547
4548 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4549 comment typo.
4550 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4551 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4552 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4553 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4554 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4555
f1847a84
RM
45562004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4557
4558 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4559 Add memory clobber to inline assembly.
4560 (__lll_mutex_trylock): Likewise.
4561 (__lll_mutex_cond_trylock): Likewise.
4562
f7c81e1a
UD
45632004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4564
4565 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4566 Pass val argument as 6th system call argument in %r7.
4567
75fccede
UD
45682004-05-21 Jakub Jelinek <jakub@redhat.com>
4569
4570 * Makefile (tests): Add tst-cond16.
4571 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4572 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4573 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4574 Add __data.__futex field, reshuffle __data.__clock.
4575 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4576 (__pthread_cond_signal): Increment __futex at the same time as
4577 __wakeup_seq or __total_seq. Pass address of __futex instead of
4578 address of low 32-bits of __wakeup_seq to futex syscall.
4579 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4580 (__pthread_cond_wait): Likewise. Pass __futex value from before
4581 releasing internal lock to FUTEX_WAIT.
4582 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4583 (__pthread_cond_timedwait): Likewise.
4584 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4585 (FUTEX_CMP_REQUEUE): Define.
4586 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4587 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4588 Pass __futex value from before the unlock and __futex address instead
4589 of address of low 32-bits of __wakeup_seq to futex syscall.
4590 Fallback to FUTEX_WAKE all on any errors.
4591 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4592 Define.
4593 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4594 internally. Return non-zero if error, zero if success.
4595 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4596 Add __data.__futex field, reshuffle __data.__clock.
4597 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4598 Define.
4599 (lll_futex_requeue): Add val argument, return 1 unconditionally
4600 for the time being.
4601 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4602 Add __data.__futex field, reshuffle __data.__clock.
4603 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4604 Define.
4605 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4606 internally. Return non-zero if error, zero if success.
4607 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4608 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4609 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4610 Define.
4611 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4612 internally. Return non-zero if error, zero if success.
4613 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4614 Add __data.__futex field, reshuffle __data.__clock.
4615 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4616 Define.
4617 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4618 internally. Return non-zero if error, zero if success.
4619 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4620 Add __data.__futex field, reshuffle __data.__clock.
4621 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4622 Add __data.__futex field, reshuffle __data.__clock.
4623 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4624 Increment __futex at the same time as __wakeup_seq or __total_seq.
4625 Pass address of __futex instead of address of low 32-bits of
4626 __wakeup_seq to futex syscall.
4627 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4628 Pass __futex value from before releasing internal lock
4629 to FUTEX_WAIT.
4630 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4631 Likewise. Avoid unnecessary shadowing of variables.
4632 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4633 Set __futex to 2 * __total_seq. Pass __futex value from before the
4634 unlock and __futex address instead of address of low 32-bits of
4635 __wakeup_seq to futex_requeue macro, adjust for new return value
4636 meaning.
4637 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4638 (__pthread_cond_signal): Increment __futex at the same time as
4639 __wakeup_seq or __total_seq. Pass address of __futex instead of
4640 address of low 32-bits of __wakeup_seq to futex syscall.
4641 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4642 (__pthread_cond_wait): Likewise. Pass __futex value from before
4643 releasing internal lock to FUTEX_WAIT.
4644 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4645 (__pthread_cond_timedwait): Likewise.
4646 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4647 (FUTEX_CMP_REQUEUE): Define.
4648 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4649 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4650 Pass __futex value from before the unlock and __futex address instead
4651 of address of low 32-bits of __wakeup_seq to futex syscall.
4652 Fallback to FUTEX_WAKE all on any errors.
4653
46542004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4655
4656 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4657 Add nop to align the end of critical section.
4658 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4659
fbf86dda
UD
46602004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4661
4662 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4663 Add __broadcast_seq field.
4664 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4665 all waiters as woken with woken_seq and bump broadcast counter.
4666 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4667 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4668 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4669 Comment typo fixes. Avoid returning -ETIMEDOUT.
4670
46712004-06-01 Ulrich Drepper <drepper@redhat.com>
4672
4673 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4674 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4675 Reported by Kaz Kojima.
4676
ffdd5e50
UD
46772004-05-25 Jakub Jelinek <jakub@redhat.com>
4678
4679 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4680
3abc82c8
UD
46812004-05-21 Jakub Jelinek <jakub@redhat.com>
4682
4683 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4684 __broadcast_seq with bc_seq after acquiring internal lock instead of
4685 before it.
4686
893a3511
UD
46872004-05-18 Jakub Jelinek <jakub@redhat.com>
4688
4689 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4690 compilation.
4691 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4692 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4693 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4694 (pthread_cond_t): Add __data.__broadcast_seq field.
4695 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4696 (FRAME_SIZE): Define.
4697 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4698 Comment typo fixes.
4699 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4700 Define.
4701 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4702 typo fixes.
4703 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4704 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4705 fixes.
4706
47072004-05-18 Ulrich Drepper <drepper@redhat.com>
4708
4709 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4710 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4711 Add __broadcast_seq field.
4712 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4713 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4714 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4715 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4716 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4717 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4718 all waiters as woken with woken_seq and bump broadcast counter.
4719 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4720 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4721 __broadcast_seq field.
4722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4723 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4724 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4725 * pthread_cond_init.c: Initialize __broadcast_seq field.
4726 * Makefile (tests): Add tst-cond17 and tst-cond18.
4727 Add .NOTPARALLEL goal.
4728 * tst-cond16.c: New file. From Jakub.
4729 * tst-cond17.c: New file. From Jakub.
4730 * tst-cond18.c: New file. From Jakub.
4731
4123718e
UD
47322004-05-16 Ulrich Drepper <drepper@redhat.com>
4733
4734 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4735 unwind info.
4736
4737 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4738 Parametrize frame size. Correct some unwind info.
4739 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4740
2d7ae210
UD
47412004-05-04 Jakub Jelinek <jakub@redhat.com>
4742
4743 * tst-stack3.c: Note testing functionality beyond POSIX.
4744
50c2b6d7
UD
47452004-05-04 Jakub Jelinek <jakub@redhat.com>
4746
4747 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4748 Change conditional from ifdef to if.
4749
27b02589
UD
47502004-04-23 Jakub Jelinek <jakub@redhat.com>
4751
4752 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4753 SYSDEP_CANCEL_ERROR): Define.
4754 (PSEUDO): Use it.
4755
4bb8fc33
UD
47562004-05-01 Jakub Jelinek <jakub@redhat.com>
4757
4758 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4759
f9a06dc1
UD
47602004-04-20 Jakub Jelinek <jakub@redhat.com>
4761
4762 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4763
d3b52028
UD
47642004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4765
4766 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4767 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4768 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4769 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4770
a5dd0a6c
UD
47712004-04-19 Ulrich Drepper <drepper@redhat.com>
4772
4773 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4774 thread has all signals blocked.
4775
620c3354
AJ
47762004-04-18 Andreas Jaeger <aj@suse.de>
4777
4778 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4779 (SEM_VALUE_MAX): Add missing brace.
4780
1683daeb
UD
47812004-04-17 Jakub Jelinek <jakub@redhat.com>
4782
4783 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4784 in rt subdir.
4785 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4786 * sysdeps/pthread/tst-mqueue8x.c: New test.
4787 * tst-cancel4.c: Update comment about message queues.
4788
4789 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4790 return it_value { 0, 0 }.
4791 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4792 like SIGEV_SIGNAL.
4793 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4794 assertion for SIGEV_NONE.
4795 (thread_attr_compare): Compare all attributes, not just a partial
4796 subset.
4797
47982004-04-17 Jakub Jelinek <jakub@redhat.com>
4799
4800 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4801
f532641d
UD
48022004-04-17 Ulrich Drepper <drepper@redhat.com>
4803
4804 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4805 Just use a plain number.
4806 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4807 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4808 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4809 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4810 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4811 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4812 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4813
7eb7fdda
UD
48142004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4815
53392906
UD
4816 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4817 frame info.
4818 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 4819
d7ba1313
UD
48202004-04-15 Jakub Jelinek <jakub@redhat.com>
4821
4822 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4823 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4824 of calling sigwaitinfo.
4825
5adac0e4
UD
48262004-04-16 Ulrich Drepper <drepper@redhat.com>
4827
4828 * allocatestack.c (allocate_stack): Set reported_guardsize
4829 unconditionally.
4830 * pthread_getattr_np.c (pthread_getattr_np): Use
4831 reported_guardsize instead of guardsize.
4832 * descr.h (struct pthread): Add reported_guardsize field.
4833
f93fa7d4
UD
48342004-04-13 Jakub Jelinek <jakub@redhat.com>
4835
4836 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4837
1b82c6c7
UD
48382004-04-12 Ulrich Drepper <drepper@redhat.com>
4839
4840 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4841
48422004-04-08 Jakub Jelinek <jakub@redhat.com>
4843
4844 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4845 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4846 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4847 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4848 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4849 Define.
4850 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4851 (_POSIX_MESSAGE_PASSING): Define.
4852 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4853 (_POSIX_MESSAGE_PASSING): Define.
4854 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4855 (_POSIX_MESSAGE_PASSING): Define.
4856
e6eb894e
UD
48572004-04-04 Ulrich Drepper <drepper@redhat.com>
4858
4859 * tst-context1.c (fct): Check whether correct stack is used.
4860
1e084487
UD
48612004-04-03 Ulrich Drepper <drepper@redhat.com>
4862
4e73e115
UD
4863 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4864 matching constraints for asm mem parameters.
4865
1e084487
UD
4866 * tst-clock2.c (tf): Don't define unless needed.
4867
feca5e0b
UD
48682004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4869
4870 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4871 $(gnulib).
4872
3fa21fd8
UD
48732004-03-30 Ulrich Drepper <drepper@redhat.com>
4874
4875 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4876 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4877 * pthreadP.h: Declare __nptl_deallocate_tsd.
4878 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4879 Adjust caller.
4880
4881 * Makefile (tests): Add tst-tsd5.
4882 * tst-tsd5.c: New file.
4883
8e32efa6
UD
48842004-03-29 Ulrich Drepper <drepper@redhat.com>
4885
4886 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4887 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4888 is SHLIB_COMPAT check.
4889 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4890 (__pthread_attr_getaffinity_old): Likewise.
4891 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4892 (__pthread_getaffinity_old): Likewise.
4893 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4894 (__pthread_setaffinity_old): Likewise.
4895
eec8b6ca
UD
48962004-03-26 Ulrich Drepper <drepper@redhat.com>
4897
4898 * allocatestack.c (_make_stacks_executable): Call
4899 _dl_make_stack_executable first.
4900
db2f05ba
RM
49012004-03-24 Roland McGrath <roland@redhat.com>
4902
4903 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4904 constraint instead of "0".
4905
6abbc501
UD
49062004-03-24 Ulrich Drepper <drepper@redhat.com>
4907
68dc4dcb
UD
4908 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4909 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4910
6abbc501
UD
4911 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4912 code to avoid warning.
4913
865e14d9
AJ
49142004-03-24 Andreas Jaeger <aj@suse.de>
4915
4916 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4917 (__pthread_attr_setaffinity_old): Remove const.
4918
16b06b70
UD
49192004-03-23 Ulrich Drepper <drepper@redhat.com>
4920
2c0b891a
UD
4921 * sysdeps/unix/sysv/linux/smp.h: New file.
4922 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4923 * init.c: Define __is_smp.
4924 (__pthread_initialize_minimal_internal): Call is_smp_system to
4925 initialize __is_smp.
4926 * pthreadP.h: Declare __is_smp.
4927 Define MAX_ADAPTIVE_COUNT is necessary.
4928 * pthread_mutex_init.c: Add comment regarding __spins field.
4929 * pthread_mutex_lock.c: Implement adaptive mutex type.
4930 * pthread_mutex_timedlock.c: Likewise.
4931 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4932 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4933 Add __spins field.
4934 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4935 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4936 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4937 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4938 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4939 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4940 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4941 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4942 lll_mutex_cond_trylock.
4943 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4944 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4945 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4946 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4947 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4948 Define BUSY_WAIT_NOP.
4949 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4950 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4951
4952 * tst-mutex5.c: Add support for testing adaptive mutexes.
4953 * tst-mutex7.c: Likewise.
4954 * tst-mutex5a.c: New file.
4955 * tst-mutex7a.c: New file.
4956 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4957
565699e4
UD
4958 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4959 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 4960 vgettimeofday call might destroy the content.
565699e4 4961
7fe1586f
UD
4962 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4963 @pause in the loop.
4964
e408880b
UD
4965 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4966 No need to restrict type of ret. Make it int. Add comment.
4967
16b06b70
UD
4968 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4969 Remove unnecessary setne instruction.
4970
61645263
UD
49712004-03-22 Jakub Jelinek <jakub@redhat.com>
4972
4973 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4974 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4975 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4976 If realloc fails, break out of the loop.
4977
e3d4c585
AJ
49782004-03-20 Andreas Jaeger <aj@suse.de>
4979
4980 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4981 (__pthread_setaffinity_old): Fix interface.
4982 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4983 (__pthread_getaffinity_old): Likewise.
4984
4985 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4986 (__pthread_setaffinity_new): Remove duplicate declaration.
4987
3abb1ff7
UD
49882004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4989
4990 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4991 the return value to a safe register.
4992 (CDISABLE): Set the function argument correctly.
4993
07bd2a3f
UD
49942004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4995
4996 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4997 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4998 Rewrite so that only one locked memory operation per round is needed.
4999 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5000 (pthread_barrier_wait): After wakeup, release lock only when the
5001 last thread stopped using the barrier object.
5002 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5003 (__pthread_cond_wait): Don't store mutex address if the current
5004 value is ~0l. Add correct cleanup support and unwind info.
5005 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5006 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5007 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5008 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5009 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5010 Add correct cleanup support and unwind info.
5011 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5012 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5013 information for syscall wrappers.
5014
14c35863
UD
50152004-03-18 Ulrich Drepper <drepper@redhat.com>
5016
5017 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5018 cpusetsize field, remove next.
5019 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5020 parameter for size of the CPU set.
5021 (pthread_setaffinity_np): Likewise.
5022 (pthread_attr_getaffinity_np): Likewise.
5023 (pthread_attr_setaffinity_np): Likewise.
5024 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5025 interface change, keep compatibility code.
5026 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5027 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5028 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5029 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5030 __pthread_getaffinity_np.
5031 * Versions: Add version for changed interfaces.
5032 * tst-attr3.c: Adjust test for interface change.
5033 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5034 increasing buffer sizes.
5035 * pthread_attr_destroy.c: Remove unused list handling.
5036 * pthread_attr_init.c: Likewise.
5037
8e115d80
RM
50382004-03-17 Roland McGrath <roland@redhat.com>
5039
5040 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5041 first argument to clock_getres so we ever enable kernel timers.
5042
e3b22ad3
UD
50432004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5044
5045 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5046
841153fa
RH
50472004-03-12 Richard Henderson <rth@redhat.com>
5048
e3b22ad3
UD
5049 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5050 oldvalue from CENABLE to CDISABLE.
841153fa 5051
932dfea7
UD
50522004-03-12 Ulrich Drepper <drepper@redhat.com>
5053
5054 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5055 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5056 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5057 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5058
9852f6dc
RH
50592004-03-11 Richard Henderson <rth@redhat.com>
5060
5061 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5062 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5063 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5064
43513fb7
UD
50652004-03-11 Jakub Jelinek <jakub@redhat.com>
5066
5067 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5068 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5069 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5070
50712004-03-11 Jakub Jelinek <jakub@redhat.com>
5072
5073 * forward.c (__pthread_cond_broadcast_2_0,
5074 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5075 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5076 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5077
8a3e10e0
UD
50782004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5079
5080 * sysdeps/sh/tcb-offsets.sym: Add PID.
5081 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5082 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5083
6d3a2bec
UD
50842004-03-10 Ulrich Drepper <drepper@redhat.com>
5085
5086 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5087 include <sysdep-cancel.h>, vfork is no cancellation point.
5088 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5089 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5090 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5091
d3a4a571
UD
50922004-03-10 Jakub Jelinek <jakub@redhat.com>
5093
73b4ce64
UD
5094 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5095 libc_hidden_def.
5096 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5097 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5098 Likewise.
5099 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5100 Likewise.
5101 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5102 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5103 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5104 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5105 of DO_CALL_VIA_BREAK. Work around a gas problem.
5106
d682a515
UD
5107 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5108 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5109 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5110 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5111 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5112 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5113
5114 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5115 a local register for saving old PID. Negate PID in parent upon exit.
5116
d3a4a571
UD
5117 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5118 tcb-offsets.h.
5119 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5120 before syscall, set to the old value in the parent afterwards.
5121 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5122 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5123 tcb-offsets.h.
5124 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5125 before syscall, set to the old value in the parent afterwards.
5126 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5127 * sysdeps/s390/tcb-offsets.sym: Add PID.
5128
5129 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5130 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5131 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5132 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5133 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5134 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5135
51362004-03-10 Andreas Schwab <schwab@suse.de>
5137
5138 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5139 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5140 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5141
3f2fb223 51422004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 5143
3f2fb223
UD
5144 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5145 * tst-cancel21.c (do_one_test): Likewise.
5146 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 5147
8b9d6054
UD
51482004-02-09 Jakub Jelinek <jakub@redhat.com>
5149
5150 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5151 if non-zero and set to INT_MIN if zero.
5152 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5153 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5154 (SAVE_PID, RESTORE_PID): Define.
5155 (__vfork): Use it.
5156 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5157 Use relative path to avoid including NPTL i386/vfork.S.
5158 (SAVE_PID, RESTORE_PID): Define.
5159 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5160 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5161 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5162 tst-vfork2x.
5163 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5164 * tst-vfork1.c: New test.
5165 * tst-vfork2.c: New test.
5166 * tst-vfork1x.c: New test.
5167 * tst-vfork2x.c: New test.
5168
02287d05
UD
51692004-03-08 Ulrich Drepper <drepper@redhat.com>
5170
c072ef6d 5171 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 5172 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 5173 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 5174 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 5175
d4acd24b
UD
51762004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5177
5178 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5179
8acb4b81
UD
51802004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5181
5182 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5183 _rtld_global_ro.
5184
4d1a02ef
UD
51852004-03-07 Ulrich Drepper <drepper@redhat.com>
5186
001836c8 5187 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 5188 _rtld_global_ro.
001836c8 5189
4d1a02ef
UD
5190 * tst-once4.c: Remove unnecessary macro definition.
5191
5192 * tst-mutex7.c (do_test): Limit thread stack size.
5193 * tst-once2.c (do_test): Likewise.
5194 * tst-tls3.c (do_test): Likewise.
5195 * tst-tls1.c (do_test): Likewise.
5196 * tst-signal3.c (do_test): Likewise.
5197 * tst-kill6.c (do_test): Likewise.
5198 * tst-key4.c (do_test): Likewise.
5199 * tst-join4.c (do_test): Likewise.
5200 * tst-fork1.c (do_test): Likewise.
5201 * tst-context1.c (do_test): Likewise.
5202 * tst-cond2.c (do_test): Likewise.
5203 * tst-cond10.c (do_test): Likewise.
5204 * tst-clock2.c (do_test): Likewise.
5205 * tst-cancel10.c (do_test): Likewise.
5206 * tst-basic2.c (do_test): Likewise.
5207 * tst-barrier4.c (do_test): Likewise.
5208
aa420660
UD
52092004-03-05 Ulrich Drepper <drepper@redhat.com>
5210
5211 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5212
cff08c81
UD
52132004-03-01 Ulrich Drepper <drepper@redhat.com>
5214
5215 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5216 (__pthread_cond_timedwait): Optimize wakeup test.
5217 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5218 (__pthread_cond_wait): Likewise.
5219 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5220 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5221 Likewise.
5222
b7fe377c
UD
52232004-02-29 Ulrich Drepper <drepper@redhat.com>
5224
5225 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5226 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5227 the atomic instruction needed.
5228 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5229 (__lll_mutex_lock_wait): Likewise.
5230
4c771a3b
UD
52312004-02-28 Ulrich Drepper <drepper@redhat.com>
5232
5233 * Makefile (tests): Add tst-cond14 and tst-cond15.
5234 * tst-cond14.c: New file.
5235 * tst-cond15.c: New file.
5236
a2c33d5a
UD
52372004-02-27 Ulrich Drepper <drepper@redhat.com>
5238
5239 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5240 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5241 needs to be implemented differently to be useful.
5242
261eada2
UD
52432004-02-26 Ulrich Drepper <drepper@redhat.com>
5244
14ffbc83
UD
5245 * pthread_attr_setschedparam.c: Don't test priority against limits
5246 here. Set ATTR_FLAG_SCHED_SET flag.
5247 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5248 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5249 from parent thread to child. If attribute is used and scheduling
5250 parameters are not inherited, copy parameters from attribute or
5251 compute them. Check priority value.
5252 * pthread_getschedparam.c: If the parameters aren't known yet get
5253 them from the kernel.
5254 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5255 ATTR_FLAG_POLICY_SET flag for thread.
5256 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5257 and ATTR_FLAG_POLICY_SET.
5258
5259 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5260
261eada2
UD
5261 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5262 fail if stack address hasn't been set. Just return 0.
5263
701d185c
UD
52642004-02-25 Ulrich Drepper <drepper@redhat.com>
5265
25b8e63c
UD
5266 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5267 libpthread for the files in this list.
5268 (CFLAGS-tst-unload): Removed.
5269 * tst-unload.c (do_test): Don't use complete path for
5270 LIBPHREAD_SO.
5271
701d185c
UD
5272 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5273 tst-_res1mod2.
5274
a8fd5a02
UD
52752004-02-22 Ulrich Drepper <drepper@redhat.com>
5276
5277 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5278 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5279 operation per round is needed.
5280 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5281 (__lll_mutex_lock_wait): Likewise.
5282
dd0b7b19
UD
52832004-02-20 Ulrich Drepper <drepper@redhat.com>
5284
5285 * tst-cancel9.c (cleanup): Don't print to stderr.
5286
5990e1fe
UD
52872004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5288
5289 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5290
33ab3b66
UD
52912004-02-20 Jakub Jelinek <jakub@redhat.com>
5292
1be3130e
UD
5293 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5294 (__syscall_error_handler2): Call CDISABLE.
5295 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5296 (__syscall_error_handler2): Call CDISABLE.
5297
8ba5025a
UD
5298 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5299 Release lock before the loop, don't reacquire it.
8ba5025a 5300
33ab3b66
UD
5301 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5302
11986c68
UD
53032004-02-19 Andreas Schwab <schwab@suse.de>
5304
5305 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5306 Fix last change.
5307
dc391246
UD
53082004-02-18 Ulrich Drepper <drepper@redhat.com>
5309
37c054c7
UD
5310 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5311 (pthread_barrier_wait): After wakeup, release lock only when the
5312 last thread stopped using the barrier object.
5313 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5314 (pthread_barrier_wait): Likewise.
5315 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5316 Likewise.
5317 * Makefile (tests): Add tst-barrier4.
5318 * tst-barrier4.c: New file.
dc391246
UD
5319
5320 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5321 (__pthread_cond_timedwait): Perform timeout test while holding
5322 internal lock to prevent wakeup race.
5323 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5324 * sysdeps/pthread/pthread_cond_timedwait.c
5325 (__pthread_cond_timedwait): Likewise.
5326 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5327 (__pthread_cond_timedwait): Likewise.
5328
4a08113c
UD
53292004-02-18 Jakub Jelinek <jakub@redhat.com>
5330
5331 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5332 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5333 * Makefile (tests): Add tst-rwlock13.
5334 * tst-rwlock13.c: New test.
5335
71b1675e
UD
53362004-02-16 Ulrich Drepper <drepper@redhat.com>
5337
5338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5339 (__condvar_tw_cleanup): Little optimization.
5340 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5341
cd9fdc72
UD
53422004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5343
5344 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5345 libpthread as "lib" parameter to SHLIB_COMPAT.
5346 (__novmx_siglongjmp): Fix typo in function name.
5347 (__novmx_longjmp): Fix typo in function name.
5348
82038750
UD
53492004-02-13 Ulrich Drepper <drepper@redhat.com>
5350
b078c591
UD
5351 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5352 __builtin_expect.
5353
82038750
UD
5354 * sysdeps/generic/pt-longjmp.c: Moved to...
5355 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5356
e2982bf0
UD
53572004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5358
5359 * Makefile (libpthread-routines): Add pt-cleanup.
5360 * pt-longjmp.c: Removed.
5361 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5362 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5363 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5364 Version longjmp, siglongjmp for GLIBC_2.3.4.
5365 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5366
3730d95c
UD
53672004-02-13 Ulrich Drepper <drepper@redhat.com>
5368
219304ec
UD
5369 * sysdeps/pthread/pthread_cond_timedwait.c
5370 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5371 Reuse code. Add __builtin_expects.
5372
3730d95c
UD
5373 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5374 (__pthread_cond_timedwait): Get internal lock in case timeout has
5375 passed before the futex syscall.
5376 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5377
5673ccc1
UD
53782004-01-20 Ulrich Drepper <drepper@redhat.com>
5379
debddf64
UD
5380 * allocatestack.c: Pretty printing.
5381
5673ccc1
UD
5382 * sysdeps/pthread/createthread.c (create_thread): Don't add
5383 CLONE_DETACHED bit if it is not necessary.
5384
6bae8725
UD
53852004-01-16 Ulrich Drepper <drepper@redhat.com>
5386
5387 * pthread_getattr_np.c: Include ldsodefs.h.
5388
ff151400
RH
53892004-01-16 Richard Henderson <rth@redhat.com>
5390
6bae8725
UD
5391 * allocatestack.c: Don't declare __libc_stack_end.
5392 * init.c (__pthread_initialize_minimal_internal): Likewise.
5393 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 5394
ba683832
RH
53952004-01-15 Richard Henderson <rth@redhat.com>
5396
5397 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5398 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5399 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5400 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5401 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5402 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5403 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5404 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5405
630d93a7
UD
54062004-01-14 Ulrich Drepper <drepper@redhat.com>
5407
219304ec 5408 * init.c (pthread_functions): Make array const.
630d93a7 5409
d1fc817e
UD
54102004-01-13 Ulrich Drepper <drepper@redhat.com>
5411
5412 * allocatestack.c (__make_stacks_executable): Change interface.
5413 Check parameters. Pass parameter on to libc counterpart.
5414 * pthreadP.h: Change declaration.
5415
dc927809
RH
54162004-01-13 Richard Henderson <rth@redhat.com>
5417
10677727
UD
5418 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5419 prototype form.
5420 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5421 Likewise.
5422
d1fc817e
UD
5423 * sysdeps/alpha/Makefile: New file.
5424 * sysdeps/alpha/tcb-offsets.sym: New file.
5425 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5426 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 5427
d1fc817e
UD
5428 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5429 on powerpc version.
dc927809 5430
249a3d0c
UD
54312004-01-08 Jakub Jelinek <jakub@redhat.com>
5432
5433 * Makefile (tests): Add tst-backtrace1.
5434 * tst-backtrace1.c: New test.
5435
763c0490
RM
54362003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5437
5438 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5439 register as second parameter to the REGISTER macro.
5440 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5441 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5442 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5443 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5444 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5445 of thread register as second parameter to REGISTER macro in 64 case.
5446
c7baafd5
UD
54472004-01-03 Ulrich Drepper <drepper@redhat.com>
5448
5449 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5450 (CFLAGS-getpid.o): Defined.
5451 (CFLAGS-getpid.os): Defined.
5452
25ac0258
UD
54532003-12-31 Ulrich Drepper <drepper@redhat.com>
5454
5455 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5456 returned for main thread does not overlap with any other VMA.
5457 Patch by Jakub Jelinek.
5458
795985e4
UD
54592003-12-29 Jakub Jelinek <jakub@redhat.com>
5460
5461 * tst-raise1.c: Include stdio.h.
5462
cb5b9388
UD
54632003-12-23 Jakub Jelinek <jakub@redhat.com>
5464
5465 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5466 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5467 If pid is 0, set it to selftid.
5468 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5469 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5470 != 0, return self->tid without doing a syscall.
5471 * descr.h (struct pthread): Move pid field after tid.
5472
5473 * Makefile (tests): Add tst-raise1.
5474 * tst-raise1.c: New file.
5475
432aaf5b
RM
54762003-12-23 Roland McGrath <roland@redhat.com>
5477
5478 * tst-oddstacklimit.c: New file.
5479 * Makefile (tests): Add it.
5480 (tst-oddstacklimit-ENV): New variable.
5481
5482 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5483 value up to page size for __default_stacksize.
5484
33ebea17
UD
54852003-12-21 Ulrich Drepper <drepper@redhat.com>
5486
5487 * Makefile (tests): Add tst-eintr5.
5488 * tst-eintr5.c: New file.
5489
5490 * eintr.c (eintr_source): Prevent sending signal to self.
5491
5492 * tst-eintr2.c (tf1): Improve error message.
5493
bbe35eb5
UD
54942003-12-20 Ulrich Drepper <drepper@redhat.com>
5495
5496 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5497 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
5498 * pthread_cancel.c: Add comment explaining use of PID field.
5499 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5500 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5501 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5502 temporarily to signal the field must not be relied on and updated
5503 by getpid().
5504 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5505 temporarily negative.
5506 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 5507
4efdd8d3
UD
55082003-12-19 Ulrich Drepper <drepper@redhat.com>
5509
5510 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5511 (eintr_source): If ARG != NULL, use pthread_kill.
5512 * tst-eintr1.c: Adjust for this change.
5513 * tst-eintr2.c: Likewise.
5514 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5515 * tst-eintr3.c: New file.
5516 * tst-eintr4.c: New file.
5517
55182003-12-19 Jakub Jelinek <jakub@redhat.com>
5519
5520 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5521 if CANCELSTATE_BITMASK is set.
5522 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5523 Likewise.
5524
5525 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5526 (tests-reverse): Add tst-cancel23.
5527 * tst-cancel22.c: New test.
5528 * tst-cancel23.c: New test.
5529
675620f7
UD
55302003-12-18 Ulrich Drepper <drepper@redhat.com>
5531
5532 * tst-eintr1.c: Better error messages.
5533
5534 * Makefile (tests): Add tst-eintr2.
5535 * tst-eintr2.c: New file.
5536
55372003-12-18 Jakub Jelinek <jakub@redhat.com>
5538
5539 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5540 (CFLAGS-tst-cancelx21.c): Set.
5541 * tst-cancel21.c: New test.
5542 * tst-cancelx21.c: New test.
5543
5544 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5545 comparison operand.
5546 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5547 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5548 * pt-longjmp.c: Include jmpbuf-unwind.h.
5549 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5550 _JMPBUF_UNWINDS. Adjust compared pointers.
5551 * init.c (__pthread_initialize_minimal_internal): Initialize
5552 pd->stackblock_size.
5553 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5554 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5555 * sysdeps/i386/jmpbuf-unwind.h: New file.
5556 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5557 * sysdeps/s390/jmpbuf-unwind.h: New file.
5558 * sysdeps/sh/jmpbuf-unwind.h: New file.
5559 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5560 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 5561 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
5562 (_JMPBUF_CFA_UNWINDS): Remove.
5563 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5564
55652003-12-12 Jakub Jelinek <jakub@redhat.com>
5566
5567 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5568 (CFLAGS-tst-cancelx20.c): Set.
5569 * tst-cancel20.c: New test.
5570 * tst-cancelx20.c: New test.
5571
2d951ab6
UD
55722003-12-17 Ulrich Drepper <drepper@redhat.com>
5573
5574 * init.c (__pthread_initialize_minimal_internal): Don't treat
5575 architectures with separate register stack special here when
5576 computing default stack size.
5577
f8a3a2e7
RM
55782003-12-17 Roland McGrath <roland@redhat.com>
5579
5580 * Makefile (tst-cancelx7-ARGS): New variable.
5581 Reportd by Greg Schafer <gschafer@zip.com.au>.
5582
e796f92f
UD
55832003-12-17 Jakub Jelinek <jakub@redhat.com>
5584
5585 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5586 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5587 (tst-stack3-ENV): Set.
5588 ($(objpfx)tst-stack3-mem): New.
5589 * tst-stack3.c: New test.
5590
092eb73c
UD
55912003-12-10 David Mosberger <davidm@hpl.hp.com>
5592
5593 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5594 Add unwind directives. Drop unused .regstk directive.
5595 (_fini_EPILOG_BEGINS): Add unwind directives.
5596
ff48874d
UD
55972003-12-11 Ulrich Drepper <drepper@redhat.com>
5598
5599 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5600 Assume parameter is a pointer.
5601 (lll_futex_wake): Likewise.
20945457
UD
5602 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5603 Likewise.
5604 (lll_futex_wake): Likewise.
ff48874d
UD
5605 Reported by Boris Hu.
5606 * sysdeps/unix/sysv/linux/unregister-atfork.c
5607 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5608
5609 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5610
1d9d0b80
UD
56112003-12-10 Ulrich Drepper <drepper@redhat.com>
5612
5613 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5614 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5615 __rtld_lock_initialize for ld.so lock.
5616 Patch in part by Adam Li <adam.li@intel.com>.
5617
c776b3d7
UD
56182003-12-02 David Mosberger <davidm@hpl.hp.com>
5619
5620 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5621 in $(gnulib). Also, remove stale comment.
5622
56232003-11-12 David Mosberger <davidm@hpl.hp.com>
5624
5625 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5626 advantage of new syscall stub and optimize accordingly.
5627
5628 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5629 from SYS_futex, to match expectations of
5630 sysdep.h:DO_INLINE_SYSCALL.
5631 (lll_futex_clobbers): Remove.
5632 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5633 (lll_futex_wake): Likewise.
5634 (lll_futex_requeue): Likewise.
5635 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5636 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5637 Jelinek).
5638 (__lll_mutex_lock): Likewise.
5639 (__lll_mutex_cond_lock): Likewise.
5640 (__lll_mutex_timed_lock): Likewise.
5641 (__lll_mutex_unlock): Likewise.
5642 (__lll_mutex_unlock_force): Likewise.
5643
5644 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5645 comes before the include of <sysdep.h>.
5646 (THREAD_SELF_SYSINFO): New macro.
5647 (THREAD_SYSINFO): Likewise.
5648 (INIT_SYSINFO): New macro.
5649 (TLS_INIT_TP): Call INIT_SYSINFO.
5650
5651 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5652
5653 * sysdeps/pthread/createthread.c (create_thread): Use
5654 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5655 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5656 THREAD_SELF_SYSINFO instead of open code.
5657 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5658 (THREAD_SYSINFO): Likewise.
5659
5660 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5661
5662 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5663
57d20ee7
UD
56642003-12-06 Ulrich Drepper <drepper@redhat.com>
5665
5666 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5667 instead of .init. Patch by David Mosberger.
5668
67aeab2a
AJ
56692003-11-30 Thorsten Kukuk <kukuk@suse.de>
5670
5671 * sysdeps/pthread/configure.in: Remove broken declaration in C
5672 cleanup handling check.
5673
8ca203e6
AJ
56742003-11-30 Andreas Jaeger <aj@suse.de>
5675
5676 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5677 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5678 Likewise.
5679
46bf9de7
UD
56802003-11-27 Jakub Jelinek <jakub@redhat.com>
5681
5682 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5683 * pthread_attr_destroy.c: Include shlib-compat.h.
5684 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5685 is set in iattr->flags.
5686 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5687
1d9b73ab
UD
56882003-11-21 Jakub Jelinek <jakub@redhat.com>
5689
5690 * Makefile (distribute): Add tst-cleanup4aux.c.
5691
5692 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5693 include.
5694
53f9084e
UD
56952003-11-21 Ulrich Drepper <drepper@redhat.com>
5696
1d9b73ab
UD
5697 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5698 pthread_cond_signal.
5699
e42a990e
UD
5700 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5701 store mutex address if the current value is ~0l.
5702 * sysdeps/pthread/pthread_cond_timedwait.c
5703 (__pthread_cond_timedwait): Likewise.
5704 * sysdeps/pthread/pthread_cond_broadcast.c
5705 (__pthread_cond_broadcast): Don't use requeue for pshared
5706 condvars.
5707
5708 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5709 (__pthread_cond_wait): Don't store mutex address if the current
5710 value is ~0l.
5711 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5712 (__pthread_cond_timedwait): Likewise.
5713 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5714 (__pthread_cond_broadcast): Don't use requeue for pshared
5715 condvars.
5716
5717 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5718 element with ~0l for pshared condvars, with NULL otherwise.
5719
5720 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5721 (__pthread_cond_wait): Don't store mutex address if the current
5722 value is ~0l.
5723 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5724 (__pthread_cond_timedwait): Likewise.
5725 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5726 (__pthread_cond_broadcast): Don't use requeue for pshared
5727 condvars.
5728
bf68b236 5729 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 5730 * tst-cond12.c: New file.
bf68b236 5731 * tst-cond13.c: New file.
53f9084e 5732
9780c971
UD
57332003-11-17 Ulrich Drepper <drepper@redhat.com>
5734
5735 * sysdeps/pthread/configure.in: Make missing forced unwind support
5736 fatal.
5737
74e12fbc
UD
57382003-11-11 Ulrich Drepper <drepper@redhat.com>
5739
5740 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5741
c685b2b0
UD
57422003-11-06 Ulrich Drepper <drepper@redhat.com>
5743
5744 * Makefile: Add magic to clean up correctly.
5745
44e94149
UD
57462003-11-05 Jakub Jelinek <jakub@redhat.com>
5747
5748 * unwind.c (FRAME_LEFT): Define.
5749 (unwind_stop): Handle old style cleanups here.
5750 (__pthread_unwind): Handle old style cleanups only if
5751 !HAVE_FORCED_UNWIND.
5752 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5753 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5754 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5755 ($(objpfx)tst-cleanupx4): Likewise.
5756 * tst-cleanup4.c: New test.
5757 * tst-cleanup4aux.c: New.
5758 * tst-cleanupx4.c: New test.
5759
c28422b5
UD
57602003-11-04 Ulrich Drepper <drepper@redhat.com>
5761
5762 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5763 lll_mutex_*lock macros to skip atomic operations on some archs.
5764
27176677
UD
57652003-11-03 Ulrich Drepper <drepper@redhat.com>
5766
5767 * sysdeps/pthread/tst-timer.c (main): Initialize
5768 sigev2.sigev_value as well.
5769
026395a2
RM
57702003-10-15 Roland McGrath <roland@redhat.com>
5771
5772 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5773 is missing.
5774 * sysdeps/pthread/configure: Regenerated.
5775
fa3cbe3d
UD
57762003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5777
5778 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5779 locking macros. No distinction between normal and mutex locking
5780 anymore.
5781 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5782 Merge bits from lowlevelmutex.S we still need.
5783 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5784 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5785 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5786 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5787 new mutex implementation.
5788 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5789 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5790 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5791 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5792 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5793 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5794 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5795 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5796 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5797 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5798 symbol for entry point to avoid cancellation.
5799
e700a908
UD
58002003-10-07 Jakub Jelinek <jakub@redhat.com>
5801
5802 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5803 changes.
5804 (SAVE_OLDTYPE_0): Fix a typo.
5805
c70a86b6
UD
58062003-10-03 Ulrich Drepper <drepper@redhat.com>
5807
5808 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5809 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5810
134abcb5
UD
58112003-10-02 Ulrich Drepper <drepper@redhat.com>
5812
5813 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5814 correct offset.
5815
b77ca0e8
UD
58162003-10-02 Jakub Jelinek <jakub@redhat.com>
5817
5818 * Makefile (tests): Add tst-cancel19.
5819 * tst-cancel19.c: New test.
5820
4d961dc7
UD
58212003-10-02 Ulrich Drepper <drepper@redhat.com>
5822
5823 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5824 restoring of the old cancellation type.
5825
1d5b20ad 58262003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 5827
1d5b20ad
UD
5828 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5829
4106a403
RM
58302003-09-27 Wolfram Gloger <wg@malloc.de>
5831
4d961dc7 5832 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 5833
fca9d8e4
RM
58342003-09-24 Roland McGrath <roland@redhat.com>
5835
5836 * allocatestack.c (__make_stacks_executable): Don't ignore return
5837 value from _dl_make_stack_executable.
5838
c9c60884
UD
58392003-09-24 Ulrich Drepper <drepper@redhat.com>
5840
69c9fa04
UD
5841 * allocatestack.c (__make_stacks_executable): Also change
5842 permission of the currently unused stacks.
5843
279f1143
UD
5844 * allocatestack.c (change_stack_perm): Split out from
5845 __make_stacks_executable.
5846 (allocate_stack): If the required permission changed between the time
5847 we started preparing the stack and queueing it, change the permission.
5848 (__make_stacks_executable): Call change_stack_perm.
5849
c9c60884
UD
5850 * Makefile: Build tst-execstack-mod locally.
5851 * tst-execstack-mod.c: New file.
5852
54ee14b3
UD
58532003-09-23 Jakub Jelinek <jakub@redhat.com>
5854
5855 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5856
58572003-09-23 Roland McGrath <roland@redhat.com>
5858
5859 * tst-execstack.c: New file.
5860 * Makefile (tests): Add it.
5861 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5862 (LDFLAGS-tst-execstack): New variable.
5863
5864 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5865 whether to use PROT_EXEC for stack mmap.
5866 (__make_stacks_executable): New function.
5867 * pthreadP.h: Declare it.
5868 * init.c (__pthread_initialize_minimal_internal): Set
5869 GL(dl_make_stack_executable_hook) to that.
5870
365b1602
UD
58712003-09-22 Ulrich Drepper <drepper@redhat.com>
5872
5873 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5874 recommendation from AMD re avoidance of lock prefix.
5875
39358e8b
UD
58762003-09-22 Jakub Jelinek <jakub@redhat.com>
5877
5878 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5879 lll_futex_timed_wait instead of lll_futex_wait.
5880 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5881 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5882 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5883 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5884 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5885 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5886 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5887 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5888 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5889 Completely revamp the locking macros. No distinction between
5890 normal and mutex locking anymore.
5891 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5892 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5893 __lll_lock_timedwait): Fix prototypes.
5894 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5895 __lll_lock_timedwait): Likewise.
5896 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5897 macros, add __builtin_expect.
5898 (lll_mutex_timedlock): Likewise. Fix return value.
5899 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5900 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5901 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5902 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5903 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5904 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5905 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5906 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5907
9d08fbbb
UD
59082003-09-22 Ulrich Drepper <drepper@redhat.com>
5909
c0df57e1
UD
5910 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5911 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5912 operation if possible.
5913
9d08fbbb
UD
5914 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5915 like jumping over the lock prefix.
5916
71451de2
UD
59172003-09-21 Ulrich Drepper <drepper@redhat.com>
5918
5919 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5920 locking macros. No distinction between normal and mutex locking
5921 anymore.
3a226d33 5922 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
5923 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5924 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
5925 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5926 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 5927 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 5928 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 5929 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 5930 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
5931 * Makefile (routines): Remove libc-lowlevelmutex.
5932 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
5933 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5934 for new mutex implementation.
5935 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5936 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5937 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5938 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5939 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5940 Likewise.
5941 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5942 Likewise.
5943 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5944 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5945 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5946 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5947 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5948 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5949 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5950 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5951 Likewise.
5952 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5953 Likewise.
5954 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5955 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5956 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5957 Don't use requeue.
5958 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 5959 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 5960
8f31c0ef
UD
59612003-09-20 Ulrich Drepper <drepper@redhat.com>
5962
56a4aa98
UD
5963 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5964 in parameters of asm with output parameters.
5965
8f31c0ef
UD
5966 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5967 type of DECR parameter to int.
5968 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5969
8b8074da
UD
59702003-09-18 Jakub Jelinek <jakub@redhat.com>
5971
5972 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5973 guardsize for each thread.
5974
65af7e61
UD
59752003-09-17 Jakub Jelinek <jakub@redhat.com>
5976
9ba96eda
UD
5977 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5978 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5979 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5980
06f6ca90
UD
5981 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5982 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5983 NULL.
5984 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5985 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5986 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5987 (pthread_getaffinity_np): Add hidden_def.
5988
5989 * Makefile (tests): Add tst-attr3.
5990 * tst-attr3.c: New test.
5991
65af7e61
UD
5992 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5993
3402852c
UD
59942003-09-15 Jakub Jelinek <jakub@redhat.com>
5995
5996 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5997 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5998
a4db3439
UD
59992003-09-17 Jakub Jelinek <jakub@redhat.com>
6000
6001 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6002 * tst-align.c: Include tst-stack-align.h.
6003 (tf, do_test): Use TEST_STACK_ALIGN macro.
6004
60052003-09-17 Ulrich Drepper <drepper@redhat.com>
6006
6007 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6008 variable.
6009
92ce4676
UD
60102003-09-16 Ulrich Drepper <drepper@redhat.com>
6011
6012 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6013 stack-related values for the initial thread.
6014
e07bb02a
UD
60152003-09-15 Jakub Jelinek <jakub@redhat.com>
6016
6017 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6018
d087b5dc
UD
60192003-09-11 Ulrich Drepper <drepper@redhat.com>
6020
6021 * pthread_mutex_lock.c: Minor code rearrangements.
6022
7f08f55a
RM
60232003-09-05 Roland McGrath <roland@redhat.com>
6024
6025 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6026 Instead, include ../nptl_db/db_info.c to do its magic.
6027 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6028 (__pthread_pthread_key_2ndlevel_size): Likewise.
6029 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6030 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6031 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6032 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6033 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6034 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6035 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6036 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6037 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6038 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6039 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6040 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6041 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6042 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6043 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6044 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6045 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6046
806e4a4a
UD
60472003-09-08 Ulrich Drepper <drepper@redhat.com>
6048
6049 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6050 of pthread_t to be compatible with LT.
6051 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6052 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6053 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6054 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6055 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6056 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6057 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6058
17f83e56
UD
60592003-09-04 Ulrich Drepper <drepper@redhat.com>
6060
6061 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6062
58e8ec84
UD
60632003-09-04 Jakub Jelinek <jakub@redhat.com>
6064
6065 * unwind-forcedunwind.c: Move to...
6066 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6067 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6068 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6069 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6070 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6071 * unwind.c: Include jmpbuf-unwind.h.
6072 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6073
abf1cf21
JJ
60742003-09-02 Jakub Jelinek <jakub@redhat.com>
6075
4a244f0d
UD
6076 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6077 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6078 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6079 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6080 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6081 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6082 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6083 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6084 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6085 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6086 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6087 function.
6088 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6089 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6090 * Makefile (tests): Add tst-stack2.
6091 * tst-stack2.c: New test.
6092 * tst-stack1.c: Include limits.h and sys/param.h.
6093 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6094
e29ef647
UD
6095 * pthread_condattr_setpshared.c: Include errno.h.
6096 (pthread_condattr_setpshared): Return EINVAL if pshared
6097 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6098
5777d565
UD
6099 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6100 defined symbol for entry point to avoid cancellation.
6101 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6102 Likewise.
6103 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6104 Likewise.
6105 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6106 Likewise.
6107 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6108 Likewise.
6109 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6110 Likewise.
6111 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6112 __close_nocancel, __read_nocancel, __write_nocancel,
6113 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6114 libpthread.so or librt.so, define to corresponding function
6115 without _nocancel suffix.
6116 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6117 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6118 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6119
abf1cf21
JJ
6120 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6121
8348dcc8
UD
61222003-09-02 Ulrich Drepper <drepper@redhat.com>
6123
6124 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 6125 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
6126
6127 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6128 in subsections has a symbol associated with it.
6129
6130 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6131 defined symbol for entry point to avoid cancellation.
6132 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6133
c874a32e
UD
61342003-09-01 Jakub Jelinek <jakub@redhat.com>
6135
6136 * Makefile (tests): Add tst-tls5.
6137 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6138 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6139 ($(objpfx)tst-tls5): New.
6140 ($(objpfx)tst-tls6.out): Likewise.
6141 (tests): Depend on $(objpfx)tst-tls6.out.
6142 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6143 (do_test): Check pthread_self () return value alignment.
6144 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6145 (tf): Check pthread_self () return value alignment.
6146 * tst-tls5.c: New test.
6147 * tst-tls5.h: New.
6148 * tst-tls5mod.c: New.
6149 * tst-tls5moda.c: New.
6150 * tst-tls5modb.c: New.
6151 * tst-tls5modc.c: New.
6152 * tst-tls5modd.c: New.
6153 * tst-tls5mode.c: New.
6154 * tst-tls5modf.c: New.
6155 * tst-tls6.sh: New test.
6156
c503d3dc
UD
6157 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6158 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6159 * init.c (pthread_functions): Initialize them.
6160 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6161 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6162 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6163 pthread_cond_timedwait@@GLIBC_2.3.2.
6164
48614753
JJ
61652003-09-01 Jakub Jelinek <jakub@redhat.com>
6166
56a1b877
JJ
6167 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6168 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6169 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6170 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6171 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6172 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6173
6174 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6175
48614753
JJ
6176 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6177 _POSIX_THREAD_PRIORITY_SCHEDULING.
6178 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6179
28c97261
UD
61802003-08-31 Ulrich Drepper <drepper@redhat.com>
6181
eef80cf8
UD
6182 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6183 nested function, use static inline function from libio.h.
6184 Code by Richard Henderson.
6185
28c97261
UD
6186 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6187 weak.
6188
cd2fbe58
UD
61892003-08-30 Jakub Jelinek <jakub@redhat.com>
6190
6191 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6192 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6193 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6194 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6195 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6196 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6197 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6198 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6199 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6200 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6201 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6202 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6203 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6204 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6205 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6206 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6207 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6208 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6209 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6210 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6211 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6212 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6213 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6214 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6215 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6216 * sysdeps/sparc/tls.h: New file.
6217 * sysdeps/sparc/tcb-offsets.sym: New file.
6218 * sysdeps/sparc/Makefile: New file.
6219 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6220 * init.c [__sparc__] (__NR_set_tid_address): Define.
6221
feda52c0
UD
62222003-08-29 Jakub Jelinek <jakub@redhat.com>
6223
6224 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6225 _IO_release_lock): Define.
6226
7c868816
JJ
62272003-08-29 Jakub Jelinek <jakuB@redhat.com>
6228
0261d33f 6229 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
6230 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6231
68b9e1ae
UD
62322003-08-27 Ulrich Drepper <drepper@redhat.com>
6233
6234 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6235 (__pthread_cleanup_class): Add missing return types of member
6236 functions.
6237
13b3edfc
UD
62382003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6239
6240 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6241 (lll_mutex_unlock_force): Add memory barrier between store and futex
6242 syscall.
6243
bb606fbe
UD
62442003-08-25 Ulrich Drepper <drepper@redhat.com>
6245
6246 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6247 tempmsg in first loop.
6248
ee4e5a3d
UD
62492003-08-18 Ulrich Drepper <drepper@redhat.com>
6250
6251 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6252 _POSIX_THREAD_PRIORITY_SCHEDULING.
6253 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6254
334fcf2a
UD
62552003-08-07 Jakub Jelinek <jakub@redhat.com>
6256
6257 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6258 (__rtld_lock_default_lock_recursive,
6259 __rtld_lock_default_unlock_recursive): Define.
6260 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6261 __rtld_lock_unlock_recursive): Define using
6262 GL(_dl_rtld_*lock_recursive).
6263 * init.c (__pthread_initialize_minimal_internal): Initialize
6264 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6265 Lock GL(_dl_load_lock) the same number of times as
6266 GL(_dl_load_lock) using non-mt implementation was nested.
6267
6268 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6269 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6270
a30fb2df
UD
62712003-08-06 Jakub Jelinek <jakub@redhat.com>
6272
6273 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6274 PIPE_BUF.
6275
ce0d30a0
JJ
62762003-08-07 Jakub Jelinek <jakub@redhat.com>
6277
6278 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6279
9c988b83
UD
62802003-08-03 Jakub Jelinek <jakub@redhat.com>
6281
6282 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6283 to first syscall error check. Move syscall error check for tkill
6284 into __ASSUME_CLONE_STOPPED #ifdef.
6285
5c5252bd
UD
62862003-08-02 Ulrich Drepper <drepper@redhat.com>
6287
f1205aa7
UD
6288 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6289 is not defined, do explicit synchronization.
6290 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6291 is not defined also unlock pd->lock for non-debugging case in case
6292 it is necessary.
6293 * pthread_create.c (start_thread): Always get and release pd->lock
6294 if __ASSUME_CLONE_STOPPED is not defined.
6295 (start_thread_debug): Removed. Adjust users.
6296 * allocatestack.c (allocate_stack): Always initialize lock if
6297 __ASSUME_CLONE_STOPPED is not defined.
6298 * Makefile (tests): Add tst-sched1.
6299 * tst-sched1.c: New file.
6300
5c5252bd
UD
6301 * sysdeps/pthread/createthread.c (do_clone): Only use
6302 sched_setschduler and pass correct parameters.
6303
973d66e4
UD
63042003-07-31 Jakub Jelinek <jakub@redhat.com>
6305
6306 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6307 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6308 PTHREAD_STACK_MIN in comments.
6309
d347a4ab
UD
63102003-07-31 Jakub Jelinek <jakub@redhat.com>
6311
6312 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6313 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6314 argument.
6315 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6316 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6317 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6318 (__pthread_cleanup_upto): Fix prototype.
6319 (_longjmp_unwind): Adjust caller.
6320 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6321 Change second argument to const struct pointer.
6322 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6323 * tst-sem9.c (main): Likewise.
6324 * unwind.c: Include string.h for strlen prototype.
6325
1b26e9a5
UD
63262003-07-31 Ulrich Drepper <drepper@redhat.com>
6327
6328 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6329 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6330 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6331 Define HAVE_CMOV.
6332 Patch by Nicholas Miell <nmiell@attbi.com>.
6333
adc12574
UD
63342003-07-30 Jakub Jelinek <jakub@redhat.com>
6335
6336 * init.c (__pthread_initialize_minimal_internal): Initialize
6337 GL(dl_init_static_tls).
6338 * pthreadP.h (__pthread_init_static_tls): New prototype.
6339 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6340 New functions.
6341 * Makefile (tests): Add tst-tls4.
6342 (modules-names): Add tst-tls4moda and tst-tls4modb.
6343 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6344 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6345 tst-tls4modb.so.
6346 * tst-tls4.c: New file.
6347 * tst-tls4moda.c: New file.
6348 * tst-tls4modb.c: New file.
6349
a7f6c66e
RM
63502003-06-19 Daniel Jacobowitz <drow@mvista.com>
6351
6352 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6353 before __timer_dealloc.
6354 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6355 Don't call list_unlink.
6356
172ce013
RM
63572003-07-29 Roland McGrath <roland@redhat.com>
6358
6359 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6360
7b787f85
UD
63612003-07-25 Jakub Jelinek <jakub@redhat.com>
6362
6363 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6364 Don't reuse struct aiocb A if it failed.
6365 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6366 not just one byte, as that does not block.
6367
0e9d6240
UD
63682003-07-22 Jakub Jelinek <jakub@redhat.com>
6369
9d79e037
UD
6370 * sysdeps/pthread/unwind-resume.c: New file.
6371 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6372 unwind-resume in csu subdir.
6373 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6374 exceptions.
6375 (librt-sysdep_routines, librt-shared-only-routines): Add
6376 rt-unwind-resume.
6377 * sysdeps/pthread/rt-unwind-resume.c: New file.
6378 * unwind-forcedunwind.c: New file.
6379 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6380 (libpthread-shared-only-routines): Likewise.
6381 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6382 * pthreadP.h (pthread_cancel_init): New prototype.
6383 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6384
6385 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6386 attr argument const struct pthread_attr *.
6387
0e9d6240
UD
6388 * res.c (__res_state): Return __resp.
6389 * descr.h: Include resolv.h.
6390 (struct pthread): Add res field.
6391 * pthread_create.c: Include resolv.h.
6392 (start_thread): Initialize __resp.
6393 * Makefile (tests): Add tst-_res1.
6394 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6395 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6396 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6397 libpthread.
6398 * tst-_res1.c: New file.
6399 * tst-_res1mod1.c: New file.
6400 * tst-_res1mod2.c: New file.
6401
1a379ea0
UD
64022003-07-21 Ulrich Drepper <drepper@redhat.com>
6403
7e939b21
UD
6404 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6405
1a379ea0
UD
6406 * Makefile: Define various *-no-z-defs variables for test DSOs
6407 which has undefined symbols.
6408
ca86a763
UD
64092003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6410
6411 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6412 Retry if the stwcx fails to store once_control.
6413
80f536db
UD
64142003-07-20 Ulrich Drepper <drepper@redhat.com>
6415
6416 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6417 pthread_attr_setaffinity.
6418 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6419 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6420 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6421 * pthread_attr_destroy.c: Free cpuset element if allocated.
6422 * pthread_create.c: Pass iattr as additional parameter to
6423 create_thread.
6424 * sysdeps/pthread/createthread.c: If attribute is provided and
6425 a new thread is created with affinity set or scheduling parameters,
6426 start thread with CLONE_STOPPED.
6427 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6428 pthread_attr_setaffinity.
6429 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6430 cpuset element.
6431
73299943
UD
64322003-07-15 Ulrich Drepper <drepper@redhat.com>
6433
6434 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6435
da35d15e
UD
64362003-07-14 Ulrich Drepper <drepper@redhat.com>
6437
6438 * sysdeps/pthread/configure.in: Require CFI directives also for
6439 ppc and s390.
6440
75540d8a
UD
64412003-07-15 Jakub Jelinek <jakub@redhat.com>
6442
6443 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6444 Add cfi directives.
6445
4a17085f
UD
64462003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6447
6448 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6449 CLEANUP_JMP_BUF.
6450 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6451 registers as variables. Call __pthread_mutex_unlock_usercnt.
6452 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6453 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6454 not self pointer in __writer. Compare with TID to determine
6455 deadlocks.
6456 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6457 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6458 Likewise.
6459 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6460 Likewise.
6461 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6462 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6463 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6464 macros also when compiling librt.
6465
6080ecdf
UD
64662003-07-11 Jakub Jelinek <jakub@redhat.com>
6467
6468 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6469 -fasynchronous-unwind-tables.
6470 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6471 (PSEUDO): Add cfi directives.
6472 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6473 Likewise.
6474 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6475 Likewise.
6476
da0c02ee
UD
64772003-07-08 Jakub Jelinek <jakub@redhat.com>
6478
6479 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6480 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6481 * unwind.c (__pthread_unwind_next): Add hidden_def.
6482 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6483 Likewise.
6484 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6485 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6486 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6487 Likewise.
6488 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6489 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6490 Likewise.
6491 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6492 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6493 __pthread_unregister_cancel and __pthread_unwind_next.
6494
57a5ea02
UD
64952003-07-04 Jakub Jelinek <jakub@redhat.com>
6496
6497 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6498 different symbol for the cancellation syscall wrapper and
6499 non-cancellation syscall wrapper.
6500 (PSEUDO_END): Define.
6501
d810b358
UD
65022003-07-05 Richard Henderson <rth@redhat.com>
6503
6504 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6505 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
6506 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6507 return actual return value from the syscall, not 0.
d810b358 6508
db54f488
UD
65092003-07-07 Ulrich Drepper <drepper@redhat.com>
6510
6511 * descr.h (struct pthread): Add pid field.
6512 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6513 (__reclaim_stacks): Likewise.
6514 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6515 also check for PID of the signal source.
6516 (__pthread_initialize_minimal_internal): Also initialize pid field
6517 of initial thread's descriptor.
6518 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6519 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6520 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6521 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6522 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6523
5e497a41
UD
65242003-07-05 Ulrich Drepper <drepper@redhat.com>
6525
6526 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6527 Fix use of parameter.
6528 (__libc_cleanup_pop): Likewise.
6529
86a0c4fa
UD
65302003-07-04 Ulrich Drepper <drepper@redhat.com>
6531
6532 * init.c (sigcancel_handler): Change parameters to match handler
6533 for SA_SIGACTION. Check signal number and code to recognize
6534 invalid invocations.
6535
bdbecaa3
RM
65362003-07-03 Roland McGrath <roland@redhat.com>
6537
6538 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6539 Apply sizeof (struct pthread) bias to r13 value.
6540
56421b23
UD
65412003-07-03 Ulrich Drepper <drepper@redhat.com>
6542
fbd90f6c
UD
6543 * sysdeps/pthread/configure.in: Require CFI directives.
6544
56421b23
UD
6545 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6546 definition.
6547 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6548 libpthread compilation.
6549 * unwind.c (__pthread_unwind): Add hidden_def.
6550 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6551
ca2b4cd7
UD
65522003-07-01 Ulrich Drepper <drepper@redhat.com>
6553
6554 * libc-cancellation.c (__libc_cleanup_routine): Define.
6555 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6556 (__pthread_cleanup_pop): Define.
6557
f036e569
UD
65582003-07-01 Richard Henderson <rth@redhat.com>
6559
6560 * sysdeps/alpha/elf/pt-initfini.c: New file.
6561 * sysdeps/alpha/pthread_spin_lock.S: New file.
6562 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6563 * sysdeps/alpha/pthreaddef.h: New file.
6564 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6565 * sysdeps/alpha/tls.h: New file.
6566 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6567 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6568 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6569 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6570 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6571 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6572 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6573 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6574 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6575 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6576
3b985826
UD
65772003-07-01 Ulrich Drepper <drepper@redhat.com>
6578
6579 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6580 cleanup support and unwind info.
6581
3a4d1e1e
UD
65822003-06-30 Ulrich Drepper <drepper@redhat.com>
6583
6584 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6585 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
6586 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6587 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
6588 * tst-once3.c: Add cleanup handler and check it is called.
6589 * tst-once4.c: Likewise.
6590 * tst-oncex3.c: New file.
6591 * tst-oncex4.c: New file.
6592 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6593
e479cc8e
UD
65942003-06-29 Ulrich Drepper <drepper@redhat.com>
6595
6596 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6597
7d7ff54c
UD
65982003-06-27 Ulrich Drepper <drepper@redhat.com>
6599
483e95d0
UD
6600 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6601 (tf_msgsnd): Likewise.
6602
7d7ff54c
UD
6603 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6604 premature returns a bit more.
6605
7539c7ec
UD
66062003-06-26 Ulrich Drepper <drepper@redhat.com>
6607
6608 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6609 definition to the front.
6610
6611 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6612 the cleanup functions to make the names unique. Fix dwarf opcode
6613 un unwind table.
6614 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6615 functions to make the names unique. Fix CFA offset for two blocks.
6616
0af6a1d9
UD
66172003-06-25 Ulrich Drepper <drepper@redhat.com>
6618
6619 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6620 missing closing braces.
6621 Patch by Christophe Saout <christophe@saout.de>.
6622
eef4a9f3
RM
66232003-06-24 Roland McGrath <roland@redhat.com>
6624
6625 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6626
4165d44d
UD
66272003-06-24 Ulrich Drepper <drepper@redhat.com>
6628
7f8f7b9d
UD
6629 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6630 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6631
4165d44d
UD
6632 * pthreadP.h: Declare __find_thread_by_id.
6633 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6634 * pthread_clock_gettime.c: Allow using other thread's clock.
6635 * pthread_clock_settime.c: Likewise.
6636 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6637 * Makefile: Add rules to build and run tst-clock2.
6638 * tst-clock2.c: New file.
6639
67b78ef9
UD
66402003-06-23 Ulrich Drepper <drepper@redhat.com>
6641
6642 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6643 to use exception-based cleanup handler.
6644 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6645
6646 * tst-cond8.c (ch): Announce that we are done.
6647
6648 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6649
6650 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6651 Also test aio_suspend with timeout value.
6652
61623643
UD
66532003-06-22 Ulrich Drepper <drepper@redhat.com>
6654
3a4f2043
UD
6655 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6656 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6657 attribute_hidden.
6658
61623643
UD
6659 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6660 (__pthread_mutex_lock_internal): Likewise.
6661 (__pthread_mutex_unlock_internal): Likewise.
6662 (__pthread_mutex_unlock_usercnt): Declare.
6663 * pthread_mutex_destroy.c: Always fail if used in any way.
6664 * pthread_mutex_init.c: Update comment.
6665 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6666 * pthread_mutex_timedlock.c: Adjust __nusers.
6667 * pthread_mutex_trylock.c: Adjust __nusers.
6668 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6669 and public interfaces are wrapper with pass additional parameter.
6670 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6671 parameter zero.
6672 * tst-mutex8.c: New file.
6673 * Makefile (tests): Add tst-mutex8.
6674 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6675 __pthread_mutex_unlock_usercnt.
6676 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6677 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6678 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6679 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6680 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6681 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6682 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6683 Add __nusers.
6684 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6685 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6686 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6687 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6688 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6689
6690 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6691 * pthread_mutex_timedlock.c: Likewise.
6692 * pthread_mutex_trylock.c: Adjust __nusers.
6693 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6694 * tst-mutex9.c: New file.
6695 * Makefile (tests): Add tst-mutex9.
6696 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6697 * sysdeps/ia64/tls.h: Likewise.
6698 * sysdeps/powerpc/tls.h: Likewise.
6699 * sysdeps/s390/tls.h: Likewise.
6700 * sysdeps/sh/tls.h: Likewise.
6701 * sysdeps/x86_64/tls.h: Likewise.
6702 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6703 Change type of __owner.
6704 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6705 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6706 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6707 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6708 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6709
9bdabb94
UD
67102003-06-19 Jakub Jelinek <jakub@redhat.com>
6711
6712 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6713 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6714
6715 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6716 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6717 instead of nr to lll_futex_wake. Only set errno and return -1
6718 if err < 0.
6719
6720 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6721 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6722 return actual return value from the syscall, not 0.
6723
f6c93bd9
UD
67242003-06-18 Ulrich Drepper <drepper@redhat.com>
6725
ca343e73
UD
6726 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6727 find a random value.
6728 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6729 errno==EIDRM.
6730
50441a98
UD
6731 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6732 compat_timer_settime.
6733 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6734 compat_timer_gettime.
6735 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 6736 compat_timer_getoverrun.
50441a98
UD
6737 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6738 compat_timer_delete.
6739
f6c93bd9
UD
6740 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6741 error-checking mutex detect busy mutexes.
6742
047aec8f
UD
67432003-06-17 Ulrich Drepper <drepper@redhat.com>
6744
1d53508d
UD
6745 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6746 Add ax to clobber list.
6747 (lll_mutex_cond_lock): Likewise.
6748 (lll_mutex_unlock): Likewise.
6749 (lll_lock): Likewise.
6750 (lll_unlock): Likewise.
6751
f23b30e2
UD
6752 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6753 * tst-cancel18.c: New file.
6754 * tst-cancelx18.c: New file.
6755
6756 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6757 and tcdrain.
6758
6759 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6760 * tst-cancel17.c: New file.
6761 * tst-cancelx17.c: New file.
6762
6763 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6764 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6765 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6766
047aec8f
UD
6767 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6768
bbde8527
UD
67692003-06-16 Jakub Jelinek <jakub@redhat.com>
6770
6771 * sysdeps/pthread/createthread.c (create_thread): Set
6772 header.multiple_threads unconditionally.
6773 * allocatestack.c (allocate_stack): Likewise.
6774 * descr.h (struct pthread): Add header.multiple_threads
6775 unconditionally.
6776 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6777 Define for librt. #error if neither libpthread, libc nor librt.
6778 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6779 Likewise.
6780 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6781 CDISABLE): Likewise.
6782 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6783 CDISABLE): Likewise.
6784 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6785 CDISABLE): Likewise.
6786 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6787 CDISABLE): Likewise. Access header.multiple_threads outside of
6788 libc and libpthread.
6789 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6790 Likewise.
6791 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6792 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6793
26676450
UD
67942003-06-17 Ulrich Drepper <drepper@redhat.com>
6795
6796 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6797 Also test early cancellation before the thread reaches the cancellation
6798 point.
6799
6800 * Makefile: Compile forward.c with exceptions.
6801
6802 * sysdeps/unix/sysv/linux/sleep.c: New file.
6803
301a6724
UD
68042003-06-16 Ulrich Drepper <drepper@redhat.com>
6805
0e0deb03
UD
6806 * Makefile: Add CFLAGS definition to compile function wrappers
6807 duplicated from libc with exceptions.
6808 * tst-cancel4.c: Also check cancellation handlers.
6809
301a6724
UD
6810 * Makefile: Add rules to build and run tst-cancel16 and
6811 tst-cancelx16. Add missing CFLAGS definitions.
6812 * tst-cancel16.c: New file.
6813 * tst-cancelx16.c: New file.
6814
7a114794
UD
68152003-06-15 Ulrich Drepper <drepper@redhat.com>
6816
452aea84
UD
6817 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6818 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6819 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6820 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6821
7a114794
UD
6822 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6823 (LIBC_CANCEL_RESET): Likewise.
6824 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6825 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6826 librt-cancellation.
6827 (CFLAGS-libcrt-cancellation.c): Define.
6828 * sysdeps/pthread/librt-cancellation.c: New file.
6829 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6830 macros also when compiling librt.
6831 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6832 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6833 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6834 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6835 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6836 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6837 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6838
6839 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6840 compat_timer_create.
6841
8ba1d429
UD
68422003-06-14 Ulrich Drepper <drepper@redhat.com>
6843
cc8fb6f3
UD
6844 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6845
8ba1d429
UD
6846 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6847 __register_atfork.
6848 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6849 Add libc_hidden_def.
6850
d4f100e2
RM
68512003-06-13 Roland McGrath <roland@redhat.com>
6852
6853 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6854 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6855
dd9423a6
UD
68562003-06-11 Ulrich Drepper <drepper@redhat.com>
6857
6858 * allocatestack.c (queue_stack): Always inline.
6859 * ptreadhP.h (__do_cancel): Likewise.
6860
ed24330d
JJ
68612003-06-10 Jakub Jelinek <jakub@redhat.com>
6862
6863 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6864 a typo.
6865
06120d79
UD
68662003-06-10 Ulrich Drepper <drepper@redhat.com>
6867
6868 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6869 (__pthread_cond_signal): Remove incorrect second addition for
6870 cond_lock!=0.
6871
b1720346
UD
68722003-06-09 Ulrich Drepper <drepper@redhat.com>
6873
5b318f85
UD
6874 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6875 (__pthread_cond_signal): Use correct futex pointer in
6876 __lll_mutex_lock_wait call.
6877
b1720346
UD
6878 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6879 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6880
3e36c37d
UD
68812003-06-08 Ulrich Drepper <drepper@redhat.com>
6882
ecf7955d
UD
6883 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6884 cancelable.
ed24330d 6885 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
6886 Likewise.
6887
3e36c37d
UD
6888 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6889 hand-written CFI generation code. Since ENTRY/END also initiated
6890 CFI frames this caused two CFI sets to be generated.
6891
7726edc2
UD
68922003-06-07 Ulrich Drepper <drepper@redhat.com>
6893
6894 * cleanup_routine.c: New file.
6895 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6896 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6897 cleanup handling.
6898 * Makefile (libpthread-routines): Add cleanup_routine.
6899 Add more CFLAGS variables to compile with exceptions. Add comments
6900 why which file needs unwind tables.
6901 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6902 tests.
6903 * tst-cancelx1.c: New file.
6904 * tst-cancelx2.c: New file.
6905 * tst-cancelx3.c: New file.
6906 * tst-cancelx4.c: New file.
6907 * tst-cancelx5.c: New file.
6908 * tst-cancelx6.c: New file.
6909 * tst-cancelx7.c: New file.
6910 * tst-cancelx8.c: New file.
6911 * tst-cancelx9.c: New file.
6912 * tst-cancelx10.c: New file.
6913 * tst-cancelx11.c: New file.
6914 * tst-cancelx12.c: New file.
6915 * tst-cancelx13.c: New file.
6916 * tst-cancelx14.c: New file.
6917 * tst-cancelx15.c: New file.
6918 * tst-cleanupx0.c: New file.
6919 * tst-cleanupx0.expect: New file.
6920 * tst-cleanupx1.c: New file.
6921 * tst-cleanupx2.c: New file.
6922 * tst-cleanupx3.c: New file.
6923
6924 * tst-cleanup0.c: Make standard compliant.
6925 * tst-cleanup1.c: Likewise.
6926
6927 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6928 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6929 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6930 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6931 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6932 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6933 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6934 CLEANUP_JMP_BUF.
6935 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6936 * tst-cancel12.c: New file.
6937 * tst-cancel13.c: New file.
6938 * tst-cancel14.c: New file.
6939 * tst-cancel15.c: New file.
6940 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6941 and tst-cancel15.
6942
6943 * tst-cancel1.c: Add some comments.
6944
6945 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6946 timeout correctly.
6947
7a8a8e21
UD
69482003-06-06 Ulrich Drepper <drepper@redhat.com>
6949
6950 * Makefile (CFLAGS-pthread_cancel.c): Define.
6951
4ad0bbf4
UD
69522003-06-05 Ulrich Drepper <drepper@redhat.com>
6953
6954 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6955 Change type of __writer element to int.
6956 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6957 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6958 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6959 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6960 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6961 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6962 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6963 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6964 Compare with TID to determine deadlocks.
6965 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6966 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6967 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6968 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6969 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6970 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6971 Likewise.
6972 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6973 Likewise.
6974 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6975 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6976 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6977 Likewise.
6978 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6979 Likewise.
6980 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6981 * Makefile (tests): Add tst-rwlock12.
6982 * tst-rwlock12.c: New file.
6983
332faa96
JJ
69842003-06-05 Jakub Jelinek <jakub@redhat.com>
6985
6986 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6987 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6988 Remove bogus hidden_proto.
6989 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6990 Likewise.
6991 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6992 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6993 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6994 ___lll_mutex_timedlock): Likewise.
6995
29d9e2fd
UD
69962003-06-04 Ulrich Drepper <drepper@redhat.com>
6997
6998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6999 (__pthread_cond_signal): Add some code to eventually handle
7000 cond_lock!=0.
7001
6f1acb30
UD
70022003-06-01 Ulrich Drepper <drepper@redhat.com>
7003
7004 * Makefile (tests): Add tst-exec4.
7005 (tst-exec4-ARGS): Define.
7006 * tst-exec4.c: New file.
7007
49b65043
UD
70082003-05-31 Ulrich Drepper <drepper@redhat.com>
7009
31195be2
UD
7010 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7011 Also fail if tv_nsec < 0.
7012 (__lll_timedwait_tid): Likewise.
7013 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7014 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7015 Likewise.
7016 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7017 Likewise.
7018 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7019 Likewise.
7020 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7021 Likewise.
80b54217
UD
7022 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7023 Likewise.
7024 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7025 Likewise.
31195be2 7026
dcfc8224
UD
7027 * Makefile (tests): Add tst-sem8 and tst-sem9.
7028 * tst-sem8.c: New file.
7029 * tst-sem9.c: New file.
7030 * sem_open.c: Fix creation of in_use record if the file exists but
7031 no internal record.
7032
49b65043
UD
7033 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7034 definitions.
7035
7036 * sysdeps/pthread/timer_create.c (timer_create): In case
7037 evp==NULL, assign timer ID to sival_ptr.
7038
7039 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7040 struct pthread_unwind_buf *.
7041 (struct pthread): Likewise for cleanup_jmp_buf element.
7042
7043 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7044 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7045 * unwind.c (__pthread_unwind_next): Likewise.
7046
50794a45
UD
70472003-05-30 Ulrich Drepper <drepper@redhat.com>
7048
5d4f57bd
UD
7049 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7050 (lll_futex_timed_wait): Use int for futex value parameter.
7051 (lll_futex_wake): Likewise.
7052 (lll_futex_requeue): Likewise.
7053
7054 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7055 Replace one memory operation with one register operation.
7056
7057 * tst-join4.c (do_test): Fix error message.
7058
7ab7ea33
UD
7059 * tst-rwlock6.c (do_test): Use correct format specifier.
7060
7061 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7062 (__lll_mutex_lock_wait): Replace one memory operation with one
7063 register operation.
7064 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7065 (__lll_mutex_lock_wait): Likewise.
7066
50794a45
UD
7067 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7068 (__lll_mutex_cond_lock): Add one to value parameter of
7069 __lll_lock_wait to reflect reality in the futex syscall.
7070 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7071 (lll_mutex_cond_lock): Likewise.
7072
5a70784e
JJ
70732003-05-30 Jakub Jelinek <jakub@redhat.com>
7074
7075 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7076 New function.
7077 (lll_mutex_cond_lock): Define.
7078
e7c5ac68
UD
70792003-05-29 Ulrich Drepper <drepper@redhat.com>
7080
586d1748
UD
7081 * Makefile (tests): Add tst-signal6.
7082 * tst-signal6.c: New file.
7083
b8ba4a27
UD
7084 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7085 (__lll_mutex_unlock_force): New function
7086 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7087
65d46efe
UD
7088 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7089 (__lll_mutex_unlock_force): New function.
7090 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7091
7092 * tst-rwlock7.c (do_test): Use correct format specifier.
7093
e7c5ac68
UD
7094 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7095 Find break parameter in correct asm argument.
7096
284bdc42
UD
70972003-05-27 Jakub Jelinek <jakub@redhat.com>
7098
7099 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7100 Remove out4.
7101 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7102 error occured.
7103 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7104 Add __mutex.
7105 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7106 lll_futex_requeue, lll_mutex_unlock_force): Define.
7107
e7c5ac68
UD
71082003-05-30 Jakub Jelinek <jakub@redhat.com>
7109
7110 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7111 (pthread_cond_t): Add __mutex.
7112 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7113 lll_futex_requeue, lll_mutex_unlock_force): Define.
7114
ea2630c6
UD
71152003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7116
7117 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7118 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 7119 Add __mutex field.
ea2630c6
UD
7120 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7121 Define.
7122 (lll_futex_wait, lll_futex_wake): Define.
7123 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7124 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7125 FUTEX_REQUEUE instead of FUTEX_WAIT.
7126 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7127 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7128 mutex which was used in condvar structure. Call
7129 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7130 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7131
7132 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7133 include tcb-offsets.h. Read wakeup value in locked region.
7134 Use the value of gbr register as THREAD_ID.
7135 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7136 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7137 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7138
7139 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7140 macros.
7141
5a77f150
UD
71422003-05-28 Ulrich Drepper <drepper@redhat.com>
7143
7144 * sysdeps/pthread/pthread_cond_broadcast.c
7145 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7146
7661d9f7
UD
71472003-05-26 Ulrich Drepper <drepper@redhat.com>
7148
7149 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7150 typo in register name.
7151 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7152 correctly. Actually use requeue. Little optimization.
7153 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7154 mutex address early. Handle cancellation state as 32-bit value.
7155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7156 Remove unnecessary label.
7157
69431c9a
UD
71582003-05-25 Ulrich Drepper <drepper@redhat.com>
7159
7160 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7161 instead of FUTEX_WAIT.
7162 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7163 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7164 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7166 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7167 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7168 used in condvar structure. Call __pthread_mutex_cond_lock instead
7169 of __pthread_mutex_lock_internal.
7170 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7171 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7172 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7173 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7174 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7175 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7176 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7177 Add pthread_mutex_cond_lock.
7178 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7179 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7180 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7181 lll_mutex_cond_lock.
7182 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7183 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 7184 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 7185 Add __mutex field.
248a3490 7186 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
7187 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7188
7189 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7190 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7191
7192 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7193 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7194 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7195 macro don't define aliases.
7196
7197 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7198 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7199 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7200 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7201 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7203 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7205 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7206
fddfebbd
UD
72072003-05-17 Ulrich Drepper <drepper@redhat.com>
7208
7209 * sem_open.c: Fix one endless loop. Implement correct semantics
7210 wrt opening the same semaphore more then once.
7211 * sem_close.c: Adjust for sem_open change.
7212 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7213 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7214 * Makefile (tests): Add tst-sem7.
7215 * tst-sem7.c: New file.
7216
1eefffb0
RM
72172003-05-16 Roland McGrath <roland@redhat.com>
7218
7219 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7220 uninitialized variable braino.
7221
6e66dc78
UD
72222003-05-16 Ulrich Drepper <drepper@redhat.com>
7223
23ae6451
UD
7224 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7225 test for syscall availability.
7226
7227 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7228 __no_posix_timers to -1 if the syscalls don't exist.
7229
7ac5b8e2
UD
7230 * pthread_join.c (pthread_join): Set tid field of the joined
7231 thread to -1. This isn't necessary but helps to recognize some
7232 error conditions with almost no cost.
7233
7234 * allocatestack.c (FREE_P): Also negative values indicate an
7235 unused stack.
7236
6e66dc78
UD
7237 * unwind.c: Include <unistd.h>.
7238
855dba3c
UD
72392003-05-14 Ulrich Drepper <drepper@redhat.com>
7240
7241 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7242
81f3ac4c
UD
72432003-05-14 Jakub Jelinek <jakub@redhat.com>
7244
7245 * Makefile (crti-objs, crtn-objs): New variables.
7246 (omit-deps, extra-objs): Add crtn.
7247 ($(objpfx)libpthread.so): Depend on both crti and crtn
7248 and links to them in multidir.
7249 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7250
7158eae4
UD
72512003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7252
7253 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7254 (lll_mutex_unlock): Use atomic_exchange_rel.
7255
edf205d5
UD
72562003-05-11 Ulrich Drepper <drepper@redhat.com>
7257
7258 * cond-perf.c (cons): Add missing locking around setting of alldone.
7259
a3f979a7
UD
72602003-05-10 Ulrich Drepper <drepper@redhat.com>
7261
7262 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7263 related macros.
7264 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7265
880867a4
UD
72662003-05-09 Ulrich Drepper <drepper@redhat.com>
7267
949ec764
UD
7268 * tst-sem6.c: New file.
7269 * Makefile (tests): Add tst-sem6.
7270
7271 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7272 Use atomic_exchange_rel instead of atomic_exchange.
7273 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7274 Likewise.
7275
7276 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7277 code for lll_futex_wait and lll_futex_wake in static apps. Use
7278 vsyscall is possible.
7279
7280 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7281 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7282 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7283 pthread_setaffinity_np.
7284 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7285 and pthread_setaffinity_np.
7286 * Makefile (libpthread-routines): Add pthread_getaffinity and
7287 pthread_setaffinity.
7288
880867a4
UD
7289 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7290 use it in case mmap to allocate the stack fails.
7291 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7292 ARCH_MAP_FLAGS here.
7293 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7294 ARCH_RETRY_MMAP.
7295
92d83c72
UD
72962003-05-08 Ulrich Drepper <drepper@redhat.com>
7297
7298 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7299 handler implementation. It is now lockless in fork().
7300 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7301 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7302 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7303 declare the __fork_*_lists.
7304 (struct fork_handler): Include pointers to all three functions.
7305 Add next, refcntr and need_signal elements.
7306 (__fork_handlers): New declaration.
7307 (__register_atfork_malloc): Remove declaration.
7308 (HAVE_register_atfork_malloc): Remove definition.
7309 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7310 __pthread_child_handler variable.
7311 (__libc_pthread_init): Use __register_atfork instead of explicitly
7312 adding to the list.
7313 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7314 and lll_futex_wake.
7315 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7316
7317 * unwind.c (unwind_cleanup): Print error message and then abort. This
7318 function must never be reached.
7319
7320 * cond-perf.c: New file.
7321
be4d8038
UD
73222003-05-05 Ulrich Drepper <drepper@redhat.com>
7323
7324 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7325
c6696b79
RM
73262003-05-04 Roland McGrath <roland@redhat.com>
7327
7328 * Makefile ($(objpfx)../libc.so): New target.
7329
7da168bf
UD
73302003-05-02 Ulrich Drepper <drepper@redhat.com>
7331
7332 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7333 (pthread_condattr_t): Size is only an int, don't use long for
7334 alignment.
7335 (pthread_mutexattr_t): Likewise.
7da168bf
UD
7336 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7337 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7338 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7339
9a7178d6
UD
73402003-05-01 Ulrich Drepper <drepper@redhat.com>
7341
7342 * sysdeps/i386/tls.h: Define THREAD_ID.
7343 * sysdeps/ia64/tls.h: Likewise.
7344 * sysdeps/powerpc/tls.h: Likewise.
7345 * sysdeps/s390/tls.h: Likewise.
7346 * sysdeps/sh/tls.h: Likewise.
7347 * sysdeps/x86_64/tls.h: Likewise.
7348 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7349 record ownership.
7350 * pthread_mutex_timedlock.c: Likewise.
7351 * pthread_mutex_trylock.c: Likewise.
7352 * pthread_mutex_unlock.c: Likewise.
7353 * pthread_rwlock_trywrlock.c: Likewise.
7354 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7355 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7356 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7357 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7358
7359 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7360 flag.
7361
a234e27d
UD
73622003-04-29 Jakub Jelinek <jakub@redhat.com>
7363
7364 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7365 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7366 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7367 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7368 Make __align long long instead of long.
7369 (pthread_rwlock_t): Formatting.
7370 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7371 (pthread_rwlock_t): Formatting.
7372 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7373 (pthread_cond_t): Make __align long long instead of long.
7374 (pthread_rwlock_t): Move __flags field to the same position as in
7375 linuxthreads.
7376
f025c136
UD
73772003-04-30 Ulrich Drepper <drepper@redhat.com>
7378
7379 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7380 * tst-rwlock7.c (do_test): Likewise.
7381
7531ab9e
RM
73822003-04-26 Roland McGrath <roland@redhat.com>
7383
7384 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7385
299601a1
UD
73862003-04-22 Jakub Jelinek <jakub@redhat.com>
7387
299601a1
UD
7388 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7389 sizeof (struct pthread).
7390 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 7391 1 struct pthread.
299601a1
UD
7392 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7393 to 0.
7394 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7395 struct pthread.
7396 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7397 to 32-bit bytes.
7398 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7399 tcbp.
7400 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7401 unneccessarily.
7402 (NO_TLS_OFFSET): Define.
299601a1
UD
7403 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7404 add TLS_TCB_SIZE unnecessarily.
299601a1 7405
950094f8
RM
74062003-04-22 Roland McGrath <roland@redhat.com>
7407
7408 * Makeconfig (shared-thread-library): Reverse link order to work
7409 around linker bug.
7410
dc2f6455
UD
74112003-04-22 Ulrich Drepper <drepper@redhat.com>
7412
7413 * semaphore.h: Fix typo in comment.
7414
e7608d77
UD
74152003-04-21 Ulrich Drepper <drepper@redhat.com>
7416
6a87ee19
UD
7417 * sysdeps/pthread/sigfillset.c: New file.
7418
e7608d77
UD
7419 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7420 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7421 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7422 * sysdeps/pthread/sigaction.c: Likewise.
7423 * sysdeps/pthread/sigprocmask.c: New file.
7424 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7425 __SIGRTMIN+1.
7426 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7427 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7428 in this case.
7429
0b3df49e
UD
74302003-04-19 Ulrich Drepper <drepper@redhat.com>
7431
58a7a325
UD
7432 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7433 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7434
0b3df49e
UD
7435 * sysdeps/unix/sysv/linux/unregister-atfork.c
7436 (__unregister_atfork): Don't free memory not allocated dynamically.
7437
7438 * semaphore.h: Remove __THROW marker from cancellation points.
7439 * nptl/sysdeps/pthread/pthread.h: Likewise.
7440
7d74651e
UD
74412003-04-18 Ulrich Drepper <drepper@redhat.com>
7442
76a67697
UD
7443 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7444 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
7445 __THROW.
7446
dd9d6538
JJ
74472003-04-16 Jakub Jelinek <jakub@redhat.com>
7448
7449 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7450
4ab6f47c
RM
74512003-04-15 Roland McGrath <roland@redhat.com>
7452
7453 * forward.c (__pthread_unwind): Tweak to avoid warning.
7454
162434a6
UD
74552003-04-15 Ulrich Drepper <drepper@redhat.com>
7456
7457 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7458
35909161
UD
74592003-04-14 Ulrich Drepper <drepper@redhat.com>
7460
18ddd3aa 7461 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
7462 overflow CFA advance instructions.
7463 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7464
18a8e730
UD
74652003-04-14 Jakub Jelinek <jakub@redhat.com>
7466
bd4f43b4
UD
7467 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7468 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7469 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7470 defined.
7471
18a8e730
UD
7472 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7473 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7475 DW_CFA_advance_loc for .Laddl-.Lsubl.
7476
08c765fa
UD
74772003-04-13 Ulrich Drepper <drepper@redhat.com>
7478
18a8e730
UD
7479 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7480 position-independent unwind data for static libraries.
7481 Add missing unwind info. Add comments.
7482
ad2be852
UD
7483 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7484 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7485 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
7486 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7487
177d1ad3
UD
74882003-04-12 Ulrich Drepper <drepper@redhat.com>
7489
08c765fa
UD
7490 * Makefile: Make sure all cancellation points are compiled with
7491 exception and asynchronous unwind tables.
7492
177d1ad3
UD
7493 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7494 which mishandles loading of global object addresses in PIC.
7495 (THREAD_SETMEM_NC): Likewise.
7496
09d65ff3
UD
74972003-04-11 Ulrich Drepper <drepper@redhat.com>
7498
7499 * pthread.h: Define new data structure for cleanup buffer. Declare
7500 new cleanup handler interfaces.
7501 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7502 (struct pthread): Add cleanup_jmp_buf pointer. Define
7503 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7504 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7505 it. Declare old cleanup handler installation functions.
7506 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7507 handling.
7508 * cleanup_defer.c: Likewise.
7509 * cleanup_compat.c: New file. Old cleanup code.
7510 * cleanup_def_compat.c: New file. Old cleanup code.
7511 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7512 if own thread descriptor.
7513 * unwind.c: New file.
7514 * forward.c: Add __pthread_unwind.
7515 * init.c (pthread_functions): Add __pthread_unwind.
7516 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7517 Add ptr___pthread_unwind.
7518 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7519 and unwind function.
7520 * Makefile (libpthread-routines): Add cleanup_compat,
7521 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7522 table generation if necessary.
7523 * version.c: Record whether unwind support is compiled in.
7524 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7525 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7526 handler interfaces.
7527 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7528 complication to generate unwind information for syscall wrappers.
68107ec0 7529 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
7530 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7531 __cleanup_fct_attribute.
7532
7533 * Makefile: Add rules to build and run tst-cleanup0.
7534 * tst-cleanup0.c: New file.
7535 * tst-cleanup0.expect: New file.
7536
7537 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7538 caller. Optimize to avoid often unecessary local variable.
7539
0dc44b51
RM
75402003-04-11 Roland McGrath <roland@redhat.com>
7541
7542 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7543 sets variable `multidir'; include that.
7544 (generated): Add it.
7545 ($(objpfx)$(multidir)/crti.o): New target.
7546 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7547
84a80719
UD
75482003-04-11 Ulrich Drepper <drepper@redhat.com>
7549
7550 * tst-attr2.c (do_test): Add cast to avoid warning.
7551 * tst-mutex4.c (do_test): Likewise.
7552
88ff4759
UD
75532003-04-10 Ulrich Drepper <drepper@redhat.com>
7554
7555 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7556 in child.
7557
b2041097
UD
75582003-04-09 Ulrich Drepper <drepper@redhat.com>
7559
7560 * Makefile (tests): Add tst-detach1.
7561 * tst-detach1.c: New file.
7562
f9657e88
UD
75632003-04-08 Ulrich Drepper <drepper@redhat.com>
7564
9afe4964
UD
7565 * sysdeps/pthread/pthread.h: Remove duplicate
7566 pthread_cleanup_{push,pop} definitions.
7567
f9657e88
UD
7568 * tst-barrier2.c: Eliminate warnings.
7569 * tst-cancel4.c: Likewise.
7570 * tst-cond4.c: Likewise.
7571 * tst-cond6.c: Likewise.
7572 * tst-detach1.c: Likewise.
7573 * tst-rwlock4.c: Likewise.
7574 * tst-rwlock6.c: Likewise.
7575 * tst-rwlock7.c: Likewise.
7576 * tst-sem3.c: Likewise.
7577 * tst-spin2.c: Likewise.
7578 * tst-umask1.c: Likewise.
7579
69b35e86
UD
75802003-04-07 Ulrich Drepper <drepper@redhat.com>
7581
7582 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7583
c70ad7d7
UD
75842003-04-06 Ulrich Drepper <drepper@redhat.com>
7585
7586 * descr.h (struct pthread): Move cancelhandling member to the front.
7587
54e0138f
UD
75882003-04-05 Ulrich Drepper <drepper@redhat.com>
7589
7590 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7591 malloc_parent, and malloc_child statically.
7592 (__register_atfork_malloc): New function.
7593 (free_mem): Don't free any of the malloc_* variables on the list.
7594 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7595 Define HAVE_register_atfork_malloc.
7596
b22d701b
UD
75972003-04-04 Ulrich Drepper <drepper@redhat.com>
7598
7599 * sysdeps/pthread/createthread.c (create_thread): Add some more
7600 comments explaining when to set multiple_threads and when not.
7601
7602 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7603 THREAD_ATOMIC_BIT_SET if not already defined.
7604 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7605 THREAD_ATOMIC_BIT_SET:
7606 * sysdeps/x86_64/tls.h: Likewise.
7607 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7608 THREAD_ATOMIC_CMPXCHG_VAL.
7609 (_pthread_cleanup_pop_restore): Likewise.
7610 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7611 (__pthread_enable_asynccancel_2): Likewise.
7612 (__pthread_disable_asynccancel): Likewise.
7613 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7614 (__libc_disable_asynccancel): Likewise.
7615 * init.c (sigcancel_handler): Likewise.
7616 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7617 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7618
86246935
UD
76192003-04-03 Ulrich Drepper <drepper@redhat.com>
7620
7621 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7622 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7623 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7624 * Makefile (tests): Add tst-cancel11.
7625 * tst-cancel11.c: New file.
7626
6b4686a5
UD
76272003-04-01 Ulrich Drepper <drepper@redhat.com>
7628
7629 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7630 round, not the first. Use specific_used flag instead of local
7631 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7632 (__free_tcb): Don't call deallocate_tsd here.
7633 (start_thread): Call deallocate_tsd here.
7634 * pthread_setspecific.c: Set specific_used flag really only when
7635 needed.
0d73a73b 7636 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 7637 * tst-tsd3.c: New file.
0d73a73b 7638 * tst-tsd4.c: New file.
6b4686a5 7639
42b2395d
UD
76402003-03-31 Ulrich Drepper <drepper@redhat.com>
7641
211d90c5
UD
7642 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7643 Use atomic_exchange_and_add instead of __lll_add.
7644 (__lll_mutex_timedlock): Likewise.
7645 Patch by Ian Wienand.
7646
76472003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7648
7649 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7650 (SINGLE_THREAD_P): Fix typo.
7651 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7652
76532003-03-31 Ulrich Drepper <drepper@redhat.com>
7654
7655 * Makefile (tests): Add tst-align.
7656 * tst-align.c: New file.
7657 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 7658
42b2395d
UD
7659 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7660 function correctly.
7661
211d90c5
UD
7662 * tst-tsd2.c: Add casts to avoid warnings.
7663
163b180f
UD
76642003-03-30 Ulrich Drepper <drepper@redhat.com>
7665
7666 * descr.h (struct pthread): Move most often used elements to the front.
7667
ea473bad
UD
76682003-03-29 Ulrich Drepper <drepper@redhat.com>
7669
7670 * Makefile (libpthread-routines): Add pthread_atfork.
7671 (libpthread-static-only-routines): Add pthread_atfork.
7672
dd731d53
UD
76732003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7674
7675 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7676 of TLS_DTV_AT_TP.
7677 (INSTALL_DTV): Add parens.
7678 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7679 Use passed descr instead of THREAD_SELF.
7680 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7681 (__lll_mutex_timedlock_wait): Correct expected value after
7682 spurious wakeup.
7683 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7684 Release lock before waking up the waiters.
7685 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7686 criteria. Reorderstruct passed to cleanup handler. Fix
7687 handling of cancellation and failung pthread_mutex_unlock call.
7688 Use __pthread_enable_asynccancel_2 instead of
7689 __pthread_enable_asynccancel.
7690 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7691 Return result of lock re-get if it fails.
7692 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7693 for __pthread_cleanup_push.
7694 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7695 completely broken rwlock implementation.
7696 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7697 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7698 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7699 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7700 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7701 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7702 versioned_symbol macro.
7703 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7704 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7705
c75d02f0
UD
77062003-03-27 Ulrich Drepper <drepper@redhat.com>
7707
5f5004df
UD
7708 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7709 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7710 and __helper_tid.
7711 (struct timer): Remove th and bar field.
7712 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7713 debugging code. Create only one helper thread.
7714 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7715 helper thread.
7716 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7717 Renamed. Define statically. Use thread info from siginfo.
7718 (__helper_once): New variable.
7719 (__helper_tid): New variable.
7720 (__reset_helper_control): New function.
7721 (__start_helper_thread): New function.
7722
18d009ca
UD
7723 * pthread_create.c (start_thread): Don't use setjmp inside
7724 __builtin_expect to work around gcc bug.
7725
c75d02f0
UD
7726 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7727 timer_delete syscall fails, but not with ENOSYS, set
7728 __no_posix_timers.
7729
7730 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7731 (timer_settime): Fix typo.
28cf3058
UD
7732 * sysdeps/unix/sysv/linux/timer_getoverr.c
7733 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 7734
049ac259
JJ
77352003-03-27 Jakub Jelinek <jakub@redhat.com>
7736
7737 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7738 offset of cleanupbuf.__prev.
7739
f93d39dd
JJ
77402003-03-26 Jakub Jelinek <jakub@redhat.com>
7741
7742 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7743 of included file.
7744
f064e4c5
UD
77452003-03-26 Ulrich Drepper <drepper@redhat.com>
7746
7747 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7748 NULL provide default definition to syscall.
7749
83e886a3
RM
77502003-03-25 Roland McGrath <roland@redhat.com>
7751
7752 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7753 (timer_id2ptr): Fix typo.
7754
09402f5b
UD
77552003-03-25 Ulrich Drepper <drepper@redhat.com>
7756
7757 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7758 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7759 * sysdeps/ia64/pthreaddef.h: Likewise.
7760 * sysdeps/powerpc/pthreaddef.h: Likewise.
7761 * sysdeps/s390/pthreaddef.h: Likewise.
7762 * sysdeps/sh/pthreaddef.h: Likewise.
7763 * sysdeps/x86_64/pthreaddef.h: Likewise.
7764 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7765 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7766 being changed.
7767 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7768 SIGTIMER is not unblocked.
7769 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7770 RT signal taken.
7771 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7772 be send.
7773 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7774 pass pointer through as ID.
7775 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7776 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7777 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7778 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7779 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7780 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7781 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7782 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7783 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7784 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7785 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7786 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7787 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7788 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7789 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7790 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7791 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7792 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7793 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7794 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7795 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7796 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7797 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7798 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7799 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7800 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7801 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7802 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7803 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7804 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7805 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7806 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7807 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7808
7809 * pthreadP.h: Remove FRAME_LEFT definition.
7810 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7811 already left frame. Programs which have this problem are not POSIX
7812 compliant.
7813 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7814
5e826ab5
UD
78152003-03-24 Ulrich Drepper <drepper@redhat.com>
7816
7817 * sysdeps/pthread/tst-timer.c: Check return values of the
7818 functions we test.
7819
b910f788
RM
78202003-03-23 Roland McGrath <roland@redhat.com>
7821
3045a1fe
RM
7822 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7823 * tst-tls3mod.c: Likewise.
7824 * tst-tls1.c: Likewise.
7825 * tst-tls2.c: Likewise.
7826
85047fe3
RM
7827 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7828 undefined behavior.
7829
b910f788
RM
7830 * tst-join5.c (tf1, tf2): Add a cast.
7831
7832 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7833
7834 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7835 Don't test anything.
7836 * tst-cond4.c: Likewise.
7837 * tst-cond6.c: Likewise.
7838 * tst-flock2.c: Likewise.
7839 * tst-mutex4.c: Likewise.
7840 * tst-rwlock4.c: Likewise.
7841 * tst-signal1.c: Likewise.
7842 * tst-spin2.c: Likewise.
7843 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7844
7845 * tst-mutex4.c: Use test-skeleton.c.
7846 * tst-spin2.c: Likewise.
7847 * tst-sysconf.c: Likewise.
7848 * tst-barrier2.c: Likewise.
7849 * tst-cond4.c: Likewise.
7850 * tst-cond6.c: Likewise.
7851 * tst-rwlock4.c: Likewise.
7852 * tst-unload.c: Likewise.
7853 * tst-flock2.c (do_test): Use return instead of exit.
7854
4baa087a
RM
78552003-03-22 Jakub Jelinek <jakub@redhat.com>
7856
7857 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7858
5a3ab2fc
UD
78592003-03-21 Ulrich Drepper <drepper@redhat.com>
7860
9f07eae2
UD
7861 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7862 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7863 instead of __lll_compare_and_swap.
7864 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7865 Likewise.
7866 Removed definition if __lll_compare_and_swap.
7867
5a3ab2fc
UD
7868 * cancellation.c: Adjust for new form of compare&exchange macros.
7869 * cleanup_defer.c: Likewise.
7870 * init.c: Likewise.
7871 * libc-cancellation.c: Likewise.
7872 * old_pthread_cond_broadcast.c: Likewise.
7873 * old_pthread_cond_signal.c: Likewise.
7874 * old_pthread_cond_timedwait.c: Likewise.
7875 * old_pthread_cond_wait.c: Likewise.
7876 * pthread_cancel.c: Likewise.
7877 * pthread_create.c: Likewise.
7878 * pthread_detach.c: Likewise.
7879 * pthread_join.c: Likewise.
7880 * pthread_key_delete.c: Likewise.
7881 * pthread_setcancelstate.c: Likewise.
7882 * pthread_setcanceltype.c: Likewise.
7883 * pthread_timedjoin.c: Likewise.
7884 * pthread_tryjoin.c: Likewise.
7885 * sysdeps/pthread/createthread.c: Likewise.
7886
b1aea098
UD
78872003-03-20 Ulrich Drepper <drepper@redhat.com>
7888
7889 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 7890 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
7891 definitions. Replace uses with calls to atomic_* functions.
7892 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7893 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7894 __lll_test_and_set calls with atomic_exchange_and_add and
7895 atomic_exchange calls respectively.
7896 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7897 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7898 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7899 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7900 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7901 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7902 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7903
7904 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7905 returns the old value.
7906
100a7100
RM
79072003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7908
7909 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7910 int for variable OLDVAL and correct inline assembler contraint.
7911 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7912 type int for variable OLD.
7913
7914 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7915 only for s390-32.
7916 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7917 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7918 instead of multiple_threads field in the TCB.
7919
95767b36
UD
79202003-03-19 Ulrich Drepper <drepper@redhat.com>
7921
4009bf40
UD
7922 * sysdeps/i386/i686/bits/atomic.h: Removed.
7923 * sysdeps/i386/i586/bits/atomic.h: Removed.
7924 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7925 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7926 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7927 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7928 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7929 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7930 * atomic.h: Removed. Moved to glibc.
7931
560a784f
UD
7932 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7933 support for clock selection.
7934
95767b36
UD
7935 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7936 signalling waiters.
7937
043ad426
RM
79382003-03-18 Roland McGrath <roland@redhat.com>
7939
94659495
RM
7940 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7941 Add __lll_rel_instr first. Add memory clobber.
7942 (lll_mutex_unlock): Use __lll_test_and_set.
7943 From Paul Mackerras <paulus@samba.org>.
7944
7945 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7946 unconditionally.
7947 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7948 (SINGLE_THREAD_P): Add `header.' prefix.
7949 From Paul Mackerras <paulus@samba.org>.
7950
043ad426
RM
7951 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7952 pthread_timedjoin_np to ...
7953 (libpthread: GLIBC_2.3.3): ... here.
7954 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7955
7956 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7957 Avoid shadowing VAL variable.
7958
7959 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7960 New macro.
7961
86a9ee5e
UD
79622003-03-18 Ulrich Drepper <drepper@redhat.com>
7963
ac9e0aa1
UD
7964 * Makefile (tests): Add tst-cond11.
7965 * tst-cond11.c: New file.
7966
a14b373c
UD
7967 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7968 struct passed to cleanup handler to eliminate one more
7969 instruction.
7970 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7971
24a49f38
UD
7972 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7973 (pthrad_cond_t): Replace __unused field with __clock.
7974
7975 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7976 waken all waiters in cleanup handler.
7977 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7979
86a9ee5e
UD
7980 * pthread_condattr_getclock.c: New file.
7981 * pthread_condattr_setclock.c: New file.
7982 * sysdeps/pthread/pthread.h: Declare these new functions.
7983 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7984 * Makefile (libpthread-routines): Add the new functions.
7985 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7986 Renamed field to value. Document use of the bits.
7987 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7988 change.
7989 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 7990 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
7991 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7992 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7993 Add __clock field.
7994 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7995 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7996 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7997 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7999 Implement clock selection.
8000 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8001 * pthread-errnos.sym: Add ENOSYS.
8002 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8003 _POSIX_CLOCK_SELECTION.
8004 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8005
8006 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8007 invalid .size directive.
8008
98054a05
RM
80092003-03-17 Roland McGrath <roland@redhat.com>
8010
8011 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8012 Formatting tweaks.
8013
001bea71
UD
80142003-03-17 Ulrich Drepper <drepper@redhat.com>
8015
4773086e
UD
8016 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8017 Use __lll_add instead of spelling it out. Use protected symbol names.
8018 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8019 Use __lll_add.
8020 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8021 Renamed from lll_compare_and_swap. Use new name where necessary.
8022 (__lll_add): Defined.
8023 (__lll_dec_if_positive): Defined.
8024 (__lll_test_and_set): Defined.
8025 * sysdeps/ia64/pthread_spin_init.c: Removed.
8026 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8027 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8028 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8029 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8030 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8031 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8032 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
8033 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8034 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8035 __sync_lock_release_si.
8036 Patch by Jakub Jelinek.
8037
8038 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8039 Fix timeout handling.
8040 (__lll_timedwait_tid): Likewise.
8041 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8042 Patch by Jakub Jelinek.
8043
8044 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8045
de4471dd
RM
80462003-03-17 Roland McGrath <roland@redhat.com>
8047
8048 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8049 * sysdeps/pthread/pthread_spin_init.c: New file.
8050 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8051 * sysdeps/powerpc/Makefile: New file.
8052 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8053 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8054 * sysdeps/powerpc/pthreaddef.h: New file.
8055 * sysdeps/powerpc/tcb-offsets.sym: New file.
8056 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8057 * sysdeps/powerpc/tls.h: New file.
8058 * sysdeps/powerpc/bits/atomic.h: New file.
8059 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8060 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8061 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 8062
de4471dd
RM
8063 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8064 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8065 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8066 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8067 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8068 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8069 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8070 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8071 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8072 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8073 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8074 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8075 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8076 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8077 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8078
8079 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8080 not gettimeofday.
8081 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8082 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8083 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8084 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8085 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8086
5778033f
UD
80872003-03-17 Ulrich Drepper <drepper@redhat.com>
8088
8089 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8090 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8091 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8092 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8093 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8094
796038f8
RM
80952003-03-16 Roland McGrath <roland@redhat.com>
8096
8097 * tst-fork4.c: Include <string.h>.
8098 * tst-signal2.c: Likewise.
8099 * tst-mutex5.c (do_test): exit -> return.
8100 * tst-mutex2.c: Include <stdlib.h>.
8101
51d0678c
UD
81022003-03-16 Ulrich Drepper <drepper@redhat.com>
8103
5778033f
UD
8104 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8105 (__lll_mutex_timedlock_wait): Correct expected value after
8106 spurious wakeup. Otherwise we would never wait again.
8107
b6e2f87a
UD
8108 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8109 zone versus inline asm stupidity. Use correct instructions.
8110
51d0678c
UD
8111 * tst-rwlock6.c: Add some more status output.
8112
8112cc70
RM
81132003-03-15 Roland McGrath <roland@redhat.com>
8114
8115 * sysdeps/pthread/configure.in: New file.
8116 * sysdeps/pthread/configure: New file (generated).
8117
49773c19
UD
81182003-03-15 Ulrich Drepper <drepper@redhat.com>
8119
8120 * allocatestack.c (allocate_stack): Store the exact stack size of
8121 user allocated stacks.
8122
eec0ca9f
JJ
81232003-03-15 Jakub Jelinek <jakub@redhat.com>
8124
8125 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8126 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8127 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8128 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8129 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8130 Use `header.' prefix.
8131 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8132
a87731e2
UD
81332003-03-15 Ulrich Drepper <drepper@redhat.com>
8134
8135 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8136 __builtin_frame_address, use stack pointer.
8137
8138 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8139 instead of __builtin_frame_pointer.
8140
e22a221d
UD
81412003-03-14 Ulrich Drepper <drepper@redhat.com>
8142
92ed3daf
UD
8143 * tst-basic1.c (do_test): Add cast to avoid warning.
8144 * tst-basic2.c (do_test): Likewise.
8145
9b89567d
UD
8146 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8147 amount of stack correction.
8148
e22a221d
UD
8149 * tst-fork4.c: Use test-skeleton.c.
8150
2e49caba
RM
81512003-03-14 Roland McGrath <roland@redhat.com>
8152
8153 * init.c: Fix typo "#eli" for "#else".
8154
415ef7d8
RM
81552003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8156
8157 * allocatestack.c (__stack_user): Use hidden_data_def.
8158 * pthread_create.c (__pthread_keys): Likewise.
8159
8160 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8161
52287505
RM
81622003-03-14 Roland McGrath <roland@redhat.com>
8163
415ef7d8
RM
8164 * tst-fork4.c: New file.
8165 * Makefile (tests): Add it.
8166
52287505
RM
8167 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8168 we always define the padding space.
8169 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8170 stopped supporting its own extensions fully.
8171 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8172 struct also called `header', so `header.multiple_threads' is the field
8173 name to use on all machines.
8174 * allocatestack.c (allocate_stack): Use `header.' prefix.
8175 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8176 * pthread_create.c (__pthread_create_2_1): Likewise.
8177 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8178 (THREAD_SELF): Likewise.
8179 * sysdeps/x86_64/tls.h: Likewise.
8180 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8181 (SINGLE_THREAD_P): Likewise.
8182 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8183 (SINGLE_THREAD_P): Likewise.
8184 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8185 (SINGLE_THREAD_P): Likewise.
8186
8187 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8188 value directly.
8189
c44bf9aa
UD
81902003-03-14 Ulrich Drepper <drepper@redhat.com>
8191
e22a221d
UD
8192 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8193 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8194
0eb18281
UD
8195 * pthread_create.c (start_thread): setjmp is expected to return 0.
8196
c44bf9aa
UD
8197 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8198 (THREAD_GETMEM_NC): Likewise.
8199
564cd8b6
UD
82002003-03-13 Ulrich Drepper <drepper@redhat.com>
8201
8202 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8203 and the size of the stack which must be allocated is a multiple,
8204 allocate one more page.
8205 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8206 MULTI_PAGE_ALIASING.
8207
6461e577
RM
82082003-03-13 Roland McGrath <roland@redhat.com>
8209
8210 * pthread_create.c (start_thread): Set EXITING_BIT after the
8211 event-reporting (and destructors), not before.
8212
b5ec5617
UD
82132003-03-13 Jakub Jelinek <jakub@redhat.com>
8214
6461e577
RM
8215 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8216 lll_futex_wake): Declare register variables as long int instead of
8217 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8218 Make syscall arguments clobbered by the syscall.
8219 (lll_futex_wait): Define using lll_futex_timed_wait.
8220
8221 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8222 to void *.
8223
8224 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8225 PPID if [! NDEBUG].
8226
8227 * allocatestack.c (nptl_ncreated): Only declare if
8228 COLORING_INCREMENT != 0.
8229
8230 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8231 (__libc_enable_asynccancel_2): Remove prototype.
8232
b5ec5617
UD
8233 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8234 ctid to match kernel.
8235
d0369fb8
UD
82362003-03-12 Ulrich Drepper <drepper@redhat.com>
8237
7588880f
UD
8238 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8239 libc_multiple_threads.
8240 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8241 __libc_multiple_threads to...
8242 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8243
8244 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8245 versioning.
8246 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8247 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8248
8249 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8250 (__pthread_once_internal): Define.
8251
8252 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8253 macros instead of .symver directly.
8254 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8255 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8256
d0369fb8
UD
8257 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8258 * sysdeps/x86_64/tcb-offsets.sym: New file.
8259 * sysdeps/x86_64/Makefile: New file.
8260
8261 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8262 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8263 to access own pthread_t in TCB.
8264 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8265 Likewise.
8266 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8267 Likewise.
8268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8269
0bb2ac85
RM
82702003-03-12 Roland McGrath <roland@redhat.com>
8271
8272 * pthread-errnos.sym: New file.
8273 * Makefile (gen-as-const-headers): New variable, list that file.
8274 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8275 header <pthread-errnos.h> instead of defining errno values here.
8276 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8277 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8278 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8279 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8280 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8281 Likewise.
8282 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8283 Likewise.
8284 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8285 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8286 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8287 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8288 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8289 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8290 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8291 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8292 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8293 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8294 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8295 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8296 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8297 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8298 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8299 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8300 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8301 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8302 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8303 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8304 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8305 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8306 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8307 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8308 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8309 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8310 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8311
8312 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8313 CLONE_CHILD_SETTID worked.
8314
35e148cb
UD
83152003-03-12 Ulrich Drepper <drepper@redhat.com>
8316
d0369fb8
UD
8317 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8318 file.
8319 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8320 file.
8321
8322 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8323 (pthread_cond_t): Add padding.
8324
da49194d
UD
8325 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8326 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8327 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8328
35e148cb
UD
8329 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8330 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8331 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8332 (__pthread_rwlock_timedrdlock): Likewise.
8333 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8334 (__pthread_rwlock_wrlock): Likewise.
8335 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8336 (__pthread_rwlock_rdlock): Likewise.
8337
8338 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8339
8340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8341 result of lock re-get if it fails.
8342
3e976b96
UD
83432003-03-11 Ulrich Drepper <drepper@redhat.com>
8344
5a03acfe
UD
8345 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8346 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8347 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8349 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8350 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8351 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8352 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8353 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8354 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8355
8356 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8357 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8358
8359 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8360 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8361 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8362 (create_thread): Likewise.
8363 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8364 * init.c (__pthread_initialize_minimal_internal): Initialize
8365 __libc_multiple_threads_ptr if necessary.
8366 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8367 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8368 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8369 __libc_multiple_threads.
8370 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8371 necessary.
8372
8373 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8374 (THREAD_SETMEM_NC): Likewise.
8375
8376 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8377 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8378 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8379 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8380
8381 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8382 Eliminate one entire instruction.
8383
32a589b1
UD
8384 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8385 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8387 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8388 instead of __pthread_enable_asynccancel.
8389 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8390 (__pthread_cond_wait): Likewise.
8391 * sysdeps/pthread/pthread_cond_timedwait.c
8392 (__pthread_cond_timedwait): Likewise.
8393 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8394
3e976b96
UD
8395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8396 (__condvar_cleanup): Wake up all waiters in case we got signaled
8397 after being woken up but before disabling asynchronous
8398 cancellation.
8399 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8400 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8401 (__condvar_cleanup): Likewise.
8402
8403 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8404 Make it an error if architecture has no #if case. Add x86-64.
8405
8406 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8407 pt-initfini.s generation.
8408
8409 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8410 (TLS_INIT_TP): Fix typo.
8411
6c477888
UD
84122003-03-11 Jakub Jelinek <jakub@redhat.com>
8413
8414 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8415 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8416
8417 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8418 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8419 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8420 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8421 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8422 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8423 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8424 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8425
ea694823
UD
84262003-03-11 Ulrich Drepper <drepper@redhat.com>
8427
6c477888
UD
8428 * sysdeps/pthread/pthread_cond_timedwait.c
8429 (__pthread_cond_timedwait): Return the result of the final
8430 locking. If it succeeds, the regular function return value.
8431
8432 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8433 Return result of the final locking.
8434 * version.c (__nptl_main): Work around problems with the strange
8435 INTERNAL_SYSCALL macro on ppc32.
8436 * init.c (__pthread_initialize_minimal_internal): Unblock
8437 SIGCANCEL in case the parent blocked it.
8438 Reported by Paul Mackerras <paulus@samba.org>.
8439
ea694823
UD
8440 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8441 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8443
b33e6163
RM
84442003-03-11 Jakub Jelinek <jakub@redhat.com>
8445
8446 * sysdeps/pthread/pthread_cond_timedwait.c
8447 (__pthread_cond_timedwait): Unlock and fail if
8448 __pthread_mutex_unlock_internal failed.
8449
8450 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8451 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8452 Use ARCH_CLONE.
8453 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8454 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8455 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8456 ALLOCATE_STACK): New macros.
8457 (TLS_TPADJ): New macro.
8458 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8459 (allocate_stack): Handle TLS_DTV_AT_TP and
8460 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8461 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8462 Don't set PD->self.
8463 * init.c [__ia64__] (__NR_set_tid_address): Define.
8464
8465 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8466 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8467 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8468 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8469 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8470 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8471 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8472 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8473 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8474 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8475 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8476 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8477 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8478 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8479 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8480 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8481 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8482 * sysdeps/ia64/bits/atomic.h: New file.
8483 * sysdeps/ia64/Makefile: New file.
8484 * sysdeps/ia64/pthread_spin_init.c: New file.
8485 * sysdeps/ia64/pthread_spin_lock.c: New file.
8486 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8487 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8488 * sysdeps/ia64/pthreaddef.h: New file.
8489 * sysdeps/ia64/tcb-offsets.sym: New file.
8490 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8491 * sysdeps/ia64/tls.h: New file.
8492
8493 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8494 to syscall instead of no arguments.
8495
2b30b2e5
UD
84962003-03-10 Ulrich Drepper <drepper@redhat.com>
8497
db5f2fc9
UD
8498 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8499 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8500 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8501 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8502
8503 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8504 unused code.
8505
6a4263e3
UD
8506 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8507
3de7c2a9
UD
8508 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8509 lowlevelbarrier.sym.
8510 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8511 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8512 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 8513 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 8514
2a544d82
UD
8515 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8516 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8517 (__lll_mutex_timedlock_wait): Likewise.
8518 (lll_mutex_lock): Adjust asm for that.
8519 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8520 (lll_lock): Adjust asm for operand order change.
8521 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8522 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8523
ec06436c
UD
8524 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8525 Reverse order of parameters.
8526 (__lll_timedwait_tid): Remove regparms attribute.
8527 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8528 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8529
3273832c
UD
8530 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8531 (__lll_timedwait_tid): Remove one unnecessary instruction.
8532
51f32ab8
UD
8533 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8534 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8535 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8536 lowlevelmutex.S.
8537
8538 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8539 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8540 for NOT_IN_libc.
8541 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8542 lowlevellock.S.
8543
fad48d9e
UD
8544 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8545 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8546 for libc.so.
8547 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8548 define LOCK here (if UP is not defined). The actual code is in
8549 lowlevelmutex.S.
8550
9356d063
UD
8551 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8552 LOCK is already defined. Don't define lll_unlock_wake_cb and
8553 __lll_timedwait_tid for libc.so.
8554 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8555 define LOCK here (if UP is not defined). The actual code is in
8556 lowlevellock.S.
8557
ebf0cbc5 8558 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
8559 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8560 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8561 instead of lowlevelsem.h.
8562 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8563 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8564 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 8565
c915e5ad
UD
8566 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8567 lowlevelrwlock.sym.
8568 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8569 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 8570 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 8571
4c3c2e8a
UD
8572 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8573 register loading.
8574 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8575 last changed. D'oh.
8576
2b30b2e5
UD
8577 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8578
8579 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8580 of __libc_locking_needed.
8581 (lll_trylock): Initialize %eax to zero.
8582
2b30b2e5
UD
8583 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8584 pthread_cond_t definition.
8585
e48f9638
RM
85862003-03-10 Roland McGrath <roland@redhat.com>
8587
8588 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8589 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8590 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8591 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8592 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8593
8594 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8595 Instead of setting PD->multiple_threads, set globals
8596 __pthread_multiple_threads and __libc_multiple_threads.
8597 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8598 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8599 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8600
8601 * descr.h (struct pthread): Conditionalize first member on
8602 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8603 containing an anonymous tcbhead_t. Move `list' member out.
8604 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8605 * allocatestack.c: Remove use of `header.data.' prefix.
8606 * pthread_create.c: Likewise.
8607 * init.c (__pthread_initialize_minimal_internal): Likewise.
8608 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8609 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8610 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8611 * sysdeps/x86_64/tls.h: Likewise.
8612 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8613 (SINGLE_THREAD_P): Likewise.
8614 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8615 (SINGLE_THREAD_P): Likewise.
8616 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8617 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8618
c37cae9e
UD
86192003-03-09 Ulrich Drepper <drepper@redhat.com>
8620
d38c777e
RM
8621 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8622
7b44a5e0 8623 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 8624 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 8625
c2e5e085
UD
8626 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8627 leftovers from the ia32 code.
8628
8629 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8630 memory load.
8631 (clear_once_control): Don't load %esi.
8632
8633 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8634 handling.
8635
8636 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8637
cd4b2a55
UD
8638 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8639 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8640
c37cae9e
UD
8641 * Makefile (tests): Add tst-cond10.
8642 * tst-cond10.c: New file.
8643
d130a341
UD
86442003-03-08 Ulrich Drepper <drepper@redhat.com>
8645
ccf1d573
UD
8646 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8647 * tst-signal3.c (do_test): Likewise.
8648 * tst-sem5.c (do_test): Likewise.
8649 * tst-kill6.c (do_test): Likewise.
8650 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8651
8652 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8653 of inc/dec.
8654 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8655 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8656 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8657 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8658 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8659 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8660 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8661 Likewise.
8662 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8663 Likewise.
8664 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8665 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8666 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8667 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8668 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8669 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8670 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8671 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8672
d130a341
UD
8673 * allocatestack.c (allocate_stack): If mprotect() fails free the
8674 TLS memory.
8675
bc6389ad
UD
86762003-03-07 Ulrich Drepper <drepper@redhat.com>
8677
41d4d223
UD
8678 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8679
8680 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8681 lll_wake_tid. This was used only to work around kernel limits in
8682 the early days.
8683 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8684 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8685 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8686 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8687
bc6389ad
UD
8688 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8689 (__pthread_initialize_minimal_internal): Change initialization of
8690 __static_tls_align_m1 appropriately.
8691 * pthreadP.h (__static_tls_align_m1): Renamed from
8692 __static_tls_align.
8693 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8694 instead of __static_tls_align-1.
8695
cc775edf
UD
86962003-03-04 Ulrich Drepper <drepper@redhat.com>
8697
0de28d5c 8698 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 8699
518b5308
UD
8700 * pthread_create.c: Define __pthread_keys using nocommon
8701 attribute, not by placing it explicitly in bss.
8702 Remove DEFINE_DEALLOC definition. Not needed anymore.
8703
8704 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8705 Use it in mmap call to allocate stacks.
8706
8707 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8708
cc775edf
UD
8709 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8710 result of the thread function.
8711
4f6f0a8f
UD
87122003-03-03 Ulrich Drepper <drepper@redhat.com>
8713
f04a2721
UD
8714 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8715 version is just fine.
8716
4f6f0a8f
UD
8717 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8718 (__pthread_child_handler): Renamed from pthread_child_handler,
8719 exported, and marked hidden. Change all users.
8720 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8721 free __pthread_child_handler from child list.
8722
7ce5c164
UD
87232003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8724
8725 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8726
8727 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8728 Fix handling of cancellation and failing pthread_mutex_unlock call.
8729 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8730 (__pthread_cond_wait): Likewise.
8731
8732 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8733 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8734 lll_futex_timed_wait call.
8735 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8736 (pthread_rwlock_timedwrlock): Likewise.
8737
8738 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8739 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8740 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8741
8742 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8743 check of lll_futex_wake return value.
8744
ea6a015b
RM
87452003-03-03 Roland McGrath <roland@redhat.com>
8746
8747 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8748
8749 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8750 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8751 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8752
4adacf57
UD
87532003-03-02 Ulrich Drepper <drepper@redhat.com>
8754
1be3d664
UD
8755 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8756 error for CPU clocks.
8757
885bafa1
UD
8758 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8759 _POSIX_MONOTONIC_CLOCK.
8760 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8761
4adacf57
UD
8762 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8763 recent kernels.
8764
86bfff4d
UD
87652003-03-01 Ulrich Drepper <drepper@redhat.com>
8766
8767 * descr.h (struct pthread): Move cleanup field to the front.
8768
d1149385
RM
87692003-03-01 Roland McGrath <roland@redhat.com>
8770
8771 * sem_open.c (sem_open): Braino fix.
8772
bd8bb78b
UD
87732003-03-01 Ulrich Drepper <drepper@redhat.com>
8774
748bec08
UD
8775 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8776 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8777 __pthread_cleanup_pop functionality.
8778 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8779
bd8bb78b
UD
8780 * descr.h (struct pthread): Move tid field to the front now that
8781 it is often used.
8782
8783 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8784 (__lll_mutex_timedlock_wait): Remove.
8785 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8786 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8787 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8788 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8789 (lll_unlock_wake_cb): Don't save and restore %esi.
8790 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8791 %esi.
8792 (__lll_timedwait_tid): Add alignment.
8793 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8794 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8795 %esi.
8796 (__lll_timedwait_tid): Removed.
8797 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8798 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8799 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8800 (pthread_barrier_wait): Don't save, load, and restore %esi for
8801 last thread.
8802 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8803 (__pthread_cond_signal): Don't save, load, and restore %esi.
8804 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8805 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8806 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8807 Don't save, load, and restore %esi.
8808
d2637c70
UD
88092003-02-27 Ulrich Drepper <drepper@redhat.com>
8810
567fb22a
UD
8811 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8812 Release lock before waking up the waiters.
8813
427f5fa1
UD
8814 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8815
a2d83cfb
UD
8816 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8817 (reader_thread): Likewise.
8818
d2637c70
UD
8819 * sysdeps/pthread/pthread_rwlock_unlock.c
8820 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8821 to wake up readers if there are none.
8822
8823 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8824 Release internal lock before wake threads.
8825
b1531183
UD
88262003-02-26 Ulrich Drepper <drepper@redhat.com>
8827
dbf6131c
UD
8828 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8829 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8830 predefined.
8831 * tst-rwlock9.c: Likewise.
8832 * tst-rwlock10.c: New file.
8833 * tst-rwlock11.c: New file.
8834
695799fe
UD
8835 * Makefile (tests): Add tst-dlsym1.
8836 * tst-dlsym1.c: New file.
8837
b1531183
UD
8838 * init.c (__pthread_initialize_minimal_internal): Set
8839 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8840 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8841
3724f268
UD
88422003-02-24 Ulrich Drepper <drepper@redhat.com>
8843
3857ca78
UD
8844 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8845
80d80779
UD
8846 * tst-cond2.c: Fix sychronization with child.
8847
86371308
UD
8848 * tst-rwlock8.c (reader_thread): Remove unused variable.
8849
ffeb4481
UD
8850 * Makefile: Add rules to build and run tst-tls3.
8851 * tst-tls3.c: New file.
8852 * tst-tls3mod.c: New file.
8853
3724f268
UD
8854 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8855 * tst-rwlock8.c: New file.
8856 * tst-rwlock9.c: New file.
8857 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8858 complete broken rwlock implementation.
8859 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8860 Likewise.
8861 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8862 Likewise.
8863 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8864 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
8865 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8866 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8867 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8868 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8869 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 8870
8915cc40
RM
88712003-02-23 Roland McGrath <roland@redhat.com>
8872
8873 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8874
fd1a0d0c
UD
88752003-02-23 Ulrich Drepper <drepper@redhat.com>
8876
ecf28959
UD
8877 * Makefile (tests): Add tst-context1.
8878 * tst-context1.c: New file.
8879
5e47b76b
UD
8880 * Makefile (tests): Add tst-tls1 and tst-tls2.
8881 * tst-tls1.c: New file.
8882 * tst-tls2.c: New file.
8883
5a6bbb41
UD
8884 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8885 for failed cmpxchg.
8886
fd1a0d0c
UD
8887 * pthread_create.c (start_thread): Set EXITING_BIT early.
8888
8889 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8890 (THREAD_GETMEM_NC): Likewise.
8891
757f9fcb
UD
88922003-02-22 Ulrich Drepper <drepper@redhat.com>
8893
b1b8e747
UD
8894 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8895 off 3 more bytes by using offset-less instructions when possible.
8896
c780aa21 8897 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
8898
8899 * eintr.c (eintr_source): Add unnecessary return but the compiler
8900 insists.
8901
8902 * tst-kill3.c: Include <unistd.h>.
8903
5148559c
RM
89042003-02-21 Roland McGrath <roland@redhat.com>
8905
8906 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8907
ab2d98e3
UD
89082003-02-21 Ulrich Drepper <drepper@redhat.com>
8909
71028edd
UD
8910 * Makefile (tests): Add tst-eintr1.
8911 (distribute): Add eintr.c.
8912 * tst-eintr1.c: New file.
8913 * eintr.c: New file.
8914
e814f748
UD
8915 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8916
8917 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8918 Disallow sending SIGCANCEL.
8919
ab2d98e3 8920 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 8921 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
8922 * tst-kill1.c: New file.
8923 * tst-kill2.c: New file.
8924 * tst-kill3.c: New file.
8925 * tst-kill5.c: New file.
9c03686d 8926 * tst-kill6.c: New file.
e814f748
UD
8927 * tst-basic7.c: Renamed to...
8928 * tst-kill4.c: ...this.
ab2d98e3 8929
59fed0e2
RM
89302003-02-21 Roland McGrath <roland@redhat.com>
8931
8932 * Makefile (install-lib-ldscripts): New variable.
8933
49dc759f
UD
89342003-02-21 Ulrich Drepper <drepper@redhat.com>
8935
8c2e9a29
UD
8936 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8937 * pthread_cancel.c: Use INVALID_TD_P.
8938 * pthread_detach.c: Likewise.
8939 * pthread_getschedparam.c: Likewise.
8940 * pthread_setschedparam.c: Likewise.
8941 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8942 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8943 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8944 * pthread_timedjoin.c: Likewise.
8945
8946 * tst-basic7.c: Include <signal.h>.
8947
49dc759f
UD
8948 * pthread_join.c (pthread_join): Limited checking for invalid
8949 descriptors.
8950 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8951
df5803bf
UD
89522003-02-20 Ulrich Drepper <drepper@redhat.com>
8953
c5acd3d7
UD
8954 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8955 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
8956 * Makefile (tests): Add tst-key4.
8957 * tst-key4.c: New file.
8958
729924a0
UD
89592003-02-18 Ulrich Drepper <drepper@redhat.com>
8960
2f7dc594
UD
8961 * Makefile (tests): Add tst-basic7.
8962 * tst-basic7.c: New file.
8963
ba25bb0f
UD
8964 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8965 Add some more __builtin_expect.
8966
12fd3c5f 8967 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 8968
5430d926
UD
89692003-02-17 Ulrich Drepper <drepper@redhat.com>
8970
b0db7fbe
UD
8971 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8972 _POSIX_THREAD_PRIORITY_SCHEDULING.
8973 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8974 _XOPEN_REALTIME_THREADS.
8975 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8976
8977 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8978 kernel returns EINVAL for PID <= 0, work around it.
8979
ecfda9bd
UD
8980 * Makefile (tests): Add tst-signal5.
8981 * tst-signal5.c: New file.
8982
7d78ab99
UD
8983 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8984 and LOGIN_NAME_MAX.
8985
371a2972
UD
8986 * tst-cancel1.c (tf): Block all signals.
8987
5430d926
UD
8988 * Makefile (tests): Add tst-basic6.
8989 * tst-basic6.c: New file.
8990
8991 * tst-basic1.c: Add test for process ID.
8992
8993 * Makefile (tests): Add tst-cancel10.
8994 * tst-cancel10.c: New file.
8995
8996 * Makefile (tests): Add tst-signal4.
8997 * tst-signal4.c: New file.
8998
8999 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9000 __sigismember instead of sigismember. Add __builtin_expect.
9001
1564916a
UD
90022003-02-16 Ulrich Drepper <drepper@redhat.com>
9003
179ff175
UD
9004 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9005 pthread_setcancelstate, and pthread_rwlock_setpshared.
9006
e4335f9a
UD
9007 * tst-cancel7.c (do_test): Make sure the pid file exists before
9008 canceling the thread.
9009
0a37669a
UD
9010 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9011 pthread_rwlock_timedrdlock tests.
9012 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9013 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9014 Check for invalid tv_nsec field.
9015 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9016 Likewise.
9017
9018 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9019 recursive mutex of overflow.
9020
9021 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9022
e4335f9a 9023 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
9024 going into an endless loop.
9025 * Makefile (tests): Add tst-cancel9.
9026 * tst-cancel9.c: New file.
9027
9028 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9029
b270b548
UD
90302003-02-15 Ulrich Drepper <drepper@redhat.com>
9031
1c82b97f
UD
9032 * tst-mutex5.c (do_test): Add more timedlock tests.
9033
b2f05465 9034 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
9035 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9036
e798b60f
UD
9037 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9038 use INLINE_SYSCALL. Error number is returned, not -1.
9039
90491dc4
UD
9040 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9041 and __deallocate_stack with internal_function.
9042 * pthread_create.c: Adjust definitions appropriately.
9043 * allocatestack.c: Likewise.
9044
9045 * pthread_join.c: Add one more __builtin_expect.
9046 * pthread_timedjoin.c: Likewise.
9047
9048 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9049 not data of sequence number does not match.
9050 Add one __builtin_expect.
9051
c6247c9d
UD
9052 * Makefile (tests): Add tst-clock1.
9053 * tst-clock1.c: New file.
9054
b270b548
UD
9055 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9056 negative arguments.
9057 * Makefile (tests): Add tst-basic5.
9058 * tst-basic5.c: New file.
9059
700bf7af
UD
90602003-02-14 Ulrich Drepper <drepper@redhat.com>
9061
757de559
UD
9062 * Makefile (tests): Add tst-basic4.
9063 * tst-basic4.c: New file.
9064
47202270
UD
9065 * pthreadP.h: Add declaraction for __nptl_nthreads.
9066 * pthread_create.c: Define __nptl_nthreads
9067 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 9068 after thread is done. If then zero, call exit(0).
47202270
UD
9069 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9070 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9071 * init.c (pthread_functions): Initialize ptr_nthreads.
9072 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9073 (__reclaim_stacks): Decrement __nptl_nthreads.
9074 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9075 Define.
9076 * Makefile (tests): Add tst-basic3.
9077 * tst-basic3.c: New file.
9078
e320ef46
UD
9079 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9080 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9081 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9082 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9083 if asynchronous canceling is enabled.
9084 * pthread_join.c (pthread_join): When recognizing circular joins,
9085 take into account the other thread might be already canceled.
9086 * Makefile (tests): Add tst-join5.
9087 * tst-join5.c: New file.
9088
700bf7af
UD
9089 * Makefile (tests): Add tst-join4.
9090 * tst-join4.c: New file.
9091
90922003-02-13 Ulrich Drepper <drepper@redhat.com>
9093
9094 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9095
dac0f772
UD
90962003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9097
9098 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9099 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9100 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9101 warning.
9102 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9103 to avoid warning.
9104 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9105 error if lll_futex_wake failed.
9106
e8cda341
UD
91072003-02-13 Ulrich Drepper <drepper@redhat.com>
9108
a7720b5e
UD
9109 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9110 handling of cancellation and failung pthread_mutex_unlock call.
9111 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9112 * Makefile (tests): Add tst-cond8 and tst-cond9.
9113 * tst-cond8.c: New file.
9114 * tst-cond9.c: New file.
9115
a1ea4c06
UD
9116 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9117
9118 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9119 non-standard initializers with __USE_GNU.
9120
e8cda341
UD
9121 * Makefile (tests): Add tst-cleanup3.
9122 * tst-cleanup3.c: New file.
9123
2067577c
UD
91242003-02-12 Ulrich Drepper <drepper@redhat.com>
9125
89e78a95
UD
9126 * Makefile (tests): Add tst-attr1 and tst-attr2.
9127 * tst-attr1.c: New file.
9128 * tst-attr2.c: New file.
9129
dfdd294a
UD
9130 * Makefile: Add rules to build and run tst-atfork2 test.
9131 * tst-atfork2.c: New file.
9132 * tst-atfork2mod.c: New file.
9133
9134 * sysdeps/unix/sysv/linux/unregister-atfork.c
9135 (__unregister_atfork): Free the memory allocated for the handlers
9136 after removing them from the lists.
9137
9138 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9139 cleanup function.
9140
9141 * tst-atfork1.c (do_test): Wait for the child we forked.
9142 Report error in child.
9143
9144 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9145
2067577c
UD
9146 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9147
2a8a8a84
UD
91482003-02-10 Ulrich Drepper <drepper@redhat.com>
9149
d9dd121e
UD
9150 * Makefile (tests): Add tst-cancel8.
9151 * tst-cancel8.c: New file.
9152
2a8a8a84
UD
9153 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9154 clearing of control variable.
defd1870 9155 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 9156 * tst-once3.c: New file.
defd1870 9157 * tst-once4.c: New file.
2a8a8a84 9158
a54e8d33
UD
91592003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9160
9161 * sysdeps/sh/Makefile: New file.
9162 * sysdeps/sh/bits/atomic.h: New file.
9163 * sysdeps/sh/pthread_spin_init.c: New file.
9164 * sysdeps/sh/pthread_spin_lock.c: New file.
9165 * sysdeps/sh/pthread_spin_trylock.S: New file.
9166 * sysdeps/sh/pthread_spin_unlock.S: New file.
9167 * sysdeps/sh/pthreaddef.h: New file.
9168 * sysdeps/sh/tcb-offsets.sym: New file.
9169 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9170 * sysdeps/sh/tls.h: New file.
9171 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9172 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9173 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9174 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9175 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9176 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9177 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9178 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9179 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9180 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9181 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9182 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9183 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9184 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9185 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9186 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9187 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9188 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9189 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9190 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9191 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9192 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9193 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9194 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9195 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9196 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9197 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9198 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9199 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9200 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9201
696e556e
UD
92022003-02-08 Ulrich Drepper <drepper@redhat.com>
9203
9204 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9205 according to POSIX.
9206
9207 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9208
fef710d6
UD
92092003-02-07 Ulrich Drepper <drepper@redhat.com>
9210
c6180643
UD
9211 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9212 (TLS_GET_FS): New #define.
9213 (TLS_SET_FS): New #define.
9214 Correct value of __NR_set_thread_area.
9215
fef710d6
UD
9216 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9217
11090a99
UD
92182003-02-06 Ulrich Drepper <drepper@redhat.com>
9219
65c68990
UD
9220 * Makefile (tests): Add tst-popen1.
9221 * tst-popen1.c: New file.
9222
11090a99
UD
9223 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9224 but inactive generalization.
9225 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9226 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9227 Minor optimization, remove one instruction.
9228 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9229
a88c9263
UD
92302003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9231
9232 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9233
92342003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9235
9236 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9237 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9238 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9239 * sysdeps/pthread/pthread_cond_signal.c: New file.
9240 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9241 * sysdeps/pthread/pthread_cond_wait.c: New file.
9242 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9243 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9244 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9245 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9246 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9247 * sysdeps/s390/Makefile: New file.
9248 * sysdeps/s390/bits/atomic.h: New file.
9249 * sysdeps/s390/pthread_spin_init.c: New file.
9250 * sysdeps/s390/pthread_spin_lock.c: New file.
9251 * sysdeps/s390/pthread_spin_trylock.c: New file.
9252 * sysdeps/s390/pthread_spin_unlock.c: New file.
9253 * sysdeps/s390/pthreaddef.h: New file.
9254 * sysdeps/s390/tcb-offsets.sym: New file.
9255 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9256 * sysdeps/s390/tls.h: New file.
9257 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9258 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9259 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9260 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9261 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9262 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9263 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9264 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9265 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9266 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9267 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9268 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9269 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9270 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9271 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9272 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9273 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9274 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9275 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9276 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9277 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9278 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9279 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9280
6f1cff95
UD
92812003-02-04 Ulrich Drepper <drepper@redhat.com>
9282
ec609a8e
UD
9283 * atomic.h: Add a couple more default implementations.
9284 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
9285 __arch_compare_and_exchange_32_acq in return value definition. It
9286 always exists.
9287 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 9288 Add missing atomic_ prefixes.
e3ec8904 9289
6f1cff95
UD
9290 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9291 thread library is available, use correct value to mark initialized
9292 once variable.
9293
4f088329
UD
92942003-02-03 Ulrich Drepper <drepper@redhat.com>
9295
6f1cff95
UD
9296 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9297 __sysconf to determine pagesize.
9298
3e4fc359 9299 * pthread_create.c: Include <atomic.h>.
4f088329
UD
9300 * allocatestack.c (allocate_stack): Implement coloring of the
9301 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9302 size minus one. Adjust users.
3e4fc359 9303 * sysdeps/i386/i686/Makefile: New file.
4f088329 9304
2f42e8be
UD
93052003-02-02 Ulrich Drepper <drepper@redhat.com>
9306
4301f7e2
UD
9307 * allocatestack.c: Improve comment throughout the file.
9308
2f42e8be 9309 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 9310 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
9311 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9312 (__lll_lock_wait): Likewise.
9313 (lll_unlock_wake_cb): Removed.
9314
4a7d6545
UD
93152003-01-31 Ulrich Drepper <drepper@redhat.com>
9316
9317 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9318 _POSIX_THREAD_PRIORITY_SCHEDULING.
9319
886d5973
UD
93202003-01-30 Jakub Jelinek <jakub@redhat.com>
9321
9322 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9323 Fix return type of ptr___pthread_getspecific.
9324
e474ca78
UD
93252003-01-29 Ulrich Drepper <drepper@redhat.com>
9326
9327 * Makefile (tests): Add tst-umask1.
9328 (tst-umask1-ARGS): Define.
9329 * tst-umask1.c: New file.
9330
e6ebd2e4
UD
93312003-01-28 Ulrich Drepper <drepper@redhat.com>
9332
6cf26f41
UD
9333 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9334 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9335 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9336 pthread_rwlock_unlock.
9337 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9338 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9339 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9340 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9341 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9342 New file.
9343 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9344 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9345 New file.
9346 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9347 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9348 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9349 New file.
9350 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9351 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9352 New file.
9353 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9354 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9355 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9356 New file.
9357 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9358 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9359 New file.
9360 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9361
1d087a7e
UD
9362 * Makefile (libpthread-routines): Remove lowlevelcond and
9363 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9364 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9365 and pthread_cond_broadcast.
4a99d160
UD
9366 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9367 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9368 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9369 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9370 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9371 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9372 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9373 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9374 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9375 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9376 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9377 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9378 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9379 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9380 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9381 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9382 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9383 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9384 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9385 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9386 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9387 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9388 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9389 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9390 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9391 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9392 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9393 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9394 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9395 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9396 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 9397
e6ebd2e4
UD
9398 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9399 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9400 of the code is moved to ...
9401 * sysdeps/pthread/createthread.c: ...here. New file.
9402
a15698cb
UD
94032003-01-27 Ulrich Drepper <drepper@redhat.com>
9404
0566b130
UD
9405 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9406 (__new_sem_post): Clear %eax before returning.
9407 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9408
e6fb8846
UD
9409 * Makefile (tests): Add tst-cleanup2.
9410 * tst-cleanup2.c: New file.
9411
a15698cb
UD
9412 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9413 Interpret first parameter correctly.
9414
8824b0a1
UD
94152003-01-17 Ulrich Drepper <drepper@redhat.com>
9416
9417 * Makefile (headers): Add bits/semaphore.h.
9418
850dcfca
UD
94192003-01-16 Jakub Jelinek <jakub@redhat.com>
9420
9421 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9422 if not SHARED.
9423
574b892e
UD
94242003-01-14 Ulrich Drepper <drepper@redhat.com>
9425
a8d87c92
UD
9426 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9427 must be used and mapping failed.
9428 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9429
574b892e
UD
9430 * Makefile (CFLAGS-pthread_self.os): Define this, not
9431 CFLAGS-pthread_self.c.
9432
fb48047a
UD
94332003-01-13 Ulrich Drepper <drepper@redhat.com>
9434
47805511
UD
9435 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9436 lll_unlock_wake_cb.
9437
fb48047a
UD
9438 * Makefile (libpthread-routines): Add version. Add rules to build
9439 version.os and banner.h.
9440 * version.c: New file.
9441
115bb61d
UD
94422003-01-13 Jakub Jelinek <jakub@redhat.com>
9443
9444 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9445 the alias unconditional.
9446 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9447
94482003-01-13 Ulrich Drepper <drepper@redhat.com>
9449
9450 * Makefile (CFLAGS-pthread_self.c): New definition.
9451
6aca81bb
UD
94522003-01-06 Jakub Jelinek <jakub@redhat.com>
9453
9454 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9455 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9456 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9457 * init.c (__pthread_initialize_minimal_internal): Likewise.
9458
e9c7764e
UD
94592003-01-07 Jakub Jelinek <jakub@redhat.com>
9460
b5facfda
UD
9461 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9462
e9c7764e
UD
9463 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9464 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9465 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9466 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9467 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9468 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9469
bef1e42f
UD
94702003-01-06 Jakub Jelinek <jakub@redhat.com>
9471
9472 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9473 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9474 * tst-cancel-wrappers.sh: Remove all exceptions.
9475
bbd17455
UD
94762003-01-05 Ulrich Drepper <drepper@redhat.com>
9477
a73ab6df
UD
9478 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9479 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9480
bbd17455
UD
9481 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9482 Use __libc_pthread_functions array if SHARED.
9483
9484 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9485 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9486
9487 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9488 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9489 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9490 __libc_ptf_call instead of __libc_maybe_call.
9491 (PTF): New #define.
9492 (__libc_cleanup_region_start): Wrap function name with PTF call.
9493 (__libc_cleanup_region_end): Likewise.
9494 (__libc_cleanup_end): Likewise.
9495
9496 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9497 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9498 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9499 * pthreadP.h: Add prototypes.
9500
9501 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9502 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9503 __pthread_rwlock_unlock aliases.
9504 * pthreadP.h: Add prototypes for new aliases.
9505
9506 * pthreadP.h (struct pthead_functions): Moved to...
9507 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9508 * init.c (pthread_functions): Add initializers for new elements.
9509
9510 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9511 __pthread_cleanup_pop_restore aliases.
9512 * pthreadP.h: Add prototypes.
9513
9514 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9515 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9516 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9517 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9518 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9519 * pthreadP.h: Adjust prototypes and callers.
9520
d27a78be
UD
95212003-01-04 Ulrich Drepper <drepper@redhat.com>
9522
b74121ae
UD
9523 * Makefile (tests): Add tst-cancel7.
9524 (tst-cancel7-ARGS): New variable.
bbd17455 9525 * tst-cancel7.c: New file.
b74121ae 9526
29bc410c
UD
9527 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9528 around gcc defficiencies.
9529 * old_pthread_cond_signal.c: Likewise.
9530 * old_pthread_cond_timedwait.c: Likewise.
9531 * old_pthread_cond_wait.c: Likewise.
9532
d27a78be
UD
9533 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9534
733f25e6
UD
95352003-01-03 Ulrich Drepper <drepper@redhat.com>
9536
7edb2ae3
UD
9537 * Makefile (tests): Add tst-cond7.
9538 * tst-cond7.c: New file.
9539
b1151300
UD
9540 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9541 (condvar_cleanup): Get condvar address from the right place.
9542
733f25e6
UD
9543 * atomic.h: Correct definitions of atomic_full_barrier,
9544 atomic_read_barrier, atomic_write_barrier.
9545
9546 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9547 race-free.
9548 * old_pthread_cond_signal.c: Likewise.
9549 * old_pthread_cond_timedwait.c: Likewise.
9550 * old_pthread_cond_wait.c: Likewise.
9551
686b7223
UD
95522003-01-03 Jakub Jelinek <jakub@redhat.com>
9553
9554 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9555
0e07706e
UD
95562003-01-03 Ulrich Drepper <drepper@redhat.com>
9557
997256dd
UD
9558 * pthreadP.h (pthread_cond_2_0_t): New type.
9559 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9560 Use new type for the 2.0 condvar function prototypes.
9561 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9562 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9563 parameter.
9564 * old_pthread_cond_destroy.c: Likewise.
9565 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9566 * old_pthread_cond_signal.c: Likewise.
9567 * old_pthread_cond_timedwait.c: Likewise.
9568 * old_pthread_cond_wait.c: Likewise.
9569
842d2817
UD
9570 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9571 (__pthread_cond_wait): Don't save cancellation mode and seq value
9572 in same location.
9573
0e07706e
UD
9574 * herrno.c (__h_errno_location): Don't define as weak.
9575
bf293afe
UD
95762003-01-02 Jakub Jelinek <jakub@redhat.com>
9577
9578 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9579 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9580 and pthread_cond_wait.
9581 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9582 Renamed to...
9583 (__pthread_cond_broadcast_2_0): ... this.
9584 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9585 Renamed to...
9586 (__pthread_cond_destroy_2_0): ... this.
9587 * old_pthread_cond_init.c (__old_pthread_cond_init):
9588 Renamed to...
9589 (__pthread_cond_init_2_0): ... this.
9590 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9591 Renamed to...
9592 (__pthread_cond_signal_2_0): ... this.
9593 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9594 Renamed to...
9595 (__pthread_cond_wait_2_0): ... this.
9596 * pthread_cond_destroy.c: Include shlib-compat.h.
9597 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9598 * pthread_cond_init.c: Include shlib-compat.h.
9599 (pthread_cond_init): Change strong_alias into versioned_symbol.
9600 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9601 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9602 fields.
9603 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9604 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9605 __pthread_cond_wait_2_0): New prototypes.
9606 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9607 __old_pthread_cond_init, __old_pthread_cond_signal,
9608 __old_pthread_cond_wait): Removed.
9609 * init.c: Include shlib-compat.h.
9610 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9611 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9612 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9613 ptr___pthread_cond_*_2_0 fields.
9614 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9615 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9616
9617 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9618 LIBC_SIGACTION was not yet defined.
9619 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9620 [!defined LIBC_SIGACTION] (__sigaction): New function and
9621 libc_hidden_weak.
9622 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9623 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9624
96252003-01-02 Jakub Jelinek <jakub@redhat.com>
9626
9627 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9628
05df18c3
UD
96292003-01-02 Ulrich Drepper <drepper@redhat.com>
9630
9631 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9632 New, larger type definition.
9633 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9634 implementation.
9635 * Versions [libpthread]: Add definitions for new pthread_cond_*
9636 interfaces for version GLIBC_2.3.2.
9637 * pthread_cond_init.c: Update initialization for new type definition.
9638 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9639 pthread_cond_timedwait, pthread_cond_signal, and
9640 pthread_cond_broadcast. Add old_pthread_cond_init,
9641 old_pthread_cond_destroy, old_pthread_cond_wait,
9642 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9643 old_pthread_cond_broadcast.
9644 * old_pthread_cond_broadcast.c: New file.
9645 * old_pthread_cond_destroy.c: New file.
9646 * old_pthread_cond_init.c: New file.
9647 * old_pthread_cond_signal.c: New file.
9648 * old_pthread_cond_timedwait.c: New file.
9649 * old_pthread_cond_wait.c: New file.
9650 * pthreadP.h: Add prototypes for the compatibility interfaces.
9651
9652 * pthread_cond_destroy.c: Don't include <errno.h>.
9653
fd8979e4
UD
96542003-01-01 Ulrich Drepper <drepper@redhat.com>
9655
9656 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9657 unnecessary zero offset when addressing MUTEX.
9658
6d6ee629
UD
96592002-12-31 Ulrich Drepper <drepper@redhat.com>
9660
9661 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9662 __register_atfork.
9663 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9664 for __register_atfork.
9665
a4baf360
UD
96662002-12-31 Jakub Jelinek <jakub@redhat.com>
9667
9668 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9669 instead of ASSEMBLER test macro.
9670
9671 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9672 __libc_current_sigrtmax): Add libc_hidden_def.
9673
9674 * sysdeps/pthread/list.h: Remove assert.h include.
9675
e9395a94
UD
96762002-12-31 Ulrich Drepper <drepper@redhat.com>
9677
9678 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9679 __pthread_initialize_minimal_internal not
9680 __pthread_initialize_minimal.
9681
89d6e444
UD
96822002-12-30 Ulrich Drepper <drepper@redhat.com>
9683
416d2de6
UD
9684 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9685 __pthread_initialize_minimal as hidden.
9686
89d6e444
UD
9687 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9688 constructor.
9689
96902002-12-31 Jakub Jelinek <jakub@redhat.com>
9691
9692 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9693 $(common-objpfx)format.lds, include that into the output script.
9694 Fix comment.
9695 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9696
8cac677c
UD
96972002-12-28 Andreas Jaeger <aj@suse.de>
9698
9699 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9700 nsec resolution changes.
9701 (xstat64_conv): Likewise.
9702 (xstat32_conv): Likewise.
9703 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9704 struct kernel_stat.
9705 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9706 structs stat and stat64.
9707 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 9708 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 9709
49e9f864
UD
97102002-12-30 Jakub Jelinek <jakub@redhat.com>
9711
9712 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9713 argument.
9714 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9715 (pthread_exit): Use strong_alias to avoid warnings.
9716 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9717 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9718 ptr___pthread_attr_init_2_*.
9719 * init.c (pthread_functions): Adjust.
9720
bab09b26
UD
97212002-12-29 Ulrich Drepper <drepper@redhat.com>
9722
598d7a42
UD
9723 * forward.c: Make all functions available by default again. It
9724 caused too much trouble.
9725
bab09b26
UD
9726 * pt-siglongjmp.c: Removed.
9727
3b7ed871
UD
97282002-12-28 Jakub Jelinek <jakub@redhat.com>
9729
9730 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9731 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9732 * sysdeps/i386/Makefile: New file.
9733 * sysdeps/i386/tcb-offsets.sym: New file.
9734 * sysdeps/pthread/tcb-offsets.h: New file.
9735 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9736 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9737
9738 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9739 __register_atfork...
9740 (GLIBC_2.3.2): ...here.
9741
97422002-12-28 Ulrich Drepper <drepper@redhat.com>
9743
9744 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9745 pthread_attr_setstackaddr with __attribute_deprecated__.
9746
270d9d47
UD
97472002-12-27 Jakub Jelinek <jakub@redhat.com>
9748
9749 * pt-system.c (system): Remove cancellation handling.
9750 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9751 cancellation routines.
9752
131fd126
UD
97532002-12-28 Ulrich Drepper <drepper@redhat.com>
9754
afb2e954
UD
9755 * descr.h: Include <dl-sysdep.h>.
9756 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
9757 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9758 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9759 (SYSINFO_OFFSEET): Likewise.
9760
97612002-12-27 Jakub Jelinek <jakub@redhat.com>
9762
9763 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9764 Define.
9765 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9766 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9767 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9768 (USE_DL_SYSINFO): Undef.
9769
97702002-12-22 Jakub Jelinek <jakub@redhat.com>
9771
9772 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9773 $(common-objpfx)libc.so.
9774 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9775 it is bigger than pipe buffer size even on arches with bigger
9776 page size.
9777 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9778
a218c9cf
UD
97792002-12-25 Ulrich Drepper <drepper@redhat.com>
9780
9781 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9782 correct errno access for case that USE___THREAD is not defined.
9783
015a2dc9
UD
97842002-12-24 Ulrich Drepper <drepper@redhat.com>
9785
9786 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9787 Patch by Marijn Ros <marijn@mad.scientist.com>.
9788
5220f9ac
RM
97892002-12-22 Roland McGrath <roland@redhat.com>
9790
9791 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9792
1561bf63
UD
97932002-12-20 Ulrich Drepper <drepper@redhat.com>
9794
9795 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9796
3325198e
UD
97972002-12-19 Ulrich Drepper <drepper@redhat.com>
9798
057c823f
UD
9799 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9800 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9801 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9802
097eca29
UD
9803 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9804 of int $0x80.
9805 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9806 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9807 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9808 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9809 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9810 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9811 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9812 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9813
9814 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9815 sysenter.
9816 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9817
9818 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9819
5f5843e3
UD
9820 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9821 in new TCB.
9822 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9823 that sysinfo is properly initialized.
9824 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9825 to 1 only for ld.so.
9826
3325198e
UD
9827 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9828 RTLD_CORRECT_DYNAMIC_WEAK.
9829
74e8f2dc
UD
98302002-12-19 Jakub Jelinek <jakub@redhat.com>
9831
9832 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9833 Use return 0 as 6th argument to FORWARD4.
9834 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9835
df45b31e
UD
98362002-12-18 Ulrich Drepper <drepper@redhat.com>
9837
9838 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9839 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9840 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9841 (INIT_SYSINFO): New #define.
9842 (TLS_TP_INIT): Use INIT_SYSINFO.
9843 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9844 At test to make sure SYSINFO_OFFSET value is correct.
9845 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9846
3d539579
UD
98472002-12-18 Jakub Jelinek <jakub@redhat.com>
9848
9849 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9850 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9851 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9852 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9853 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9854 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9855 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9856
d7913e0e
UD
98572002-12-18 Ulrich Drepper <drepper@redhat.com>
9858
f051627f
UD
9859 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9860 macro instead of using int $0x80 directly.
9861
d7913e0e
UD
9862 * sysdeps/pthread/bits/stdio-lock.h: New file.
9863 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9864 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9865 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9866 * Makefile (routines): Add libc-lowlevelmutex.
9867
9868 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9869 __i686.get_pc_thunk.dx.
9870
f077a4a9
UD
98712002-12-17 Jakub Jelinek <jakub@redhat.com>
9872
9873 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9874 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9875 ($(objpfx)tst-cancel-wrappers.out): New rule.
9876 * tst-cancel-wrappers.sh: New test.
9877 * tst-locale1.c: Include signal.h.
9878 (uselocale): Test static linking of __libc_current_sigrt*.
9879
98802002-12-17 Ulrich Drepper <drepper@redhat.com>
9881
9882 * Makefile (tests): Add tst-cancel6.
9883 * tst-cancel6.c: New file
9884
bd499a3b
UD
98852002-12-17 Jakub Jelinek <jakub@redhat.com>
9886
9887 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9888 Define meaningfully for assembler as well.
9889 * pthreadP.h (struct pthread_functions): Remove
9890 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9891 and ptr_pthread_attr_init_2_1 fields.
9892 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9893 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9894 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9895 (FORWARD3): Define using FORWARD4.
9896 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9897 versions.
9898 * pt-system.c: Remove duplicate stdlib.h include.
9899
0a1063f4
UD
99002002-12-16 Ulrich Drepper <drepper@redhat.com>
9901
87d60668
UD
9902 * sem_init.c: Define sem_init@GLIBC_2.0.
9903 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9904 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9905
0a1063f4
UD
9906 * flockfile.c: Moved to...
9907 * sysdeps/pthread/flockfile.c: ...here. New file.
9908 * funlockfile.c: Moved to...
9909 * sysdeps/pthread/funlockfile.c: ...here. New file.
9910 * ftrylockfile.c: Moved to...
9911 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9912
9634cf9d
UD
99132002-12-16 Jakub Jelinek <jakub@redhat.com>
9914
9915 * libc-cancellation.c: Guard both function with
9916 #if !defined NOT_IN_libc.
9917 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9918 automatically provided pthread wrappers.
9919 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9920 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9921 nor in libpthread.
9922 * pt-open.c: Removed.
9923 * pt-fcntl.c: Removed.
9924 * pt-fsync.c: Removed.
9925 * pt-lseek.c: Removed.
9926 * pt-msgrcv.c: Removed.
9927 * pt-msgsnd.c: Removed.
9928 * pt-msync.c: Removed.
9929 * pt-nanosleep.c: Removed.
9930 * pt-open64.c: Removed.
9931 * pt-pause.c: Removed.
9932 * pt-pread.c: Removed.
9933 * pt-pread64.c: Removed.
9934 * pt-pwrite.c: Removed.
9935 * pt-pwrite64.c: Removed.
9936 * pt-read.c: Removed.
9937 * pt-recv.c: Removed.
9938 * pt-recvfrom.c: Removed.
9939 * pt-recvmsg.c: Removed.
9940 * pt-send.c: Removed.
9941 * pt-sendto.c: Removed.
9942 * pt-sigtimedwait.c: Removed.
9943 * pt-sigwait.c: Removed.
9944 * pt-wait.c: Removed.
9945 * pt-waitpid.c: Removed.
9946 * pt-write.c: Removed.
9947 * pt-accept.c: Removed.
9948 * pt-close.c: Removed.
9949 * pt-connect.c: Removed.
9950 * pt-lseek64.c: Removed.
9951 * pt-sendmsg.c: Removed.
9952 * pt-tcdrain.c: Removed.
9953
6ee8d334
UD
99542002-12-15 Ulrich Drepper <drepper@redhat.com>
9955
81fa9371
UD
9956 * init.c (__pthread_initialize_minimal_internal): Renamed from
9957 __pthread_initialize_minimal. Make old name an alias. This
9958 converts a normal relocation into a relative relocation.
9959
f3015aa5
UD
9960 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9961
4cbc1950
UD
9962 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9963 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9964 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9965 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9966 pt-sigwaitinfo, pt-waitid, and pt-writev.
9967 * pt-creat.c: Removed.
9968 * pt-poll.c: Removed.
9969 * pt-pselect.c: Removed.
9970 * pt-readv.c: Removed.
9971 * pt-select.c: Removed.
9972 * pt-sigpause.c: Removed.
9973 * pt-sigsuspend.c: Removed.
9974 * pt-sigwaitinfo.c: Removed.
9975 * pt-waitid.c: Removed.
9976 * pt-writev.c: Removed.
9977
8454830b
UD
9978 * init.c (pthread_functions): New variable.
9979 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9980 (or NULL) to __libc_pthread_init.
9981 * forward.c: Rewrite to use __libc:pthread_functions array to get
9982 function addresses.
9983 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9984 prototype.
9985 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9986 Take new parameter. Copy content of variable pointed to by it
9987 to __libc_pthread_init.
9988
9989 * pthreadP.h (struct pthread_functions): New type.
9990 (__libc_pthread_init): Declare.
9991
9992 * pthread_attr_destroy.c: Add namespace protected alias.
9993 * pthread_attr_getdetachstate.c: Likewise.
9994 * pthread_attr_getinheritsched.c: Likewise.
9995 * pthread_attr_getschedparam.c: Likewise.
9996 * pthread_attr_getschedpolicy.c: Likewise.
9997 * pthread_attr_getscope.c: Likewise.
9998 * pthread_attr_setdetachstate.c: Likewise.
9999 * pthread_attr_setinheritsched.c: Likewise.
10000 * pthread_attr_setschedparam.c: Likewise.
10001 * pthread_attr_setschedpolicy.c: Likewise.
10002 * pthread_attr_setscope.c: Likewise.
10003 * pthread_cond_broadcast.c: Likewise.
10004 * pthread_cond_destroy.c: Likewise.
10005 * pthread_cond_init.c: Likewise.
10006 * pthread_cond_signal.c: Likewise.
10007 * pthread_cond_wait.c: Likewise.
10008 * pthread_condattr_destroy.c: Likewise.
10009 * pthread_condattr_init.c: Likewise.
10010 * pthread_equal.c: Likewise.
10011 * pthread_exit.c: Likewise.
10012 * pthread_getschedparam.c: Likewise.
10013 * pthread_self.c: Likewise.
10014 * pthread_setcancelstate.c: Likewise.
10015 * pthread_setschedparam.c: Likewise.
10016 * pthread_mutex_destroy.c: Likewise.
10017 * pthread_mutex_init.c: Likewise.
10018 * pthreadP.h: Add prototypes for the aliases.
10019
0d5f4929
UD
10020 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10021 multiple_threads member in correct TCB to 1.
10022
6ee8d334
UD
10023 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10024 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10025 member of thread decriptor, otherwise return unconditionally 1.
10026
2fb6444d
UD
100272002-12-14 Ulrich Drepper <drepper@redhat.com>
10028
10029 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10030 regular Linux version. Remove file.
10031 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10032 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10033 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10034 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10035 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10036 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10037 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10038 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10039 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10040 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10041 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10042 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10043 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10044 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10045 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10046 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10047 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10048 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10049 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10050 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10051 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10052 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10053 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10054 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10055 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10056 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10057 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10058 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10059 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10060 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10061
86b2dc40
UD
100622002-12-14 Jakub Jelinek <jakub@redhat.com>
10063
10064 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10065 * sysdeps/unix/sysv/linux/open.c: Removed.
10066 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10067 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10068 * sysdeps/unix/sysv/linux/msync.c: Removed.
10069 * sysdeps/unix/sysv/linux/read.c: Removed.
10070 * sysdeps/unix/sysv/linux/close.c: Removed.
10071 * sysdeps/unix/sysv/linux/creat.c: Removed.
10072 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10073 * sysdeps/unix/sysv/linux/pause.c: Removed.
10074 * sysdeps/unix/sysv/linux/select.c: Removed.
10075 * sysdeps/unix/sysv/linux/write.c: Removed.
10076
9d263d72
UD
100772002-12-14 Ulrich Drepper <drepper@redhat.com>
10078
10079 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10080 element in TCB to see whether locking is needed.
10081
10082 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10083 MULTIPLE_THREADS_OFFSET value is correct.
10084
10085 * sysdeps/unix/sysv/linux/close.c: New file.
10086 * sysdeps/unix/sysv/linux/connect.S: New file.
10087 * sysdeps/unix/sysv/linux/creat.c: New file.
10088 * sysdeps/unix/sysv/linux/fsync.c: New file.
10089 * sysdeps/unix/sysv/linux/llseek.c: New file.
10090 * sysdeps/unix/sysv/linux/lseek.c: New file.
10091 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10092 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10093 * sysdeps/unix/sysv/linux/msync.c: New file.
10094 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10095 * sysdeps/unix/sysv/linux/open.c: New file.
10096 * sysdeps/unix/sysv/linux/open64.c: New file.
10097 * sysdeps/unix/sysv/linux/pause.c: New file.
10098 * sysdeps/unix/sysv/linux/poll.c: New file.
10099 * sysdeps/unix/sysv/linux/pread.c: New file.
10100 * sysdeps/unix/sysv/linux/pread64.c: New file.
10101 * sysdeps/unix/sysv/linux/pselect.c: New file.
10102 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10103 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10104 * sysdeps/unix/sysv/linux/readv.c: New file.
10105 * sysdeps/unix/sysv/linux/recv.S: New file.
10106 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10107 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10108 * sysdeps/unix/sysv/linux/select.c: New file.
10109 * sysdeps/unix/sysv/linux/send.S: New file.
10110 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10111 * sysdeps/unix/sysv/linux/sendto.S: New file.
10112 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10113 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10114 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10115 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10116 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10117 * sysdeps/unix/sysv/linux/system.c: New file.
10118 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10119 * sysdeps/unix/sysv/linux/wait.c: New file.
10120 * sysdeps/unix/sysv/linux/waitid.c: New file.
10121 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10122 * sysdeps/unix/sysv/linux/writev.c: New file.
10123 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10124
10125 * pt-readv.c: Fix comment.
10126
101272002-12-14 Jakub Jelinek <jakub@redhat.com>
10128
10129 * tst-cleanup1.c: Include stdlib.h.
10130
10131 * tst-cancel5.c: New test.
10132 * Makefile (tests): Add tst-cancel5.
10133 (tst-cancel5): Link against libc.so libpthread.so in that order.
10134
9ae0909b
UD
101352002-12-13 Ulrich Drepper <drepper@redhat.com>
10136
b7bdd9c4
UD
10137 * forward.c (test_loaded): Prevent recursive calls.
10138
9ae0909b
UD
10139 * Makefile (routines): Add libc-cancellation.
10140 * libc-cancellation.c: New file.
10141 * descr.h (struct pthread): Add multiple_threads field.
10142 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10143 new thread descriptor to 1.
10144 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10145 Initialize multiple_thread field after successful thread creation.
10146 * cancellation.c (__do_cancel): Move to pthreadP.h.
10147 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10148 (__pthread_disable_asynccancel): Add internal_function attribute.
10149 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10150 * pthread_setcancelstate.c: Likewise.
10151 * pthread_setcanceltype.c: Likewise.
10152 * pthread_exit.c: Likewise.
10153 * pthreadP.h (CANCELLATION_P): Likewise.
10154 (__do_cancel): Define as static inline.
10155 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10156 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10157 declarations.
10158 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10159 fields. Define MULTIPLE_THREADS_OFFSET.
10160 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10161 declaration.
10162 * sysdeps/unix/sysv/linux/accept.S: New file.
10163 * sysdeps/unix/sysv/linux/read.c: New file.
10164 * sysdeps/unix/sysv/linux/write.c: New file.
10165 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10166 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10167 initialization of __libc_locking_needed.
10168 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10169 __libc_locking_needed, use multiple_threads field in TCB.
10170 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10171
22f20674
UD
101722002-12-12 Ulrich Drepper <drepper@redhat.com>
10173
2ad2e1e7
UD
10174 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10175 version.
10176 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10177
22f20674
UD
10178 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10179 access to __libc_locking_needed for PIC.
10180
aa80bf86
UD
101812002-12-12 Jakub Jelinek <jakub@redhat.com>
10182
10183 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10184 declare for libc.so.
10185 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10186 expression.
10187 (__libc_lock_lock): Put into statement expression.
10188 (__libc_lock_unlock): Remove trailing semicolon.
10189 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10190
24021373
RM
101912002-12-12 Roland McGrath <roland@redhat.com>
10192
10193 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10194 "m" constraint to refer to __libc_locking_needed. Declare it here.
10195
14e7aece
UD
101962002-12-12 Ulrich Drepper <drepper@redhat.com>
10197
10198 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10199 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10200 Initialize __libc_locking_needed.
10201 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10202 instead of __register_pthread_fork_handler.
10203 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10204 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10205 fork-gen with libc_pthread_init.
10206 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10207 of __register_pthread_fork_handler.
10208 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10209 of __register_pthread_fork_handler.
10210 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10211 __libc_locking_needed to determine whether lock prefix can be avoided.
10212 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10213
85631c8e
UD
102142002-12-11 Ulrich Drepper <drepper@redhat.com>
10215
da63009e
UD
10216 * Makefile (tests): Add tst-cleanup1.
10217 * tst-cleanup1.c: New file.
10218 * cancellation.c (__cleanup_thread): Removed.
10219 (__do_cancel): Remove call to __cleanup_thread.
10220 * pthreadP.h: Remove __cleanup_thread prorotype.
10221
000160a2
UD
10222 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10223 Remember function and argument even if cancellation handler
10224 function is not available.
10225 (__libc_cleanup_region_end): Execute registered function directly if
10226 pthread functions are not available.
10227 (__libc_cleanup_end): Likewise.
10228
85631c8e
UD
10229 * init.c (__pthread_initialize_minimal): Fix initialization in
10230 static lib by preventing gcc from being too clever.
10231
dce8f2b6
UD
102322002-12-10 Ulrich Drepper <drepper@redhat.com>
10233
34a075be
UD
10234 * init.c (__pthread_initialize_minimal): Remove unneccesary
10235 sigaddset call.
10236
dce8f2b6
UD
10237 * Makefile (tests): We can run tst-locale2 now.
10238
e5e45b53
UD
102392002-12-09 Ulrich Drepper <drepper@redhat.com>
10240
10241 * Versions: Remove duplicated sigwait entry.
10242
bdb04f92
UD
102432002-12-08 Ulrich Drepper <drepper@redhat.com>
10244
1e506629
UD
10245 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10246 inside libpthread.
10247
a3957dd5
UD
10248 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10249
bdb04f92
UD
10250 * pthreadP.h: Declare __pthread_enable_asynccancel and
10251 __pthread_disable_asynccancel.
10252 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10253 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10254 * cancellation.c (__pthread_enable_asynccancel): New function.
10255 (__pthread_disable_asynccancel): New function.
10256 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10257 * pt-close.c: Likewise.
10258 * pt-connect.c: Likewise.
10259 * pt-creat.c: Likewise.
10260 * pt-fcntl.c: Likewise.
10261 * pt-fsync.c: Likewise.
10262 * pt-lseek.c: Likewise.
10263 * pt-lseek64.c: Likewise.
10264 * pt-msgrcv.c: Likewise.
10265 * pt-msgsnd.c: Likewise.
10266 * pt-msync.c: Likewise.
10267 * pt-nanosleep.c: Likewise.
10268 * pt-open.c: Likewise.
10269 * pt-open64.c: Likewise.
10270 * pt-pause.c: Likewise.
10271 * pt-poll.c: Likewise.
10272 * pt-pread.c: Likewise.
10273 * pt-pread64.c: Likewise.
10274 * pt-pselect.c: Likewise.
10275 * pt-pwrite.c: Likewise.
10276 * pt-pwrite64.c: Likewise.
10277 * pt-read.c: Likewise.
10278 * pt-readv.c: Likewise.
10279 * pt-recv.c: Likewise.
10280 * pt-recvfrom.c: Likewise.
10281 * pt-recvmsg.c: Likewise.
10282 * pt-select.c: Likewise.
10283 * pt-send.c: Likewise.
10284 * pt-sendmsg.c: Likewise.
10285 * pt-sendto.c: Likewise.
10286 * pt-sigpause.c: Likewise.
10287 * pt-sigsuspend.c: Likewise.
10288 * pt-sigtimedwait.c: Likewise.
10289 * pt-sigwait.c: Likewise.
10290 * pt-sigwaitinfo.c: Likewise.
10291 * pt-system.c: Likewise.
10292 * pt-tcdrain.c: Likewise.
10293 * pt-wait.c: Likewise.
10294 * pt-waitid.c: Likewise.
10295 * pt-waitpid.c: Likewise.
10296 * pt-write.c: Likewise.
10297 * pt-writev.c: Likewise.
a3957dd5
UD
10298 * pthread_join.c: Likewise.
10299 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
10300
10301 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10302 (__xpg_sigpause): New function.
10303 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10304
6ccb3834
UD
103052002-12-07 Ulrich Drepper <drepper@redhat.com>
10306
09efc3ba
UD
10307 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10308
10309 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10310 _GI_pthread_cleanup_pop to pthreadP.h.
10311
10312 * ftrylockfile.c: Use _IO_lock_trylock instead of
10313 pthread_mutex_trylock.
10314
10315 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10316 (CANCEL_RESET): Likewise.
10317 (__pthread_setcanceltype_): Declare.
10318 (__pthread_mutex_lock_internal): Declare.
10319 (__pthread_mutex_unlock_internal): Declare.
10320 (__pthread_once_internal): Declare.
10321 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10322 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10323
10324 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10325 and pthread_mutex_unlock.
10326 * pthread_cond_wait.c: Likewise.
10327 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10328 * pthread_mutex_unlock.c: Likewise.
10329
10330 * pthread_setcanceltype.c: Add additional alias
10331 __pthread_setcanceltype.
10332
10333 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10334 * sem_open.c (sem_open): Likewise.
10335 Use __libc_open, __libc_write, and __libc_close instead of
10336 open, write, and close respectively.
10337
10338 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10339 Rewrite as statement expression since it must return a value.
10340
10341 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10342 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10343 __pthread_kill.
10344
10345 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10346 alias __pthread_once_internal.
10347
6ccb3834
UD
10348 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10349
d3c9f895
UD
103502002-12-06 Ulrich Drepper <drepper@redhat.com>
10351
4614167a
UD
10352 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10353 * tst-stdio1.c: New file.
10354 * tst-stdio2.c: New file.
10355
a4548cea
UD
10356 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10357
d3c9f895
UD
10358 * Makefile (tests): Comment out tst-locale2 for now.
10359 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10360
10361 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10362 -D_IO_MTSAFE_IO.
10363 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10364 Use _IO_lock_init instead of explicit assignment.
10365
10366 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10367 Define __libc_lock_* and __libc_lock_recursive macros with
10368 lowlevellock macros, not pthread mutexes.
10369
10370 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10371 of pthread_mutex_lock.
10372 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10373 instead of pthread_mutex_unlock.
10374
fde89ad0
RM
103752002-12-06 Roland McGrath <roland@redhat.com>
10376
10377 * allocatestack.c (__stack_user): Use uninitialized defn.
10378 * init.c (__pthread_initialize_minimal): Initialize it here.
10379
11767d47
RM
103802002-12-05 Roland McGrath <roland@redhat.com>
10381
fde89ad0
RM
10382 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10383 string.
10384 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10385
11767d47
RM
10386 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10387 missing & here too.
10388
440d8bc2
UD
103892002-12-05 Ulrich Drepper <drepper@redhat.com>
10390
10391 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10392 lowlevellock.
10393 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10394 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10395 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10396 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10397 for __libc_lock_* macros.
10398 * Makefile (routines): Add libc-lowlevellock.
10399
104002002-10-09 Roland McGrath <roland@redhat.com>
10401
10402 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10403 Under [__PIC__], call the function via the pointer fetched for
10404 comparison rather than a call by name that uses the PLT.
10405 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10406 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10407 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10408 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10409 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10410
d5ed0118
RM
104112002-12-04 Roland McGrath <roland@redhat.com>
10412
10413 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10414
10415 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10416 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10417
10418 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10419
eaa4099f
UD
104202002-12-04 Ulrich Drepper <drepper@redhat.com>
10421
10422 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10423 a completely opaque, non-integer type.
10424 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10425
33b5d0cc
UD
104262002-12-05 Jakub Jelinek <jakub@redhat.com>
10427
10428 * sysdeps/i386/tls.h: Include stdlib.h.
10429 * sysdeps/x86_64/tls.h: Likewise.
10430
7a5cdb30
UD
104312002-12-04 Ulrich Drepper <drepper@redhat.com>
10432
c4a6d859
UD
10433 * Makefile (tests): Add tst-locale2.
10434 (tests-static): Likewise.
10435 * tst-locale2.c: New file.
10436
7a5cdb30
UD
10437 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10438 volatile and add memory clobbers to lock operations.
10439
d82d5d12
UD
104402002-12-03 Ulrich Drepper <drepper@redhat.com>
10441
69cae3cf
UD
10442 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10443 * sysdeps/i386/i486/bits/atomic.h: New file.
10444 * sysdeps/i386/i586/bits/atomic.h: New file.
10445 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10446 include i486 version.
10447 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10448 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 10449 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 10450
e4044c01
UD
10451 * allocatestack.c (get_cached_stack): Don't crash if we first
10452 found a stack with a larger size then needed.
10453 Reported by Hui Huang <hui.huang@sun.com>.
10454
d82d5d12
UD
10455 * Makefile (tests): Add tst-sysconf.
10456 * tst-sysconf.c: New file.
10457
10458 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10459 PTHREAD_THREADS_MAX.
10460
fa9a4ff0
RM
104612002-12-02 Roland McGrath <roland@redhat.com>
10462
10463 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10464 Declare using hidden_proto instead of attribute_hidden, so there are
10465 non-.hidden static symbols for gdb to find.
10466 (__pthread_keys): Likewise.
10467 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10468 * allocatestack.c (__stack_user): Likewise.
10469 * pthread_create.c (__pthread_keys): Likewise.
10470 (__nptl_threads_events, __nptl_last_event): Make these static instead
10471 of hidden.
10472 * pthread_key_create.c (__pthread_pthread_keys_max,
10473 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10474
91949a33
UD
104752002-12-02 Ulrich Drepper <drepper@redhat.com>
10476
c22b52fa
UD
10477 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10478 statically.
10479 * tst-locale1.c: New file.
10480
beb6aa41
UD
10481 * pthread_cond_timedwait.c: Include <stdlib.h>.
10482
91949a33
UD
10483 * Makefile (tests): Add tst-fork2 and tst-fork3.
10484 * tst-fork2.c: New file.
10485 * tst-fork3.c: New file.
10486
654dff90
UD
104872002-11-28 Ulrich Drepper <drepper@redhat.com>
10488
cb0e76b4
UD
10489 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10490
10491 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10492 require it to 200112L.
10493
10494 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10495 instruction only if HAVE_CMOV is defined.
10496 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10497
975aa229
UD
10498 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10499
654dff90
UD
10500 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10501
10502 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10503
10504 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10505
a3931336
UD
105062002-11-27 Ulrich Drepper <drepper@redhat.com>
10507
c10c099c
UD
10508 * sysdeps/x86_64/bits/atomic.h: New file.
10509
10510 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10511 16-bit operations.
10512
dca99d27
UD
10513 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10514 possible since gettid cannot fail.
10515
f78deea6
UD
10516 * sysdeps/x86_64/pthreaddef.h: New file.
10517
10518 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10519
10520 * sysdeps/x86_64/pthread_spin_init.c: New file.
10521 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10522 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10523 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10524
10525 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10526 Add missing lock prefix. Minute optimization.
10527
10528 * tst-spin2.c (main): Also check successful trylock call.
10529
10530 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10531 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10532
10533 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10534 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10535
10536 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10537 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10538 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
10539
10540 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10541 value in case of an error.
10542
a3931336
UD
10543 * sysdeps/x86_64/tls.h: New file.
10544
76a50749
UD
105452002-11-26 Ulrich Drepper <drepper@redhat.com>
10546
117c452c
UD
10547 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10548 takes the array member name and the index as parameters.
10549 (THREAD_SETMEM_NC): Likewise.
10550 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10551 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10552 interfaces.
10553
10554 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10555 to decide which code to use.
10556 (THREAD_SETMEM_NC): Likewise.
10557
76a50749
UD
10558 * allocatestack.c (queue_stack): Don't remove stack from list here.
10559 Do it in the caller. Correct condition to prematurely terminate
10560 loop to free stacks.
10561 (__deallocate_stack): Remove stack from list here.
10562
105632002-11-26 Ulrich Drepper <drepper@redhat.com>
10564
10565 * Makefile (tests): Add tst-stack1.
10566 * tst-stack1.c: New file.
10567
10568 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10569 provided stack.
10570
10571 * pthread_attr_getstack.c: Return bottom of the thread area.
10572
105732002-11-25 Ulrich Drepper <drepper@redhat.com>
10574
10575 * Makefile (libpthread-routines): Add pt-allocrtsig and
10576 pthread_kill_other_threads.
10577 * pt-allocrtsig.c: New file.
10578 * pthread_kill_other_threads.c: New file.
10579 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10580 all three functions.
10581 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10582 allocrtsig.
10583 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10584 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10585 and __libc_allocate_rtsig_private.
10586 * Versions (libpthread): Export pthread_kill_other_threads_np,
10587 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10588
105892002-11-24 Ulrich Drepper <drepper@redhat.com>
10590
10591 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10592 the end of the stack. Adjust computations.
10593 When mprotect call fails dequeue stack and free it.
10594 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10595 attribute.
10596 * pthread_getattr_np.c: Likewise.
10597
10598 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10599 surprises.
10600
106012002-11-23 Ulrich Drepper <drepper@redhat.com>
10602
10603 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10604 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10605
106062002-11-22 Ulrich Drepper <drepper@redhat.com>
10607
10608 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10609 * pthread_setspecific.c: Likewise.
10610
106112002-11-21 Ulrich Drepper <drepper@redhat.com>
10612
10613 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10614 definitions. Get them from the official place.
10615 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10616
10617 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10618 Use new CLONE_ flags in clone() calls.
10619
10620 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10621 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10622
10623 * Versions: Add pthread_* functions for libc.
10624 * forward.c: New file.
10625
10626 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10627 errno-loc.
10628 * herrno.c: New file.
10629 * res.c: New file.
10630
10631 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10632 sem_trywait, and sem_timedwait. Add herrno and res.
10633 * sem_init.c: Don't initialize lock and waiters members.
10634 * sem_open.c: Likewise.
10635 * sem_post.c: Removed.
10636 * sem_wait.c: Removed.
10637 * sem_trywait.c: Removed.
10638 * sem_timedwait.c: Removed.
10639 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10640 Includes full implementations of sem_post, sem_wait, sem_trywait,
10641 and sem_timedwait.
10642 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10643 for new implementation.
10644 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10645 and waiters fields.
10646
10647 * tst-sem3.c: Improve error message.
10648 * tst-signal3.c: Likewise.
10649
10650 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10651 to tell the kernel about the termination futex and to initialize tid
10652 member. Don't initialize main_thread.
10653 * descr.h (struct pthread): Remove main_thread member.
10654 * cancelllation.c (__do_cancel): Remove code handling main thread.
10655 The main thread is not special anymore.
10656
10657 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10658 size of the stacks to stack_cache_actsize.
10659
10660 * pt-readv.c: Add missing "defined".
10661 * pt-sigwait.c: Likewise.
10662 * pt-writev.c: Likewise.
10663
106642002-11-09 Ulrich Drepper <drepper@redhat.com>
10665
10666 * Versions: Export __connect from libpthread.
10667 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10668
10669 * Makefile (libpthread-routines): Add pt-raise.
10670 * sysdeps/unix/sysv/linux/raise.c: New file.
10671 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10672 * sysdeps/generic/pt-raise.c: New file.
10673
10674 * pthread_cond_init.c: Initialize all data elements of the condvar
10675 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10676
10677 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10678 * pthread_create.c: Likewise.
10679
10680 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10681 * tst-key1.c: New file.
10682 * tst-key2.c: New file.
10683 * tst-key3.c: New file.
10684
10685 * Versions: Export pthread_detach for version GLIBC_2.0.
10686 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10687
106882002-11-08 Ulrich Drepper <drepper@redhat.com>
10689
10690 * pthread_key_create.c: Terminate search after an unused key was found.
10691 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10692
10693 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10694 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10695
106962002-10-10 Ulrich Drepper <drepper@redhat.com>
10697
10698 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10699 dynamic lookup for errno in PIC.
10700
10701 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10702 release the stack lock as soon as possible.
10703 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10704 the static TLS block.
10705 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10706
10707 * cancellation.c: Renamed from cancelation.c.
10708 * Makefile: Adjust accordingly.
10709 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10710 * cleanup_defer.c: Use CANCELLATION_P.
10711 * pthread_testcancel.c: Likewise.
10712 * descr.h: Fix spelling in comments.
10713 * init.c: Likewise.
10714 * pthread_getattr_np.c: Likewise.
10715 * pthread_getschedparam.c: Likewise.
10716 * pthread_setschedparam.c: Likewise.
10717 * Versions: Likewise.
10718
10719 * pt-pselect.c: New file.
10720 * Makefile (libpthread-routines): Add pt-pselect.
10721 * Versions: Add pselect.
10722
10723 * tst-cancel4.c: New file.
10724 * Makefile (tests): Add tst-cancel4.
10725
107262002-10-09 Ulrich Drepper <drepper@redhat.com>
10727
10728 * pthread_mutex_lock.c: Always record lock ownership.
10729 * pthread_mutex_timedlock.c: Likewise.
10730 * pthread_mutex_trylock.c: Likewise.
10731
10732 * pt-readv.c: New file.
10733 * pt-writev.c: New file.
10734 * pt-creat.c: New file.
10735 * pt-msgrcv.c: New file.
10736 * pt-msgsnd.c: New file.
10737 * pt-poll.c: New file.
10738 * pt-select.c: New file.
10739 * pt-sigpause.c: New file.
10740 * pt-sigsuspend.c: New file.
10741 * pt-sigwait.c: New file.
10742 * pt-sigwaitinfo.c: New file.
10743 * pt-waitid.c: New file.
10744 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10745 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10746 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10747 * Versions: Add all the new functions.
10748
10749 * tst-exit1.c: New file.
10750 * Makefile (tests): Add tst-exit1.
10751
10752 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10753
107542002-10-08 Ulrich Drepper <drepper@redhat.com>
10755
10756 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10757
10758 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10759 call. pthread_join is an official cancellation point.
10760 * pthread_timedjoin.c: Likewise.
10761
10762 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10763 and the condvar's mutex are retrieved.
10764 * pthread_cond_timedwait.c: Likewise.
10765 Reported by dice@saros.East.Sun.COM.
10766
107672002-10-07 Ulrich Drepper <drepper@redhat.com>
10768
10769 * pthreadP.h: Cut out all type definitions and move them...
10770 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10771 * pthreadP.h: Include <internaltypes.h>.
10772
10773 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10774 performance tweaks.
10775
10776 * sem_trywait.c: Shuffle #includes around to get right order.
10777 * sem_timedwait.c: Likewise.
10778 * sem_post.c: Likewise.
10779 * sem_wait.c: Likewise.
10780
10781 * nptl 0.3 released.
10782
10783 * Makefile (tests): Add tst-signal3.
10784 * tst-signal3.c: New file.
10785
107862002-10-05 Ulrich Drepper <drepper@redhat.com>
10787
10788 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10789 the asms modify the sem object.
10790 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10791
10792 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10793 the actual members.
10794 * pthreadP.h (struct sem): New type. Actual semaphore type.
10795 * semaphoreP.h: Include pthreadP.h.
10796 * sem_getvalue.c: Adjust to sem_t change.
10797 * sem_init.c: Likewise.
10798 * sem_open.c: Likewise.
10799 * sem_post.c: Likewise.
10800 * sem_timedwait.c: Likewise.
10801 * sem_trywait.c: Likewise.
10802 * sem_wait.c: Likewise.
10803
108042002-10-04 Ulrich Drepper <drepper@redhat.com>
10805
10806 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10807 * tst-basic2.c: New file.
10808 * tst-exec1.c: New file.
10809 * tst-exec2.c: New file.
10810 * tst-exec3.c: New file.
10811
10812 * tst-fork1.c: Remove extra */.
10813
10814 * nptl 0.2 released. The API for IA-32 is complete.