]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
* wctype/wctype.h: The *_l functions are in POSIX 2008.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
6cbe890a
UD
12009-02-26 Ulrich Drepper <drepper@redhat.com>
2
3 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
5 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
6 200112L to 200809L.
7
77db439e
UD
82009-02-25 Ulrich Drepper <drepper@redhat.com>
9
10 * sysdeps/pthread/pthread.h: The robust mutex functions are in
11 POSIX 2008.
12
5be0a688
UD
132009-02-24 Ulrich Drepper <drepper@redhat.com>
14
15 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
16 Unify name of include protector macro.
17
4c869eb6
UD
182009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
19
20 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
21 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
22
cca50323
UD
232009-01-29 Ulrich Drepper <drepper@redhat.com>
24
7f901dd7
UD
25 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
26 pointer variables.
27
cca50323
UD
28 * allocatestack.c (__free_stacks): Renamed from free_stacks.
29 (__free_stack_cache): Removed. Change callers to call __free_stacks.
30 * init.c (nptl_freeres): New function.
31 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
32 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
33 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
34 variable.
35 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
36 load DSO. Assign last.
37 (__unwind_freeres): New function.
38
39 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
40 for better debugging. No need to use stack_list_add here.
41
a7bd183f
UD
422009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
43
44 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
45 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
46 instead of computing relative timeout.
47 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
48 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
49
563ee1cb
UD
502009-01-25 Ulrich Drepper <drepper@redhat.com>
51
52 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
53
f25c7b08
UD
542009-01-08 Ulrich Drepper <drepper@redhat.com>
55
56 * sysdeps/pthread/list.h (list_add): Initialize new element first.
57 (list_add_tail): Removed.
58
3c612057
UD
592009-01-04 Ulrich Drepper <drepper@redhat.com>
60
61 * init.c (__pthread_initialize_minimal_internal): Optimize test
62 FUTEX_CLOCK_REALTIME a bit.
63
19834b42
UD
642009-01-03 Ulrich Drepper <drepper@redhat.com>
65
66 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
67 only passing five parameters to FUTEX_WAIT_BITSET call.
68
69 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a9fa090b 70 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
19834b42
UD
71 instead of computing relative timeout.
72
7dd650d7
UD
732009-01-02 Ulrich Drepper <drepper@redhat.com>
74
cbd8aeb8
UD
75 * init.c (__pthread_initialize_minimal_internal): Check for
76 FUTEX_CLOCK_REALTIME flag.
77 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
a9fa090b 78 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
cbd8aeb8
UD
79 relative timeout.
80
7dd650d7
UD
81 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
82 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
83 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
84 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
85 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
86 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
87
217d45cd
UD
882008-12-09 Ulrich Drepper <drepper@redhat.com>
89
90 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
91 loop body instead of ; to avoid gcc warnings.
92 (pthread_cleanup_pop_restore_np): Likewise.
93 Patch by Caolán McNamara <caolanm@redhat.com>.
94
6de79a49
UD
952008-12-09 Jakub Jelinek <jakub@redhat.com>
96
97 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
98 fast path here, for robust/PI/PP mutexes call
99 __pthread_mutex_lock_full. Don't use switch, instead use a series
100 of ifs according to their probability.
101 (__pthread_mutex_lock_full): New function.
102 * pthread_mutex_unlock.c: Include assert.h.
103 (__pthread_mutex_unlock_usercnt): Handle only the
104 fast path here, for robust/PI/PP mutexes call
105 __pthread_mutex_unlock_full. Don't use switch, instead use a series
106 of ifs according to their probability.
107 (__pthread_mutex_unlock_full): New function.
108 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
109 (__pthread_mutex_lock_full): Define.
110
71bb2639
UD
1112008-12-08 Ulrich Drepper <drepper@redhat.com>
112
113 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
114 implementation. Add necessary padding and.
115 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
116 words.
117
247626f3
UD
1182008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
119
120 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
121 and FUTEX_WAKE_BITSET.
122
da5ac135
UD
1232008-12-02 Ulrich Drepper <drepper@redhat.com>
124
125 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
126 and FUTEX_WAKE_BITSET.
127 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
128 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
129 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
130 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
131
c0439b95
RM
1322008-11-25 Roland McGrath <roland@redhat.com>
133
134 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
135 Subdirectories moved to ports repository as
136 sysdeps/.../nptl subdirectories.
137
0e54a725
UD
1382008-11-12 Jakub Jelinek <jakub@redhat.com>
139
140 [BZ #7008]
141 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
142 of old value.
143 * pthread_cond_init.c (__pthread_cond_init): Fix
144 cond->__data.__nwaiters initialization.
145 * Makefile (tests): Add tst-cond23.
146 * tst-cond23.c: New test.
147
4b23f9bd
JJ
1482008-11-07 Jakub Jelinek <jakub@redhat.com>
149
150 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
151 arguments.
152 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
153 arguments.
154
efac1fce
UD
1552008-11-01 Ulrich Drepper <drepper@redhat.com>
156
157 [BZ #6955]
158 * pthread_mutex_lock.c: Add support for private PI mutexes.
159 * pthread_mutex_timedlock.c: Likewise.
160 * pthread_mutex_trylock.c: Likewise.
161 * pthread_mutex_unlock.c: Likewise.
162 Patch mostly by Ben Jackson <ben@ben.com>.
163
bf837fa3
UD
1642008-10-31 Ulrich Drepper <drepper@redhat.com>
165
166 [BZ #6843]
167 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
168 Increase stack size for helper thread.
169
208bc836
UD
1702008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
171
172 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
173 assembly with a clobber list for access registers a0 and a1.
174
17f8b4a9
UD
1752008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
176
177 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
178 to force runp->refcntr to be read from memory.
179
2458c748
AJ
1802008-09-08 Richard Guenther <rguenther@suse.de>
181
182 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
183 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
184 lll_timedlock, lll_robust_timedlock, lll_unlock,
185 lll_robust_unlock): Promote private to int.
186
965805e8
UD
1872008-08-15 Ulrich Drepper <drepper@redhat.com>
188
189 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
190 ARCH_RETRY_MMAP definitions.
191 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
192 Define MAP_STACK when not defined.
193 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
194 handling of ARCH_RETRY_MMAP.
195
bd7f4857
UD
1962008-07-30 Ulrich Drepper <drepper@redhat.com>
197
198 * tst-align2.c (f): Print message that f is reached.
199
619cc2f6
UD
2002008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
201
202 [BZ #6740]
203 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
204 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
205
8ccf22f9
UD
2062008-07-25 Ulrich Drepper <drepper@redhat.com>
207
208 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
209 SOCK_CLOEXEC if possible.
210
2112008-05-29 Ulrich Drepper <drepper@redhat.com>
212
213 * Makefile (tests): Add tst-rwlock2a.
214 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
215 * tst-rwlock2a.c: New file.
216
5a337776
UD
2172008-06-12 Ulrich Drepper <drepper@redhat.com>
218
219 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
220
e4d6e7f5
UD
2212008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
222
223 * sysdeps/pthread/pthread.h: Fix typo in comment.
224
d6296e88
UD
2252008-05-28 Ulrich Drepper <drepper@redhat.com>
226
227 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
228 of CPU set to the kernel.
229
62605cbf
UD
2302008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
231
232 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
233 cfi directives.
234 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
235 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
236 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
237 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
238 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
239 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
240
2412008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
242
243 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
244 cfi directives.
245 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
246 Likewise.
247 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
248 Likewise.
249 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
250 Likewise.
251
4b2c85c0
UD
2522008-05-26 Ulrich Drepper <drepper@redhat.com>
253
254 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
255
b72f5692 2562008-05-20 Jakub Jelinek <jakub@redhat.com>
4b2c85c0
UD
257
258 David S. Miller <davem@davemloft.net>
3b15b590 259
b72f5692 260 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3b15b590 261
cdffaaa6
UD
2622008-05-10 Ulrich Drepper <drepper@redhat.com>
263
264 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
265 __pshared correctly.
266 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
267 Likewise.
268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
269 Likewise.
270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
271 Likewise.
272 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
273 Likewise.
274 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
275
2313c48f
JJ
2762008-04-14 David S. Miller <davem@davemloft.net>
277
278 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
279 (__old_sem_wait): Fix argument to lll_futex_wait().
280
2f611ada
UD
2812007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
282
283 * pthread_create.c: Require pthread_mutex_trylock and
284 pthread_key_delete for libgcc.
285
d24be489
JJ
2862008-04-08 Jakub Jelinek <jakub@redhat.com>
287
288 [BZ #6020]
289 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
290 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
291 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
292
f96853be
UD
2932008-03-27 Ulrich Drepper <drepper@redhat.com>
294
8ccf22f9 295 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
f96853be
UD
296 <linux/limits.h> has defined it.
297 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
298 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
299 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
300 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
301
354b7527
JJ
3022008-03-18 Jakub Jelinek <jakub@redhat.com>
303
304 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
305 of ASSEMBLER.
306 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
307 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
308
702ae329
UD
3092008-03-14 Ulrich Drepper <drepper@redhat.com>
310
311 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
312 HAVE_DL_DISCOVER_OSVERSION.
313 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
314 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
315
443db178
UD
3162008-03-07 Ulrich Drepper <drepper@redhat.com>
317
318 [BZ #5778]
319 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
320 _POSIX_CHOWN_RESTRICTED value to zero.
321
67fbfa5c
RM
3222008-01-31 Roland McGrath <roland@redhat.com>
323
324 * Makefile (omit-deps): Variable removed.
325
dd3113da
UD
3262008-01-30 Ulrich Drepper <drepper@redhat.com>
327
328 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
329 unnecessary addr32 prefix.
330
16cd816f
RM
3312008-01-29 Roland McGrath <roland@redhat.com>
332
333 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
334
b4b166af
UD
3352008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
336
337 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
338
3392008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
340
341 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
342 a scratch register.
343 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
344 (__lll_lock_wait_private): Fix typo.
345 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
346 (pthread_barrier_wait): Likewise. Adjust XADD use.
347 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
348 Adjust XADD use.
349 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
350 (pthread_rwlock_timedrdlock): Return correct return value.
351 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
16cd816f 352 (pthread_rwlock_timedwrlock): Likewise.
b4b166af 353
eaf95a26
UD
3542008-01-15 Ulrich Drepper <drepper@redhat.com>
355
356 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
357 thread returns the program exits with an error code.
358
ab355d9a
UD
3592008-01-10 Ulrich Drepper <drepper@redhat.com>
360
361 * pthread-errnos.sym: Add EOVERFLOW.
362 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
363 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
364 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
365 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
366
b8cca206
UD
3672007-12-14 Ulrich Drepper <drepper@redhat.com>
368
369 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
370 parameter. Passed it as permission to mmap.
371 * allocatestack.c (allocate_stack): Pass prot as second parameter
372 to ARCH_RETRY_MMAP.
373
189dce4f
UD
3742007-12-12 Ulrich Drepper <drepper@redhat.com>
375
3eb0e1c6
UD
376 * tst-basic7.c: Allocate memory for the stack.
377
189dce4f
UD
378 [BZ #5465]
379 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
380 (__pthread_cond_timedwait): Don't use VDSO.
58d11795 381 Patch by Michal Januszewski.
189dce4f 382
26e21e75
UD
3832007-12-07 Ulrich Drepper <drepper@redhat.com>
384
385 [BZ #5455]
386 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
387 Allow label before pthread_cleanup_pop.
388 (pthread_cleanup_pop_restore_np): Likewise.
389
191ec77f
UD
3902007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
391
392 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
393 Store 2 before returning ETIMEDOUT.
394
c012be6f
UD
3952007-11-23 Ulrich Drepper <drepper@redhat.com>
396
397 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
398 Store 2 before returning ETIMEDOUT.
399 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
400 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
401 (__lll_lock_wait_private): Optimize.
402 (__lll_lock_wait): Likewise.
403
77f1e09a
UD
4042007-11-20 Jakub Jelinek <jakub@redhat.com>
405
406 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
407 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
408 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
409
0f7e0ee5
UD
4102007-11-08 Ulrich Drepper <drepper@redhat.com>
411
cbed6a60
UD
412 [BZ #5240]
413 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
414 If we time out, try one last time to lock the futex to avoid
415 losing a wakeup signal.
416 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
417 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
418
0f7e0ee5
UD
419 [BZ #5245]
420 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
421 if necessary.
422
f6ed654c
UD
4232007-11-07 Ulrich Drepper <drepper@redhat.com>
424
425 [BZ #5245]
426 * allocatestack.c (allocate_stack): Change ENOMEM error in case
427 mmap failed to EAGAIN.
428 * Makefile (tests): Add tst-basic7.
429 * tst-basic7.c: New file.
430
b92e3780
UD
4312007-11-05 Ulrich Drepper <drepper@redhat.com>
432
433 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
434 Use __linkin_atfork.
435
94a749f6
UD
4362007-11-03 Mike Frysinger <vapier@gentoo.org>
437
438 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
439 missing line continuations.
440 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
441 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
442
f160a450
UD
4432007-10-28 Ulrich Drepper <drepper@redhat.com>
444
445 [BZ #5220]
446 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
447 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
448 (struct timer): Add next element.
449 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
450 enqueue timer structure into __active_timer_sigev_thread list.
451 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
452 remove timer struct from __active_timer_sigev_thread.
453 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
454 Before using timer structure make sure it is still on the
455 __active_timer_sigev_thread list. Keep lock until done.
456 Define __active_timer_sigev_thread and
457 __active_timer_sigev_thread_lock.
458
94833f11
UD
4592007-10-27 Ulrich Drepper <drepper@redhat.com>
460
461 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
462 Redefine thread_atfork for use of ATFORK_MEM.
463 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
464 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
465 function.
466 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
467 Use atomic operation when removing first element of list.
468
96c06e08
JJ
4692007-10-17 Jakub Jelinek <jakub@redhat.com>
470
471 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
472 routine instead of an alias to __new_sem_post.
473
e807818b
JJ
4742007-10-15 Jakub Jelinek <jakub@redhat.com>
475
476 * init.c (__pthread_initialize_minimal): Initialize word to appease
477 valgrind.
478
59d430c6
UD
4792007-10-10 Jakub Jelinek <jakub@redhat.com>
480
481 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
482 libc.so just clear NAME.
483 (__libc_rwlock_fini): Nop inside of libc.so.
484 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
485 all zeros.
486
221d9d8e
UD
4872007-09-02 Ulrich Drepper <drepper@redhat.com>
488
489 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
490 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
491 unlocking failed.
492 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
493
2a01ce56
UD
4942007-08-21 Ulrich Drepper <drepper@redhat.com>
495
496 [BZ #4938]
497 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
498 reclaimed stack if necessary.
499 * Makefile (tests): Add tst-tsd6.
500 * tst-tsd6.c: New file.
501
c273641b
JJ
5022007-08-21 Jakub Jelinek <jakub@redhat.com>
503
504 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
505 Add private argument.
506
fb84593c
UD
5072007-08-20 Ulrich Drepper <drepper@redhat.com>
508
509 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
510 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
511
3e8d1eab
JJ
5122007-08-16 Jakub Jelinek <jakub@redhat.com>
513
514 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
515 (__lll_robust_timedlock): Pass private as last argument to
516 __lll_robust_timedlock_wait.
517 (__lll_unlock): Fix a pasto.
518
e4720b0e
JJ
5192007-08-15 Jakub Jelinek <jakub@redhat.com>
520
521 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
522 sparc_old_sem): New structs.
523 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
524 (__sem_wait_cleanup): New function.
525 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
526 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
527 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
528 lll_futex_wait.
529 (__old_sem_wait): New function.
530 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
531 nptl/sysdeps/unix/sysv/linux/sparc version.
532 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
533 Likewise.
534 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
535 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
536 (__new_sem_trywait): Use sparc_old_sem structure.
537 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
538 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
539 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
540 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
541 lll_futex_timed_wait.
542 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
543 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
544 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
545 lll_futex_wake.
546 (__old_sem_post): New function.
547 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
548 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
549 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
550 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
551 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
552 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
553
d13f4a43
UD
5542007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
555
556 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
557 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
558 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
559 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
560 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
561 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
562 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
563 Use FUTEX_WAKE_OP.
564 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
565 kernel-features.h and tcb-offsets.h.
566 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
567 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
568 process private.
569 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
570 tcb-offsets.h.
571 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
572 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
573 process private.
574 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
575 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
576 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
577 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
578 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
579 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
580 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
581
702a9414
JJ
5822007-08-14 Jakub Jelinek <jakub@redhat.com>
583
467d1345
JJ
584 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
585 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
586 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
587 lll_futex_timed_wait.
588
702a9414
JJ
589 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
590 __lll_robust_unlock): Rewrite as macros instead of inline functions.
591 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
592 __lll_robust_unlock, __lll_wait_tid): Likewise.
593
22502ea2
UD
5942007-08-13 Jakub Jelinek <jakub@redhat.com>
595
596 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
597 Fix a pasto.
598 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
599 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
600 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
601 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
602 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
603 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
604 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
605 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
606 kernel-features.h.
607 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
608 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
609 process private. Switch DW_CFA_advance_loc1 and some
610 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
611 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
612 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
613 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
614 process private. Switch DW_CFA_advance_loc{1,2} and some
615 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
616 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
617 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
618 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
619 Likewise.
620 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
621 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
622 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
623 Likewise.
624 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
625 (__pthread_cond_broadcast): Compare %r8 instead of
626 dep_mutex-cond_*(%rdi) with $-1.
627 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
628 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
629 of oring.
630
4baf59ad
UD
6312007-08-13 Ulrich Drepper <drepper@redhat.com>
632
633 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
634
9c6f6953
UD
6352007-08-13 Jakub Jelinek <jakub@redhat.com>
636
637 * allocatestack.c: Include kernel-features.h.
638 * pthread_create.c: Likewise.
639 * pthread_mutex_init.c: Likewise.
640 * init.c: Likewise.
641 * pthread_cond_timedwait.c: Likewise.
642 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
643 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
644 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
645 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
646 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
647 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
648 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
649 Likewise.
650 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
651 Likewise.
652 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
653 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
654 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
655 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
656
974a1f0f
UD
6572007-08-12 Jakub Jelinek <jakub@redhat.com>
658
659 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
660 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
661 byte elements. One of them is the new __shared element.
662 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
663 adjust names of other padding elements.
664 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
665 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
666 byte elements. One of them is the new __shared element.
667 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
668 adjust names of other padding elements.
669 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
670 Renamed __pad1 element to __shared, adjust names of other padding
671 elements.
672 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
673 (pthread_rwlock_t): Likewise.
674 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
675 typo.
676
6772007-08-09 Anton Blanchard <anton@samba.org>
678
679 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
680
f47e2626
UD
6812007-08-12 Ulrich Drepper <drepper@redhat.com>
682
683 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
684 <kernel-features.h>.
685 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
686
5bd8a249
UD
6872007-08-11 Ulrich Drepper <drepper@redhat.com>
688
689 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
690 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
691 dealing with robust mutexes.
692 * pthread_mutex_timedlock.c: Likewise.
693 * pthread_mutex_trylock.c: Likewise.
694 * pthread_mutex_unlock.c: Likewise.
695 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
696
6972007-08-06 Jakub Jelinek <jakub@redhat.com>
698
699 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
700 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
701 (PTHREAD_MUTEX_PSHARED): Define.
702 * pthread_mutex_init.c (__pthread_mutex_init): Set
703 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
704 mutexes.
705 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
706 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
707 as second argument to lll_lock.
708 (LLL_MUTEX_TRYLOCK): Take mutex as argument
709 instead of its __data.__lock field.
710 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
711 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
712 to lll_robust_lock.
713 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
714 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
715 instead of mutex->__data.__kind directly, pass
716 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
717 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
718 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
719 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
720 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
721 to lll_timedlock, lll_robust_timedlock, lll_unlock and
722 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
723 of mutex->__data.__kind directly.
724 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
725 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
726 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
727 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
728 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
729 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
730 and lll_futex_wake.
731 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
732 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
733 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
734 directly.
735 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
736 Take mutex as argument instead of its __data.__lock field, pass
737 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
738 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
739 __data.__lock field.
740 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
741 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
742 to lll_robust_cond_lock.
743 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
744 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
745 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
746 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
747 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
748 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
749 lll_futex_wait.
750 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
751 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
752 lll_futex_wake.
753 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
754 pshared variable, pass it to lll_lock, lll_unlock,
755 lll_futex_timedwait and lll_futex_wake.
756 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
757 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
758 and lll_futex_wake.
759 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
760 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
761 macro.
762 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
763 lll_futex_wake_unlock): Likewise.
764 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
765 Likewise.
766 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
767 lll_futex_wake_unlock): Likewise.
768 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
769 Likewise.
770 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
771 lll_futex_wake_unlock): Likewise.
772 (lll_futex_wake): Fix a typo.
773 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
774 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
775 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
776 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
777 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
778 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
779 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
780 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
781 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
782 (__pthread_cond_timedwait): Likewise.
783 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
784 (__condvar_cleanup, __pthread_cond_wait): Likewise.
785
0470fa46
JJ
7862007-08-05 Jakub Jelinek <jakub@redhat.com>
787
788 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
789 Don't use CGOTSETUP and CGOTRESTORE macros.
790 (CGOTSETUP, CGOTRESTORE): Remove.
791 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
792 @local symbol.
793
64f6281c
UD
7942007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
795
796 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
797 definitions for private futexes.
798 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
799 kernel-features.h and lowlevellock.h. Use private futexes if
800 they are available.
801 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
802 (__lll_mutex_lock_wait): Rename to
803 (__lll_lock_wait): ... this. Don't compile in for libc.so.
804 (__lll_mutex_timedlock_wait): Rename to ...
805 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
806 Don't compile in for libc.so.
807 (__lll_mutex_unlock_wake): Rename to ...
808 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
809 (__lll_timedwait_tid): Use __NR_gettimeofday.
810 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
811 the header from assembler. Renamed all lll_mutex_* resp.
812 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
813 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
814 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
815 Define.
816 (__lll_lock_wait_private): Add prototype.
817 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
818 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
819 __lll_unlock_wake): Likewise.
820 (lll_lock): Add private argument. Call __lll_lock_wait_private
821 if private is constant LLL_PRIVATE.
822 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
823 lll_timedlock, lll_robust_timedlock): Add private argument.
824 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
825 if private is constant LLL_PRIVATE.
826 (lll_robust_unlock, lll_robust_dead): Add private argument.
827 (lll_lock_t): Remove.
828 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
829 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
830 lll_cond_wake, lll_cond_broadcast): Remove.
831 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
832 kernel-features.h and lowlevellock.h.
833 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
834 (LOAD_FUTEX_WAIT): Define.
835 (__lll_robust_mutex_lock_wait): Rename to ...
836 (__lll_robust_lock_wait): ... this. Add private argument.
837 Use LOAD_FUTEX_WAIT macro.
838 (__lll_robust_mutex_timedlock_wait): Rename to ...
839 (__lll_robust_timedlock_wait): ... this. Add private argument.
840 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
841 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
842 lowlevellock.h.
843 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
844 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
845 __lll_mutex_{lock,unlock}_*.
846 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
847 lowlevellock.h and pthread-errnos.h.
848 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
849 FUTEX_CMP_REQUEUE, EINVAL): Remove.
850 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
851 __lll_mutex_{lock,unlock}_*.
852 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
853 lowlevellock.h and pthread-errnos.h.
854 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
855 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
856 __lll_mutex_{lock,unlock}_*.
857 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
858 lowlevellock.h.
859 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
860 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
861 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
862 (__condvar_tw_cleanup): Likewise.
863 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
864 lowlevellock.h.
865 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
866 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
867 __lll_mutex_{lock,unlock}_*.
868 ( __condvar_w_cleanup): Likewise.
869 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
870 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
871 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
872 lowlevellock.h.
873 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
874 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
875 __lll_mutex_{lock,unlock}_*.
876 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
877 lowlevellock.h.
878 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
879 FUTEX_PRIVATE_FLAG): Remove.
880 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
881 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
882 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
883 lowlevellock.h.
884 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
885 FUTEX_PRIVATE_FLAG): Remove.
886 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
887 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
888 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
889 lowlevellock.h.
890 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
891 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
892 __lll_mutex_{lock,unlock}_*.
893 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
894 lowlevellock.h.
895 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
896 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
897 __lll_mutex_{lock,unlock}_*.
898 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
899 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
900 (__new_sem_post): Use standard initial exec code sequences.
901 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
902 lowlevellock.h.
903 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
904 FUTEX_PRIVATE_FLAG): Remove.
905 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
906 exec code sequences.
907 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
908 (__new_sem_trywait): Use standard initial exec code sequences.
909 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
910 (__new_sem_wait): Use standard initial exec code sequences.
911
e51deae7
UD
9122007-07-31 Anton Blanchard <anton@samba.org>
913
914 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
915 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
916 atomic_full_barrier.
917
9182007-07-31 Jakub Jelinek <jakub@redhat.com>
919
920 * allocatestack.c (stack_cache_lock): Change type to int.
921 (get_cached_stack, allocate_stack, __deallocate_stack,
922 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
923 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
924 as second argument to lll_lock and lll_unlock macros on
925 stack_cache_lock.
926 * pthread_create.c (__find_in_stack_list): Likewise.
927 (start_thread): Similarly with pd->lock. Use lll_robust_dead
928 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
929 as second argument.
930 * descr.h (struct pthread): Change lock and setxid_futex field
931 type to int.
932 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
933 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
934 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
935 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
936 Likewise.
937 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
938 * pthread_cond_init.c (__pthread_cond_init): Likewise.
939 * pthreadP.h (__attr_list_lock): Change type to int.
940 * pthread_attr_init.c (__attr_list_lock): Likewise.
941 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
942 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
943 lll_{,un}lock.
944 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
945 also for lll_futex_{wake,wait}.
946 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
947 a pointer to const.
948 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
949 LLL_SHARED as second argument to lll_{,un}lock.
950 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
951 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
952 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
953 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
954 Likewise.
955 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
956 as second argument to lll_{,un}lock macros on pd->lock.
957 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
958 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
959 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
960 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
961 Likewise.
962 * sysdeps/pthread/createthread.c (do_clone, create_thread):
963 Likewise.
964 * pthread_once.c (once_lock): Change type to int.
965 (__pthread_once): Pass LLL_PRIVATE as second argument to
966 lll_{,un}lock macros on once_lock.
967 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
968 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
969 rwlock->__data.__shared as second argument to them and similarly
970 for lll_futex_w*.
971 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
972 Likewise.
973 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
974 Likewise.
975 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
976 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
977 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
978 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
979 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
980 to lll_{,un}lock macros on __sem_mappings_lock.
981 * sem_open.c (check_add_mapping): Likewise.
982 (__sem_mappings_lock): Change type to int.
983 * semaphoreP.h (__sem_mappings_lock): Likewise.
984 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
985 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
986 instead of lll_*mutex_*, pass LLL_SHARED as last
987 argument.
988 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
989 pass LLL_SHARED as last argument.
990 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
991 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
992 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
993 pass LLL_SHARED as last argument.
994 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
995 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
996 LLL_SHARED as last argument.
997 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
998 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
999 Similarly.
1000 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1001 __libc_lock_lock_recursive, __libc_lock_unlock,
1002 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1003 argument to lll_{,un}lock.
1004 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1005 _IO_lock_unlock): Likewise.
1006 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1007 compound literal.
1008 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1009 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1010 __fork_lock.
1011 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1012 free_mem): Likewise.
1013 (__fork_lock): Change type to int.
1014 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1015 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1016 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1017 lll_futex_wake.
1018 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1019 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1020 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1021 New function.
1022 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1023 pass it through to lll_futex_*wait, only compile in when
1024 IS_IN_libpthread.
1025 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1026 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1027 argument and pass it through to lll_futex_*wait.
1028 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1029 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1030 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1031 inline functions to __lll_* resp. __lll_robust_*.
1032 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1033 (lll_mutex_dead): Add private argument.
1034 (__lll_lock_wait_private): New prototype.
1035 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1036 __lll_robust_lock_timedwait): Add private argument to prototypes.
1037 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1038 call __lll_lock_wait_private, otherwise pass private to
1039 __lll_lock_wait.
1040 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1041 __lll_robust_timedlock): Add private argument, pass it to
1042 __lll_*wait functions.
1043 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1044 call __lll_unlock_wake_private, otherwise pass private to
1045 __lll_unlock_wake.
1046 (__lll_robust_unlock): Add private argument, pass it to
1047 __lll_robust_unlock_wake.
1048 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1049 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1050 argument, pass it through to __lll_* inline function.
1051 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1052 (lll_lock_t): Remove.
1053 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1054 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1055 lll_cond_wake, lll_cond_broadcast): Remove.
1056 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1057 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1058 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1059 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1060 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1061 the header from assembler. Renamed all lll_mutex_* resp.
1062 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1063 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1064 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1065 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1066 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1067 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1068 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1069 Remove prototype.
1070 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1071 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1072 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1073 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1074 MULTIPLE_THREADS_OFFSET as another asm operand.
1075 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1076 MULTIPLE_THREADS_OFFSET as last asm operand, call
1077 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1078 otherwise pass private as another argument to __lll_lock_wait.
1079 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1080 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1081 private as another argument to __lll_*lock_wait call.
1082 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1083 MULTIPLE_THREADS_OFFSET as another asm operand, call
1084 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1085 otherwise pass private as another argument to __lll_unlock_wake.
1086 (lll_robust_unlock): Add private argument, pass private as another
1087 argument to __lll_unlock_wake.
1088 (lll_robust_dead): Add private argument, use __lll_private_flag
1089 macro.
1090 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1091 LLL_MUTEX_LOCK_INITIALIZER.
1092 (lll_lock_t): Remove.
1093 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1094 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1095 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1096 lll_cond_wake, lll_cond_broadcast): Remove.
1097 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1098 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1099 2007-05-2{3,9} changes.
1100 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1101 kernel-features.h and lowlevellock.h.
1102 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1103 (LOAD_FUTEX_WAIT): Rewritten.
1104 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1105 define.
1106 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1107 (__lll_mutex_lock_wait): Rename to ...
1108 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1109 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1110 (__lll_mutex_timedlock_wait): Rename to ...
1111 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1112 contains private argument. Don't compile in for libc.so.
1113 (__lll_mutex_unlock_wake): Rename to ...
1114 (__lll_unlock_wake): ... this. %ecx contains private argument.
1115 Don't compile in for libc.so.
1116 (__lll_timedwait_tid): Use __NR_gettimeofday.
1117 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1118 kernel-features.h and lowlevellock.h.
1119 (LOAD_FUTEX_WAIT): Define.
1120 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1121 define.
1122 (__lll_robust_mutex_lock_wait): Rename to ...
1123 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1124 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1125 macro.
1126 (__lll_robust_mutex_timedlock_wait): Rename to ...
1127 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1128 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1129 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1130 lowlevellock.h.
1131 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1132 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1133 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1134 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1135 to __lll_lock_wait in %edx.
1136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1137 Include lowlevellock.h and pthread-errnos.h.
1138 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1139 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1140 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1141 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1142 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1143 __lll_unlock_wake.
1144 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1145 Include lowlevellock.h and pthread-errnos.h.
1146 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1147 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1148 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1149 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1150 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1151 __lll_unlock_wake.
1152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1153 Include lowlevellock.h.
1154 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1155 Don't define.
1156 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1157 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1158 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1159 __lll_unlock_wake. Use __NR_gettimeofday.
1160 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1161 Include lowlevellock.h.
1162 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1163 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1164 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1165 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1166 and __lll_unlock_wake.
1167 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1168 Include lowlevellock.h.
1169 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1170 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1171 MUTEX(%ebx) address in %edx rather than %ecx to
1172 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1173 and __lll_unlock_wake. Move return value from %ecx to %edx
1174 register.
1175 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1176 Include lowlevellock.h.
1177 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1178 Don't define.
1179 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1180 MUTEX(%ebp) address in %edx rather than %ecx to
1181 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1182 and __lll_unlock_wake. Move return value from %ecx to %edx
1183 register. Use __NR_gettimeofday.
1184 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1185 Include lowlevellock.h.
1186 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1187 Don't define.
1188 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1189 MUTEX(%ebp) address in %edx rather than %ecx to
1190 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1191 and __lll_unlock_wake. Move return value from %ecx to %edx
1192 register. Use __NR_gettimeofday.
1193 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1194 Include lowlevellock.h.
1195 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1196 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1197 MUTEX(%edi) address in %edx rather than %ecx to
1198 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1199 and __lll_unlock_wake.
1200 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1201 Include lowlevellock.h.
1202 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1203 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1204 MUTEX(%ebx) address in %edx rather than %ecx to
1205 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1206 and __lll_unlock_wake. Move return value from %ecx to %edx
1207 register.
1208 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1209 lowlevellock.h.
1210 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1211 define.
1212 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1213 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1214 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1215 lowlevellock.h.
1216 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1217 (sem_timedwait): Use __NR_gettimeofday.
1218 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1219 lowlevellock.h.
1220 (LOCK): Don't define.
1221 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1222 lowlevellock.h.
1223 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1224 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1225 are waiters.
1226 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1227 2007-05-2{3,9} changes.
1228 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1229 kernel-features.h and lowlevellock.h.
1230 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1231 (LOAD_FUTEX_WAIT): Rewritten.
1232 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1233 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1234 (__lll_mutex_lock_wait): Rename to ...
1235 (__lll_lock_wait): ... this. %esi is now private argument.
1236 Don't compile in for libc.so.
1237 (__lll_mutex_timedlock_wait): Rename to ...
1238 (__lll_timedlock_wait): ... this. %esi contains private argument.
1239 Don't compile in for libc.so.
1240 (__lll_mutex_unlock_wake): Rename to ...
1241 (__lll_unlock_wake): ... this. %esi contains private argument.
1242 Don't compile in for libc.so.
1243 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1244 kernel-features.h and lowlevellock.h.
1245 (LOAD_FUTEX_WAIT): Define.
1246 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1247 (__lll_robust_mutex_lock_wait): Rename to ...
1248 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1249 Use LOAD_FUTEX_WAIT macro.
1250 (__lll_robust_mutex_timedlock_wait): Rename to ...
1251 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1252 private, use LOAD_FUTEX_WAIT macro.
1253 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1254 lowlevellock.h.
1255 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1256 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1257 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1258 __lll_lock_wait and __lll_unlock_wake.
1259 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1260 Include lowlevellock.h and pthread-errnos.h.
1261 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1262 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1263 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1264 pass LLL_SHARED in %esi to both __lll_lock_wait and
1265 __lll_unlock_wake.
1266 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1267 Include lowlevellock.h and pthread-errnos.h.
1268 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1269 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1270 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1271 pass LLL_SHARED in %esi to both __lll_lock_wait and
1272 __lll_unlock_wake.
1273 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1274 Include lowlevellock.h.
1275 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1276 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1277 pass LLL_SHARED in %esi to both __lll_lock_wait and
1278 __lll_unlock_wake.
1279 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1280 Include lowlevellock.h.
1281 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1282 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1283 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1284 and __lll_unlock_wake.
1285 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1286 Include lowlevellock.h.
1287 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1288 Don't define.
1289 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1290 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1291 and __lll_unlock_wake.
1292 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1293 Include lowlevellock.h.
1294 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1295 Don't define.
1296 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1297 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1298 and __lll_unlock_wake.
1299 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1300 Include lowlevellock.h.
1301 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1302 Don't define.
1303 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1304 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1305 and __lll_unlock_wake.
1306 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1307 Include lowlevellock.h.
1308 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1309 Don't define.
1310 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1311 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1312 and __lll_unlock_wake.
1313 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1314 Include lowlevellock.h.
1315 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1316 Don't define.
1317 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1318 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1319 and __lll_unlock_wake.
1320 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1321 lowlevellock.h.
1322 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1323 define.
1324 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1325 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1326 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1327 lowlevellock.h.
1328 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1329 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1330 lowlevellock.h.
1331 (LOCK): Don't define.
1332 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1333 lowlevellock.h.
1334 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1335 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1336 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1337 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1338 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1339 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1340 (__lll_lock_wait_private): New function.
1341 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1342 it to lll_futex_*wait. Don't compile in for libc.so.
1343 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1344 Remove.
1345 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1346 (struct sparc_pthread_barrier): Remove.
1347 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1348 struct sparc_pthread_barrier. Pass
1349 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1350 and lll_futex_wait macros.
1351 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1352 Remove.
1353 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1354 Include sparc pthread_barrier_wait.c instead of generic one.
1355
6f59d56e
UD
13562007-07-30 Jakub Jelinek <jakub@redhat.com>
1357
1475e201
UD
1358 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1359
6f59d56e
UD
1360 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1361 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1362 %ecx.
1363 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1364 (pthread_rwlock_timedwrlock): Likewise.
1365 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1366 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1367
558f0300
JJ
13682007-07-31 Jakub Jelinek <jakub@redhat.com>
1369
1370 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1371
cedb4109
UD
13722007-07-26 Jakub Jelinek <jakub@redhat.com>
1373
1374 * tst-locale2.c (useless): Add return statement.
1375
085a4412
UD
13762007-07-24 Jakub Jelinek <jakub@redhat.com>
1377
1378 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1379 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1380 * pthread_create.c (start_thread): Likewise.
1381 * init.c (sighandler_setxid): Likewise.
1382 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1383 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1384 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1385 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1386 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1387 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1388 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1389 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1390 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1391 Likewise.
1392 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1393 Likewise.
1394 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1395 Likewise.
1396 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1397 __rtld_notify): Likewise.
1398 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1399 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1400 __pthread_once): Likewise.
1401 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1402 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1403 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1404 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1405 (lll_futex_wait): Add private argument, define as wrapper around
1406 lll_futex_timed_wait.
1407 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1408 use __lll_private_flag macro.
1409 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1410 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1411 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1412 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1413 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1414 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1415 (lll_futex_wait): Add private argument, define as wrapper around
1416 lll_futex_timed_wait.
1417 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1418 use __lll_private_flag macro.
1419 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1420 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1421 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1422 Define.
1423 (lll_futex_timed_wait, lll_futex_wake): Use it.
1424 (lll_private_futex_wait, lll_private_futex_timed_wait,
1425 lll_private_futex_wake): Removed.
1426 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1427 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1428 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1429 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1430 (lll_futex_wait): Add private argument, define as wrapper around
1431 lll_futex_timed_wait.
1432 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1433 use __lll_private_flag macro.
1434 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1435 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1436 to lll_futex_*.
1437 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1438 (lll_private_futex_wait, lll_private_futex_timed_wait,
1439 lll_private_futex_wake): Removed.
1440 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1441 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1442 (lll_private_futex_wait, lll_private_futex_timed_wait,
1443 lll_private_futex_wake): Removed.
1444 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1445 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1446 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1447 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1448 (lll_futex_wait): Add private argument, define as wrapper around
1449 lll_futex_timed_wait.
1450 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1451 use __lll_private_flag macro.
1452 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1453 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1454 to lll_futex_*.
1455 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1456 Define.
1457 (lll_futex_timed_wait, lll_futex_wake): Use it.
1458 (lll_private_futex_wait, lll_private_futex_timed_wait,
1459 lll_private_futex_wake): Removed.
1460
ef0af159
JJ
14612007-07-27 Jakub Jelinek <jakub@redhat.com>
1462
1463 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1464 of the structure for sparc32.
1465
14662007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1467
1468 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1469
eb4f5909
UD
14702007-07-23 Ulrich Drepper <drepper@redhat.com>
1471
1472 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1473 code used when private futexes are assumed.
1474 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1475 Likewise.
1476
b5f13526
UD
14772007-07-23 Jakub Jelinek <jakub@redhat.com>
1478
1479 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1480 (__lll_private_flag): Define.
1481 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1482 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1483 __lll_private_flag.
1484 (lll_private_futex_wait, lll_private_futex_timedwait,
1485 lll_private_futex_wake): Define as wrapper around non-_private
1486 macros.
1487 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1488 (__lll_private_flag): Define.
1489 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1490 (lll_private_futex_wait, lll_private_futex_timedwait,
1491 lll_private_futex_wake): Define as wrapper around non-_private
1492 macros.
1493
eb7721f2
UD
14942007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1495
1496 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1497 parameter to lll_futex_wait call.
1498 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1499
1500 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1501 Replace lll_futex_wait with lll_private_futex_wait.
1502 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1503 Add LLL_SHARED parameter to lll_futex_wake().
1504
1505 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1506 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1507 lll_private_futex_wake.
1508 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1509 bit from private parm before syscall.
1510 (lll_futex_timed_wait): Likewise.
1511 (lll_futex_wake): Likewise.
1512 (lll_futex_wake_unlock): Likewise.
1513 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1514 (lll_robust_mutex_unlock): Likewise.
1515 (lll_mutex_unlock_force): Likewise.
1516 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1517
defc45f2
UD
15182007-07-23 Ulrich Drepper <drepper@redhat.com>
1519
1520 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1521 compilation when unconditionally using private futexes.
1522 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1523 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1524 Likewise.
1525 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1526 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1527
087722b8
UD
15282007-07-17 Jakub Jelinek <jakub@redhat.com>
1529
1530 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1531 Define.
1532
765c6b0c
UD
15332007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1534
1535 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1536 kernel-features.h.
1537
7d9d8bd1
RM
15382007-05-16 Roland McGrath <roland@redhat.com>
1539
1540 * init.c (__nptl_initial_report_events): New variable.
1541 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1542 to that.
1543
a4915df2
UD
15442007-06-22 Jakub Jelinek <jakub@redhat.com>
1545
1546 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1547 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1548
e4eb675d
UD
15492007-06-19 Ulrich Drepper <drepper@redhat.com>
1550
1551 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1552 implementation.
1553
ae1ad3ae
UD
15542007-06-18 Ulrich Drepper <drepper@redhat.com>
1555
1556 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1557 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1558 * pthread_mutex_timedlock.c: Likewise.
1559 * pthread_mutex_trylock.c: Likewise.
1560 * pthread_mutex_unlock.c: Likewise.
1561
89074592
UD
15622007-06-17 Andreas Schwab <schwab@suse.de>
1563
1564 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1565 sections.
1566
d4201cc4
UD
15672007-06-17 Ulrich Drepper <drepper@redhat.com>
1568
1569 * allocatestack.c (allocate_stack): Make code compile if
1570 __ASSUME_PRIVATE_FUTEX is set.
1571
339dbf0e
UD
15722007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1573
1574 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1575 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1576 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1577 (__pthread_rwlock_wrlock): Likewise.
1578 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1579 (pthread_rwlock_timedrdlock): Likewise.
1580 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1581 (pthread_rwlock_timedwrlock): Likewise.
1582 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1583 (__pthread_rwlock_unlock): Likewise.
1584
15852007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1586
1587 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1588 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1589 Split __flags into __flags, __shared, __pad1 and __pad2.
1590 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1591 futexes if they are available.
1592 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1593 in libc-lowlevellock.S allow using private futexes.
1594 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1595 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1596 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1597 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1598 lll_private_futex_timed_wait and lll_private_futex_wake.
1599 (lll_robust_mutex_unlock): Fix typo.
1600 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1601 field in futex command setup.
1602 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1603 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1604 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1605 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1606 if they are available. Remove clear_once_control.
1607 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1608 futexes if they are available.
1609 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1610 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1611 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1612 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1613 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1614 Wake only when there are waiters.
1615 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1616 support. Indicate that there are waiters. Remove unnecessary
1617 extra cancellation test.
1618 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1619 left-over duplication of __sem_wait_cleanup.
1620
26f56c1c
UD
16212007-06-07 Ulrich Drepper <drepper@redhat.com>
1622
1623 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1624 parameter to lll_futex_wait, lll_futex_timed_wait, and
1625 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1626 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1627 lll_private_futex_wake.
1628 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1629 * allocatestack.c: Adjust use of lll_futex_* macros.
1630 * init.c: Likewise.
1631 * lowlevellock.h: Likewise.
1632 * pthread_barrier_wait.c: Likewise.
1633 * pthread_cond_broadcast.c: Likewise.
1634 * pthread_cond_destroy.c: Likewise.
1635 * pthread_cond_signal.c: Likewise.
1636 * pthread_cond_timedwait.c: Likewise.
1637 * pthread_cond_wait.c: Likewise.
1638 * pthread_create.c: Likewise.
1639 * pthread_mutex_lock.c: Likewise.
1640 * pthread_mutex_setprioceiling.c: Likewise.
1641 * pthread_mutex_timedlock.c: Likewise.
1642 * pthread_mutex_unlock.c: Likewise.
1643 * pthread_rwlock_timedrdlock.c: Likewise.
1644 * pthread_rwlock_timedwrlock.c: Likewise.
1645 * pthread_rwlock_unlock.c: Likewise.
1646 * sysdeps/alpha/tls.h: Likewise.
1647 * sysdeps/i386/tls.h: Likewise.
1648 * sysdeps/ia64/tls.h: Likewise.
1649 * sysdeps/powerpc/tls.h: Likewise.
1650 * sysdeps/pthread/aio_misc.h: Likewise.
1651 * sysdeps/pthread/gai_misc.h: Likewise.
1652 * sysdeps/s390/tls.h: Likewise.
1653 * sysdeps/sh/tls.h: Likewise.
1654 * sysdeps/sparc/tls.h: Likewise.
1655 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1656 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1657 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1658 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1659 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1660 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1661 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1662 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1663 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1664 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1665 Likewise.
1666 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1667 * sysdeps/x86_64/tls.h: Likewise.
1668
ee5d5755
UD
16692007-05-29 Ulrich Drepper <drepper@redhat.com>
1670
b03b0c29
UD
1671 * pthread_getattr_np.c: No need to install a cancellation handler,
1672 this is no cancellation point.
1673 * pthread_getschedparam.c: Likewise.
1674 * pthread_setschedparam.c: Likewise.
1675 * pthread_setschedprio.c: Likewise.
1676 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1677 lll_unlock_wake_cb.
1678 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1679 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1680 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1681 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1682 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1683 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1684 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1685 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1686 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1687 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1688 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1689 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 1690
0154658d
UD
1691 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1692 whether there are more than one thread makes no sense here since
1693 we only call the slow path if the locks are taken.
1694 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1695
ee5d5755
UD
1696 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1697 COND_NWAITERS_SHIFT.
1698 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1699 COND_CLOCK_BITS.
1700 * pthread_cond_init.c: Likewise.
1701 * pthread_cond_timedwait.c: Likewise.
1702 * pthread_cond_wait.c: Likewise.
1703 * pthread_condattr_getclock.c: Likewise.
1704 * pthread_condattr_setclock.c: Likewise.
1705 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1706 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1707 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1708 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1709 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1710
991fa82b
UD
17112007-05-28 Jakub Jelinek <jakub@redhat.com>
1712
40f57573
UD
1713 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1714 unistd.h.
1715
991fa82b
UD
1716 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1717 insn suffix.
1718 (THREAD_GSCOPE_GET_FLAG): Remove.
1719 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1720 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1721 changes.
1722 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1723 (THREAD_GSCOPE_GET_FLAG): Remove.
1724 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1725 instead of THREAD_GSCOPE_GET_FLAG.
1726 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1727 it.
1728 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1729 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1730 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1731 THREAD_GSCOPE_WAIT): Define.
1732 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1733 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1734 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1735 THREAD_GSCOPE_WAIT): Define.
1736 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1737 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1738 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1739 THREAD_GSCOPE_WAIT): Define.
1740 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1741 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1742 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1743 THREAD_GSCOPE_WAIT): Define.
1744
17452007-05-24 Richard Henderson <rth@redhat.com>
1746
1747 * descr.h (struct pthread): Add header.gscope_flag.
1748 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1749 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1750 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1751 THREAD_GSCOPE_WAIT): Define.
1752
e59660bc
UD
17532007-05-27 Ulrich Drepper <drepper@redhat.com>
1754
1755 * init.c: Make it compile with older kernel headers.
1756
1757 * tst-initializers1.c: Show through exit code which test failed.
1758
1759 * pthread_rwlock_init.c: Also initialize __shared field.
1760 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1761 element in rwlock structure into four byte elements. One of them is
1762 the new __shared element.
1763 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1764 Likewise.
cd0dbd89 1765 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
1766 __shared, adjust names of other padding elements.
1767 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1768 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1769 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1770 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1771 FUTEX_PRIVATE_FLAG.
1772 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1773 futex to use private operations if possible.
1774 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1775 Likewise.
1776 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1777 Likewise.
1778 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1779 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
1780 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1781 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1782 Likewise.
1783 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1784 Likewise.
1785 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1786 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 1787
d8ff3792
UD
17882007-05-26 Ulrich Drepper <drepper@redhat.com>
1789
546346b6
UD
1790 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1791 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1792 * pthread_rwlock_timedrdlock.c: Likewise.
1793 * pthread_rwlock_tryrdlock.c: Likewise.
1794
a2dd3360
UD
1795 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1796 optimization.
1797
6df7ffad
UD
1798 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1799 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1800 duplication of __sem_wait_cleanup.
1801
1802 * allocatestack.c: Revert last change.
1803 * init.c: Likewise.
1804 * sysdeps/i386/tls.h: Likewise.
1805 * sysdeps/x86_64/tls.h: Likewise.
1806 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1807 header structure.
1808 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1809
d8ff3792
UD
1810 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1811 Add private field.
1812 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1813 * pthread_barrier_init.c: Set private flag if pshared and private
1814 futexes are supported.
1815 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1816 private field in futex command setup.
1817 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1818
3d2dd6ca
UD
18192007-05-25 Ulrich Drepper <drepper@redhat.com>
1820
42e6c665
UD
1821 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1822 support.
1823 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1824 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1825 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1826 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1827 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1828
3d2dd6ca
UD
1829 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1830 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1831 fields in the structure.
1832 (__old_sem_init): New function.
1833 * sem_open.c: Initialize all fields of the structure.
1834 * sem_getvalue.c: Adjust for renamed element.
1835 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1836 (gen-as-const-headers): Add structsem.sym.
1837 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1838 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1839 struct new_sem. Add struct old_sem.
1840 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1841 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1842 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1843 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1844 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1845 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1846 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1847 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1848 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1849 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1850 * tst-sem10.c: New file.
1851 * tst-sem11.c: New file.
1852 * tst-sem12.c: New file.
1853 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1854 of struct sem.
1855
20a4d722
JJ
18562007-05-25 Ulrich Drepper <drepper@redhat.com>
1857 Jakub Jelinek <jakub@redhat.com>
1858
1859 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1860 Move __pthread_enable_asynccancel right before futex syscall.
1861 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1862 Likewise.
1863
18642007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
1865
1866 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1867 THREAD_COPY_PRIVATE_FUTEX): Define.
1868 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1869 THREAD_COPY_PRIVATE_FUTEX): Define.
1870 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1871 * init.c (__pthread_initialize_minimal_internal): Use
1872 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
1873
1874 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1875 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1876 THREAD_GSCOPE_FLAG_WAIT): Define.
1877 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1878 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1879 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1880 PTR_DEMANGLE.
1881 (THREAD_GSCOPE_GET_FLAG): Define.
1882 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1883 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1884 instead of ->header.gscope_flag directly.
1885
5a8075b1
UD
18862007-05-23 Ulrich Drepper <drepper@redhat.com>
1887
1888 * init.c (__pthread_initialize_minimal_internal): Check whether
1889 private futexes are available.
1890 * allocatestack.c (allocate_stack): Copy private_futex field from
1891 current thread into the new stack.
1892 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1893 futexes if they are available.
1894 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1895 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1896 in libc-lowlevellock.S allow using private futexes.
1897 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1898 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1899 FUTEX_PRIVATE_FLAG.
1900 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1901 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1902 if they are available.
1903 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1904 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1905 * sysdeps/i386/tcb-offsets.sym: Likewise.
1906 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1907 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1908
6d59823c
UD
19092007-05-21 Ulrich Drepper <drepper@redhat.com>
1910
1911 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1912 Remove ptr_wait_lookup_done again.
1913 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1914 (__pthread_initialize_minimal_internal): Initialize
1915 _dl_wait_lookup_done pointer in _rtld_global directly.
1916 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1917 Remove code to code _dl_wait_lookup_done.
1918 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1919 encrypted for now.
1920
2c9718f3
JJ
19212007-05-21 Jakub Jelinek <jakub@redhat.com>
1922
1923 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1924 pthread_mutex_init failed with ENOTSUP.
1925
df94b641
UD
19262007-05-19 Ulrich Drepper <drepper@redhat.com>
1927
1928 * allocatestack.c (__wait_lookup_done): New function.
1929 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1930 Add ptr_wait_lookup_done.
1931 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1932 * pthreadP.h: Declare __wait_lookup_done.
1933 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1934 Define macros to implement reference handling of global scope.
1935 * sysdeps/x86_64/tls.h: Likewise.
1936 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1937 Initialize GL(dl_wait_lookup_done).
1938
bec51a30
UD
19392007-05-17 Ulrich Drepper <drepper@redhat.com>
1940
113ad5fc
UD
1941 [BZ #4512]
1942 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1943 is detected.
1944 * pthread_mutex_timedlock.c: Likewise.
1945 * pthread_mutex_trylock.c: Likewise.
1946 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1947
1948 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1949 * tst-robust9.c: New file.
1950 * tst-robustpi9.c: New file.
1951
bec51a30
UD
1952 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1953 unnecessary extra cancellation test.
1954
83d87915
UD
19552007-05-14 Ulrich Drepper <drepper@redhat.com>
1956
83d87915
UD
1957 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1958 extra cancellation test.
1959 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1960
3771196d
UD
19612007-05-10 Ulrich Drepper <drepper@redhat.com>
1962
341c566f
UD
1963 * descr.h (struct pthread): Rearrange members to fill hole in
1964 64-bit layout.
1965
3771196d
UD
1966 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1967 (__pthread_setaffinity_new): If syscall was successful and
1968 RESET_VGETCPU_CACHE is defined, use it before returning.
1969 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1970
7d29b542
JJ
19712007-05-10 Jakub Jelinek <jakub@redhat.com>
1972
1973 [BZ #4455]
1974 * tst-align2.c: Include stackinfo.h.
1975 * tst-getpid1.c: Likewise.
1976
16105fe0
UD
19772007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1978
29c113f0
UD
1979 [BZ #4455]
1980 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1981 * tst-getpid1.c (do_test): Likewise.
1982
16105fe0
UD
1983 [BZ #4456]
1984 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1985 (allocate_stack): Likewise.
1986
6780bc44
UD
19872007-05-07 Ulrich Drepper <drepper@redhat.com>
1988
1989 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1990 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1991 (__lll_robust_timedlock_wait): Likewise.
1992 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1993
aa75f64c
UD
19942007-05-06 Mike Frysinger <vapier@gentoo.org>
1995
15eca720 1996 [BZ #4465]
aa75f64c
UD
1997 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1998 * tst-cancel4.c (tf_fdatasync): New test.
1999
f672076e
UD
20002007-04-27 Ulrich Drepper <drepper@redhat.com>
2001
1bb5f5a1
UD
2002 [BZ #4392]
2003 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2004 check mutexes like normal mutexes.
2005
f672076e
UD
2006 [BZ #4306]
2007 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2008 Initialize the whole sigevent structure to appease valgrind.
2009
bce20b9a
UD
20102007-04-25 Ulrich Drepper <drepper@redhat.com>
2011
2012 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2013 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2014
0c786eac
UD
20152007-04-06 Ulrich Drepper <drepper@redhat.com>
2016
2017 * tst-locale1.c: Avoid warnings.
2018 * tst-locale2.c: Likewise.
2019
e1f0c5bc
UD
20202007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2021
2022 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2023 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2024
965cba04
UD
20252007-03-16 Jakub Jelinek <jakub@redhat.com>
2026
2027 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2028 __extern_always_inline where appropriate.
2029 * sysdeps/pthread/pthread.h: Likewise.
2030
a5ea509b
RH
20312007-03-13 Richard Henderson <rth@redhat.com>
2032
2033 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2034 separate cfi regions for the two subsections.
2035
00a1430e
UD
20362007-02-25 Ulrich Drepper <drepper@redhat.com>
2037
2038 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2039 new thread, don't just decrement it.
2040 Patch by Suzuki K P <suzuki@in.ibm.com>.
2041
63a2f305
UD
20422007-02-21 Ulrich Drepper <drepper@redhat.com>
2043
2044 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2045 PTHFCT_CALL definition.
2046
2484468b
UD
20472007-02-18 Ulrich Drepper <drepper@redhat.com>
2048
2049 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2050 available, don't use it.
2051
5ed61e0f
UD
20522007-02-09 Jakub Jelinek <jakub@redhat.com>
2053
2054 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2055 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2056 call into the kernel to delay.
2057
10ccaa5c
UD
20582007-01-18 Ulrich Drepper <drepper@redhat.com>
2059
f8a17855
UD
2060 * tst-initializers1.c: We want to test the initializers as seen
2061 outside of libc, so undefined _LIBC.
2062
10ccaa5c
UD
2063 * pthread_join.c (cleanup): Avoid warning.
2064
ea1533e0
UD
20652007-01-17 Ulrich Drepper <drepper@redhat.com>
2066
1476bce6
UD
2067 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2068 (__lll_timedwait_tid): Add unwind info.
2069
ea1533e0
UD
2070 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2071 function table, mangle the pointers.
2072 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2073 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2074 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2075 demangle pointers before use.
2076 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2077 demangle pointer.
2078 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2079 * sysdeps/pthread/setxid.h: Likewise.
2080
8980796b
UD
20812007-01-12 Ulrich Drepper <drepper@redhat.com>
2082
2083 * tst-rwlock7.c: Show some more information in case of correct
2084 behavior.
2085
a1d87b5d
UD
20862007-01-11 Ulrich Drepper <drepper@redhat.com>
2087
2088 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2089 (lll_futex_timed_wait): Undo part of last change, don't negate
2090 return value.
2091
11bf311e 20922007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 2093
11bf311e
UD
2094 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2095 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 2096
11bf311e 20972006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 2098
11bf311e 2099 * shlib-versions: Fix sparc64 linux target specification.
a744da90 2100
11bf311e 21012007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 2102
11bf311e
UD
2103 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2104 Adjust include path for pthread_barrier_wait.c move.
fc242bef 2105
11bf311e 21062006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 2107
11bf311e
UD
2108 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2109 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 2110
11bf311e
UD
21112006-12-06 Jakub Jelinek <jakub@redhat.com>
2112
2113 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2114 6 argument cancellable syscalls.
2115 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2116 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2117 6 argument cancellable syscalls.
2118 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 2119
66f17705
UD
21202006-12-09 Ulrich Drepper <drepper@redhat.com>
2121
2122 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2123 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2124
11bf311e
UD
21252006-10-30 Jakub Jelinek <jakub@redhat.com>
2126
2127 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2128 __sync_lock_release instead of __sync_lock_release_si.
2129
536e40e2
UD
21302006-10-29 Jakub Jelinek <jakub@redhat.com>
2131
2132 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2133 Define.
2134 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2135 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2136 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2137 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2138 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2139 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2140 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2141 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2142 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2143 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2144 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2145
11bf311e
UD
21462006-10-27 Ulrich Drepper <drepper@redhat.com>
2147
2148 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2149 * pthread_barrier_wait.c: ...here.
2150 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2151 * pthread_cond_broadcast.c: ...here.
2152 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2153 * pthread_cond_signal.c: ...here.
2154 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2155 * pthread_cond_timedwait.c: ...here.
2156 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2157 * pthread_cond_wait.c: ...here.
2158 * sysdeps/pthread/pthread_once.c: Move to...
2159 * pthread_once.c: ...here.
2160 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2161 * pthread_rwlock_rdlock.c: ...here.
2162 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2163 * pthread_rwlock_timedrdlock.c: ...here.
2164 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2165 * pthread_rwlock_timedwrlock.c: ...here.
2166 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2167 * pthread_rwlock_unlock.c: ...here.
2168 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2169 * pthread_rwlock_wrlock.c: ...here.
2170 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2171 * pthread_spin_destroy.c: ...here.
2172 * sysdeps/pthread/pthread_spin_init.c: Move to...
2173 * pthread_spin_init.c: ...here.
2174 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2175 * pthread_spin_unlock.c: ...here.
2176 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2177 * pthread_getcpuclockid.c: ...here.
2178
2179 * init.c: USE_TLS support is now always enabled.
2180 * tst-tls5.h: Likewise.
2181 * sysdeps/alpha/tls.h: Likewise.
2182 * sysdeps/i386/tls.h: Likewise.
2183 * sysdeps/ia64/tls.h: Likewise.
2184 * sysdeps/powerpc/tls.h: Likewise.
2185 * sysdeps/s390/tls.h: Likewise.
2186 * sysdeps/sh/tls.h: Likewise.
2187 * sysdeps/sparc/tls.h: Likewise.
2188 * sysdeps/x86_64/tls.h: Likewise.
2189
006a8f6f 21902006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
2191
2192 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2193 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2194 failed.
2195
2196 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2197 Define to THREAD_SELF->header.multiple_threads.
2198 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2199 Likewise.
2200 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2201 Likewise.
2202 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2203 (SINGLE_THREAD_P): Likewise.
2204 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2205 (SINGLE_THREAD_P): Likewise.
2206 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2207 (SINGLE_THREAD_P): Likewise.
2208 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2209 (SINGLE_THREAD_P): Likewise.
2210 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2211 Likewise.
2212 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2213 (SINGLE_THREAD_P): Likewise.
2214 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2215 (SINGLE_THREAD_P): Likewise.
2216 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2217 Likewise.
2218
11bf311e 22192006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 2220
11bf311e
UD
2221 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2222 by default rather than 2_3_3.
32c075e1 2223
11bf311e 22242006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 2225
11bf311e
UD
2226 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2227 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2228 atomic_* instead of catomic_* macros.
2229
22302006-10-12 Ulrich Drepper <drepper@redhat.com>
2231
2232 [BZ #3285]
2233 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2234 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2235 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2236 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2237 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2238 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2239 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2240 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2241 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2242 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2243 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2244 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2245 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2246
22472006-10-11 Ulrich Drepper <drepper@redhat.com>
2248
2249 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2250 cancelable syscalls with six parameters.
2251
2252 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2253 operations instead of atomic_*.
32c075e1 2254
11bf311e 22552006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 2256
11bf311e 2257 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 2258
11bf311e 22592006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 2260
11bf311e
UD
2261 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2262 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2263 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2264 New file.
2265 * pthread_attr_setstack.c: Allow overwriting the version number of the
2266 new symbol.
2267 * pthread_attr_setstacksize.c: Likewise.
2268 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2269 it.
2270 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2271 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 2272
457b559e
UD
22732006-09-24 Ulrich Drepper <drepper@redhat.com>
2274
2275 [BZ #3251]
2276 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2277 Patch by Petr Baudis.
2278
0466106e
UD
22792006-09-18 Jakub Jelinek <jakub@redhat.com>
2280
2281 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2282
2283 * tst-cancel2.c (tf): Loop as long as something was written.
2284
bd6d3b7d
UD
22852006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2286
2287 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2288 mutexes wake all mutexes.
2289 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2290 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2291 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2292
30aa5785
UD
22932006-09-12 Ulrich Drepper <drepper@redhat.com>
2294
2295 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2296 to guarantee the thread is always canceled.
2297
2b6a801e
UD
22982006-09-08 Jakub Jelinek <jakub@redhat.com>
2299
2300 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2301 Include stdlib.h.
2302 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2303 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2304 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2305 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2306 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 2307
346e6ad4
UD
23082006-09-08 Ulrich Drepper <drepper@redhat.com>
2309
2310 [BZ #3123]
2311 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2312 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
2313 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2314 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2315 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
2316 * Makefile (tests): Add tst-cond22.
2317 * tst-cond22.c: New file.
2318
b051fc44
UD
23192006-09-05 Ulrich Drepper <drepper@redhat.com>
2320
2321 [BZ #3124]
2322 * descr.h (struct pthread): Add parent_cancelhandling.
2323 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2324 cancelhandling value to child.
2325 * pthread_create.c (start_thread): If parent thread was canceled
2326 reset the SIGCANCEL mask.
2327 * Makefile (tests): Add tst-cancel25.
2328 * tst-cancel25.c: New file.
2329
d052233c
UD
23302006-09-05 Jakub Jelinek <jakub@redhat.com>
2331 Ulrich Drepper <drepper@redhat.com>
2332
2333 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2334 counterp if it is already zero.
2335 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2336
cd248c3f
UD
23372006-03-04 Jakub Jelinek <jakub@redhat.com>
2338 Roland McGrath <roland@redhat.com>
2339
2340 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2341 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2342 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2343 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2344 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2345 lll_robust_mutex_timedlock, lll_mutex_unlock,
2346 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2347 Add _L_*_ symbols around the subsection.
2348 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2349 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2350
23512006-03-03 Jakub Jelinek <jakub@redhat.com>
2352 Roland McGrath <roland@redhat.com>
2353
2354 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2355 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2356 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2357 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2358 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2359 lll_robust_mutex_timedlock, lll_mutex_unlock,
2360 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2361 Add _L_*_ symbols around the subsection.
2362 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2363 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2364
b80770b2
UD
23652006-08-31 Ulrich Drepper <drepper@redhat.com>
2366
2367 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2368 change because it can disturb too much existing code. If real hard
2369 reader preference is needed we'll introduce another type.
2370 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2371 (pthread_rwlock_timedwrlock): Likewise.
2372 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2373 Likewise.
2374
bee2df0b
UD
23752006-08-30 Ulrich Drepper <drepper@redhat.com>
2376
2377 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2378 reader preference.
2379 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2380 (pthread_rwlock_timedwrlock): Likewise.
2381 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2382 Likewise.
2383
d678ebc1
UD
23842006-08-25 Jakub Jelinek <jakub@redhat.com>
2385
2386 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2387 Only define ifdef SHARED.
2388
ba408f84
UD
23892006-08-23 Ulrich Drepper <drepper@redhat.com>
2390
2391 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2392 (free_stacks): ...here.
2393 (__free_stack_cache): New function.
2394 * pthreadP.h: Declare __free_stack_cache.
2395 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2396 ptr_freeres.
2397 * init.c (pthread_functions): Initialize ptr_freeres.
2398 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2399 New freeres function.
2400
376e973a
UD
24012006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2402
2403 [BZ #3018]
2404 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2405
2b34af01
UD
24062006-08-20 Ulrich Drepper <drepper@redhat.com>
2407
2408 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2409 _XOPEN_REALTIME_THREADS.
2410
89c85f87
UD
24112006-08-15 Jakub Jelinek <jakub@redhat.com>
2412
2413 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2414 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2415 HAVE_CLOCK_GETTIME_VSYSCALL.
2416 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2417
f17efcb4
UD
24182006-08-14 Jakub Jelinek <jakub@redhat.com>
2419
2420 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2421 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2422 * descr.h (struct priority_protection_data): New type.
2423 (struct pthread): Add tpp field.
2424 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2425 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2426 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2427 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2428 TPP mutexes.
2429 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2430 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2431 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2432 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2433 * tpp.c: New file.
2434 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2435 boosted by TPP.
2436 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2437 * pthread_mutexattr_getprioceiling.c
2438 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2439 in the SCHED_FIFO priority range.
2440 * pthread_mutexattr_setprioceiling.c
2441 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2442 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2443 if mutex is not TPP. Ceiling is now in __data.__lock.
2444 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2445 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2446 is now in __data.__lock. Add locking.
2447 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2448 * Makefile (libpthread-routines): Add tpp.
2449 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2450 * tst-tpp.h: New file.
2451 * tst-mutexpp1.c: New file.
2452 * tst-mutexpp6.c: New file.
2453 * tst-mutexpp10.c: New file.
2454 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2455 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2456
22bb134c
UD
24572006-08-12 Ulrich Drepper <drepper@redhat.com>
2458
2459 [BZ #2843]
2460 * pthread_join.c (pthread_join): Account for self being canceled
2461 when checking for deadlocks.
2462 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2463 (tf1): Don't print anything after pthread_join returns, this would be
2464 another cancellation point.
2465 (tf2): Likewise.
2466 * tst-join6.c: New file.
2467 * Makefile (tests): Add tst-join6.
2468
f1762c0c
UD
24692006-08-03 Ulrich Drepper <drepper@redhat.com>
2470
9c06eb66
UD
2471 [BZ #2892]
2472 * pthread_setspecific.c (__pthread_setspecific): Check
2473 out-of-range index before checking for unused key.
2474
f1762c0c
UD
2475 * sysdeps/pthread/gai_misc.h: New file.
2476
7bb1b2c9
UD
24772006-08-01 Ulrich Drepper <drepper@redhat.com>
2478
2479 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2480 file. Don't use sysctl.
2481 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2482 overwrite the file if this is likely not true.
2483
b06e7e9a
UD
24842006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2485
2486 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2487 * Makefile (tests): Add tst-getpid3.
2488 * tst-getpid3.c: New file.
2489
b894c2ea
RM
24902006-07-30 Roland McGrath <roland@redhat.com>
2491
2492 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2493
2494 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2495 (pause_not_cancel): New macro.
2496 (nanosleep_not_cancel): New macro.
2497 (sigsuspend_not_cancel): New macro.
2498 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2499 nanosleep_not_cancel macro from <not-cancel.h>.
2500 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2501 macro from <not-cancel.h>.
2502
df47504c
UD
25032006-07-28 Ulrich Drepper <drepper@redhat.com>
2504 Jakub Jelinek <jakub@redhat.com>
2505
2506 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2507 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2508 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2509 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2510 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2511 * pthread_mutex_lock.c: Likewise.
2512 * pthread_mutex_timedlock.c: Likewise.
2513 * pthread_mutex_trylock.c: Likewise.
2514 * pthread_mutex_unlock.c: Likewise.
2515 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2516 all mutexes.
2517 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2518 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2519 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2520 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2521 pthread-pi-defines.sym.
2522 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2523 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2524 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
2525 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2526 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2527 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2528 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2529 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2530 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
2531 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2532 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2533 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2534 * tst-mutex2.c: Likewise.
2535 * tst-mutex3.c: Likewise.
2536 * tst-mutex4.c: Likewise.
2537 * tst-mutex5.c: Likewise.
2538 * tst-mutex6.c: Likewise.
2539 * tst-mutex7.c: Likewise.
2540 * tst-mutex7a.c: Likewise.
2541 * tst-mutex8.c: Likewise.
2542 * tst-mutex9.c: Likewise.
2543 * tst-robust1.c: Likewise.
2544 * tst-robust7.c: Likewise.
2545 * tst-robust8.c: Likewise.
2546 * tst-mutexpi1.c: New file.
2547 * tst-mutexpi2.c: New file.
2548 * tst-mutexpi3.c: New file.
2549 * tst-mutexpi4.c: New file.
2550 * tst-mutexpi5.c: New file.
2551 * tst-mutexpi6.c: New file.
2552 * tst-mutexpi7.c: New file.
2553 * tst-mutexpi7a.c: New file.
2554 * tst-mutexpi8.c: New file.
2555 * tst-mutexpi9.c: New file.
2556 * tst-robust1.c: New file.
2557 * tst-robust2.c: New file.
2558 * tst-robust3.c: New file.
2559 * tst-robust4.c: New file.
2560 * tst-robust5.c: New file.
2561 * tst-robust6.c: New file.
2562 * tst-robust7.c: New file.
2563 * tst-robust8.c: New file.
2564 * Makefile (tests): Add the new tests.
2565
2566 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2567 * pthread_mutex_destroy.c: Remove unneeded label.
2568
f3be81a9
UD
25692006-07-01 Ulrich Drepper <drepper@redhat.com>
2570
2571 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2572 computations to compile time.
2573
c26ca5e1
UD
25742006-06-04 Ulrich Drepper <drepper@redhat.com>
2575
2576 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2577
6f8a7dff
UD
25782006-05-15 Ulrich Drepper <drepper@redhat.com>
2579
c26ca5e1 2580 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 2581
3d237e42
UD
25822006-05-11 Ulrich Drepper <drepper@redhat.com>
2583
04974d63
UD
2584 * pthread_key_create.c (__pthread_key_create): Do away with
2585 __pthread_keys_lock.
2586
2587 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2588 (__kernel_cpumask_size): Mark as hidden.
2589 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2590
3d237e42
UD
2591 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2592 * semaphoreP.h (__sem_mappings_lock): Likewise.
2593
790fc6e4
UD
25942006-05-10 Ulrich Drepper <drepper@redhat.com>
2595
2596 * pthread_atfork.c: Mark __dso_handle as hidden.
2597
be434a72
UD
25982006-05-09 Ulrich Drepper <drepper@redhat.com>
2599
2600 [BZ #2644]
2601 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2602 the reload problem. Change the one path in pthread_cancel_init
2603 which causes the problem. Force gcc to reload. Simplify callers.
2604 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2605 (_Unwind_GetBSP): Undo last patch.
2606
3142b1ac
UD
26072006-05-07 Ulrich Drepper <drepper@redhat.com>
2608
bf3635d3
UD
2609 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2610 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
2611
2612 [BZ #2644]
2613 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2614 pointers are reloaded after pthread_cancel_init calls.
2615
27488789
UD
26162006-05-01 Ulrich Drepper <drepper@redhat.com>
2617
2618 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2619 __always_inline.
2620
a6375d11
UD
26212006-04-27 Ulrich Drepper <drepper@redhat.com>
2622
2623 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2624 Allocate new object which is passed to timer_sigev_thread so that
2625 the timer can be deleted before the new thread is scheduled.
2626
16a1d952
RM
26272006-04-26 Roland McGrath <roland@redhat.com>
2628
2629 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2630
7960f2a7
UD
26312006-04-08 Ulrich Drepper <drepper@redhat.com>
2632
ab9a9ff8
UD
2633 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2634 suffix for conditional jumps.
2635 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2636 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2637 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2638 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2639 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2640 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2641
7960f2a7
UD
2642 * init.c (sigcancel_handler): Compare with correct PID even if the
2643 thread is in the middle of a fork call.
2644 (sighandler_setxid): Likewise.
2645 Reported by Suzuki K P <suzuki@in.ibm.com> .
2646
2035d91c
UD
26472006-04-07 Jakub Jelinek <jakub@redhat.com>
2648
2649 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2650
0292b0dd
UD
26512006-04-06 Ulrich Drepper <drepper@redhat.com>
2652
2653 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2654 fails [Coverity CID 105].
2655
6738b3c0
UD
26562006-04-05 Ulrich Drepper <drepper@redhat.com>
2657
2658 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2659
359157a5
RM
26602006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2661
2662 [BZ #2505]
2663 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2664 Define __lll_rel_instr using lwsync.
2665
cd277b2d
UD
26662006-03-27 Ulrich Drepper <drepper@redhat.com>
2667
2668 * allocatestack.c (allocate_stack): Always initialize robust_head.
2669 * descr.h: Define struct robust_list_head.
2670 (struct pthread): Use robust_list_head in robust mutex list definition.
2671 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2672 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2673 (__pthread_initialize_minimal_internal): Register robust_list with
2674 the kernel.
2675 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2676 Declare __set_robust_list_avail.
2677 * pthread_create.c (start_thread): Register robust_list of new thread.
2678 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2679 waiters.
2680 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2681 number of users, it's unreliable.
2682 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2683 set_robust_list syscall is available.
2684 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2685 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2686 Set robust_head.list_op_pending before trying to lock a robust mutex.
2687 * pthread_mutex_timedlock.c: Likewise.
2688 * pthread_mutex_trylock.c: Likewise.
2689 * pthread_mutex_unlock.c: Likewise for unlocking.
2690 * Makefile (tests): Add tst-robust8.
2691 * tst-robust8.c: New file.
2692
facac085
UD
26932006-03-08 Andreas Schwab <schwab@suse.de>
2694
2695 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2696 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2697
7ccbe1a1
RM
26982006-03-05 Roland McGrath <roland@redhat.com>
2699
2700 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2701 and $config_os doesn't match *linux*.
2702
043cee37
RM
27032006-03-05 David S. Miller <davem@sunset.davemloft.net>
2704
2705 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2706 Use __syscall_error.
2707 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2708 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2709 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2710 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2711 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2712 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2713
88bce79e
UD
27142006-03-02 Ulrich Drepper <drepper@redhat.com>
2715
2716 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2717
672ec465
UD
27182006-03-01 Ulrich Drepper <drepper@redhat.com>
2719
2720 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2721 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2722 mutex.
2723 (__lll_robust_timedlock_wait): Likewise.
2724 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2725 (__lll_robust_lock_wait): Likewise.
2726 (__lll_robust_timedlock_wait): Likewise.
2727 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2728 (__lll_robust_lock_wait): Likewise.
2729 (__lll_robust_timedlock_wait): Likewise.
2730
c4a4875d
RM
27312006-03-01 Jakub Jelinek <jakub@redhat.com>
2732
2733 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2734 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2735 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2736 lll_robust_mutex_unlock): Define.
2737 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2738
3192fd8e
RM
27392006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2740
2741 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2742 instead of <clone.S>.
2743
14d44b19
RM
27442006-02-27 Jakub Jelinek <jakub@redhat.com>
2745
2746 * Makefile (libpthread-routines): Add
2747 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2748 and pthread_mutex_[sg]etprioceiling.
2749 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2750 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2751 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2752 pthread_mutex_setprioceiling.
2753 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2754 PTHREAD_PRIO_PROTECT): New enum values.
2755 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2756 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2757 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2758 prototypes.
2759 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2760 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2761 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2762 Define.
2763 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2764 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2765 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2766 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2767 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2768 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2769 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2770 protocol mutexes.
2771 * pthread_mutex_getprioceiling.c: New file.
2772 * pthread_mutex_setprioceiling.c: New file.
2773 * pthread_mutexattr_getprioceiling.c: New file.
2774 * pthread_mutexattr_setprioceiling.c: New file.
2775 * pthread_mutexattr_getprotocol.c: New file.
2776 * pthread_mutexattr_setprotocol.c: New file.
2777
62f6b9b2
RM
27782006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2779
2780 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2781
e0a3ed4f
RM
27822006-02-27 Roland McGrath <roland@redhat.com>
2783
2784 * sysdeps/pthread/Subdirs: List nptl here too.
2785 * configure (libc_add_on_canonical): New variable.
2786
2787 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2788
2789 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2790 self to get main source tree's file.
2791 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2792 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2793 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2794 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2795 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2796 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2797 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2798 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2799 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2800 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2801 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2802 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2803 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2804
2805 * Makefile: Use $(sysdirs) in vpath directive.
2806
2807 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2808 (CPPFLAGS-timer_routines.c): Likewise.
2809
2810 * Makeconfig (includes): Variable removed.
2811
84cfa284
RM
28122006-02-26 Roland McGrath <roland@redhat.com>
2813
2814 * sysdeps/generic/pt-raise.c: Moved to ...
2815 * pt-raise.c: ... here.
2816 * sysdeps/generic/lowlevellock.h: Moved to ...
2817 * lowlevellock.h: ... here.
2818
c5132ca1
RM
28192006-02-23 Roland McGrath <roland@redhat.com>
2820
2821 * descr.h (struct pthread): Add final member `end_padding'.
2822 (PTHREAD_STRUCT_END_PADDING): Use it.
2823
28242006-02-20 Roland McGrath <roland@redhat.com>
2825
2826 * sysdeps/mips: Directory removed, saved in ports repository.
2827 * sysdeps/unix/sysv/linux/mips: Likewise.
2828
a93317a1
UD
28292006-02-18 Ulrich Drepper <drepper@redhat.com>
2830
2831 * tst-robust1.c: Add second mutex to check that the mutex list is
2832 handled correctly.
2833
f1740bc4
UD
28342006-02-17 Jakub Jelinek <jakub@redhat.com>
2835
2836 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2837 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2838 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2839 lll_robust_mutex_unlock): New macros.
2840 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2841 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2842 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2843 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2844 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2845
a7245bf5
UD
28462006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2847
2848 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2849 definitions.
2850 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2851
49bfc1fe
UD
28522006-02-17 Ulrich Drepper <drepper@redhat.com>
2853
2854 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2855 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2856 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2857 (lll_robust_mutex_unlock): Likewise.
2858
56e987ac
UD
28592006-02-13 Jakub Jelinek <jakub@redhat.com>
2860
2861 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2862 Set robust_list.__next rather than robust_list.
2863 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2864 (__pthread_list_t): New typedef.
2865 (pthread_mutex_t): Replace __next and __prev fields with __list.
2866 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2867 (__pthread_list_t): New typedef.
2868 (pthread_mutex_t): Replace __next and __prev fields with __list.
2869 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2870 (__pthread_list_t, __pthread_slist_t): New typedefs.
2871 (pthread_mutex_t): Replace __next and __prev fields with __list.
2872 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2873 (__pthread_list_t, __pthread_slist_t): New typedefs.
2874 (pthread_mutex_t): Replace __next and __prev fields with __list.
2875 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2876 (__pthread_list_t, __pthread_slist_t): New typedefs.
2877 (pthread_mutex_t): Replace __next and __prev fields with __list.
2878 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2879 (__pthread_slist_t): New typedef.
2880 (pthread_mutex_t): Replace __next field with __list.
2881
683040c3
UD
28822006-02-15 Ulrich Drepper <drepper@redhat.com>
2883
25bc77e6 2884 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
2885 PTHREAD_MUTEX_OWNERDEAD.
2886 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2887 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2888 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2889 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2890 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2891 to PTHREAD_MUTEX_INCONSISTENT.
2892 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2893 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2894 * pthread_mutex_trylock.c: Likewise.
2895 * pthread_mutex_timedlock.c: Likewise.
2896 * pthread_mutex_unlock.c: Likewise.
2897 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2898 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2899 lowlevelrobustlock.sym.
2900 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2901 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2902 definitions.
2903 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2904 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2905 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2906 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2907 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2908
bbf209a4
UD
29092006-02-12 Ulrich Drepper <drepper@redhat.com>
2910
b007ce7c
UD
2911 * allocatestack.c (allocate_stack): Initialize robust_list.
2912 * init.c (__pthread_initialize_minimal_internal): Likewise.
2913 * descr.h (struct xid_command): Pretty printing.
2914 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2915 robust_list. Adjust macros.
2916 * pthread_create.c (start_thread): Adjust robust_list handling.
2917 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2918 but the owner for all robust mutex types.
2919 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2920 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 2921 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
2922 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2923
bbf209a4
UD
2924 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2925 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2926
b576fca1
UD
29272006-02-08 Jakub Jelinek <jakub@redhat.com>
2928
2929 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2930 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2931
a6df7387
UD
29322006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2933
2934 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2935 Return status.
2936 (lll_futex_timed_wait): Define.
2937
7c65e900
UD
29382006-01-19 Ulrich Drepper <drepper@redhat.com>
2939
2940 * tst-cancel4.c: Test ppoll.
2941
5f9f21e8
AJ
29422006-01-18 Andreas Jaeger <aj@suse.de>
2943
cf407dfb 2944 [BZ #2167]
5f9f21e8
AJ
2945 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2946 (pthread_mutex_t): Follow changes for other archs. Based on patch
2947 by Jim Gifford <patches@jg555.com>.
2948
251278c6
UD
29492006-01-13 Richard Henderson <rth@redhat.com>
2950
2951 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2952
de59a291
RM
29532006-01-10 Roland McGrath <roland@redhat.com>
2954
2955 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2956 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2957 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2958 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2959 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2960 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2961 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2962 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2963 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 2964 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 2965
931786ee
RM
29662006-01-09 Roland McGrath <roland@redhat.com>
2967
5d42c8c3
RM
2968 * tst-initializers1-c89.c: New file.
2969 * tst-initializers1-c99.c: New file.
2970 * tst-initializers1-gnu89.c: New file.
2971 * tst-initializers1-gnu99.c: New file.
2972 * Makefile (tests): Add them.
2973 (CFLAGS-tst-initializers1-c89.c): New variable.
2974 (CFLAGS-tst-initializers1-c99.c): New variable.
2975 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2976 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2977
931786ee
RM
2978 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2979 Use __extension__ on anonymous union definition.
2980 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2981 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2982 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2983 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 2984 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 2985
8dd18431
RM
29862006-01-08 Jakub Jelinek <jakub@redhat.com>
2987
2988 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2989 Don't give the union a name because it changes the mangled name.
2990 Instead name the struct for __data.
2991 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2992 Likewise.
2993 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2994 Likewise.
2995
ae11e412
UD
29962006-01-09 Jakub Jelinek <jakub@redhat.com>
2997
2998 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2999 stack bias to mc_ftp field.
3000
c6885aa1
UD
30012006-01-07 Ulrich Drepper <drepper@redhat.com>
3002
3003 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 3004 being too clever and reloading the futex value where it shouldn't.
c6885aa1 3005
ae4ad00a
UD
30062006-01-06 Ulrich Drepper <drepper@redhat.com>
3007
3008 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3009 correct type.
3010
ced368f7
UD
30112006-01-06 Jakub Jelinek <jakub@redhat.com>
3012
3013 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3014 Add cfi directives.
3015
d804f5df
UD
30162006-01-06 Ulrich Drepper <drepper@redhat.com>
3017
cbbbb188 3018 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
3019 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3020 rename in tcbhead_t.
3021
d804f5df
UD
3022 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3023 Don't give the union a name because it changes the mangled name.
3024 Instead name the struct for __data.
3025 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3026 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3027 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3028 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3029 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3030 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3031
679d83ba
UD
30322006-01-05 Ulrich Drepper <drepper@redhat.com>
3033
3034 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3035 Return status.
3036 (lll_futex_timed_wait): Define.
3037 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3038 * sysdeps/pthread/aio_misc.h: New file.
3039
06dc5bf3
RM
30402006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3041
3042 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3043
9759bbf1
UD
30442006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3045
3046 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3047 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3048 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3049
db59b28b
UD
30502006-01-04 Ulrich Drepper <drepper@redhat.com>
3051
3052 * tst-cancel24.cc: Use C headers instead of C++ headers.
3053
b01fe5f7
UD
30542006-01-03 Jakub Jelinek <jakub@redhat.com>
3055
3056 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3057 sparc-linux configured glibc.
3058 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3059 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3060 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3061 atomic_compare_and_exchange_val_24_acq instead of
3062 atomic_compare_and_exchange_val_acq.
3063 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3064 instead of atomic_exchange_rel.
3065 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3066 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3067 file.
3068 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3069 file.
3070 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3071 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3072 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3073 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3074 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3075 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3076 New file.
3077 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3078 New file.
3079 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3080 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3081 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3082 file.
3083 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3084 file.
3085 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3086
35c2fd59
UD
30872006-01-03 Ulrich Drepper <drepper@redhat.com>
3088
3089 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3090 mutex initializers.
3091
305bb37e
UD
30922006-01-02 Jakub Jelinek <jakub@redhat.com>
3093
3094 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3095 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3096 THREAD_COPY_POINTER_GUARD): Define.
3097 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3098 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3099
cc792128
UD
31002006-01-01 Ulrich Drepper <drepper@redhat.com>
3101
3102 * version.c: Update copyright year.
3103
db0a00d3
UD
31042005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3105
3106 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3107 .eh_frame section, use cfi_* directives.
3108 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3109
b36205c4
UD
31102005-12-30 Ulrich Drepper <drepper@redhat.com>
3111
3112 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3113 now.
3114
8b4f1598
UD
31152005-12-29 Ulrich Drepper <drepper@redhat.com>
3116
3117 * sysdeps/pthread/sigaction.c: Removed.
3118 * sigaction.c: New file.
3119 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3120
fec5592d
UD
31212005-12-28 Ulrich Drepper <drepper@redhat.com>
3122
3123 * Makefile (tests): Add tst-signal7.
3124 * tst-signal7.c: New file.
3125
db169ed5
RM
31262005-12-27 Roland McGrath <roland@redhat.com>
3127
3128 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3129 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3130 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3131 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3132 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3133 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3134 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3135 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3136 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3137 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3138 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3139
bfffffae
UD
31402005-12-27 Jakub Jelinek <jakub@redhat.com>
3141
3142 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3143 and __prev field to pthread_mutex_t.
3144 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3145 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3146 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3147 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3148 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3149 to pthread_mutex_t.
3150
1bcfb5a5
UD
31512005-12-26 Ulrich Drepper <drepper@redhat.com>
3152
3153 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3154 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3155 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3156 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3157 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3158 and PTHREAD_MUTEXATTR_FLAG_BITS.
3159 * descr.h (struct pthread): Add robust_list field and define
3160 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3161 * pthread_mutexattr_getrobust.c: New file.
3162 * pthread_mutexattr_setrobust.c: New file.
3163 * pthread_mutex_consistent.c: New file.
3164 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3165 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3166 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3167 Adjust pthread_mutex_t initializers.
3168 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3169 field to pthread_mutex_t.
3170 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3171 and __prev field to pthread_mutex_t.
3172 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3173 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3174 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3175 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3176 * pthread_mutexattr_gettype.c: Likewise.
3177 * pthread_mutexattr_setpshared.c: Likewise.
3178 * pthread_mutexattr_settype.c: Likewise.
3179 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3180 Initialize mutex kind according to robust flag.
3181 * pthread_mutex_lock.c: Implement local robust mutex.
3182 * pthread_mutex_timedlock.c: Likewise.
3183 * pthread_mutex_trylock.c: Likewise.
3184 * pthread_mutex_unlock.c: Likewise.
3185 * pthread_create.c (start_thread): Mark robust mutexes which remained
3186 locked as dead.
3187 * tst-robust1.c: New file.
3188 * tst-robust2.c: New file.
3189 * tst-robust3.c: New file.
3190 * tst-robust4.c: New file.
3191 * tst-robust5.c: New file.
3192 * tst-robust6.c: New file.
3193 * tst-robust7.c: New file.
3194 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3195 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3196 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3197 tst-robust5, tst-robust6, and tst-robust7.
3198
3199 * tst-typesizes.c: New file.
3200 * Makefile (tests): Add tst-typesizes.
3201
3202 * tst-once3.c: More debug output.
3203
9333ed0d
UD
32042005-12-24 Ulrich Drepper <drepper@redhat.com>
3205
d4d138a4
UD
3206 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3207 missing after last change.
3208
bfffffae 3209 * version.c: Update copyright year.
9333ed0d 3210
dcc73a8d
UD
32112005-12-23 Ulrich Drepper <drepper@redhat.com>
3212
3213 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3214 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3215 * pthread_mutex_trylock.c: Likewise.
3216 * pthread_mutex_timedlock.c: Likewise.
3217 * pthread_mutex_unlock.c: Likewise.
3218
879f3ca6
RM
32192005-12-22 Roland McGrath <roland@redhat.com>
3220
3221 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3222 so that #include_next's search location is not reset to the -I..
3223 directory where <nptl/...> can be found.
3224
077a0da7
UD
32252005-12-22 Ulrich Drepper <drepper@redhat.com>
3226
3227 [BZ #1913]
3228 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3229 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
3230 * tst-cancel24.cc: New file.
3231 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 3232
8dea90aa
RM
32332005-12-21 Roland McGrath <roland@redhat.com>
3234
3235 * libc-cancellation.c: Use <> rather than "" #includes.
3236 * pt-cleanup.c: Likewise.
3237 * pthread_create.c: Likewise.
3238 * pthread_join.c: Likewise.
3239 * pthread_timedjoin.c: Likewise.
3240 * pthread_tryjoin.c: Likewise.
3241 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3242 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3243 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3244 * unwind.c: Likewise.
3245
8da21f96
UD
32462005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3247
3248 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3249 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3250 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3251 THREAD_COPY_POINTER_GUARD): Define.
3252
00c2b3b9
UD
32532005-12-19 Jakub Jelinek <jakub@redhat.com>
3254
3255 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3256 rather than one.
3257 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3258 THREAD_COPY_POINTER_GUARD): Define.
3259 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3260 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3261 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3262 THREAD_COPY_POINTER_GUARD): Define.
3263 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3264 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3265 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3266 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3267 Use PTR_DEMANGLE for B0 if defined.
3268
827b7087
UD
32692005-12-17 Ulrich Drepper <drepper@redhat.com>
3270
3271 * pthread_create.c (__pthread_create_2_1): Use
3272 THREAD_COPY_POINTER_GUARD if available.
3273 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3274 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3275 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3276 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3277 * sysdeps/x86_64/tls.h: Likewise.
3278
2826ac7e
RM
32792005-12-15 Roland McGrath <roland@redhat.com>
3280
3281 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3282
b6ab06ce
UD
32832005-12-13 Ulrich Drepper <drepper@redhat.com>
3284
3285 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3286 sysdeps/generic.
3287 * errno-loc.c: New file.
3288
f0d1a3b5
RM
32892005-12-12 Roland McGrath <roland@redhat.com>
3290
3291 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3292 adjustments before choosing stack size. Update minimum stack size
3293 calculation to match allocate_stack change.
3294
db13ddbc
UD
32952005-12-12 Ulrich Drepper <drepper@redhat.com>
3296
3297 * allocatestack.c (allocate_stack): Don't demand that there is an
3298 additional full page available on the stack beside guard, TLS, the
3299 minimum stack.
3300
088f460f
UD
33012005-11-24 Ulrich Drepper <drepper@redhat.com>
3302
3303 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3304 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3305
3306 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3307 compiling 32-bit code we must define __cleanup_fct_attribute.
3308
16feadf2
UD
3309005-11-24 Jakub Jelinek <jakub@redhat.com>
3310
3311 [BZ #1920]
3312 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3313 __attribute__ instead of __attribute.
3314 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3315 (__cleanup_fct_attribute): Likewise.
3316
e6e493bb
UD
33172005-11-17 Jakub Jelinek <jakub@redhat.com>
3318
3319 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3320 a write barrier before writing libgcc_s_getcfa.
3321
8e635611
UD
33222005-11-06 Ulrich Drepper <drepper@redhat.com>
3323
3324 * sysdeps/unix/sysv/linux/configure: Removed.
3325
ce33ee7c
UD
33262005-11-05 Ulrich Drepper <drepper@redhat.com>
3327
3328 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3329 optional init_array/fini_array support.
3330
20d511e0
RM
33312005-10-24 Roland McGrath <roland@redhat.com>
3332
3333 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3334 versioned_symbol use.
3335
fe60d146
RM
33362005-10-16 Roland McGrath <roland@redhat.com>
3337
3338 * init.c (__pthread_initialize_minimal_internal): Even when using a
3339 compile-time default stack size, apply the minimum that allocate_stack
3340 will require, and round up to page size.
3341
0faa1cf5
RM
33422005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3343
3344 * Makefile ($(test-modules)): Remove static pattern rule.
3345
f9126cc2
UD
33462005-10-14 Jakub Jelinek <jakub@redhat.com>
3347 Ulrich Drepper <drepper@redhat.com>
3348
3349 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3350 alignment in callback function.
3351 * Makefile: Add rules to build and run tst-align3.
3352 * tst-align3.c: New file.
3353
015a5d22
RM
33542005-10-03 Jakub Jelinek <jakub@redhat.com>
3355
3356 * allocatestack.c (setxid_signal_thread): Add
3357 INTERNAL_SYSCALL_DECL (err).
3358
b71ce910
UD
33592005-10-02 Jakub Jelinek <jakub@redhat.com>
3360
3361 * allocatestack.c (setxid_signal_thread): Need to use
3362 atomic_compare_and_exchange_bool_acq.
3363
dff9a7a1
UD
33642005-10-01 Ulrich Drepper <drepper@redhat.com>
3365 Jakub Jelinek <jakub@redhat.com>
3366
3367 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3368 CANCEL_RESTMASK.
3369 (struct pthread): Move specific_used field to avoid padding.
3370 Add setxid_futex field.
3371 * init.c (sighandler_setxid): Reset setxid flag and release the
3372 setxid futex.
3373 * allocatestack.c (setxid_signal_thread): New function. Broken
3374 out of the bodies of the two loops in __nptl_setxid. For undetached
3375 threads check whether they are exiting and if yes, don't send a signal.
3376 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3377 * pthread_create.c (start_thread): For undetached threads, check
3378 whether setxid bit is set. If yes, wait until signal has been
3379 processed.
3380
3381 * allocatestack.c (STACK_VARIABLES): Initialize them.
3382 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3383
560b4709
UD
33842004-09-02 Jakub Jelinek <jakub@redhat.com>
3385
3386 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3387 waiters, awake all waiters on the associated mutex.
3388
5eac4760
RM
33892005-09-22 Roland McGrath <roland@redhat.com>
3390
3391 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3392 ../sysdeps/x86_64/hp-timing.h).
3393
a3615024
UD
33942005-08-29 Jakub Jelinek <jakub@redhat.com>
3395
3396 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3397 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3398 (lll_futex_wake_unlock): Define.
3399 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3400 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3401 (lll_futex_wake_unlock): Define.
3402 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3403 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3404 (lll_futex_wake_unlock): Define.
3405 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3406 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3407 (lll_futex_wake_unlock): Define.
3408 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3409 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3410 (lll_futex_wake_unlock): Define.
3411 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3412 lll_futex_wake_unlock.
3413 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3414 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3415 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3416 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3417 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3418 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3419
bf017034
UD
34202005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3421
3422 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3423 Fix typo in register name.
3424
fd4af664
UD
34252005-08-23 Ulrich Drepper <drepper@redhat.com>
3426
8558d715
UD
3427 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3428 Use __sigfillset. Document that sigfillset does the right thing wrt
3429 to SIGSETXID.
fd4af664 3430
3fd1bc67
UD
34312005-07-11 Jakub Jelinek <jakub@redhat.com>
3432
44d75caf 3433 [BZ #1102]
3fd1bc67
UD
3434 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3435 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3436 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3437 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3438 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3439 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3440 in the structure.
3441 * Makefile (tests): Add tst-initializers1.
3442 (CFLAGS-tst-initializers1.c): Set.
3443 * tst-initializers1.c: New test.
3444
553185e2
UD
34452005-07-11 Jakub Jelinek <jakub@redhat.com>
3446
3447 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3448 Make sure __flags are located at offset 48 from the start of the
3449 structure.
3450
8df08cb2
RM
34512005-07-02 Roland McGrath <roland@redhat.com>
3452
3453 * Makeconfig: Comment fix.
3454
253eb3a0
UD
34552005-07-05 Jakub Jelinek <jakub@redhat.com>
3456
3457 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3458 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3459 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3460 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3461 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3462 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3463 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3464 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3465 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3466 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3467
bb6e8ca3
UD
34682005-06-25 Jakub Jelinek <jakub@redhat.com>
3469
3470 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3471 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3472 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3473 fields.
3474 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3475 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3476 field. Put in sysinfo field unconditionally.
3477 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3478 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3479 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3480 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3481 fields.
3482 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3483 * pthread_create.c (__pthread_create_2_1): Use
3484 THREAD_COPY_STACK_GUARD macro.
3485 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3486 tests.
3487 * tst-stackguard1.c: New file.
3488 * tst-stackguard1-static.c: New file.
3489
99c7f870
UD
34902005-06-14 Alan Modra <amodra@bigpond.net.au>
3491
3492 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3493 Invoke CGOTSETUP and CGOTRESTORE.
3494 (CGOTSETUP, CGOTRESTORE): Define.
3495
8074c5c5
RM
34962005-05-29 Richard Henderson <rth@redhat.com>
3497
3498 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3499 (tf_write, tf_writev): Use it.
3500 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3501 the system minimum.
3502
c179df4e
UD
35032005-05-23 Jakub Jelinek <jakub@redhat.com>
3504
3505 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3506 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3507 __librt_*_asynccancel@local.
3508
b0e196a4
UD
35092005-05-17 Alan Modra <amodra@bigpond.net.au>
3510
3511 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3512 all occurrences of JUMPTARGET. Instead append @local to labels.
3513
f7d78e18
UD
35142005-05-20 Jakub Jelinek <jakub@redhat.com>
3515
3516 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3517 size/alignment of struct pthread rather than tcbhead_t.
3518 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3519 Likewise.
3520 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3521 Likewise.
3522 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3523 Likewise.
3524
363dd976
UD
35252005-05-19 Richard Henderson <rth@redhat.com>
3526
3527 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3528 __sync_val_compare_and_swap, not explicit _si variant.
3529 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3530
1ad9da69
UD
35312005-05-03 Ulrich Drepper <drepper@redhat.com>
3532
3533 [BZ #915]
3534 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3535
5085cd1f
UD
35362005-05-03 Jakub Jelinek <jakub@redhat.com>
3537
3538 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3539 .eh_frame section, use cfi_* directives.
3540
ad529081
UD
35412005-04-27 Jakub Jelinek <jakub@redhat.com>
3542
3543 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3544 of "" includes.
3545
dea99685
UD
35462005-04-27 Ulrich Drepper <drepper@redhat.com>
3547
c06aad09 3548 [BZ #1075]
dea99685
UD
3549 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3550 aio_write blocks.
3551
84060bad
RM
35522005-04-27 Roland McGrath <roland@redhat.com>
3553
5e2d8ac8
RM
3554 * Makefile (tests): Remove tst-clock2.
3555
84060bad
RM
3556 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3557 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3558 translating to the kernel clockid_t for our own process/thread clock.
3559
3560 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3561
4a035b9d
RM
35622005-04-15 Jakub Jelinek <jakub@redhat.com>
3563
3564 * old_pthread_cond_init.c: Include <errno.h>.
3565 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3566 process shared or uses clock other than CLOCK_REALTIME.
3567 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3568
edac0e8f
UD
35692005-04-13 David S. Miller <davem@davemloft.net>
3570
3571 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3572 * sysdeps/sparc/sparc64/clone.S: New file.
3573
613d8d52
RM
35742005-04-05 Jakub Jelinek <jakub@redhat.com>
3575
44d75caf 3576 [BZ #1102]
613d8d52
RM
3577 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3578 __inline instead of inline.
3579 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3580
ee618985
UD
35812005-03-31 Jakub Jelinek <jakub@redhat.com>
3582
3583 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3584 functionally equivalent, but shorter instructions.
3585 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3586 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3587 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3588 Likewise.
3589 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3590 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3591 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3592 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3593 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3594 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3595 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3596 Likewise.
3597 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3598 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3599 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3600 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3601 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3602
f850220b
AJ
36032005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3604
3605 * sysdeps/mips/Makefile: New file.
3606 * sysdeps/mips/nptl-sysdep.S: New file.
3607 * sysdeps/mips/tcb-offsets.sym: New file.
3608 * sysdeps/mips/pthread_spin_lock.S: New file.
3609 * sysdeps/mips/pthread_spin_trylock.S: New file.
3610 * sysdeps/mips/pthreaddef.h: New file.
3611 * sysdeps/mips/tls.h: New file.
3612 * sysdeps/mips/jmpbuf-unwind.h: New file.
3613 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3614 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3615 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3616 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3617 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3618 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3619 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3620 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3621 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3622 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3623
1e6da2b0
UD
36242005-03-23 Ulrich Drepper <drepper@redhat.com>
3625
c06aad09 3626 [BZ #1112]
1e6da2b0
UD
3627 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3628 variable to scerr.
3629
5233d576
RM
36302005-03-10 Jakub Jelinek <jakub@redhat.com>
3631
3632 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3633
3053ff11
RM
36342005-02-25 Roland McGrath <roland@redhat.com>
3635
3636 * alloca_cutoff.c: Correct license text.
3637 * tst-unload.c: Likewise.
3638 * sysdeps/pthread/allocalim.h: Likewise.
3639 * sysdeps/pthread/pt-initfini.c: Likewise.
3640 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3641 * sysdeps/pthread/bits/sigthread.h: Likewise.
3642 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3643 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3644
9cfe5381
RM
36452005-02-16 Roland McGrath <roland@redhat.com>
3646
3647 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3648 Use unsigned int * for ptr_nthreads.
3649
7de00121
RM
36502005-02-14 Alan Modra <amodra@bigpond.net.au>
3651
20d511e0 3652 [BZ #721]
7de00121
RM
3653 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3654 gcc4.
3655
4bae262d
UD
36562005-02-07 Richard Henderson <rth@redhat.com>
3657
613d8d52 3658 [BZ #787]
4bae262d
UD
3659 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3660 argument.
3661
75df54b7
RM
36622004-11-03 Marcus Brinkmann <marcus@gnu.org>
3663
3664 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3665 order of arguments in invocation of atomic_add_zero.
3666
ea9c93cc
UD
36672005-01-26 Jakub Jelinek <jakub@redhat.com>
3668
9cfe5381 3669 [BZ #737]
ea9c93cc
UD
3670 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3671 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3672 at least gotntpoff relocation and addition.
3673 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3674 Likewise.
3675 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3676 Likewise.
3677 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3678 Likewise.
3679
9dcafc55
UD
36802005-01-06 Ulrich Drepper <drepper@redhat.com>
3681
3682 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3683 entry for static tls deallocation fix.
3684 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3685 also contains information whether the memory pointed to is static
3686 TLS or not.
3687 * sysdeps/i386/tls.h: Likewise.
3688 * sysdeps/ia64/tls.h: Likewise.
3689 * sysdeps/powerpc/tls.h: Likewise.
3690 * sysdeps/s390/tls.h: Likewise.
3691 * sysdeps/sh/tls.h: Likewise.
3692 * sysdeps/sparc/tls.h: Likewise.
3693 * sysdeps/x86_64/tls.h: Likewise.
3694
a71c152c
UD
36952004-12-27 Ulrich Drepper <drepper@redhat.com>
3696
3697 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3698
d143c49e
UD
36992004-12-21 Jakub Jelinek <jakub@redhat.com>
3700
3701 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3702 %esp.
3703 * Makefile (tests): Add tst-align2.
3704 * tst-align2.c: New test.
3705 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3706 -mpreferred-stack-boundary=4.
3707
50130ded
RM
37082004-12-18 Roland McGrath <roland@redhat.com>
3709
3710 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3711 New file removed withdrawn for the moment.
3712
cbc53df0
RH
37132004-12-17 Richard Henderson <rth@redhat.com>
3714
3715 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3716 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 3717
fb9d5c73
UD
37182004-12-16 Ulrich Drepper <drepper@redhat.com>
3719
03332aa6
UD
3720 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3721 Increased PTHREAD_STACK_MIN.
3722
fb9d5c73
UD
3723 * tst-context1.c (stacks): Use bigger stack size.
3724
e853ea00
UD
37252004-12-16 Jakub Jelinek <jakub@redhat.com>
3726
3727 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3728 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3729
f23673fc
UD
37302004-12-15 Jakub Jelinek <jakub@redhat.com>
3731
3732 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3733 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3734 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3735
917fbe70
UD
37362004-12-15 Ulrich Drepper <drepper@redhat.com>
3737
3738 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3739
1f9d7c27
UD
37402004-12-14 Ulrich Drepper <drepper@redhat.com>
3741
3742 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3743 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3744
3745 * tst-getpid1.c: If child crashes, report this first. Print which
3746 signal.
3747
bf7c04cd
UD
37482004-12-09 Ulrich Drepper <drepper@redhat.com>
3749
3750 * init.c (__pthread_initialize_minimal_internal): Also unblock
3751 SIGSETXID.
3752
37532004-12-01 Jakub Jelinek <jakub@redhat.com>
3754
3755 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3756 _POSIX_THREAD_CPUTIME): Define to 0.
3757 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3758 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3759 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3760 __timer_signal_thread_tclk): Remove.
3761 (init_module): Remove their initialization.
3762 (thread_cleanup): Remove their cleanup assertions.
3763 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3764 __timer_signal_thread_tclk): Remove.
3765 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 3766 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
3767 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3768
484cc801
UD
37692004-12-07 Jakub Jelinek <jakub@redhat.com>
3770
3771 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3772 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3773
3774 * Makefile (tests): Add tst-getpid2.
3775 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3776 (do_test): Use it. Use __clone2 instead of clone on ia64.
3777 * tst-getpid2.c: New test.
3778
2da9a6a1
UD
37792004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3780
3781 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3782
1ff241b8
UD
37832004-12-04 Ulrich Drepper <drepper@redhat.com>
3784
3785 * Makefile (tests): Add tst-getpid1.
3786 * tst-getpid1.c: New file.
3787 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3788 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3789
3f488b9c
RM
37902004-12-02 Roland McGrath <roland@redhat.com>
3791
3792 * Makefile (libpthread-nonshared): Variable removed.
3793 ($(objpfx)libpthread_nonshared.a): Target removed.
3794 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3795 These are now handled by generic magic from
3796 libpthread-static-only-routines being set.
3797
597ce09c
UD
37982004-11-27 Ulrich Drepper <drepper@redhat.com>
3799
3800 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3801 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3802 _POSIX_THREAD_PRIO_PROTECT): Define.
3803 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3804 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3805 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3806
60e4523a
UD
38072004-11-26 Jakub Jelinek <jakub@redhat.com>
3808
3809 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3810 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3811 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3812 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3813 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3814 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3815 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3816
f1f2cafc
UD
38172004-11-24 Ulrich Drepper <drepper@redhat.com>
3818
bca2d208
UD
3819 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3820
f1f2cafc
UD
3821 * Makefile (libpthread-routines): Add pthread_setschedprio.
3822 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3823 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3824 * pthread_setschedprio.c: New file.
3825
b639d0c9
UD
38262004-11-20 Jakub Jelinek <jakub@redhat.com>
3827
ef2bb413
UD
3828 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3829 * pthread_cancel.c (pthread_create): Likewise.
3830
b639d0c9
UD
3831 * Makefile (libpthread-routines): Add vars.
3832 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3833 * init.c (__default_stacksize, __is_smp): Remove.
3834 * vars.c: New file.
3835 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3836 and define a wrapper macro.
3837 (PTHREAD_STATIC_FN_REQUIRE): Define.
3838 * allocatestack.c (__find_thread_by_id): Undefine.
3839 * pthread_create (__pthread_keys): Remove.
3840 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3841 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3842 PTHREAD_STATIC_FN_REQUIRE.
3843
3defcff3
UD
38442004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3845
3846 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3847 parameter to REGISTER macro.
3848
ec188f92
RM
38492004-11-17 Roland McGrath <roland@redhat.com>
3850
3851 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3852 Make sure SIGCANCEL is blocked as well.
3853
ccd8de9a
UD
38542004-11-10 Jakub Jelinek <jakub@redhat.com>
3855
3856 * sysdeps/pthread/setxid.h: New file.
3857 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3858 (struct xid_command): Add forward decl.
3859 (struct pthread_functions): Change return type of __nptl_setxid hook
3860 to int.
3861 * pthreadP.h (__nptl_setxid): Change return type to int.
3862 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3863 calling thread, return its return value and set errno on failure.
3864 * descr.h (struct xid_command): Change id type to long array.
3865
3866 * Makefile: Add rules to build and test tst-setuid1 and
3867 tst-setuid1-static.
3868 * tst-setuid1.c: New test.
3869 * tst-setuid1-static.c: New test.
3870
ed2ced8a
UD
38712004-11-10 Jakub Jelinek <jakub@redhat.com>
3872
3873 * Makefile (tests): Add tst-exit3.
3874 * tst-exit3.c: New test.
3875
948603ee
UD
38762004-11-09 Ulrich Drepper <drepper@redhat.com>
3877
3878 * Makefile (tests): Add tst-exit2.
3879 * tst-exit2.c: New file.
3880
ba5ffd2a
RM
38812004-11-09 Roland McGrath <roland@redhat.com>
3882
3883 [BZ #530]
3884 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3885 here, before calling clone.
3886 * pthread_create.c (start_thread): Don't do it here.
3887
c4d7bd39
RM
38882004-11-02 Jakub Jelinek <jakub@redhat.com>
3889
3890 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3891
543fb0c8
UD
38922004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3893
3894 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3895 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3896 assembler warning.
3897
a1fbd858
UD
38982004-10-28 Jakub Jelinek <jakub@redhat.com>
3899
3900 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3901 if sched_priority is not between minprio and maxprio.
3902
c2a4357a
UD
39032004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3904
3905 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3906 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3907
3908 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3909 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3910
78d8d211
UD
39112004-10-24 Ulrich Drepper <drepper@redhat.com>
3912
3913 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3914 not-cancelable I/O functions.
3915
dd28590f
UD
39162004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3917
3918 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3919 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3920 make sure 2 is stored in the futex and we looked at the old value.
3921 Fix a few other problems to return the correct value.
3922
f8c97af7
RH
39232004-10-14 Richard Henderson <rth@redhat.com>
3924
3925 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3926 make gcc4 happy.
3927
3feb8efa
UD
39282004-10-06 Jakub Jelinek <jakub@redhat.com>
3929
3930 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3931 of pthread-functions.h and pthreaddef.h.
3932 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3933
3934 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3935 Change __data.__nwaiters from int to unsigned int.
3936
3937 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3938 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3939
3940 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3941 before return type.
3942
3943 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3944 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3945
67060ef5
UD
39462004-10-06 Ulrich Drepper <drepper@redhat.com>
3947
3948 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3949 test fails, remove message queue.
3950 (tf_msgsnd): Likewise.
3951
f38a3086
UD
39522004-10-05 Jakub Jelinek <jakub@redhat.com>
3953
3954 * tst-clock1.c: Change #ifdef to #if defined.
3955 * tst-clock2.c: Likewise.
3956 * tst-cond11.c: Likewise.
3957
2c03b6db
UD
3958 * sysdeps/pthread/timer_create.c (timer_create): Use
3959 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3960 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3961 THREAD_CPUTIME.
3962
6ab5f50d
UD
39632004-10-05 Jakub Jelinek <jakub@redhat.com>
3964
3965 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3966 _POSIX_THREAD_CPUTIME): Define to 0.
3967
e4bb4853
UD
39682004-10-04 Ulrich Drepper <drepper@redhat.com>
3969
3970 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3971 and _POSIX_THREAD_CPUTIME to zero.
3972 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3973 * tst-barrier2.c: Fix testing for POSIX feature.
3974 * tst-clock1.c: Likewise.
3975 * tst-clock2.c: Likewise.
3976 * tst-cond11.c: Likewise.
3977 * tst-cond4.c: Likewise.
3978 * tst-cond6.c: Likewise.
3979 * tst-flock2.c: Likewise.
3980 * tst-mutex4.c: Likewise.
3981 * tst-mutex9.c: Likewise.
3982 * tst-rwlock12.c: Likewise.
3983 * tst-rwlock4.c: Likewise.
3984 * tst-signal1.c: Likewise.
3985 * tst-spin2.c: Likewise.
3986 * sysdeps/pthread/posix-timer.h: Likewise.
3987 * sysdeps/pthread/timer_create.c: Likewise.
3988 * sysdeps/pthread/timer_routines.c: Likewise.
3989
c1b48791
UD
39902004-10-01 Ulrich Drepper <drepper@redhat.com>
3991
927f0673
UD
3992 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3993 (__lll_mutex_timedlock_wait): Address futex correctly.
3994
c1b48791 3995 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 3996 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
3997 make sure 2 is stored in the futex and we looked at the old value.
3998 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3999 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4000 which might very well made the code not working at all before.
7b87aca6 4001 [BZ #417]
c1b48791 4002
e9f4e844
UD
40032004-09-28 Ulrich Drepper <drepper@redhat.com>
4004
4f21c95d
UD
4005 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4006 allow SIGSETXID to be sent.
4007 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4008 for SIGSETXID to be defined.
4009 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4010 SIGSETXID cannot be blocked.
4011
e9f4e844
UD
4012 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4013 Add __extension__ to long long types.
4014 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4015 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4016 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4017 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4018 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4019 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4020 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4021
5f66b766
UD
40222004-09-25 Ulrich Drepper <drepper@redhat.com>
4023
4024 * descr.h (struct pthread): Add stopped_start field.
4025 * sysdeps/pthread/createthread.c (create_thread): Set
4026 start_stopped flag in descriptor for new thread appropriately.
4027 * pthread_create.c (start_thread): Only take lock to be stopped on
4028 startup if stopped_start flag says so.
4029
362038b0
UD
40302004-09-24 Ulrich Drepper <drepper@redhat.com>
4031
3f80a99b
UD
4032 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4033 is created detached and if yes, do not try to free the stack in case
4034 the thread creation failed.
4035 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4036 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4037 case there has been no error. [BZ #405]
4038
362038b0
UD
4039 * pthread_create.c (start_thread): Don't wait for scheduler data
4040 etc to be set at the beginning of the function. The cancellation
4041 infrastructure must have been set up. And enable async
4042 cancellation before potentially going to sleep. [BZ #401]
4043
65f0beb9
UD
40442004-09-20 Ulrich Drepper <drepper@redhat.com>
4045
3c12b91a 4046 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
4047 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4048 for now.
4049 * Makefile: Don't build pthread_set*id code for now.
4050
2edb61e3
UD
40512004-09-19 Ulrich Drepper <drepper@redhat.com>
4052
4053 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4054 internal use.
4055 * allocatestack.c (__nptl_setxid): New function.
4056 * descr.h (struct xid_command): Define type.
4057 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4058 (sighandler_setxid): New function.
4059 (__pthread_initialize_minimal): Register sighandler_setxid for
4060 SIGCANCEL.
4061 * pt-allocrtsig.c: Update comment.
4062 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4063 Declare __nptl_setxid.
4064 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4065 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4066 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4067 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4068 and pthread_setresuid_np.
4069 * pthread_setgid_np.c: New file.
4070 * pthread_setuid_np.c: New file.
4071 * pthread_setegid_np.c: New file.
4072 * pthread_seteuid_np.c: New file.
4073 * pthread_setregid_np.c: New file.
4074 * pthread_setreuid_np.c: New file.
4075 * pthread_setresgid_np.c: New file.
4076 * pthread_setresuid_np.c: New file.
4077 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4078 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4079 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4080 and pthread_setresuid_np.
4081 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4082 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4083 pthread_setregid, and pthread_setresgid.
4084
1ab1fa6f
UD
40852004-09-18 Ulrich Drepper <drepper@redhat.com>
4086
4087 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4088 ENOMEM when out of memory.
4089
ae9e6b36
RM
40902004-09-10 Roland McGrath <roland@redhat.com>
4091
4092 [BZ #379]
4093 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4094 code, since we don't try to use the broken CLONE_STOPPED any more.
4095 * pthread_create.c (start_thread): Likewise.
4096
424bd2f8
RH
40972004-09-15 Richard Henderson <rth@redhat.com>
4098
4099 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4100
17b8a52d
UD
41012004-09-01 David Mosberger <davidm@hpl.hp.com>
4102
4103 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4104 (__libc_unwind_longjmp): Delete macro and declare as function.
4105 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4106 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4107 nptl directory.
4108 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4109 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4110 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4111
ccc63b07
UD
41122004-09-12 Ulrich Drepper <drepper@redhat.com>
4113
4114 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4115 for __USE_XOPEN2K.
4116 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4117 types also for __USE_XOPEN2K.
4118 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4119 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4120 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4121 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4122 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4123 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4124 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4125 [BZ #320]
4126
31f93b3b
UD
41272004-09-08 Ulrich Drepper <drepper@redhat.com>
4128
4129 * sysdeps/pthread/pthread.h
4130 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4131 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4132 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4133 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4134 [BZ #375]
4135
e0329987
UD
41362004-09-07 Ulrich Drepper <drepper@redhat.com>
4137
590b40f7
UD
4138 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4139 PSEUDO to be used with . prefix.
4140
67254a97
UD
4141 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4142 Use atomic_increment instead of atomic_exchange_and_add.
4143 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4144 Likewise.
4145 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4146 Likewise.
4147 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4148 Likewise.
4149
4150 * allocatestack.c (allocate_stack): Use atomic_increment_val
4151 instead of atomic_exchange_and_add.
4152 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4153 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4154 Likewise.
4155 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4156 Likewise.
4157
e0329987
UD
4158 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4159 the initialization function might throw.
4160
42d86dd6 41612005-09-05 Richard Henderson <rth@redhat.com>
e0329987 4162
42d86dd6
RH
4163 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4164 Move definition inside libpthread, libc, librt check. Provide
4165 definition for rtld.
4166
73f7c32c
UD
41672004-09-02 Ulrich Drepper <drepper@redhat.com>
4168
f76c8499
UD
4169 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4170 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4171 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4172 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4173 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4174 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4175 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4176 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4177 * unwind.c: Use it.
4178
73f7c32c
UD
4179 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4180 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4181 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4182 Likewise.
4183 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4184 Decrement __nwaiters. If pthread_cond_destroy has been called and
4185 this is the last waiter, signal pthread_cond_destroy caller and
4186 avoid using the pthread_cond_t structure after unlock.
4187 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4188 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4189 Read clock type from the least significant bits of __nwaiters instead
4190 of __clock.
4191 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4192 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4193
41942004-08-31 Jakub Jelinek <jakub@redhat.com>
4195
4196 [BZ #342]
4197 * Makefile (tests): Add tst-cond20 and tst-cond21.
4198 * tst-cond20.c: New test.
4199 * tst-cond21.c: New test.
4200 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4201 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4202 it unsigned int.
4203 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4204 Likewise.
4205 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4206 (pthread_cond_t): Likewise.
4207 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4208 Likewise.
4209 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4210 Likewise.
4211 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4212 Likewise.
4213 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4214 (cond_nwaiters): New.
4215 (clock_bits): New.
4216 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4217 if there are waiters not signalled yet.
4218 Wait until all already signalled waiters wake up.
4219 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4220 __nwaiters. If pthread_cond_destroy has been called and this is the
4221 last waiter, signal pthread_cond_destroy caller and avoid using
4222 the pthread_cond_t structure after unlock.
4223 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4224 decrement it when leaving. If pthread_cond_destroy has been called
4225 and this is the last waiter, signal pthread_cond_destroy caller.
4226 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4227 Likewise. Read clock type from the least significant bits of
4228 __nwaiters instead of __clock.
4229 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4230 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4231 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4232 clock type just from the last COND_CLOCK_BITS bits of value.
4233 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4234 instead of __clock, just from second bit of condattr's value.
4235
409f7493
UD
42362004-08-30 Jakub Jelinek <jakub@redhat.com>
4237
4238 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4239 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4240 != 64.
4241 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4242
92c6ccd1
RM
42432004-08-15 Roland McGrath <roland@frob.com>
4244
4245 * pthread_atfork.c: Update copyright terms including special exception
4246 for these trivial files, which are statically linked into executables
4247 that use dynamic linking for the significant library code.
4248
4d004cfb
UD
42492004-08-09 Jakub Jelinek <jakub@redhat.com>
4250
4251 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4252 pthread_rwlock_rdlock.
4253 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4254 Decrease __nr_readers_queued after reacquiring lock.
4255 * sysdeps/pthread/pthread_rwlock_timedrdlock
4256 (pthread_rwlock_timedrdlock): Likewise.
4257 Reported by Bob Cook <bobcook47@hotmail.com>.
4258
90595fb6
RM
42592004-08-11 Jakub Jelinek <jakub@redhat.com>
4260
4261 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4262 before pthread_barrier_wait.
4263
fa46f7ab
UD
42642004-08-07 Ulrich Drepper <drepper@redhat.com>
4265
4266 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4267 Remove unnecessary exception handling data.
4268
15ef4b55
UD
42692004-07-23 Jakub Jelinek <jakub@redhat.com>
4270
4271 [BZ #284]
4272 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4273 instead of clockid_t.
4274
4fb907b7
RM
42752004-07-21 Roland McGrath <roland@redhat.com>
4276
4277 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4278
42792004-07-19 Roland McGrath <roland@redhat.com>
4280
4281 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4282
8f73811b
RM
42832004-07-02 Roland McGrath <roland@redhat.com>
4284
4285 * configure: Don't exit.
4286
290639c3
UD
42872004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4288
4289 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4290 (__pthread_cond_timedwait): Check for invalid nanosecond in
4291 timeout value.
4292
8e5aaad9
UD
42932004-07-07 Ulrich Drepper <drepper@redhat.com>
4294
4295 * Makefile: Add rules to build and run tst-fini1.
4296 * tst-fini1.c: New file.
4297 * tst-fini1mod.c: New file.
4298
ce6e047f
UD
42992004-07-05 Ulrich Drepper <drepper@redhat.com>
4300
4301 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4302 if no cancellation support is needed.
4303 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4304 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4305 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4306 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4307 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4308 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4309 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4310 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4311 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4312
4313 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4314 only if not already defined.
4315
9b9ef823
UD
43162004-07-05 Jakub Jelinek <jakub@redhat.com>
4317
2dd18ce2
UD
4318 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4319 constraint "m" instead of "0" for futex.
4320
9b9ef823
UD
4321 * shlib-versions: Add powerpc64-.*-linux.*.
4322
38205402
UD
43232004-07-04 Jakub Jelinek <jakub@redhat.com>
4324
4325 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4326 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4327 for valid tv_nsec.
4328 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4329 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4330 bits.
4331
78a9c837
RM
43322004-06-29 Roland McGrath <roland@redhat.com>
4333
4334 * Banner: NPTL no longer has its own version number.
4335 * Makefile (nptl-version): Variable removed.
4336 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4337 using $(version), the glibc version number.
4338
d3d35527
UD
43392004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4340
4341 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4342 Fix branch offset for a PLT entry.
4343 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4344 Likewise.
4345 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4346 Likewise.
4347 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4348 Likewise.
4349 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4350 Likewise.
4351
346f18ae
UD
43522004-06-28 Jakub Jelinek <jakub@redhat.com>
4353
4354 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4355 unconditionally.
4356
f3a19754
UD
43572004-06-28 Jakub Jelinek <jakub@redhat.com>
4358
4359 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4360 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4361 instead of tv_sec.
4362 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4363 (pthread_rwlock_timedrdlock): Likewise.
4364
539842a4
UD
43652004-06-22 Jakub Jelinek <jakub@redhat.com>
4366
4367 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4368 Set __r7 to val, not mutex.
4369
46f4c578
UD
43702004-06-27 Ulrich Drepper <drepper@redhat.com>
4371
4372 * Makefile: Add rules to build tst-rwlock14.
4373 * tst-rwlock14.c: New file.
4374
43752004-06-24 Boris Hu <boris.hu@intel.com>
4376
4377 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4378 check.
4379 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4380
9898e99c
AJ
43812004-06-19 Andreas Jaeger <aj@suse.de>
4382
4383 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4384 assembler in last patch.
4385
7c3164bc
UD
43862004-06-17 Ulrich Drepper <drepper@redhat.com>
4387
4388 * sysdeps/pthread/pthread_cond_timedwait.c
4389 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4390 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4391 (__pthread_cond_timedwait): Check for invalid nanosecond in
4392 timeout value.
4393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4394 * tst-cond19.c: New file.
4395 * Makefile: Add rules to build and run tst-cond19.
4396
72e61500
UD
43972004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4398
4399 * tst-context1.c (GUARD_PATTERN): Defined.
4400 (tst_context_t): Define struct containing ucontext_t & guard words.
4401 (ctx): Declare as an array of tst_context_t.
4402 (fct): Verify uc_link & guard words are still valid.
4403 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4404
7c370086
UD
44052004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4406
4407 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4408 Add __data.__futex field, reshuffle __data.__clock.
4409 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4410 (__pthread_cond_signal): Increment __futex at the same time as
4411 __wakeup_seq or __total_seq. Pass address of __futex instead of
4412 address of low 32-bits of __wakeup_seq to futex syscall.
4413 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4414 (__pthread_cond_wait): Likewise. Pass __futex value from before
4415 releasing internal lock to FUTEX_WAIT.
4416 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4417 (__pthread_cond_timedwait): Likewise.
4418 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4419 (FUTEX_CMP_REQUEUE): Define.
4420 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4421 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4422 Pass __futex value from before the unlock and __futex address instead
4423 of address of low 32-bits of __wakeup_seq to futex syscall.
4424 Fallback to FUTEX_WAKE all on any errors.
4425
a9e526e7
RM
44262004-06-08 Jakub Jelinek <jakub@redhat.com>
4427
4428 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4429 comment typo.
4430 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4431 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4432 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4433 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4434 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4435
f1847a84
RM
44362004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4437
4438 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4439 Add memory clobber to inline assembly.
4440 (__lll_mutex_trylock): Likewise.
4441 (__lll_mutex_cond_trylock): Likewise.
4442
f7c81e1a
UD
44432004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4444
4445 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4446 Pass val argument as 6th system call argument in %r7.
4447
75fccede
UD
44482004-05-21 Jakub Jelinek <jakub@redhat.com>
4449
4450 * Makefile (tests): Add tst-cond16.
4451 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4452 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4453 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4454 Add __data.__futex field, reshuffle __data.__clock.
4455 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4456 (__pthread_cond_signal): Increment __futex at the same time as
4457 __wakeup_seq or __total_seq. Pass address of __futex instead of
4458 address of low 32-bits of __wakeup_seq to futex syscall.
4459 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4460 (__pthread_cond_wait): Likewise. Pass __futex value from before
4461 releasing internal lock to FUTEX_WAIT.
4462 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4463 (__pthread_cond_timedwait): Likewise.
4464 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4465 (FUTEX_CMP_REQUEUE): Define.
4466 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4467 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4468 Pass __futex value from before the unlock and __futex address instead
4469 of address of low 32-bits of __wakeup_seq to futex syscall.
4470 Fallback to FUTEX_WAKE all on any errors.
4471 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4472 Define.
4473 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4474 internally. Return non-zero if error, zero if success.
4475 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4476 Add __data.__futex field, reshuffle __data.__clock.
4477 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4478 Define.
4479 (lll_futex_requeue): Add val argument, return 1 unconditionally
4480 for the time being.
4481 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4482 Add __data.__futex field, reshuffle __data.__clock.
4483 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4484 Define.
4485 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4486 internally. Return non-zero if error, zero if success.
4487 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4488 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4489 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4490 Define.
4491 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4492 internally. Return non-zero if error, zero if success.
4493 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4494 Add __data.__futex field, reshuffle __data.__clock.
4495 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4496 Define.
4497 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4498 internally. Return non-zero if error, zero if success.
4499 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4500 Add __data.__futex field, reshuffle __data.__clock.
4501 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4502 Add __data.__futex field, reshuffle __data.__clock.
4503 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4504 Increment __futex at the same time as __wakeup_seq or __total_seq.
4505 Pass address of __futex instead of address of low 32-bits of
4506 __wakeup_seq to futex syscall.
4507 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4508 Pass __futex value from before releasing internal lock
4509 to FUTEX_WAIT.
4510 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4511 Likewise. Avoid unnecessary shadowing of variables.
4512 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4513 Set __futex to 2 * __total_seq. Pass __futex value from before the
4514 unlock and __futex address instead of address of low 32-bits of
4515 __wakeup_seq to futex_requeue macro, adjust for new return value
4516 meaning.
4517 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4518 (__pthread_cond_signal): Increment __futex at the same time as
4519 __wakeup_seq or __total_seq. Pass address of __futex instead of
4520 address of low 32-bits of __wakeup_seq to futex syscall.
4521 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4522 (__pthread_cond_wait): Likewise. Pass __futex value from before
4523 releasing internal lock to FUTEX_WAIT.
4524 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4525 (__pthread_cond_timedwait): Likewise.
4526 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4527 (FUTEX_CMP_REQUEUE): Define.
4528 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4529 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4530 Pass __futex value from before the unlock and __futex address instead
4531 of address of low 32-bits of __wakeup_seq to futex syscall.
4532 Fallback to FUTEX_WAKE all on any errors.
4533
45342004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4535
4536 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4537 Add nop to align the end of critical section.
4538 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4539
fbf86dda
UD
45402004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4541
4542 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4543 Add __broadcast_seq field.
4544 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4545 all waiters as woken with woken_seq and bump broadcast counter.
4546 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4547 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4548 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4549 Comment typo fixes. Avoid returning -ETIMEDOUT.
4550
45512004-06-01 Ulrich Drepper <drepper@redhat.com>
4552
4553 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4554 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4555 Reported by Kaz Kojima.
4556
ffdd5e50
UD
45572004-05-25 Jakub Jelinek <jakub@redhat.com>
4558
4559 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4560
3abc82c8
UD
45612004-05-21 Jakub Jelinek <jakub@redhat.com>
4562
4563 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4564 __broadcast_seq with bc_seq after acquiring internal lock instead of
4565 before it.
4566
893a3511
UD
45672004-05-18 Jakub Jelinek <jakub@redhat.com>
4568
4569 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4570 compilation.
4571 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4572 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4573 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4574 (pthread_cond_t): Add __data.__broadcast_seq field.
4575 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4576 (FRAME_SIZE): Define.
4577 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4578 Comment typo fixes.
4579 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4580 Define.
4581 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4582 typo fixes.
4583 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4584 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4585 fixes.
4586
45872004-05-18 Ulrich Drepper <drepper@redhat.com>
4588
4589 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4590 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4591 Add __broadcast_seq field.
4592 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4593 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4594 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4595 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4596 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4597 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4598 all waiters as woken with woken_seq and bump broadcast counter.
4599 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4600 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4601 __broadcast_seq field.
4602 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4603 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4604 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4605 * pthread_cond_init.c: Initialize __broadcast_seq field.
4606 * Makefile (tests): Add tst-cond17 and tst-cond18.
4607 Add .NOTPARALLEL goal.
4608 * tst-cond16.c: New file. From Jakub.
4609 * tst-cond17.c: New file. From Jakub.
4610 * tst-cond18.c: New file. From Jakub.
4611
4123718e
UD
46122004-05-16 Ulrich Drepper <drepper@redhat.com>
4613
4614 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4615 unwind info.
4616
4617 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4618 Parametrize frame size. Correct some unwind info.
4619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4620
2d7ae210
UD
46212004-05-04 Jakub Jelinek <jakub@redhat.com>
4622
4623 * tst-stack3.c: Note testing functionality beyond POSIX.
4624
50c2b6d7
UD
46252004-05-04 Jakub Jelinek <jakub@redhat.com>
4626
4627 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4628 Change conditional from ifdef to if.
4629
27b02589
UD
46302004-04-23 Jakub Jelinek <jakub@redhat.com>
4631
4632 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4633 SYSDEP_CANCEL_ERROR): Define.
4634 (PSEUDO): Use it.
4635
4bb8fc33
UD
46362004-05-01 Jakub Jelinek <jakub@redhat.com>
4637
4638 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4639
f9a06dc1
UD
46402004-04-20 Jakub Jelinek <jakub@redhat.com>
4641
4642 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4643
d3b52028
UD
46442004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4645
4646 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4647 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4648 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4649 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4650
a5dd0a6c
UD
46512004-04-19 Ulrich Drepper <drepper@redhat.com>
4652
4653 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4654 thread has all signals blocked.
4655
620c3354
AJ
46562004-04-18 Andreas Jaeger <aj@suse.de>
4657
4658 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4659 (SEM_VALUE_MAX): Add missing brace.
4660
1683daeb
UD
46612004-04-17 Jakub Jelinek <jakub@redhat.com>
4662
4663 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4664 in rt subdir.
4665 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4666 * sysdeps/pthread/tst-mqueue8x.c: New test.
4667 * tst-cancel4.c: Update comment about message queues.
4668
4669 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4670 return it_value { 0, 0 }.
4671 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4672 like SIGEV_SIGNAL.
4673 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4674 assertion for SIGEV_NONE.
4675 (thread_attr_compare): Compare all attributes, not just a partial
4676 subset.
4677
46782004-04-17 Jakub Jelinek <jakub@redhat.com>
4679
4680 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4681
f532641d
UD
46822004-04-17 Ulrich Drepper <drepper@redhat.com>
4683
4684 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4685 Just use a plain number.
4686 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4687 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4688 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4689 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4690 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4691 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4692 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4693
7eb7fdda
UD
46942004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4695
53392906
UD
4696 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4697 frame info.
4698 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 4699
d7ba1313
UD
47002004-04-15 Jakub Jelinek <jakub@redhat.com>
4701
4702 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4703 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4704 of calling sigwaitinfo.
4705
5adac0e4
UD
47062004-04-16 Ulrich Drepper <drepper@redhat.com>
4707
4708 * allocatestack.c (allocate_stack): Set reported_guardsize
4709 unconditionally.
4710 * pthread_getattr_np.c (pthread_getattr_np): Use
4711 reported_guardsize instead of guardsize.
4712 * descr.h (struct pthread): Add reported_guardsize field.
4713
f93fa7d4
UD
47142004-04-13 Jakub Jelinek <jakub@redhat.com>
4715
4716 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4717
1b82c6c7
UD
47182004-04-12 Ulrich Drepper <drepper@redhat.com>
4719
4720 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4721
47222004-04-08 Jakub Jelinek <jakub@redhat.com>
4723
4724 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4725 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4726 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4727 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4728 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4729 Define.
4730 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4731 (_POSIX_MESSAGE_PASSING): Define.
4732 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4733 (_POSIX_MESSAGE_PASSING): Define.
4734 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4735 (_POSIX_MESSAGE_PASSING): Define.
4736
e6eb894e
UD
47372004-04-04 Ulrich Drepper <drepper@redhat.com>
4738
4739 * tst-context1.c (fct): Check whether correct stack is used.
4740
1e084487
UD
47412004-04-03 Ulrich Drepper <drepper@redhat.com>
4742
4e73e115
UD
4743 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4744 matching constraints for asm mem parameters.
4745
1e084487
UD
4746 * tst-clock2.c (tf): Don't define unless needed.
4747
feca5e0b
UD
47482004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4749
4750 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4751 $(gnulib).
4752
3fa21fd8
UD
47532004-03-30 Ulrich Drepper <drepper@redhat.com>
4754
4755 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4756 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4757 * pthreadP.h: Declare __nptl_deallocate_tsd.
4758 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4759 Adjust caller.
4760
4761 * Makefile (tests): Add tst-tsd5.
4762 * tst-tsd5.c: New file.
4763
8e32efa6
UD
47642004-03-29 Ulrich Drepper <drepper@redhat.com>
4765
4766 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4767 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4768 is SHLIB_COMPAT check.
4769 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4770 (__pthread_attr_getaffinity_old): Likewise.
4771 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4772 (__pthread_getaffinity_old): Likewise.
4773 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4774 (__pthread_setaffinity_old): Likewise.
4775
eec8b6ca
UD
47762004-03-26 Ulrich Drepper <drepper@redhat.com>
4777
4778 * allocatestack.c (_make_stacks_executable): Call
4779 _dl_make_stack_executable first.
4780
db2f05ba
RM
47812004-03-24 Roland McGrath <roland@redhat.com>
4782
4783 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4784 constraint instead of "0".
4785
6abbc501
UD
47862004-03-24 Ulrich Drepper <drepper@redhat.com>
4787
68dc4dcb
UD
4788 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4789 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4790
6abbc501
UD
4791 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4792 code to avoid warning.
4793
865e14d9
AJ
47942004-03-24 Andreas Jaeger <aj@suse.de>
4795
4796 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4797 (__pthread_attr_setaffinity_old): Remove const.
4798
16b06b70
UD
47992004-03-23 Ulrich Drepper <drepper@redhat.com>
4800
2c0b891a
UD
4801 * sysdeps/unix/sysv/linux/smp.h: New file.
4802 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4803 * init.c: Define __is_smp.
4804 (__pthread_initialize_minimal_internal): Call is_smp_system to
4805 initialize __is_smp.
4806 * pthreadP.h: Declare __is_smp.
4807 Define MAX_ADAPTIVE_COUNT is necessary.
4808 * pthread_mutex_init.c: Add comment regarding __spins field.
4809 * pthread_mutex_lock.c: Implement adaptive mutex type.
4810 * pthread_mutex_timedlock.c: Likewise.
4811 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4812 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4813 Add __spins field.
4814 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4815 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4816 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4817 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4818 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4819 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4820 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4821 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4822 lll_mutex_cond_trylock.
4823 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4824 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4825 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4826 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4827 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4828 Define BUSY_WAIT_NOP.
4829 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4830 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4831
4832 * tst-mutex5.c: Add support for testing adaptive mutexes.
4833 * tst-mutex7.c: Likewise.
4834 * tst-mutex5a.c: New file.
4835 * tst-mutex7a.c: New file.
4836 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4837
565699e4
UD
4838 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4839 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 4840 vgettimeofday call might destroy the content.
565699e4 4841
7fe1586f
UD
4842 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4843 @pause in the loop.
4844
e408880b
UD
4845 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4846 No need to restrict type of ret. Make it int. Add comment.
4847
16b06b70
UD
4848 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4849 Remove unnecessary setne instruction.
4850
61645263
UD
48512004-03-22 Jakub Jelinek <jakub@redhat.com>
4852
4853 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4854 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4855 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4856 If realloc fails, break out of the loop.
4857
e3d4c585
AJ
48582004-03-20 Andreas Jaeger <aj@suse.de>
4859
4860 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4861 (__pthread_setaffinity_old): Fix interface.
4862 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4863 (__pthread_getaffinity_old): Likewise.
4864
4865 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4866 (__pthread_setaffinity_new): Remove duplicate declaration.
4867
3abb1ff7
UD
48682004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4869
4870 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4871 the return value to a safe register.
4872 (CDISABLE): Set the function argument correctly.
4873
07bd2a3f
UD
48742004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4875
4876 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4877 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4878 Rewrite so that only one locked memory operation per round is needed.
4879 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4880 (pthread_barrier_wait): After wakeup, release lock only when the
4881 last thread stopped using the barrier object.
4882 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4883 (__pthread_cond_wait): Don't store mutex address if the current
4884 value is ~0l. Add correct cleanup support and unwind info.
4885 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4886 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4887 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4888 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4889 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4890 Add correct cleanup support and unwind info.
4891 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4892 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4893 information for syscall wrappers.
4894
14c35863
UD
48952004-03-18 Ulrich Drepper <drepper@redhat.com>
4896
4897 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4898 cpusetsize field, remove next.
4899 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4900 parameter for size of the CPU set.
4901 (pthread_setaffinity_np): Likewise.
4902 (pthread_attr_getaffinity_np): Likewise.
4903 (pthread_attr_setaffinity_np): Likewise.
4904 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4905 interface change, keep compatibility code.
4906 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4907 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4908 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4909 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4910 __pthread_getaffinity_np.
4911 * Versions: Add version for changed interfaces.
4912 * tst-attr3.c: Adjust test for interface change.
4913 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4914 increasing buffer sizes.
4915 * pthread_attr_destroy.c: Remove unused list handling.
4916 * pthread_attr_init.c: Likewise.
4917
8e115d80
RM
49182004-03-17 Roland McGrath <roland@redhat.com>
4919
4920 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4921 first argument to clock_getres so we ever enable kernel timers.
4922
e3b22ad3
UD
49232004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4924
4925 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4926
841153fa
RH
49272004-03-12 Richard Henderson <rth@redhat.com>
4928
e3b22ad3
UD
4929 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4930 oldvalue from CENABLE to CDISABLE.
841153fa 4931
932dfea7
UD
49322004-03-12 Ulrich Drepper <drepper@redhat.com>
4933
4934 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4935 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4936 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4937 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4938
9852f6dc
RH
49392004-03-11 Richard Henderson <rth@redhat.com>
4940
4941 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4942 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4943 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4944
43513fb7
UD
49452004-03-11 Jakub Jelinek <jakub@redhat.com>
4946
4947 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4948 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4949 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4950
49512004-03-11 Jakub Jelinek <jakub@redhat.com>
4952
4953 * forward.c (__pthread_cond_broadcast_2_0,
4954 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4955 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4956 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4957
8a3e10e0
UD
49582004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4959
4960 * sysdeps/sh/tcb-offsets.sym: Add PID.
4961 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4962 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4963
6d3a2bec
UD
49642004-03-10 Ulrich Drepper <drepper@redhat.com>
4965
4966 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4967 include <sysdep-cancel.h>, vfork is no cancellation point.
4968 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4969 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4970 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4971
d3a4a571
UD
49722004-03-10 Jakub Jelinek <jakub@redhat.com>
4973
73b4ce64
UD
4974 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4975 libc_hidden_def.
4976 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4977 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4978 Likewise.
4979 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4980 Likewise.
4981 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4982 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4983 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4984 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4985 of DO_CALL_VIA_BREAK. Work around a gas problem.
4986
d682a515
UD
4987 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4988 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4989 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4990 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4991 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4992 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4993
4994 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4995 a local register for saving old PID. Negate PID in parent upon exit.
4996
d3a4a571
UD
4997 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4998 tcb-offsets.h.
4999 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5000 before syscall, set to the old value in the parent afterwards.
5001 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5002 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5003 tcb-offsets.h.
5004 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5005 before syscall, set to the old value in the parent afterwards.
5006 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5007 * sysdeps/s390/tcb-offsets.sym: Add PID.
5008
5009 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5010 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5011 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5012 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5013 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5014 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5015
50162004-03-10 Andreas Schwab <schwab@suse.de>
5017
5018 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5019 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5020 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5021
3f2fb223 50222004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 5023
3f2fb223
UD
5024 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5025 * tst-cancel21.c (do_one_test): Likewise.
5026 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 5027
8b9d6054
UD
50282004-02-09 Jakub Jelinek <jakub@redhat.com>
5029
5030 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5031 if non-zero and set to INT_MIN if zero.
5032 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5033 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5034 (SAVE_PID, RESTORE_PID): Define.
5035 (__vfork): Use it.
5036 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5037 Use relative path to avoid including NPTL i386/vfork.S.
5038 (SAVE_PID, RESTORE_PID): Define.
5039 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5040 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5041 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5042 tst-vfork2x.
5043 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5044 * tst-vfork1.c: New test.
5045 * tst-vfork2.c: New test.
5046 * tst-vfork1x.c: New test.
5047 * tst-vfork2x.c: New test.
5048
02287d05
UD
50492004-03-08 Ulrich Drepper <drepper@redhat.com>
5050
c072ef6d 5051 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 5052 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 5053 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 5054 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 5055
d4acd24b
UD
50562004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5057
5058 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5059
8acb4b81
UD
50602004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5061
5062 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5063 _rtld_global_ro.
5064
4d1a02ef
UD
50652004-03-07 Ulrich Drepper <drepper@redhat.com>
5066
001836c8 5067 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 5068 _rtld_global_ro.
001836c8 5069
4d1a02ef
UD
5070 * tst-once4.c: Remove unnecessary macro definition.
5071
5072 * tst-mutex7.c (do_test): Limit thread stack size.
5073 * tst-once2.c (do_test): Likewise.
5074 * tst-tls3.c (do_test): Likewise.
5075 * tst-tls1.c (do_test): Likewise.
5076 * tst-signal3.c (do_test): Likewise.
5077 * tst-kill6.c (do_test): Likewise.
5078 * tst-key4.c (do_test): Likewise.
5079 * tst-join4.c (do_test): Likewise.
5080 * tst-fork1.c (do_test): Likewise.
5081 * tst-context1.c (do_test): Likewise.
5082 * tst-cond2.c (do_test): Likewise.
5083 * tst-cond10.c (do_test): Likewise.
5084 * tst-clock2.c (do_test): Likewise.
5085 * tst-cancel10.c (do_test): Likewise.
5086 * tst-basic2.c (do_test): Likewise.
5087 * tst-barrier4.c (do_test): Likewise.
5088
aa420660
UD
50892004-03-05 Ulrich Drepper <drepper@redhat.com>
5090
5091 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5092
cff08c81
UD
50932004-03-01 Ulrich Drepper <drepper@redhat.com>
5094
5095 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5096 (__pthread_cond_timedwait): Optimize wakeup test.
5097 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5098 (__pthread_cond_wait): Likewise.
5099 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5100 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5101 Likewise.
5102
b7fe377c
UD
51032004-02-29 Ulrich Drepper <drepper@redhat.com>
5104
5105 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5106 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5107 the atomic instruction needed.
5108 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5109 (__lll_mutex_lock_wait): Likewise.
5110
4c771a3b
UD
51112004-02-28 Ulrich Drepper <drepper@redhat.com>
5112
5113 * Makefile (tests): Add tst-cond14 and tst-cond15.
5114 * tst-cond14.c: New file.
5115 * tst-cond15.c: New file.
5116
a2c33d5a
UD
51172004-02-27 Ulrich Drepper <drepper@redhat.com>
5118
5119 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5120 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5121 needs to be implemented differently to be useful.
5122
261eada2
UD
51232004-02-26 Ulrich Drepper <drepper@redhat.com>
5124
14ffbc83
UD
5125 * pthread_attr_setschedparam.c: Don't test priority against limits
5126 here. Set ATTR_FLAG_SCHED_SET flag.
5127 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5128 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5129 from parent thread to child. If attribute is used and scheduling
5130 parameters are not inherited, copy parameters from attribute or
5131 compute them. Check priority value.
5132 * pthread_getschedparam.c: If the parameters aren't known yet get
5133 them from the kernel.
5134 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5135 ATTR_FLAG_POLICY_SET flag for thread.
5136 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5137 and ATTR_FLAG_POLICY_SET.
5138
5139 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5140
261eada2
UD
5141 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5142 fail if stack address hasn't been set. Just return 0.
5143
701d185c
UD
51442004-02-25 Ulrich Drepper <drepper@redhat.com>
5145
25b8e63c
UD
5146 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5147 libpthread for the files in this list.
5148 (CFLAGS-tst-unload): Removed.
5149 * tst-unload.c (do_test): Don't use complete path for
5150 LIBPHREAD_SO.
5151
701d185c
UD
5152 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5153 tst-_res1mod2.
5154
a8fd5a02
UD
51552004-02-22 Ulrich Drepper <drepper@redhat.com>
5156
5157 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5158 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5159 operation per round is needed.
5160 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5161 (__lll_mutex_lock_wait): Likewise.
5162
dd0b7b19
UD
51632004-02-20 Ulrich Drepper <drepper@redhat.com>
5164
5165 * tst-cancel9.c (cleanup): Don't print to stderr.
5166
5990e1fe
UD
51672004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5168
5169 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5170
33ab3b66
UD
51712004-02-20 Jakub Jelinek <jakub@redhat.com>
5172
1be3130e
UD
5173 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5174 (__syscall_error_handler2): Call CDISABLE.
5175 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5176 (__syscall_error_handler2): Call CDISABLE.
5177
8ba5025a
UD
5178 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5179 Release lock before the loop, don't reacquire it.
8ba5025a 5180
33ab3b66
UD
5181 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5182
11986c68
UD
51832004-02-19 Andreas Schwab <schwab@suse.de>
5184
5185 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5186 Fix last change.
5187
dc391246
UD
51882004-02-18 Ulrich Drepper <drepper@redhat.com>
5189
37c054c7
UD
5190 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5191 (pthread_barrier_wait): After wakeup, release lock only when the
5192 last thread stopped using the barrier object.
5193 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5194 (pthread_barrier_wait): Likewise.
5195 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5196 Likewise.
5197 * Makefile (tests): Add tst-barrier4.
5198 * tst-barrier4.c: New file.
dc391246
UD
5199
5200 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5201 (__pthread_cond_timedwait): Perform timeout test while holding
5202 internal lock to prevent wakeup race.
5203 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5204 * sysdeps/pthread/pthread_cond_timedwait.c
5205 (__pthread_cond_timedwait): Likewise.
5206 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5207 (__pthread_cond_timedwait): Likewise.
5208
4a08113c
UD
52092004-02-18 Jakub Jelinek <jakub@redhat.com>
5210
5211 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5212 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5213 * Makefile (tests): Add tst-rwlock13.
5214 * tst-rwlock13.c: New test.
5215
71b1675e
UD
52162004-02-16 Ulrich Drepper <drepper@redhat.com>
5217
5218 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5219 (__condvar_tw_cleanup): Little optimization.
5220 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5221
cd9fdc72
UD
52222004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5223
5224 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5225 libpthread as "lib" parameter to SHLIB_COMPAT.
5226 (__novmx_siglongjmp): Fix typo in function name.
5227 (__novmx_longjmp): Fix typo in function name.
5228
82038750
UD
52292004-02-13 Ulrich Drepper <drepper@redhat.com>
5230
b078c591
UD
5231 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5232 __builtin_expect.
5233
82038750
UD
5234 * sysdeps/generic/pt-longjmp.c: Moved to...
5235 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5236
e2982bf0
UD
52372004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5238
5239 * Makefile (libpthread-routines): Add pt-cleanup.
5240 * pt-longjmp.c: Removed.
5241 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5242 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5243 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5244 Version longjmp, siglongjmp for GLIBC_2.3.4.
5245 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5246
3730d95c
UD
52472004-02-13 Ulrich Drepper <drepper@redhat.com>
5248
219304ec
UD
5249 * sysdeps/pthread/pthread_cond_timedwait.c
5250 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5251 Reuse code. Add __builtin_expects.
5252
3730d95c
UD
5253 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5254 (__pthread_cond_timedwait): Get internal lock in case timeout has
5255 passed before the futex syscall.
5256 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5257
5673ccc1
UD
52582004-01-20 Ulrich Drepper <drepper@redhat.com>
5259
debddf64
UD
5260 * allocatestack.c: Pretty printing.
5261
5673ccc1
UD
5262 * sysdeps/pthread/createthread.c (create_thread): Don't add
5263 CLONE_DETACHED bit if it is not necessary.
5264
6bae8725
UD
52652004-01-16 Ulrich Drepper <drepper@redhat.com>
5266
5267 * pthread_getattr_np.c: Include ldsodefs.h.
5268
ff151400
RH
52692004-01-16 Richard Henderson <rth@redhat.com>
5270
6bae8725
UD
5271 * allocatestack.c: Don't declare __libc_stack_end.
5272 * init.c (__pthread_initialize_minimal_internal): Likewise.
5273 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 5274
ba683832
RH
52752004-01-15 Richard Henderson <rth@redhat.com>
5276
5277 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5278 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5279 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5280 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5281 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5282 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5283 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5284 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5285
630d93a7
UD
52862004-01-14 Ulrich Drepper <drepper@redhat.com>
5287
219304ec 5288 * init.c (pthread_functions): Make array const.
630d93a7 5289
d1fc817e
UD
52902004-01-13 Ulrich Drepper <drepper@redhat.com>
5291
5292 * allocatestack.c (__make_stacks_executable): Change interface.
5293 Check parameters. Pass parameter on to libc counterpart.
5294 * pthreadP.h: Change declaration.
5295
dc927809
RH
52962004-01-13 Richard Henderson <rth@redhat.com>
5297
10677727
UD
5298 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5299 prototype form.
5300 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5301 Likewise.
5302
d1fc817e
UD
5303 * sysdeps/alpha/Makefile: New file.
5304 * sysdeps/alpha/tcb-offsets.sym: New file.
5305 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5306 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 5307
d1fc817e
UD
5308 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5309 on powerpc version.
dc927809 5310
249a3d0c
UD
53112004-01-08 Jakub Jelinek <jakub@redhat.com>
5312
5313 * Makefile (tests): Add tst-backtrace1.
5314 * tst-backtrace1.c: New test.
5315
763c0490
RM
53162003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5317
5318 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5319 register as second parameter to the REGISTER macro.
5320 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5321 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5322 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5323 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5324 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5325 of thread register as second parameter to REGISTER macro in 64 case.
5326
c7baafd5
UD
53272004-01-03 Ulrich Drepper <drepper@redhat.com>
5328
5329 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5330 (CFLAGS-getpid.o): Defined.
5331 (CFLAGS-getpid.os): Defined.
5332
25ac0258
UD
53332003-12-31 Ulrich Drepper <drepper@redhat.com>
5334
5335 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5336 returned for main thread does not overlap with any other VMA.
5337 Patch by Jakub Jelinek.
5338
795985e4
UD
53392003-12-29 Jakub Jelinek <jakub@redhat.com>
5340
5341 * tst-raise1.c: Include stdio.h.
5342
cb5b9388
UD
53432003-12-23 Jakub Jelinek <jakub@redhat.com>
5344
5345 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5346 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5347 If pid is 0, set it to selftid.
5348 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5349 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5350 != 0, return self->tid without doing a syscall.
5351 * descr.h (struct pthread): Move pid field after tid.
5352
5353 * Makefile (tests): Add tst-raise1.
5354 * tst-raise1.c: New file.
5355
432aaf5b
RM
53562003-12-23 Roland McGrath <roland@redhat.com>
5357
5358 * tst-oddstacklimit.c: New file.
5359 * Makefile (tests): Add it.
5360 (tst-oddstacklimit-ENV): New variable.
5361
5362 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5363 value up to page size for __default_stacksize.
5364
33ebea17
UD
53652003-12-21 Ulrich Drepper <drepper@redhat.com>
5366
5367 * Makefile (tests): Add tst-eintr5.
5368 * tst-eintr5.c: New file.
5369
5370 * eintr.c (eintr_source): Prevent sending signal to self.
5371
5372 * tst-eintr2.c (tf1): Improve error message.
5373
bbe35eb5
UD
53742003-12-20 Ulrich Drepper <drepper@redhat.com>
5375
5376 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5377 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
5378 * pthread_cancel.c: Add comment explaining use of PID field.
5379 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5380 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5381 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5382 temporarily to signal the field must not be relied on and updated
5383 by getpid().
5384 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5385 temporarily negative.
5386 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 5387
4efdd8d3
UD
53882003-12-19 Ulrich Drepper <drepper@redhat.com>
5389
5390 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5391 (eintr_source): If ARG != NULL, use pthread_kill.
5392 * tst-eintr1.c: Adjust for this change.
5393 * tst-eintr2.c: Likewise.
5394 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5395 * tst-eintr3.c: New file.
5396 * tst-eintr4.c: New file.
5397
53982003-12-19 Jakub Jelinek <jakub@redhat.com>
5399
5400 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5401 if CANCELSTATE_BITMASK is set.
5402 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5403 Likewise.
5404
5405 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5406 (tests-reverse): Add tst-cancel23.
5407 * tst-cancel22.c: New test.
5408 * tst-cancel23.c: New test.
5409
675620f7
UD
54102003-12-18 Ulrich Drepper <drepper@redhat.com>
5411
5412 * tst-eintr1.c: Better error messages.
5413
5414 * Makefile (tests): Add tst-eintr2.
5415 * tst-eintr2.c: New file.
5416
54172003-12-18 Jakub Jelinek <jakub@redhat.com>
5418
5419 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5420 (CFLAGS-tst-cancelx21.c): Set.
5421 * tst-cancel21.c: New test.
5422 * tst-cancelx21.c: New test.
5423
5424 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5425 comparison operand.
5426 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5427 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5428 * pt-longjmp.c: Include jmpbuf-unwind.h.
5429 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5430 _JMPBUF_UNWINDS. Adjust compared pointers.
5431 * init.c (__pthread_initialize_minimal_internal): Initialize
5432 pd->stackblock_size.
5433 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5434 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5435 * sysdeps/i386/jmpbuf-unwind.h: New file.
5436 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5437 * sysdeps/s390/jmpbuf-unwind.h: New file.
5438 * sysdeps/sh/jmpbuf-unwind.h: New file.
5439 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5440 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 5441 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
5442 (_JMPBUF_CFA_UNWINDS): Remove.
5443 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5444
54452003-12-12 Jakub Jelinek <jakub@redhat.com>
5446
5447 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5448 (CFLAGS-tst-cancelx20.c): Set.
5449 * tst-cancel20.c: New test.
5450 * tst-cancelx20.c: New test.
5451
2d951ab6
UD
54522003-12-17 Ulrich Drepper <drepper@redhat.com>
5453
5454 * init.c (__pthread_initialize_minimal_internal): Don't treat
5455 architectures with separate register stack special here when
5456 computing default stack size.
5457
f8a3a2e7
RM
54582003-12-17 Roland McGrath <roland@redhat.com>
5459
5460 * Makefile (tst-cancelx7-ARGS): New variable.
5461 Reportd by Greg Schafer <gschafer@zip.com.au>.
5462
e796f92f
UD
54632003-12-17 Jakub Jelinek <jakub@redhat.com>
5464
5465 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5466 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5467 (tst-stack3-ENV): Set.
5468 ($(objpfx)tst-stack3-mem): New.
5469 * tst-stack3.c: New test.
5470
092eb73c
UD
54712003-12-10 David Mosberger <davidm@hpl.hp.com>
5472
5473 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5474 Add unwind directives. Drop unused .regstk directive.
5475 (_fini_EPILOG_BEGINS): Add unwind directives.
5476
ff48874d
UD
54772003-12-11 Ulrich Drepper <drepper@redhat.com>
5478
5479 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5480 Assume parameter is a pointer.
5481 (lll_futex_wake): Likewise.
20945457
UD
5482 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5483 Likewise.
5484 (lll_futex_wake): Likewise.
ff48874d
UD
5485 Reported by Boris Hu.
5486 * sysdeps/unix/sysv/linux/unregister-atfork.c
5487 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5488
5489 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5490
1d9d0b80
UD
54912003-12-10 Ulrich Drepper <drepper@redhat.com>
5492
5493 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5494 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5495 __rtld_lock_initialize for ld.so lock.
5496 Patch in part by Adam Li <adam.li@intel.com>.
5497
c776b3d7
UD
54982003-12-02 David Mosberger <davidm@hpl.hp.com>
5499
5500 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5501 in $(gnulib). Also, remove stale comment.
5502
55032003-11-12 David Mosberger <davidm@hpl.hp.com>
5504
5505 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5506 advantage of new syscall stub and optimize accordingly.
5507
5508 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5509 from SYS_futex, to match expectations of
5510 sysdep.h:DO_INLINE_SYSCALL.
5511 (lll_futex_clobbers): Remove.
5512 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5513 (lll_futex_wake): Likewise.
5514 (lll_futex_requeue): Likewise.
5515 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5516 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5517 Jelinek).
5518 (__lll_mutex_lock): Likewise.
5519 (__lll_mutex_cond_lock): Likewise.
5520 (__lll_mutex_timed_lock): Likewise.
5521 (__lll_mutex_unlock): Likewise.
5522 (__lll_mutex_unlock_force): Likewise.
5523
5524 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5525 comes before the include of <sysdep.h>.
5526 (THREAD_SELF_SYSINFO): New macro.
5527 (THREAD_SYSINFO): Likewise.
5528 (INIT_SYSINFO): New macro.
5529 (TLS_INIT_TP): Call INIT_SYSINFO.
5530
5531 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5532
5533 * sysdeps/pthread/createthread.c (create_thread): Use
5534 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5535 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5536 THREAD_SELF_SYSINFO instead of open code.
5537 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5538 (THREAD_SYSINFO): Likewise.
5539
5540 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5541
5542 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5543
57d20ee7
UD
55442003-12-06 Ulrich Drepper <drepper@redhat.com>
5545
5546 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5547 instead of .init. Patch by David Mosberger.
5548
67aeab2a
AJ
55492003-11-30 Thorsten Kukuk <kukuk@suse.de>
5550
5551 * sysdeps/pthread/configure.in: Remove broken declaration in C
5552 cleanup handling check.
5553
8ca203e6
AJ
55542003-11-30 Andreas Jaeger <aj@suse.de>
5555
5556 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5557 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5558 Likewise.
5559
46bf9de7
UD
55602003-11-27 Jakub Jelinek <jakub@redhat.com>
5561
5562 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5563 * pthread_attr_destroy.c: Include shlib-compat.h.
5564 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5565 is set in iattr->flags.
5566 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5567
1d9b73ab
UD
55682003-11-21 Jakub Jelinek <jakub@redhat.com>
5569
5570 * Makefile (distribute): Add tst-cleanup4aux.c.
5571
5572 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5573 include.
5574
53f9084e
UD
55752003-11-21 Ulrich Drepper <drepper@redhat.com>
5576
1d9b73ab
UD
5577 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5578 pthread_cond_signal.
5579
e42a990e
UD
5580 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5581 store mutex address if the current value is ~0l.
5582 * sysdeps/pthread/pthread_cond_timedwait.c
5583 (__pthread_cond_timedwait): Likewise.
5584 * sysdeps/pthread/pthread_cond_broadcast.c
5585 (__pthread_cond_broadcast): Don't use requeue for pshared
5586 condvars.
5587
5588 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5589 (__pthread_cond_wait): Don't store mutex address if the current
5590 value is ~0l.
5591 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5592 (__pthread_cond_timedwait): Likewise.
5593 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5594 (__pthread_cond_broadcast): Don't use requeue for pshared
5595 condvars.
5596
5597 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5598 element with ~0l for pshared condvars, with NULL otherwise.
5599
5600 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5601 (__pthread_cond_wait): Don't store mutex address if the current
5602 value is ~0l.
5603 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5604 (__pthread_cond_timedwait): Likewise.
5605 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5606 (__pthread_cond_broadcast): Don't use requeue for pshared
5607 condvars.
5608
bf68b236 5609 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 5610 * tst-cond12.c: New file.
bf68b236 5611 * tst-cond13.c: New file.
53f9084e 5612
9780c971
UD
56132003-11-17 Ulrich Drepper <drepper@redhat.com>
5614
5615 * sysdeps/pthread/configure.in: Make missing forced unwind support
5616 fatal.
5617
74e12fbc
UD
56182003-11-11 Ulrich Drepper <drepper@redhat.com>
5619
5620 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5621
c685b2b0
UD
56222003-11-06 Ulrich Drepper <drepper@redhat.com>
5623
5624 * Makefile: Add magic to clean up correctly.
5625
44e94149
UD
56262003-11-05 Jakub Jelinek <jakub@redhat.com>
5627
5628 * unwind.c (FRAME_LEFT): Define.
5629 (unwind_stop): Handle old style cleanups here.
5630 (__pthread_unwind): Handle old style cleanups only if
5631 !HAVE_FORCED_UNWIND.
5632 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5633 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5634 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5635 ($(objpfx)tst-cleanupx4): Likewise.
5636 * tst-cleanup4.c: New test.
5637 * tst-cleanup4aux.c: New.
5638 * tst-cleanupx4.c: New test.
5639
c28422b5
UD
56402003-11-04 Ulrich Drepper <drepper@redhat.com>
5641
5642 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5643 lll_mutex_*lock macros to skip atomic operations on some archs.
5644
27176677
UD
56452003-11-03 Ulrich Drepper <drepper@redhat.com>
5646
5647 * sysdeps/pthread/tst-timer.c (main): Initialize
5648 sigev2.sigev_value as well.
5649
026395a2
RM
56502003-10-15 Roland McGrath <roland@redhat.com>
5651
5652 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5653 is missing.
5654 * sysdeps/pthread/configure: Regenerated.
5655
fa3cbe3d
UD
56562003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5657
5658 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5659 locking macros. No distinction between normal and mutex locking
5660 anymore.
5661 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5662 Merge bits from lowlevelmutex.S we still need.
5663 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5664 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5665 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5666 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5667 new mutex implementation.
5668 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5669 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5670 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5671 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5672 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5673 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5674 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5675 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5676 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5677 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5678 symbol for entry point to avoid cancellation.
5679
e700a908
UD
56802003-10-07 Jakub Jelinek <jakub@redhat.com>
5681
5682 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5683 changes.
5684 (SAVE_OLDTYPE_0): Fix a typo.
5685
c70a86b6
UD
56862003-10-03 Ulrich Drepper <drepper@redhat.com>
5687
5688 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5689 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5690
134abcb5
UD
56912003-10-02 Ulrich Drepper <drepper@redhat.com>
5692
5693 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5694 correct offset.
5695
b77ca0e8
UD
56962003-10-02 Jakub Jelinek <jakub@redhat.com>
5697
5698 * Makefile (tests): Add tst-cancel19.
5699 * tst-cancel19.c: New test.
5700
4d961dc7
UD
57012003-10-02 Ulrich Drepper <drepper@redhat.com>
5702
5703 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5704 restoring of the old cancellation type.
5705
1d5b20ad 57062003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 5707
1d5b20ad
UD
5708 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5709
4106a403
RM
57102003-09-27 Wolfram Gloger <wg@malloc.de>
5711
4d961dc7 5712 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 5713
fca9d8e4
RM
57142003-09-24 Roland McGrath <roland@redhat.com>
5715
5716 * allocatestack.c (__make_stacks_executable): Don't ignore return
5717 value from _dl_make_stack_executable.
5718
c9c60884
UD
57192003-09-24 Ulrich Drepper <drepper@redhat.com>
5720
69c9fa04
UD
5721 * allocatestack.c (__make_stacks_executable): Also change
5722 permission of the currently unused stacks.
5723
279f1143
UD
5724 * allocatestack.c (change_stack_perm): Split out from
5725 __make_stacks_executable.
5726 (allocate_stack): If the required permission changed between the time
5727 we started preparing the stack and queueing it, change the permission.
5728 (__make_stacks_executable): Call change_stack_perm.
5729
c9c60884
UD
5730 * Makefile: Build tst-execstack-mod locally.
5731 * tst-execstack-mod.c: New file.
5732
54ee14b3
UD
57332003-09-23 Jakub Jelinek <jakub@redhat.com>
5734
5735 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5736
57372003-09-23 Roland McGrath <roland@redhat.com>
5738
5739 * tst-execstack.c: New file.
5740 * Makefile (tests): Add it.
5741 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5742 (LDFLAGS-tst-execstack): New variable.
5743
5744 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5745 whether to use PROT_EXEC for stack mmap.
5746 (__make_stacks_executable): New function.
5747 * pthreadP.h: Declare it.
5748 * init.c (__pthread_initialize_minimal_internal): Set
5749 GL(dl_make_stack_executable_hook) to that.
5750
365b1602
UD
57512003-09-22 Ulrich Drepper <drepper@redhat.com>
5752
5753 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5754 recommendation from AMD re avoidance of lock prefix.
5755
39358e8b
UD
57562003-09-22 Jakub Jelinek <jakub@redhat.com>
5757
5758 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5759 lll_futex_timed_wait instead of lll_futex_wait.
5760 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5761 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5762 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5763 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5764 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5765 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5766 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5767 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5768 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5769 Completely revamp the locking macros. No distinction between
5770 normal and mutex locking anymore.
5771 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5772 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5773 __lll_lock_timedwait): Fix prototypes.
5774 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5775 __lll_lock_timedwait): Likewise.
5776 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5777 macros, add __builtin_expect.
5778 (lll_mutex_timedlock): Likewise. Fix return value.
5779 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5780 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5781 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5782 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5783 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5784 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5785 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5786 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5787
9d08fbbb
UD
57882003-09-22 Ulrich Drepper <drepper@redhat.com>
5789
c0df57e1
UD
5790 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5791 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5792 operation if possible.
5793
9d08fbbb
UD
5794 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5795 like jumping over the lock prefix.
5796
71451de2
UD
57972003-09-21 Ulrich Drepper <drepper@redhat.com>
5798
5799 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5800 locking macros. No distinction between normal and mutex locking
5801 anymore.
3a226d33 5802 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
5803 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5804 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
5805 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5806 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 5807 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 5808 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 5809 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 5810 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
5811 * Makefile (routines): Remove libc-lowlevelmutex.
5812 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
5813 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5814 for new mutex implementation.
5815 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5816 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5817 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5818 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5819 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5820 Likewise.
5821 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5822 Likewise.
5823 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5824 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5825 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5826 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5827 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5828 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5829 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5830 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5831 Likewise.
5832 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5833 Likewise.
5834 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5835 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5836 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5837 Don't use requeue.
5838 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 5839 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 5840
8f31c0ef
UD
58412003-09-20 Ulrich Drepper <drepper@redhat.com>
5842
56a4aa98
UD
5843 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5844 in parameters of asm with output parameters.
5845
8f31c0ef
UD
5846 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5847 type of DECR parameter to int.
5848 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5849
8b8074da
UD
58502003-09-18 Jakub Jelinek <jakub@redhat.com>
5851
5852 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5853 guardsize for each thread.
5854
65af7e61
UD
58552003-09-17 Jakub Jelinek <jakub@redhat.com>
5856
9ba96eda
UD
5857 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5858 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5859 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5860
06f6ca90
UD
5861 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5862 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5863 NULL.
5864 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5865 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5866 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5867 (pthread_getaffinity_np): Add hidden_def.
5868
5869 * Makefile (tests): Add tst-attr3.
5870 * tst-attr3.c: New test.
5871
65af7e61
UD
5872 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5873
3402852c
UD
58742003-09-15 Jakub Jelinek <jakub@redhat.com>
5875
5876 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5877 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5878
a4db3439
UD
58792003-09-17 Jakub Jelinek <jakub@redhat.com>
5880
5881 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5882 * tst-align.c: Include tst-stack-align.h.
5883 (tf, do_test): Use TEST_STACK_ALIGN macro.
5884
58852003-09-17 Ulrich Drepper <drepper@redhat.com>
5886
5887 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5888 variable.
5889
92ce4676
UD
58902003-09-16 Ulrich Drepper <drepper@redhat.com>
5891
5892 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5893 stack-related values for the initial thread.
5894
e07bb02a
UD
58952003-09-15 Jakub Jelinek <jakub@redhat.com>
5896
5897 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5898
d087b5dc
UD
58992003-09-11 Ulrich Drepper <drepper@redhat.com>
5900
5901 * pthread_mutex_lock.c: Minor code rearrangements.
5902
7f08f55a
RM
59032003-09-05 Roland McGrath <roland@redhat.com>
5904
5905 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5906 Instead, include ../nptl_db/db_info.c to do its magic.
5907 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5908 (__pthread_pthread_key_2ndlevel_size): Likewise.
5909 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5910 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5911 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5912 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5913 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5914 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5915 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5916 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5917 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5918 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5919 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5920 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5921 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5922 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5923 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5924 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5925 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5926
806e4a4a
UD
59272003-09-08 Ulrich Drepper <drepper@redhat.com>
5928
5929 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5930 of pthread_t to be compatible with LT.
5931 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5932 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5933 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5934 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5935 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5936 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5937 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5938
17f83e56
UD
59392003-09-04 Ulrich Drepper <drepper@redhat.com>
5940
5941 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5942
58e8ec84
UD
59432003-09-04 Jakub Jelinek <jakub@redhat.com>
5944
5945 * unwind-forcedunwind.c: Move to...
5946 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5947 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5948 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5949 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5950 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5951 * unwind.c: Include jmpbuf-unwind.h.
5952 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5953
abf1cf21
JJ
59542003-09-02 Jakub Jelinek <jakub@redhat.com>
5955
4a244f0d
UD
5956 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5957 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5958 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5959 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5960 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5961 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5962 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5963 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5964 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5965 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5966 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5967 function.
5968 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5969 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5970 * Makefile (tests): Add tst-stack2.
5971 * tst-stack2.c: New test.
5972 * tst-stack1.c: Include limits.h and sys/param.h.
5973 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5974
e29ef647
UD
5975 * pthread_condattr_setpshared.c: Include errno.h.
5976 (pthread_condattr_setpshared): Return EINVAL if pshared
5977 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5978
5777d565
UD
5979 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5980 defined symbol for entry point to avoid cancellation.
5981 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5982 Likewise.
5983 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5984 Likewise.
5985 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5986 Likewise.
5987 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5988 Likewise.
5989 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5990 Likewise.
5991 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5992 __close_nocancel, __read_nocancel, __write_nocancel,
5993 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5994 libpthread.so or librt.so, define to corresponding function
5995 without _nocancel suffix.
5996 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5997 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5998 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5999
abf1cf21
JJ
6000 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6001
8348dcc8
UD
60022003-09-02 Ulrich Drepper <drepper@redhat.com>
6003
6004 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 6005 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
6006
6007 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6008 in subsections has a symbol associated with it.
6009
6010 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6011 defined symbol for entry point to avoid cancellation.
6012 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6013
c874a32e
UD
60142003-09-01 Jakub Jelinek <jakub@redhat.com>
6015
6016 * Makefile (tests): Add tst-tls5.
6017 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6018 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6019 ($(objpfx)tst-tls5): New.
6020 ($(objpfx)tst-tls6.out): Likewise.
6021 (tests): Depend on $(objpfx)tst-tls6.out.
6022 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6023 (do_test): Check pthread_self () return value alignment.
6024 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6025 (tf): Check pthread_self () return value alignment.
6026 * tst-tls5.c: New test.
6027 * tst-tls5.h: New.
6028 * tst-tls5mod.c: New.
6029 * tst-tls5moda.c: New.
6030 * tst-tls5modb.c: New.
6031 * tst-tls5modc.c: New.
6032 * tst-tls5modd.c: New.
6033 * tst-tls5mode.c: New.
6034 * tst-tls5modf.c: New.
6035 * tst-tls6.sh: New test.
6036
c503d3dc
UD
6037 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6038 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6039 * init.c (pthread_functions): Initialize them.
6040 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6041 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6042 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6043 pthread_cond_timedwait@@GLIBC_2.3.2.
6044
48614753
JJ
60452003-09-01 Jakub Jelinek <jakub@redhat.com>
6046
56a1b877
JJ
6047 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6048 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6049 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6050 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6051 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6052 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6053
6054 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6055
48614753
JJ
6056 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6057 _POSIX_THREAD_PRIORITY_SCHEDULING.
6058 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6059
28c97261
UD
60602003-08-31 Ulrich Drepper <drepper@redhat.com>
6061
eef80cf8
UD
6062 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6063 nested function, use static inline function from libio.h.
6064 Code by Richard Henderson.
6065
28c97261
UD
6066 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6067 weak.
6068
cd2fbe58
UD
60692003-08-30 Jakub Jelinek <jakub@redhat.com>
6070
6071 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6072 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6073 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6074 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6075 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6076 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6077 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6078 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6079 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6080 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6081 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6082 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6083 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6084 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6085 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6086 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6087 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6088 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6089 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6090 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6091 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6092 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6093 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6094 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6095 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6096 * sysdeps/sparc/tls.h: New file.
6097 * sysdeps/sparc/tcb-offsets.sym: New file.
6098 * sysdeps/sparc/Makefile: New file.
6099 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6100 * init.c [__sparc__] (__NR_set_tid_address): Define.
6101
feda52c0
UD
61022003-08-29 Jakub Jelinek <jakub@redhat.com>
6103
6104 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6105 _IO_release_lock): Define.
6106
7c868816
JJ
61072003-08-29 Jakub Jelinek <jakuB@redhat.com>
6108
0261d33f 6109 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
6110 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6111
68b9e1ae
UD
61122003-08-27 Ulrich Drepper <drepper@redhat.com>
6113
6114 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6115 (__pthread_cleanup_class): Add missing return types of member
6116 functions.
6117
13b3edfc
UD
61182003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6119
6120 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6121 (lll_mutex_unlock_force): Add memory barrier between store and futex
6122 syscall.
6123
bb606fbe
UD
61242003-08-25 Ulrich Drepper <drepper@redhat.com>
6125
6126 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6127 tempmsg in first loop.
6128
ee4e5a3d
UD
61292003-08-18 Ulrich Drepper <drepper@redhat.com>
6130
6131 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6132 _POSIX_THREAD_PRIORITY_SCHEDULING.
6133 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6134
334fcf2a
UD
61352003-08-07 Jakub Jelinek <jakub@redhat.com>
6136
6137 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6138 (__rtld_lock_default_lock_recursive,
6139 __rtld_lock_default_unlock_recursive): Define.
6140 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6141 __rtld_lock_unlock_recursive): Define using
6142 GL(_dl_rtld_*lock_recursive).
6143 * init.c (__pthread_initialize_minimal_internal): Initialize
6144 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6145 Lock GL(_dl_load_lock) the same number of times as
6146 GL(_dl_load_lock) using non-mt implementation was nested.
6147
6148 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6149 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6150
a30fb2df
UD
61512003-08-06 Jakub Jelinek <jakub@redhat.com>
6152
6153 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6154 PIPE_BUF.
6155
ce0d30a0
JJ
61562003-08-07 Jakub Jelinek <jakub@redhat.com>
6157
6158 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6159
9c988b83
UD
61602003-08-03 Jakub Jelinek <jakub@redhat.com>
6161
6162 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6163 to first syscall error check. Move syscall error check for tkill
6164 into __ASSUME_CLONE_STOPPED #ifdef.
6165
5c5252bd
UD
61662003-08-02 Ulrich Drepper <drepper@redhat.com>
6167
f1205aa7
UD
6168 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6169 is not defined, do explicit synchronization.
6170 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6171 is not defined also unlock pd->lock for non-debugging case in case
6172 it is necessary.
6173 * pthread_create.c (start_thread): Always get and release pd->lock
6174 if __ASSUME_CLONE_STOPPED is not defined.
6175 (start_thread_debug): Removed. Adjust users.
6176 * allocatestack.c (allocate_stack): Always initialize lock if
6177 __ASSUME_CLONE_STOPPED is not defined.
6178 * Makefile (tests): Add tst-sched1.
6179 * tst-sched1.c: New file.
6180
5c5252bd
UD
6181 * sysdeps/pthread/createthread.c (do_clone): Only use
6182 sched_setschduler and pass correct parameters.
6183
973d66e4
UD
61842003-07-31 Jakub Jelinek <jakub@redhat.com>
6185
6186 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6187 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6188 PTHREAD_STACK_MIN in comments.
6189
d347a4ab
UD
61902003-07-31 Jakub Jelinek <jakub@redhat.com>
6191
6192 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6193 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6194 argument.
6195 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6196 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6197 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6198 (__pthread_cleanup_upto): Fix prototype.
6199 (_longjmp_unwind): Adjust caller.
6200 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6201 Change second argument to const struct pointer.
6202 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6203 * tst-sem9.c (main): Likewise.
6204 * unwind.c: Include string.h for strlen prototype.
6205
1b26e9a5
UD
62062003-07-31 Ulrich Drepper <drepper@redhat.com>
6207
6208 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6209 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6210 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6211 Define HAVE_CMOV.
6212 Patch by Nicholas Miell <nmiell@attbi.com>.
6213
adc12574
UD
62142003-07-30 Jakub Jelinek <jakub@redhat.com>
6215
6216 * init.c (__pthread_initialize_minimal_internal): Initialize
6217 GL(dl_init_static_tls).
6218 * pthreadP.h (__pthread_init_static_tls): New prototype.
6219 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6220 New functions.
6221 * Makefile (tests): Add tst-tls4.
6222 (modules-names): Add tst-tls4moda and tst-tls4modb.
6223 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6224 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6225 tst-tls4modb.so.
6226 * tst-tls4.c: New file.
6227 * tst-tls4moda.c: New file.
6228 * tst-tls4modb.c: New file.
6229
a7f6c66e
RM
62302003-06-19 Daniel Jacobowitz <drow@mvista.com>
6231
6232 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6233 before __timer_dealloc.
6234 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6235 Don't call list_unlink.
6236
172ce013
RM
62372003-07-29 Roland McGrath <roland@redhat.com>
6238
6239 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6240
7b787f85
UD
62412003-07-25 Jakub Jelinek <jakub@redhat.com>
6242
6243 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6244 Don't reuse struct aiocb A if it failed.
6245 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6246 not just one byte, as that does not block.
6247
0e9d6240
UD
62482003-07-22 Jakub Jelinek <jakub@redhat.com>
6249
9d79e037
UD
6250 * sysdeps/pthread/unwind-resume.c: New file.
6251 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6252 unwind-resume in csu subdir.
6253 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6254 exceptions.
6255 (librt-sysdep_routines, librt-shared-only-routines): Add
6256 rt-unwind-resume.
6257 * sysdeps/pthread/rt-unwind-resume.c: New file.
6258 * unwind-forcedunwind.c: New file.
6259 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6260 (libpthread-shared-only-routines): Likewise.
6261 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6262 * pthreadP.h (pthread_cancel_init): New prototype.
6263 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6264
6265 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6266 attr argument const struct pthread_attr *.
6267
0e9d6240
UD
6268 * res.c (__res_state): Return __resp.
6269 * descr.h: Include resolv.h.
6270 (struct pthread): Add res field.
6271 * pthread_create.c: Include resolv.h.
6272 (start_thread): Initialize __resp.
6273 * Makefile (tests): Add tst-_res1.
6274 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6275 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6276 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6277 libpthread.
6278 * tst-_res1.c: New file.
6279 * tst-_res1mod1.c: New file.
6280 * tst-_res1mod2.c: New file.
6281
1a379ea0
UD
62822003-07-21 Ulrich Drepper <drepper@redhat.com>
6283
7e939b21
UD
6284 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6285
1a379ea0
UD
6286 * Makefile: Define various *-no-z-defs variables for test DSOs
6287 which has undefined symbols.
6288
ca86a763
UD
62892003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6290
6291 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6292 Retry if the stwcx fails to store once_control.
6293
80f536db
UD
62942003-07-20 Ulrich Drepper <drepper@redhat.com>
6295
6296 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6297 pthread_attr_setaffinity.
6298 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6299 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6300 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6301 * pthread_attr_destroy.c: Free cpuset element if allocated.
6302 * pthread_create.c: Pass iattr as additional parameter to
6303 create_thread.
6304 * sysdeps/pthread/createthread.c: If attribute is provided and
6305 a new thread is created with affinity set or scheduling parameters,
6306 start thread with CLONE_STOPPED.
6307 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6308 pthread_attr_setaffinity.
6309 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6310 cpuset element.
6311
73299943
UD
63122003-07-15 Ulrich Drepper <drepper@redhat.com>
6313
6314 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6315
da35d15e
UD
63162003-07-14 Ulrich Drepper <drepper@redhat.com>
6317
6318 * sysdeps/pthread/configure.in: Require CFI directives also for
6319 ppc and s390.
6320
75540d8a
UD
63212003-07-15 Jakub Jelinek <jakub@redhat.com>
6322
6323 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6324 Add cfi directives.
6325
4a17085f
UD
63262003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6327
6328 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6329 CLEANUP_JMP_BUF.
6330 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6331 registers as variables. Call __pthread_mutex_unlock_usercnt.
6332 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6333 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6334 not self pointer in __writer. Compare with TID to determine
6335 deadlocks.
6336 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6337 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6338 Likewise.
6339 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6340 Likewise.
6341 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6342 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6343 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6344 macros also when compiling librt.
6345
6080ecdf
UD
63462003-07-11 Jakub Jelinek <jakub@redhat.com>
6347
6348 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6349 -fasynchronous-unwind-tables.
6350 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6351 (PSEUDO): Add cfi directives.
6352 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6353 Likewise.
6354 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6355 Likewise.
6356
da0c02ee
UD
63572003-07-08 Jakub Jelinek <jakub@redhat.com>
6358
6359 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6360 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6361 * unwind.c (__pthread_unwind_next): Add hidden_def.
6362 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6363 Likewise.
6364 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6365 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6366 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6367 Likewise.
6368 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6369 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6370 Likewise.
6371 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6372 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6373 __pthread_unregister_cancel and __pthread_unwind_next.
6374
57a5ea02
UD
63752003-07-04 Jakub Jelinek <jakub@redhat.com>
6376
6377 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6378 different symbol for the cancellation syscall wrapper and
6379 non-cancellation syscall wrapper.
6380 (PSEUDO_END): Define.
6381
d810b358
UD
63822003-07-05 Richard Henderson <rth@redhat.com>
6383
6384 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6385 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
6386 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6387 return actual return value from the syscall, not 0.
d810b358 6388
db54f488
UD
63892003-07-07 Ulrich Drepper <drepper@redhat.com>
6390
6391 * descr.h (struct pthread): Add pid field.
6392 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6393 (__reclaim_stacks): Likewise.
6394 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6395 also check for PID of the signal source.
6396 (__pthread_initialize_minimal_internal): Also initialize pid field
6397 of initial thread's descriptor.
6398 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6399 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6400 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6401 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6402 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6403
5e497a41
UD
64042003-07-05 Ulrich Drepper <drepper@redhat.com>
6405
6406 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6407 Fix use of parameter.
6408 (__libc_cleanup_pop): Likewise.
6409
86a0c4fa
UD
64102003-07-04 Ulrich Drepper <drepper@redhat.com>
6411
6412 * init.c (sigcancel_handler): Change parameters to match handler
6413 for SA_SIGACTION. Check signal number and code to recognize
6414 invalid invocations.
6415
bdbecaa3
RM
64162003-07-03 Roland McGrath <roland@redhat.com>
6417
6418 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6419 Apply sizeof (struct pthread) bias to r13 value.
6420
56421b23
UD
64212003-07-03 Ulrich Drepper <drepper@redhat.com>
6422
fbd90f6c
UD
6423 * sysdeps/pthread/configure.in: Require CFI directives.
6424
56421b23
UD
6425 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6426 definition.
6427 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6428 libpthread compilation.
6429 * unwind.c (__pthread_unwind): Add hidden_def.
6430 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6431
ca2b4cd7
UD
64322003-07-01 Ulrich Drepper <drepper@redhat.com>
6433
6434 * libc-cancellation.c (__libc_cleanup_routine): Define.
6435 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6436 (__pthread_cleanup_pop): Define.
6437
f036e569
UD
64382003-07-01 Richard Henderson <rth@redhat.com>
6439
6440 * sysdeps/alpha/elf/pt-initfini.c: New file.
6441 * sysdeps/alpha/pthread_spin_lock.S: New file.
6442 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6443 * sysdeps/alpha/pthreaddef.h: New file.
6444 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6445 * sysdeps/alpha/tls.h: New file.
6446 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6447 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6448 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6449 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6450 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6451 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6452 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6453 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6454 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6455 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6456
3b985826
UD
64572003-07-01 Ulrich Drepper <drepper@redhat.com>
6458
6459 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6460 cleanup support and unwind info.
6461
3a4d1e1e
UD
64622003-06-30 Ulrich Drepper <drepper@redhat.com>
6463
6464 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6465 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
6466 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6467 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
6468 * tst-once3.c: Add cleanup handler and check it is called.
6469 * tst-once4.c: Likewise.
6470 * tst-oncex3.c: New file.
6471 * tst-oncex4.c: New file.
6472 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6473
e479cc8e
UD
64742003-06-29 Ulrich Drepper <drepper@redhat.com>
6475
6476 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6477
7d7ff54c
UD
64782003-06-27 Ulrich Drepper <drepper@redhat.com>
6479
483e95d0
UD
6480 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6481 (tf_msgsnd): Likewise.
6482
7d7ff54c
UD
6483 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6484 premature returns a bit more.
6485
7539c7ec
UD
64862003-06-26 Ulrich Drepper <drepper@redhat.com>
6487
6488 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6489 definition to the front.
6490
6491 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6492 the cleanup functions to make the names unique. Fix dwarf opcode
6493 un unwind table.
6494 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6495 functions to make the names unique. Fix CFA offset for two blocks.
6496
0af6a1d9
UD
64972003-06-25 Ulrich Drepper <drepper@redhat.com>
6498
6499 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6500 missing closing braces.
6501 Patch by Christophe Saout <christophe@saout.de>.
6502
eef4a9f3
RM
65032003-06-24 Roland McGrath <roland@redhat.com>
6504
6505 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6506
4165d44d
UD
65072003-06-24 Ulrich Drepper <drepper@redhat.com>
6508
7f8f7b9d
UD
6509 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6510 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6511
4165d44d
UD
6512 * pthreadP.h: Declare __find_thread_by_id.
6513 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6514 * pthread_clock_gettime.c: Allow using other thread's clock.
6515 * pthread_clock_settime.c: Likewise.
6516 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6517 * Makefile: Add rules to build and run tst-clock2.
6518 * tst-clock2.c: New file.
6519
67b78ef9
UD
65202003-06-23 Ulrich Drepper <drepper@redhat.com>
6521
6522 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6523 to use exception-based cleanup handler.
6524 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6525
6526 * tst-cond8.c (ch): Announce that we are done.
6527
6528 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6529
6530 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6531 Also test aio_suspend with timeout value.
6532
61623643
UD
65332003-06-22 Ulrich Drepper <drepper@redhat.com>
6534
3a4f2043
UD
6535 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6536 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6537 attribute_hidden.
6538
61623643
UD
6539 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6540 (__pthread_mutex_lock_internal): Likewise.
6541 (__pthread_mutex_unlock_internal): Likewise.
6542 (__pthread_mutex_unlock_usercnt): Declare.
6543 * pthread_mutex_destroy.c: Always fail if used in any way.
6544 * pthread_mutex_init.c: Update comment.
6545 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6546 * pthread_mutex_timedlock.c: Adjust __nusers.
6547 * pthread_mutex_trylock.c: Adjust __nusers.
6548 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6549 and public interfaces are wrapper with pass additional parameter.
6550 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6551 parameter zero.
6552 * tst-mutex8.c: New file.
6553 * Makefile (tests): Add tst-mutex8.
6554 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6555 __pthread_mutex_unlock_usercnt.
6556 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6557 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6558 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6559 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6561 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6562 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6563 Add __nusers.
6564 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6565 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6566 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6567 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6568 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6569
6570 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6571 * pthread_mutex_timedlock.c: Likewise.
6572 * pthread_mutex_trylock.c: Adjust __nusers.
6573 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6574 * tst-mutex9.c: New file.
6575 * Makefile (tests): Add tst-mutex9.
6576 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6577 * sysdeps/ia64/tls.h: Likewise.
6578 * sysdeps/powerpc/tls.h: Likewise.
6579 * sysdeps/s390/tls.h: Likewise.
6580 * sysdeps/sh/tls.h: Likewise.
6581 * sysdeps/x86_64/tls.h: Likewise.
6582 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6583 Change type of __owner.
6584 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6585 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6586 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6587 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6588 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6589
9bdabb94
UD
65902003-06-19 Jakub Jelinek <jakub@redhat.com>
6591
6592 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6593 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6594
6595 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6596 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6597 instead of nr to lll_futex_wake. Only set errno and return -1
6598 if err < 0.
6599
6600 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6601 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6602 return actual return value from the syscall, not 0.
6603
f6c93bd9
UD
66042003-06-18 Ulrich Drepper <drepper@redhat.com>
6605
ca343e73
UD
6606 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6607 find a random value.
6608 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6609 errno==EIDRM.
6610
50441a98
UD
6611 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6612 compat_timer_settime.
6613 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6614 compat_timer_gettime.
6615 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 6616 compat_timer_getoverrun.
50441a98
UD
6617 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6618 compat_timer_delete.
6619
f6c93bd9
UD
6620 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6621 error-checking mutex detect busy mutexes.
6622
047aec8f
UD
66232003-06-17 Ulrich Drepper <drepper@redhat.com>
6624
1d53508d
UD
6625 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6626 Add ax to clobber list.
6627 (lll_mutex_cond_lock): Likewise.
6628 (lll_mutex_unlock): Likewise.
6629 (lll_lock): Likewise.
6630 (lll_unlock): Likewise.
6631
f23b30e2
UD
6632 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6633 * tst-cancel18.c: New file.
6634 * tst-cancelx18.c: New file.
6635
6636 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6637 and tcdrain.
6638
6639 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6640 * tst-cancel17.c: New file.
6641 * tst-cancelx17.c: New file.
6642
6643 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6644 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6645 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6646
047aec8f
UD
6647 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6648
bbde8527
UD
66492003-06-16 Jakub Jelinek <jakub@redhat.com>
6650
6651 * sysdeps/pthread/createthread.c (create_thread): Set
6652 header.multiple_threads unconditionally.
6653 * allocatestack.c (allocate_stack): Likewise.
6654 * descr.h (struct pthread): Add header.multiple_threads
6655 unconditionally.
6656 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6657 Define for librt. #error if neither libpthread, libc nor librt.
6658 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6659 Likewise.
6660 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6661 CDISABLE): Likewise.
6662 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6663 CDISABLE): Likewise.
6664 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6665 CDISABLE): Likewise.
6666 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6667 CDISABLE): Likewise. Access header.multiple_threads outside of
6668 libc and libpthread.
6669 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6670 Likewise.
6671 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6672 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6673
26676450
UD
66742003-06-17 Ulrich Drepper <drepper@redhat.com>
6675
6676 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6677 Also test early cancellation before the thread reaches the cancellation
6678 point.
6679
6680 * Makefile: Compile forward.c with exceptions.
6681
6682 * sysdeps/unix/sysv/linux/sleep.c: New file.
6683
301a6724
UD
66842003-06-16 Ulrich Drepper <drepper@redhat.com>
6685
0e0deb03
UD
6686 * Makefile: Add CFLAGS definition to compile function wrappers
6687 duplicated from libc with exceptions.
6688 * tst-cancel4.c: Also check cancellation handlers.
6689
301a6724
UD
6690 * Makefile: Add rules to build and run tst-cancel16 and
6691 tst-cancelx16. Add missing CFLAGS definitions.
6692 * tst-cancel16.c: New file.
6693 * tst-cancelx16.c: New file.
6694
7a114794
UD
66952003-06-15 Ulrich Drepper <drepper@redhat.com>
6696
452aea84
UD
6697 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6698 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6699 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6700 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6701
7a114794
UD
6702 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6703 (LIBC_CANCEL_RESET): Likewise.
6704 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6705 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6706 librt-cancellation.
6707 (CFLAGS-libcrt-cancellation.c): Define.
6708 * sysdeps/pthread/librt-cancellation.c: New file.
6709 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6710 macros also when compiling librt.
6711 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6712 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6713 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6714 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6715 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6716 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6717 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6718
6719 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6720 compat_timer_create.
6721
8ba1d429
UD
67222003-06-14 Ulrich Drepper <drepper@redhat.com>
6723
cc8fb6f3
UD
6724 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6725
8ba1d429
UD
6726 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6727 __register_atfork.
6728 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6729 Add libc_hidden_def.
6730
d4f100e2
RM
67312003-06-13 Roland McGrath <roland@redhat.com>
6732
6733 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6734 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6735
dd9423a6
UD
67362003-06-11 Ulrich Drepper <drepper@redhat.com>
6737
6738 * allocatestack.c (queue_stack): Always inline.
6739 * ptreadhP.h (__do_cancel): Likewise.
6740
ed24330d
JJ
67412003-06-10 Jakub Jelinek <jakub@redhat.com>
6742
6743 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6744 a typo.
6745
06120d79
UD
67462003-06-10 Ulrich Drepper <drepper@redhat.com>
6747
6748 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6749 (__pthread_cond_signal): Remove incorrect second addition for
6750 cond_lock!=0.
6751
b1720346
UD
67522003-06-09 Ulrich Drepper <drepper@redhat.com>
6753
5b318f85
UD
6754 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6755 (__pthread_cond_signal): Use correct futex pointer in
6756 __lll_mutex_lock_wait call.
6757
b1720346
UD
6758 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6759 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6760
3e36c37d
UD
67612003-06-08 Ulrich Drepper <drepper@redhat.com>
6762
ecf7955d
UD
6763 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6764 cancelable.
ed24330d 6765 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
6766 Likewise.
6767
3e36c37d
UD
6768 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6769 hand-written CFI generation code. Since ENTRY/END also initiated
6770 CFI frames this caused two CFI sets to be generated.
6771
7726edc2
UD
67722003-06-07 Ulrich Drepper <drepper@redhat.com>
6773
6774 * cleanup_routine.c: New file.
6775 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6776 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6777 cleanup handling.
6778 * Makefile (libpthread-routines): Add cleanup_routine.
6779 Add more CFLAGS variables to compile with exceptions. Add comments
6780 why which file needs unwind tables.
6781 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6782 tests.
6783 * tst-cancelx1.c: New file.
6784 * tst-cancelx2.c: New file.
6785 * tst-cancelx3.c: New file.
6786 * tst-cancelx4.c: New file.
6787 * tst-cancelx5.c: New file.
6788 * tst-cancelx6.c: New file.
6789 * tst-cancelx7.c: New file.
6790 * tst-cancelx8.c: New file.
6791 * tst-cancelx9.c: New file.
6792 * tst-cancelx10.c: New file.
6793 * tst-cancelx11.c: New file.
6794 * tst-cancelx12.c: New file.
6795 * tst-cancelx13.c: New file.
6796 * tst-cancelx14.c: New file.
6797 * tst-cancelx15.c: New file.
6798 * tst-cleanupx0.c: New file.
6799 * tst-cleanupx0.expect: New file.
6800 * tst-cleanupx1.c: New file.
6801 * tst-cleanupx2.c: New file.
6802 * tst-cleanupx3.c: New file.
6803
6804 * tst-cleanup0.c: Make standard compliant.
6805 * tst-cleanup1.c: Likewise.
6806
6807 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6808 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6809 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6810 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6811 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6812 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6813 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6814 CLEANUP_JMP_BUF.
6815 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6816 * tst-cancel12.c: New file.
6817 * tst-cancel13.c: New file.
6818 * tst-cancel14.c: New file.
6819 * tst-cancel15.c: New file.
6820 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6821 and tst-cancel15.
6822
6823 * tst-cancel1.c: Add some comments.
6824
6825 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6826 timeout correctly.
6827
7a8a8e21
UD
68282003-06-06 Ulrich Drepper <drepper@redhat.com>
6829
6830 * Makefile (CFLAGS-pthread_cancel.c): Define.
6831
4ad0bbf4
UD
68322003-06-05 Ulrich Drepper <drepper@redhat.com>
6833
6834 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6835 Change type of __writer element to int.
6836 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6837 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6838 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6839 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6840 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6841 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6842 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6843 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6844 Compare with TID to determine deadlocks.
6845 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6846 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6847 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6848 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6849 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6850 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6851 Likewise.
6852 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6853 Likewise.
6854 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6855 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6856 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6857 Likewise.
6858 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6859 Likewise.
6860 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6861 * Makefile (tests): Add tst-rwlock12.
6862 * tst-rwlock12.c: New file.
6863
332faa96
JJ
68642003-06-05 Jakub Jelinek <jakub@redhat.com>
6865
6866 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6867 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6868 Remove bogus hidden_proto.
6869 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6870 Likewise.
6871 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6872 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6873 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6874 ___lll_mutex_timedlock): Likewise.
6875
29d9e2fd
UD
68762003-06-04 Ulrich Drepper <drepper@redhat.com>
6877
6878 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6879 (__pthread_cond_signal): Add some code to eventually handle
6880 cond_lock!=0.
6881
6f1acb30
UD
68822003-06-01 Ulrich Drepper <drepper@redhat.com>
6883
6884 * Makefile (tests): Add tst-exec4.
6885 (tst-exec4-ARGS): Define.
6886 * tst-exec4.c: New file.
6887
49b65043
UD
68882003-05-31 Ulrich Drepper <drepper@redhat.com>
6889
31195be2
UD
6890 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6891 Also fail if tv_nsec < 0.
6892 (__lll_timedwait_tid): Likewise.
6893 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6894 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6895 Likewise.
6896 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6897 Likewise.
6898 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6899 Likewise.
6900 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6901 Likewise.
80b54217
UD
6902 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6903 Likewise.
6904 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6905 Likewise.
31195be2 6906
dcfc8224
UD
6907 * Makefile (tests): Add tst-sem8 and tst-sem9.
6908 * tst-sem8.c: New file.
6909 * tst-sem9.c: New file.
6910 * sem_open.c: Fix creation of in_use record if the file exists but
6911 no internal record.
6912
49b65043
UD
6913 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6914 definitions.
6915
6916 * sysdeps/pthread/timer_create.c (timer_create): In case
6917 evp==NULL, assign timer ID to sival_ptr.
6918
6919 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6920 struct pthread_unwind_buf *.
6921 (struct pthread): Likewise for cleanup_jmp_buf element.
6922
6923 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6924 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6925 * unwind.c (__pthread_unwind_next): Likewise.
6926
50794a45
UD
69272003-05-30 Ulrich Drepper <drepper@redhat.com>
6928
5d4f57bd
UD
6929 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6930 (lll_futex_timed_wait): Use int for futex value parameter.
6931 (lll_futex_wake): Likewise.
6932 (lll_futex_requeue): Likewise.
6933
6934 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6935 Replace one memory operation with one register operation.
6936
6937 * tst-join4.c (do_test): Fix error message.
6938
7ab7ea33
UD
6939 * tst-rwlock6.c (do_test): Use correct format specifier.
6940
6941 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6942 (__lll_mutex_lock_wait): Replace one memory operation with one
6943 register operation.
6944 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6945 (__lll_mutex_lock_wait): Likewise.
6946
50794a45
UD
6947 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6948 (__lll_mutex_cond_lock): Add one to value parameter of
6949 __lll_lock_wait to reflect reality in the futex syscall.
6950 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6951 (lll_mutex_cond_lock): Likewise.
6952
5a70784e
JJ
69532003-05-30 Jakub Jelinek <jakub@redhat.com>
6954
6955 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6956 New function.
6957 (lll_mutex_cond_lock): Define.
6958
e7c5ac68
UD
69592003-05-29 Ulrich Drepper <drepper@redhat.com>
6960
586d1748
UD
6961 * Makefile (tests): Add tst-signal6.
6962 * tst-signal6.c: New file.
6963
b8ba4a27
UD
6964 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6965 (__lll_mutex_unlock_force): New function
6966 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6967
65d46efe
UD
6968 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6969 (__lll_mutex_unlock_force): New function.
6970 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6971
6972 * tst-rwlock7.c (do_test): Use correct format specifier.
6973
e7c5ac68
UD
6974 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6975 Find break parameter in correct asm argument.
6976
284bdc42
UD
69772003-05-27 Jakub Jelinek <jakub@redhat.com>
6978
6979 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6980 Remove out4.
6981 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6982 error occured.
6983 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6984 Add __mutex.
6985 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6986 lll_futex_requeue, lll_mutex_unlock_force): Define.
6987
e7c5ac68
UD
69882003-05-30 Jakub Jelinek <jakub@redhat.com>
6989
6990 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6991 (pthread_cond_t): Add __mutex.
6992 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6993 lll_futex_requeue, lll_mutex_unlock_force): Define.
6994
ea2630c6
UD
69952003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6996
6997 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6998 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 6999 Add __mutex field.
ea2630c6
UD
7000 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7001 Define.
7002 (lll_futex_wait, lll_futex_wake): Define.
7003 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7004 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7005 FUTEX_REQUEUE instead of FUTEX_WAIT.
7006 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7007 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7008 mutex which was used in condvar structure. Call
7009 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7010 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7011
7012 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7013 include tcb-offsets.h. Read wakeup value in locked region.
7014 Use the value of gbr register as THREAD_ID.
7015 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7016 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7017 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7018
7019 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7020 macros.
7021
5a77f150
UD
70222003-05-28 Ulrich Drepper <drepper@redhat.com>
7023
7024 * sysdeps/pthread/pthread_cond_broadcast.c
7025 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7026
7661d9f7
UD
70272003-05-26 Ulrich Drepper <drepper@redhat.com>
7028
7029 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7030 typo in register name.
7031 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7032 correctly. Actually use requeue. Little optimization.
7033 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7034 mutex address early. Handle cancellation state as 32-bit value.
7035 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7036 Remove unnecessary label.
7037
69431c9a
UD
70382003-05-25 Ulrich Drepper <drepper@redhat.com>
7039
7040 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7041 instead of FUTEX_WAIT.
7042 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7045 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7046 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7047 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7048 used in condvar structure. Call __pthread_mutex_cond_lock instead
7049 of __pthread_mutex_lock_internal.
7050 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7051 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7052 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7053 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7054 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7055 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7056 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7057 Add pthread_mutex_cond_lock.
7058 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7059 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7060 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7061 lll_mutex_cond_lock.
7062 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7063 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 7064 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 7065 Add __mutex field.
248a3490 7066 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
7067 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7068
7069 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7070 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7071
7072 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7073 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7074 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7075 macro don't define aliases.
7076
7077 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7078 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7079 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7080 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7081 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7082 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7083 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7084 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7085 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7086
fddfebbd
UD
70872003-05-17 Ulrich Drepper <drepper@redhat.com>
7088
7089 * sem_open.c: Fix one endless loop. Implement correct semantics
7090 wrt opening the same semaphore more then once.
7091 * sem_close.c: Adjust for sem_open change.
7092 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7093 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7094 * Makefile (tests): Add tst-sem7.
7095 * tst-sem7.c: New file.
7096
1eefffb0
RM
70972003-05-16 Roland McGrath <roland@redhat.com>
7098
7099 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7100 uninitialized variable braino.
7101
6e66dc78
UD
71022003-05-16 Ulrich Drepper <drepper@redhat.com>
7103
23ae6451
UD
7104 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7105 test for syscall availability.
7106
7107 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7108 __no_posix_timers to -1 if the syscalls don't exist.
7109
7ac5b8e2
UD
7110 * pthread_join.c (pthread_join): Set tid field of the joined
7111 thread to -1. This isn't necessary but helps to recognize some
7112 error conditions with almost no cost.
7113
7114 * allocatestack.c (FREE_P): Also negative values indicate an
7115 unused stack.
7116
6e66dc78
UD
7117 * unwind.c: Include <unistd.h>.
7118
855dba3c
UD
71192003-05-14 Ulrich Drepper <drepper@redhat.com>
7120
7121 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7122
81f3ac4c
UD
71232003-05-14 Jakub Jelinek <jakub@redhat.com>
7124
7125 * Makefile (crti-objs, crtn-objs): New variables.
7126 (omit-deps, extra-objs): Add crtn.
7127 ($(objpfx)libpthread.so): Depend on both crti and crtn
7128 and links to them in multidir.
7129 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7130
7158eae4
UD
71312003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7132
7133 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7134 (lll_mutex_unlock): Use atomic_exchange_rel.
7135
edf205d5
UD
71362003-05-11 Ulrich Drepper <drepper@redhat.com>
7137
7138 * cond-perf.c (cons): Add missing locking around setting of alldone.
7139
a3f979a7
UD
71402003-05-10 Ulrich Drepper <drepper@redhat.com>
7141
7142 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7143 related macros.
7144 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7145
880867a4
UD
71462003-05-09 Ulrich Drepper <drepper@redhat.com>
7147
949ec764
UD
7148 * tst-sem6.c: New file.
7149 * Makefile (tests): Add tst-sem6.
7150
7151 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7152 Use atomic_exchange_rel instead of atomic_exchange.
7153 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7154 Likewise.
7155
7156 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7157 code for lll_futex_wait and lll_futex_wake in static apps. Use
7158 vsyscall is possible.
7159
7160 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7161 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7162 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7163 pthread_setaffinity_np.
7164 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7165 and pthread_setaffinity_np.
7166 * Makefile (libpthread-routines): Add pthread_getaffinity and
7167 pthread_setaffinity.
7168
880867a4
UD
7169 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7170 use it in case mmap to allocate the stack fails.
7171 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7172 ARCH_MAP_FLAGS here.
7173 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7174 ARCH_RETRY_MMAP.
7175
92d83c72
UD
71762003-05-08 Ulrich Drepper <drepper@redhat.com>
7177
7178 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7179 handler implementation. It is now lockless in fork().
7180 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7181 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7182 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7183 declare the __fork_*_lists.
7184 (struct fork_handler): Include pointers to all three functions.
7185 Add next, refcntr and need_signal elements.
7186 (__fork_handlers): New declaration.
7187 (__register_atfork_malloc): Remove declaration.
7188 (HAVE_register_atfork_malloc): Remove definition.
7189 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7190 __pthread_child_handler variable.
7191 (__libc_pthread_init): Use __register_atfork instead of explicitly
7192 adding to the list.
7193 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7194 and lll_futex_wake.
7195 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7196
7197 * unwind.c (unwind_cleanup): Print error message and then abort. This
7198 function must never be reached.
7199
7200 * cond-perf.c: New file.
7201
be4d8038
UD
72022003-05-05 Ulrich Drepper <drepper@redhat.com>
7203
7204 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7205
c6696b79
RM
72062003-05-04 Roland McGrath <roland@redhat.com>
7207
7208 * Makefile ($(objpfx)../libc.so): New target.
7209
7da168bf
UD
72102003-05-02 Ulrich Drepper <drepper@redhat.com>
7211
7212 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7213 (pthread_condattr_t): Size is only an int, don't use long for
7214 alignment.
7215 (pthread_mutexattr_t): Likewise.
7da168bf
UD
7216 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7217 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7218 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7219
9a7178d6
UD
72202003-05-01 Ulrich Drepper <drepper@redhat.com>
7221
7222 * sysdeps/i386/tls.h: Define THREAD_ID.
7223 * sysdeps/ia64/tls.h: Likewise.
7224 * sysdeps/powerpc/tls.h: Likewise.
7225 * sysdeps/s390/tls.h: Likewise.
7226 * sysdeps/sh/tls.h: Likewise.
7227 * sysdeps/x86_64/tls.h: Likewise.
7228 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7229 record ownership.
7230 * pthread_mutex_timedlock.c: Likewise.
7231 * pthread_mutex_trylock.c: Likewise.
7232 * pthread_mutex_unlock.c: Likewise.
7233 * pthread_rwlock_trywrlock.c: Likewise.
7234 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7235 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7236 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7237 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7238
7239 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7240 flag.
7241
a234e27d
UD
72422003-04-29 Jakub Jelinek <jakub@redhat.com>
7243
7244 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7245 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7246 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7247 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7248 Make __align long long instead of long.
7249 (pthread_rwlock_t): Formatting.
7250 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7251 (pthread_rwlock_t): Formatting.
7252 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7253 (pthread_cond_t): Make __align long long instead of long.
7254 (pthread_rwlock_t): Move __flags field to the same position as in
7255 linuxthreads.
7256
f025c136
UD
72572003-04-30 Ulrich Drepper <drepper@redhat.com>
7258
7259 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7260 * tst-rwlock7.c (do_test): Likewise.
7261
7531ab9e
RM
72622003-04-26 Roland McGrath <roland@redhat.com>
7263
7264 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7265
299601a1
UD
72662003-04-22 Jakub Jelinek <jakub@redhat.com>
7267
299601a1
UD
7268 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7269 sizeof (struct pthread).
7270 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 7271 1 struct pthread.
299601a1
UD
7272 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7273 to 0.
7274 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7275 struct pthread.
7276 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7277 to 32-bit bytes.
7278 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7279 tcbp.
7280 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7281 unneccessarily.
7282 (NO_TLS_OFFSET): Define.
299601a1
UD
7283 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7284 add TLS_TCB_SIZE unnecessarily.
299601a1 7285
950094f8
RM
72862003-04-22 Roland McGrath <roland@redhat.com>
7287
7288 * Makeconfig (shared-thread-library): Reverse link order to work
7289 around linker bug.
7290
dc2f6455
UD
72912003-04-22 Ulrich Drepper <drepper@redhat.com>
7292
7293 * semaphore.h: Fix typo in comment.
7294
e7608d77
UD
72952003-04-21 Ulrich Drepper <drepper@redhat.com>
7296
6a87ee19
UD
7297 * sysdeps/pthread/sigfillset.c: New file.
7298
e7608d77
UD
7299 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7300 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7301 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7302 * sysdeps/pthread/sigaction.c: Likewise.
7303 * sysdeps/pthread/sigprocmask.c: New file.
7304 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7305 __SIGRTMIN+1.
7306 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7307 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7308 in this case.
7309
0b3df49e
UD
73102003-04-19 Ulrich Drepper <drepper@redhat.com>
7311
58a7a325
UD
7312 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7313 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7314
0b3df49e
UD
7315 * sysdeps/unix/sysv/linux/unregister-atfork.c
7316 (__unregister_atfork): Don't free memory not allocated dynamically.
7317
7318 * semaphore.h: Remove __THROW marker from cancellation points.
7319 * nptl/sysdeps/pthread/pthread.h: Likewise.
7320
7d74651e
UD
73212003-04-18 Ulrich Drepper <drepper@redhat.com>
7322
76a67697
UD
7323 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7324 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
7325 __THROW.
7326
dd9d6538
JJ
73272003-04-16 Jakub Jelinek <jakub@redhat.com>
7328
7329 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7330
4ab6f47c
RM
73312003-04-15 Roland McGrath <roland@redhat.com>
7332
7333 * forward.c (__pthread_unwind): Tweak to avoid warning.
7334
162434a6
UD
73352003-04-15 Ulrich Drepper <drepper@redhat.com>
7336
7337 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7338
35909161
UD
73392003-04-14 Ulrich Drepper <drepper@redhat.com>
7340
18ddd3aa 7341 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
7342 overflow CFA advance instructions.
7343 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7344
18a8e730
UD
73452003-04-14 Jakub Jelinek <jakub@redhat.com>
7346
bd4f43b4
UD
7347 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7348 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7349 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7350 defined.
7351
18a8e730
UD
7352 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7353 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7354 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7355 DW_CFA_advance_loc for .Laddl-.Lsubl.
7356
08c765fa
UD
73572003-04-13 Ulrich Drepper <drepper@redhat.com>
7358
18a8e730
UD
7359 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7360 position-independent unwind data for static libraries.
7361 Add missing unwind info. Add comments.
7362
ad2be852
UD
7363 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7364 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7365 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
7366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7367
177d1ad3
UD
73682003-04-12 Ulrich Drepper <drepper@redhat.com>
7369
08c765fa
UD
7370 * Makefile: Make sure all cancellation points are compiled with
7371 exception and asynchronous unwind tables.
7372
177d1ad3
UD
7373 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7374 which mishandles loading of global object addresses in PIC.
7375 (THREAD_SETMEM_NC): Likewise.
7376
09d65ff3
UD
73772003-04-11 Ulrich Drepper <drepper@redhat.com>
7378
7379 * pthread.h: Define new data structure for cleanup buffer. Declare
7380 new cleanup handler interfaces.
7381 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7382 (struct pthread): Add cleanup_jmp_buf pointer. Define
7383 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7384 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7385 it. Declare old cleanup handler installation functions.
7386 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7387 handling.
7388 * cleanup_defer.c: Likewise.
7389 * cleanup_compat.c: New file. Old cleanup code.
7390 * cleanup_def_compat.c: New file. Old cleanup code.
7391 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7392 if own thread descriptor.
7393 * unwind.c: New file.
7394 * forward.c: Add __pthread_unwind.
7395 * init.c (pthread_functions): Add __pthread_unwind.
7396 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7397 Add ptr___pthread_unwind.
7398 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7399 and unwind function.
7400 * Makefile (libpthread-routines): Add cleanup_compat,
7401 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7402 table generation if necessary.
7403 * version.c: Record whether unwind support is compiled in.
7404 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7405 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7406 handler interfaces.
7407 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7408 complication to generate unwind information for syscall wrappers.
68107ec0 7409 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
7410 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7411 __cleanup_fct_attribute.
7412
7413 * Makefile: Add rules to build and run tst-cleanup0.
7414 * tst-cleanup0.c: New file.
7415 * tst-cleanup0.expect: New file.
7416
7417 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7418 caller. Optimize to avoid often unecessary local variable.
7419
0dc44b51
RM
74202003-04-11 Roland McGrath <roland@redhat.com>
7421
7422 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7423 sets variable `multidir'; include that.
7424 (generated): Add it.
7425 ($(objpfx)$(multidir)/crti.o): New target.
7426 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7427
84a80719
UD
74282003-04-11 Ulrich Drepper <drepper@redhat.com>
7429
7430 * tst-attr2.c (do_test): Add cast to avoid warning.
7431 * tst-mutex4.c (do_test): Likewise.
7432
88ff4759
UD
74332003-04-10 Ulrich Drepper <drepper@redhat.com>
7434
7435 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7436 in child.
7437
b2041097
UD
74382003-04-09 Ulrich Drepper <drepper@redhat.com>
7439
7440 * Makefile (tests): Add tst-detach1.
7441 * tst-detach1.c: New file.
7442
f9657e88
UD
74432003-04-08 Ulrich Drepper <drepper@redhat.com>
7444
9afe4964
UD
7445 * sysdeps/pthread/pthread.h: Remove duplicate
7446 pthread_cleanup_{push,pop} definitions.
7447
f9657e88
UD
7448 * tst-barrier2.c: Eliminate warnings.
7449 * tst-cancel4.c: Likewise.
7450 * tst-cond4.c: Likewise.
7451 * tst-cond6.c: Likewise.
7452 * tst-detach1.c: Likewise.
7453 * tst-rwlock4.c: Likewise.
7454 * tst-rwlock6.c: Likewise.
7455 * tst-rwlock7.c: Likewise.
7456 * tst-sem3.c: Likewise.
7457 * tst-spin2.c: Likewise.
7458 * tst-umask1.c: Likewise.
7459
69b35e86
UD
74602003-04-07 Ulrich Drepper <drepper@redhat.com>
7461
7462 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7463
c70ad7d7
UD
74642003-04-06 Ulrich Drepper <drepper@redhat.com>
7465
7466 * descr.h (struct pthread): Move cancelhandling member to the front.
7467
54e0138f
UD
74682003-04-05 Ulrich Drepper <drepper@redhat.com>
7469
7470 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7471 malloc_parent, and malloc_child statically.
7472 (__register_atfork_malloc): New function.
7473 (free_mem): Don't free any of the malloc_* variables on the list.
7474 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7475 Define HAVE_register_atfork_malloc.
7476
b22d701b
UD
74772003-04-04 Ulrich Drepper <drepper@redhat.com>
7478
7479 * sysdeps/pthread/createthread.c (create_thread): Add some more
7480 comments explaining when to set multiple_threads and when not.
7481
7482 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7483 THREAD_ATOMIC_BIT_SET if not already defined.
7484 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7485 THREAD_ATOMIC_BIT_SET:
7486 * sysdeps/x86_64/tls.h: Likewise.
7487 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7488 THREAD_ATOMIC_CMPXCHG_VAL.
7489 (_pthread_cleanup_pop_restore): Likewise.
7490 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7491 (__pthread_enable_asynccancel_2): Likewise.
7492 (__pthread_disable_asynccancel): Likewise.
7493 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7494 (__libc_disable_asynccancel): Likewise.
7495 * init.c (sigcancel_handler): Likewise.
7496 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7497 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7498
86246935
UD
74992003-04-03 Ulrich Drepper <drepper@redhat.com>
7500
7501 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7502 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7503 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7504 * Makefile (tests): Add tst-cancel11.
7505 * tst-cancel11.c: New file.
7506
6b4686a5
UD
75072003-04-01 Ulrich Drepper <drepper@redhat.com>
7508
7509 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7510 round, not the first. Use specific_used flag instead of local
7511 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7512 (__free_tcb): Don't call deallocate_tsd here.
7513 (start_thread): Call deallocate_tsd here.
7514 * pthread_setspecific.c: Set specific_used flag really only when
7515 needed.
0d73a73b 7516 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 7517 * tst-tsd3.c: New file.
0d73a73b 7518 * tst-tsd4.c: New file.
6b4686a5 7519
42b2395d
UD
75202003-03-31 Ulrich Drepper <drepper@redhat.com>
7521
211d90c5
UD
7522 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7523 Use atomic_exchange_and_add instead of __lll_add.
7524 (__lll_mutex_timedlock): Likewise.
7525 Patch by Ian Wienand.
7526
75272003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7528
7529 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7530 (SINGLE_THREAD_P): Fix typo.
7531 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7532
75332003-03-31 Ulrich Drepper <drepper@redhat.com>
7534
7535 * Makefile (tests): Add tst-align.
7536 * tst-align.c: New file.
7537 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 7538
42b2395d
UD
7539 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7540 function correctly.
7541
211d90c5
UD
7542 * tst-tsd2.c: Add casts to avoid warnings.
7543
163b180f
UD
75442003-03-30 Ulrich Drepper <drepper@redhat.com>
7545
7546 * descr.h (struct pthread): Move most often used elements to the front.
7547
ea473bad
UD
75482003-03-29 Ulrich Drepper <drepper@redhat.com>
7549
7550 * Makefile (libpthread-routines): Add pthread_atfork.
7551 (libpthread-static-only-routines): Add pthread_atfork.
7552
dd731d53
UD
75532003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7554
7555 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7556 of TLS_DTV_AT_TP.
7557 (INSTALL_DTV): Add parens.
7558 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7559 Use passed descr instead of THREAD_SELF.
7560 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7561 (__lll_mutex_timedlock_wait): Correct expected value after
7562 spurious wakeup.
7563 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7564 Release lock before waking up the waiters.
7565 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7566 criteria. Reorderstruct passed to cleanup handler. Fix
7567 handling of cancellation and failung pthread_mutex_unlock call.
7568 Use __pthread_enable_asynccancel_2 instead of
7569 __pthread_enable_asynccancel.
7570 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7571 Return result of lock re-get if it fails.
7572 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7573 for __pthread_cleanup_push.
7574 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7575 completely broken rwlock implementation.
7576 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7577 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7578 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7579 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7580 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7581 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7582 versioned_symbol macro.
7583 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7584 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7585
c75d02f0
UD
75862003-03-27 Ulrich Drepper <drepper@redhat.com>
7587
5f5004df
UD
7588 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7589 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7590 and __helper_tid.
7591 (struct timer): Remove th and bar field.
7592 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7593 debugging code. Create only one helper thread.
7594 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7595 helper thread.
7596 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7597 Renamed. Define statically. Use thread info from siginfo.
7598 (__helper_once): New variable.
7599 (__helper_tid): New variable.
7600 (__reset_helper_control): New function.
7601 (__start_helper_thread): New function.
7602
18d009ca
UD
7603 * pthread_create.c (start_thread): Don't use setjmp inside
7604 __builtin_expect to work around gcc bug.
7605
c75d02f0
UD
7606 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7607 timer_delete syscall fails, but not with ENOSYS, set
7608 __no_posix_timers.
7609
7610 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7611 (timer_settime): Fix typo.
28cf3058
UD
7612 * sysdeps/unix/sysv/linux/timer_getoverr.c
7613 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 7614
049ac259
JJ
76152003-03-27 Jakub Jelinek <jakub@redhat.com>
7616
7617 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7618 offset of cleanupbuf.__prev.
7619
f93d39dd
JJ
76202003-03-26 Jakub Jelinek <jakub@redhat.com>
7621
7622 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7623 of included file.
7624
f064e4c5
UD
76252003-03-26 Ulrich Drepper <drepper@redhat.com>
7626
7627 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7628 NULL provide default definition to syscall.
7629
83e886a3
RM
76302003-03-25 Roland McGrath <roland@redhat.com>
7631
7632 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7633 (timer_id2ptr): Fix typo.
7634
09402f5b
UD
76352003-03-25 Ulrich Drepper <drepper@redhat.com>
7636
7637 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7638 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7639 * sysdeps/ia64/pthreaddef.h: Likewise.
7640 * sysdeps/powerpc/pthreaddef.h: Likewise.
7641 * sysdeps/s390/pthreaddef.h: Likewise.
7642 * sysdeps/sh/pthreaddef.h: Likewise.
7643 * sysdeps/x86_64/pthreaddef.h: Likewise.
7644 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7645 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7646 being changed.
7647 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7648 SIGTIMER is not unblocked.
7649 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7650 RT signal taken.
7651 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7652 be send.
7653 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7654 pass pointer through as ID.
7655 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7656 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7657 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7658 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7659 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7660 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7661 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7662 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7663 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7664 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7665 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7666 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7667 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7668 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7669 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7670 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7671 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7672 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7673 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7674 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7675 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7676 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7677 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7678 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7679 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7680 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7681 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7682 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7683 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7684 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7685 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7686 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7687 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7688
7689 * pthreadP.h: Remove FRAME_LEFT definition.
7690 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7691 already left frame. Programs which have this problem are not POSIX
7692 compliant.
7693 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7694
5e826ab5
UD
76952003-03-24 Ulrich Drepper <drepper@redhat.com>
7696
7697 * sysdeps/pthread/tst-timer.c: Check return values of the
7698 functions we test.
7699
b910f788
RM
77002003-03-23 Roland McGrath <roland@redhat.com>
7701
3045a1fe
RM
7702 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7703 * tst-tls3mod.c: Likewise.
7704 * tst-tls1.c: Likewise.
7705 * tst-tls2.c: Likewise.
7706
85047fe3
RM
7707 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7708 undefined behavior.
7709
b910f788
RM
7710 * tst-join5.c (tf1, tf2): Add a cast.
7711
7712 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7713
7714 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7715 Don't test anything.
7716 * tst-cond4.c: Likewise.
7717 * tst-cond6.c: Likewise.
7718 * tst-flock2.c: Likewise.
7719 * tst-mutex4.c: Likewise.
7720 * tst-rwlock4.c: Likewise.
7721 * tst-signal1.c: Likewise.
7722 * tst-spin2.c: Likewise.
7723 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7724
7725 * tst-mutex4.c: Use test-skeleton.c.
7726 * tst-spin2.c: Likewise.
7727 * tst-sysconf.c: Likewise.
7728 * tst-barrier2.c: Likewise.
7729 * tst-cond4.c: Likewise.
7730 * tst-cond6.c: Likewise.
7731 * tst-rwlock4.c: Likewise.
7732 * tst-unload.c: Likewise.
7733 * tst-flock2.c (do_test): Use return instead of exit.
7734
4baa087a
RM
77352003-03-22 Jakub Jelinek <jakub@redhat.com>
7736
7737 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7738
5a3ab2fc
UD
77392003-03-21 Ulrich Drepper <drepper@redhat.com>
7740
9f07eae2
UD
7741 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7742 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7743 instead of __lll_compare_and_swap.
7744 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7745 Likewise.
7746 Removed definition if __lll_compare_and_swap.
7747
5a3ab2fc
UD
7748 * cancellation.c: Adjust for new form of compare&exchange macros.
7749 * cleanup_defer.c: Likewise.
7750 * init.c: Likewise.
7751 * libc-cancellation.c: Likewise.
7752 * old_pthread_cond_broadcast.c: Likewise.
7753 * old_pthread_cond_signal.c: Likewise.
7754 * old_pthread_cond_timedwait.c: Likewise.
7755 * old_pthread_cond_wait.c: Likewise.
7756 * pthread_cancel.c: Likewise.
7757 * pthread_create.c: Likewise.
7758 * pthread_detach.c: Likewise.
7759 * pthread_join.c: Likewise.
7760 * pthread_key_delete.c: Likewise.
7761 * pthread_setcancelstate.c: Likewise.
7762 * pthread_setcanceltype.c: Likewise.
7763 * pthread_timedjoin.c: Likewise.
7764 * pthread_tryjoin.c: Likewise.
7765 * sysdeps/pthread/createthread.c: Likewise.
7766
b1aea098
UD
77672003-03-20 Ulrich Drepper <drepper@redhat.com>
7768
7769 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 7770 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
7771 definitions. Replace uses with calls to atomic_* functions.
7772 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7773 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7774 __lll_test_and_set calls with atomic_exchange_and_add and
7775 atomic_exchange calls respectively.
7776 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7777 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7778 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7779 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7780 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7781 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7782 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7783
7784 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7785 returns the old value.
7786
100a7100
RM
77872003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7788
7789 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7790 int for variable OLDVAL and correct inline assembler contraint.
7791 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7792 type int for variable OLD.
7793
7794 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7795 only for s390-32.
7796 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7797 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7798 instead of multiple_threads field in the TCB.
7799
95767b36
UD
78002003-03-19 Ulrich Drepper <drepper@redhat.com>
7801
4009bf40
UD
7802 * sysdeps/i386/i686/bits/atomic.h: Removed.
7803 * sysdeps/i386/i586/bits/atomic.h: Removed.
7804 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7805 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7806 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7807 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7808 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7809 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7810 * atomic.h: Removed. Moved to glibc.
7811
560a784f
UD
7812 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7813 support for clock selection.
7814
95767b36
UD
7815 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7816 signalling waiters.
7817
043ad426
RM
78182003-03-18 Roland McGrath <roland@redhat.com>
7819
94659495
RM
7820 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7821 Add __lll_rel_instr first. Add memory clobber.
7822 (lll_mutex_unlock): Use __lll_test_and_set.
7823 From Paul Mackerras <paulus@samba.org>.
7824
7825 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7826 unconditionally.
7827 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7828 (SINGLE_THREAD_P): Add `header.' prefix.
7829 From Paul Mackerras <paulus@samba.org>.
7830
043ad426
RM
7831 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7832 pthread_timedjoin_np to ...
7833 (libpthread: GLIBC_2.3.3): ... here.
7834 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7835
7836 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7837 Avoid shadowing VAL variable.
7838
7839 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7840 New macro.
7841
86a9ee5e
UD
78422003-03-18 Ulrich Drepper <drepper@redhat.com>
7843
ac9e0aa1
UD
7844 * Makefile (tests): Add tst-cond11.
7845 * tst-cond11.c: New file.
7846
a14b373c
UD
7847 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7848 struct passed to cleanup handler to eliminate one more
7849 instruction.
7850 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7851
24a49f38
UD
7852 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7853 (pthrad_cond_t): Replace __unused field with __clock.
7854
7855 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7856 waken all waiters in cleanup handler.
7857 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7858 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7859
86a9ee5e
UD
7860 * pthread_condattr_getclock.c: New file.
7861 * pthread_condattr_setclock.c: New file.
7862 * sysdeps/pthread/pthread.h: Declare these new functions.
7863 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7864 * Makefile (libpthread-routines): Add the new functions.
7865 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7866 Renamed field to value. Document use of the bits.
7867 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7868 change.
7869 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 7870 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
7871 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7872 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7873 Add __clock field.
7874 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7875 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7876 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7877 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7878 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7879 Implement clock selection.
7880 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7881 * pthread-errnos.sym: Add ENOSYS.
7882 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7883 _POSIX_CLOCK_SELECTION.
7884 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7885
7886 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7887 invalid .size directive.
7888
98054a05
RM
78892003-03-17 Roland McGrath <roland@redhat.com>
7890
7891 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7892 Formatting tweaks.
7893
001bea71
UD
78942003-03-17 Ulrich Drepper <drepper@redhat.com>
7895
4773086e
UD
7896 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7897 Use __lll_add instead of spelling it out. Use protected symbol names.
7898 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7899 Use __lll_add.
7900 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7901 Renamed from lll_compare_and_swap. Use new name where necessary.
7902 (__lll_add): Defined.
7903 (__lll_dec_if_positive): Defined.
7904 (__lll_test_and_set): Defined.
7905 * sysdeps/ia64/pthread_spin_init.c: Removed.
7906 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7907 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7908 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7909 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7910 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7911 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7912 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
7913 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7914 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7915 __sync_lock_release_si.
7916 Patch by Jakub Jelinek.
7917
7918 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7919 Fix timeout handling.
7920 (__lll_timedwait_tid): Likewise.
7921 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7922 Patch by Jakub Jelinek.
7923
7924 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7925
de4471dd
RM
79262003-03-17 Roland McGrath <roland@redhat.com>
7927
7928 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7929 * sysdeps/pthread/pthread_spin_init.c: New file.
7930 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7931 * sysdeps/powerpc/Makefile: New file.
7932 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7933 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7934 * sysdeps/powerpc/pthreaddef.h: New file.
7935 * sysdeps/powerpc/tcb-offsets.sym: New file.
7936 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7937 * sysdeps/powerpc/tls.h: New file.
7938 * sysdeps/powerpc/bits/atomic.h: New file.
7939 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7940 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7941 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 7942
de4471dd
RM
7943 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7944 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7945 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7946 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7947 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7948 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7949 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7950 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7951 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7952 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7953 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7954 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7955 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7956 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7957 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7958
7959 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7960 not gettimeofday.
7961 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7962 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7963 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7964 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7965 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7966
5778033f
UD
79672003-03-17 Ulrich Drepper <drepper@redhat.com>
7968
7969 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7970 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7971 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7972 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7973 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7974
796038f8
RM
79752003-03-16 Roland McGrath <roland@redhat.com>
7976
7977 * tst-fork4.c: Include <string.h>.
7978 * tst-signal2.c: Likewise.
7979 * tst-mutex5.c (do_test): exit -> return.
7980 * tst-mutex2.c: Include <stdlib.h>.
7981
51d0678c
UD
79822003-03-16 Ulrich Drepper <drepper@redhat.com>
7983
5778033f
UD
7984 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7985 (__lll_mutex_timedlock_wait): Correct expected value after
7986 spurious wakeup. Otherwise we would never wait again.
7987
b6e2f87a
UD
7988 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7989 zone versus inline asm stupidity. Use correct instructions.
7990
51d0678c
UD
7991 * tst-rwlock6.c: Add some more status output.
7992
8112cc70
RM
79932003-03-15 Roland McGrath <roland@redhat.com>
7994
7995 * sysdeps/pthread/configure.in: New file.
7996 * sysdeps/pthread/configure: New file (generated).
7997
49773c19
UD
79982003-03-15 Ulrich Drepper <drepper@redhat.com>
7999
8000 * allocatestack.c (allocate_stack): Store the exact stack size of
8001 user allocated stacks.
8002
eec0ca9f
JJ
80032003-03-15 Jakub Jelinek <jakub@redhat.com>
8004
8005 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8006 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8007 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8008 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8009 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8010 Use `header.' prefix.
8011 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8012
a87731e2
UD
80132003-03-15 Ulrich Drepper <drepper@redhat.com>
8014
8015 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8016 __builtin_frame_address, use stack pointer.
8017
8018 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8019 instead of __builtin_frame_pointer.
8020
e22a221d
UD
80212003-03-14 Ulrich Drepper <drepper@redhat.com>
8022
92ed3daf
UD
8023 * tst-basic1.c (do_test): Add cast to avoid warning.
8024 * tst-basic2.c (do_test): Likewise.
8025
9b89567d
UD
8026 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8027 amount of stack correction.
8028
e22a221d
UD
8029 * tst-fork4.c: Use test-skeleton.c.
8030
2e49caba
RM
80312003-03-14 Roland McGrath <roland@redhat.com>
8032
8033 * init.c: Fix typo "#eli" for "#else".
8034
415ef7d8
RM
80352003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8036
8037 * allocatestack.c (__stack_user): Use hidden_data_def.
8038 * pthread_create.c (__pthread_keys): Likewise.
8039
8040 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8041
52287505
RM
80422003-03-14 Roland McGrath <roland@redhat.com>
8043
415ef7d8
RM
8044 * tst-fork4.c: New file.
8045 * Makefile (tests): Add it.
8046
52287505
RM
8047 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8048 we always define the padding space.
8049 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8050 stopped supporting its own extensions fully.
8051 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8052 struct also called `header', so `header.multiple_threads' is the field
8053 name to use on all machines.
8054 * allocatestack.c (allocate_stack): Use `header.' prefix.
8055 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8056 * pthread_create.c (__pthread_create_2_1): Likewise.
8057 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8058 (THREAD_SELF): Likewise.
8059 * sysdeps/x86_64/tls.h: Likewise.
8060 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8061 (SINGLE_THREAD_P): Likewise.
8062 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8063 (SINGLE_THREAD_P): Likewise.
8064 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8065 (SINGLE_THREAD_P): Likewise.
8066
8067 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8068 value directly.
8069
c44bf9aa
UD
80702003-03-14 Ulrich Drepper <drepper@redhat.com>
8071
e22a221d
UD
8072 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8073 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8074
0eb18281
UD
8075 * pthread_create.c (start_thread): setjmp is expected to return 0.
8076
c44bf9aa
UD
8077 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8078 (THREAD_GETMEM_NC): Likewise.
8079
564cd8b6
UD
80802003-03-13 Ulrich Drepper <drepper@redhat.com>
8081
8082 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8083 and the size of the stack which must be allocated is a multiple,
8084 allocate one more page.
8085 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8086 MULTI_PAGE_ALIASING.
8087
6461e577
RM
80882003-03-13 Roland McGrath <roland@redhat.com>
8089
8090 * pthread_create.c (start_thread): Set EXITING_BIT after the
8091 event-reporting (and destructors), not before.
8092
b5ec5617
UD
80932003-03-13 Jakub Jelinek <jakub@redhat.com>
8094
6461e577
RM
8095 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8096 lll_futex_wake): Declare register variables as long int instead of
8097 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8098 Make syscall arguments clobbered by the syscall.
8099 (lll_futex_wait): Define using lll_futex_timed_wait.
8100
8101 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8102 to void *.
8103
8104 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8105 PPID if [! NDEBUG].
8106
8107 * allocatestack.c (nptl_ncreated): Only declare if
8108 COLORING_INCREMENT != 0.
8109
8110 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8111 (__libc_enable_asynccancel_2): Remove prototype.
8112
b5ec5617
UD
8113 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8114 ctid to match kernel.
8115
d0369fb8
UD
81162003-03-12 Ulrich Drepper <drepper@redhat.com>
8117
7588880f
UD
8118 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8119 libc_multiple_threads.
8120 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8121 __libc_multiple_threads to...
8122 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8123
8124 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8125 versioning.
8126 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8127 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8128
8129 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8130 (__pthread_once_internal): Define.
8131
8132 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8133 macros instead of .symver directly.
8134 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8135 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8136
d0369fb8
UD
8137 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8138 * sysdeps/x86_64/tcb-offsets.sym: New file.
8139 * sysdeps/x86_64/Makefile: New file.
8140
8141 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8142 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8143 to access own pthread_t in TCB.
8144 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8145 Likewise.
8146 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8147 Likewise.
8148 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8149
0bb2ac85
RM
81502003-03-12 Roland McGrath <roland@redhat.com>
8151
8152 * pthread-errnos.sym: New file.
8153 * Makefile (gen-as-const-headers): New variable, list that file.
8154 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8155 header <pthread-errnos.h> instead of defining errno values here.
8156 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8157 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8158 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8159 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8160 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8161 Likewise.
8162 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8163 Likewise.
8164 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8165 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8166 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8167 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8168 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8169 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8170 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8171 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8172 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8173 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8174 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8175 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8176 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8177 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8178 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8179 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8180 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8181 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8182 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8183 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8184 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8185 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8186 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8187 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8188 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8189 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8190 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8191
8192 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8193 CLONE_CHILD_SETTID worked.
8194
35e148cb
UD
81952003-03-12 Ulrich Drepper <drepper@redhat.com>
8196
d0369fb8
UD
8197 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8198 file.
8199 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8200 file.
8201
8202 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8203 (pthread_cond_t): Add padding.
8204
da49194d
UD
8205 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8206 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8207 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8208
35e148cb
UD
8209 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8210 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8211 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8212 (__pthread_rwlock_timedrdlock): Likewise.
8213 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8214 (__pthread_rwlock_wrlock): Likewise.
8215 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8216 (__pthread_rwlock_rdlock): Likewise.
8217
8218 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8219
8220 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8221 result of lock re-get if it fails.
8222
3e976b96
UD
82232003-03-11 Ulrich Drepper <drepper@redhat.com>
8224
5a03acfe
UD
8225 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8226 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8227 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8228 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8229 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8230 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8231 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8232 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8233 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8234 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8235
8236 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8237 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8238
8239 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8240 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8241 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8242 (create_thread): Likewise.
8243 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8244 * init.c (__pthread_initialize_minimal_internal): Initialize
8245 __libc_multiple_threads_ptr if necessary.
8246 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8247 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8248 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8249 __libc_multiple_threads.
8250 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8251 necessary.
8252
8253 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8254 (THREAD_SETMEM_NC): Likewise.
8255
8256 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8257 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8258 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8259 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8260
8261 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8262 Eliminate one entire instruction.
8263
32a589b1
UD
8264 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8265 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8266 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8267 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8268 instead of __pthread_enable_asynccancel.
8269 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8270 (__pthread_cond_wait): Likewise.
8271 * sysdeps/pthread/pthread_cond_timedwait.c
8272 (__pthread_cond_timedwait): Likewise.
8273 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8274
3e976b96
UD
8275 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8276 (__condvar_cleanup): Wake up all waiters in case we got signaled
8277 after being woken up but before disabling asynchronous
8278 cancellation.
8279 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8280 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8281 (__condvar_cleanup): Likewise.
8282
8283 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8284 Make it an error if architecture has no #if case. Add x86-64.
8285
8286 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8287 pt-initfini.s generation.
8288
8289 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8290 (TLS_INIT_TP): Fix typo.
8291
6c477888
UD
82922003-03-11 Jakub Jelinek <jakub@redhat.com>
8293
8294 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8295 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8296
8297 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8298 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8299 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8300 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8301 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8302 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8303 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8304 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8305
ea694823
UD
83062003-03-11 Ulrich Drepper <drepper@redhat.com>
8307
6c477888
UD
8308 * sysdeps/pthread/pthread_cond_timedwait.c
8309 (__pthread_cond_timedwait): Return the result of the final
8310 locking. If it succeeds, the regular function return value.
8311
8312 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8313 Return result of the final locking.
8314 * version.c (__nptl_main): Work around problems with the strange
8315 INTERNAL_SYSCALL macro on ppc32.
8316 * init.c (__pthread_initialize_minimal_internal): Unblock
8317 SIGCANCEL in case the parent blocked it.
8318 Reported by Paul Mackerras <paulus@samba.org>.
8319
ea694823
UD
8320 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8321 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8322 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8323
b33e6163
RM
83242003-03-11 Jakub Jelinek <jakub@redhat.com>
8325
8326 * sysdeps/pthread/pthread_cond_timedwait.c
8327 (__pthread_cond_timedwait): Unlock and fail if
8328 __pthread_mutex_unlock_internal failed.
8329
8330 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8331 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8332 Use ARCH_CLONE.
8333 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8334 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8335 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8336 ALLOCATE_STACK): New macros.
8337 (TLS_TPADJ): New macro.
8338 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8339 (allocate_stack): Handle TLS_DTV_AT_TP and
8340 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8341 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8342 Don't set PD->self.
8343 * init.c [__ia64__] (__NR_set_tid_address): Define.
8344
8345 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8346 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8347 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8348 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8349 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8350 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8351 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8352 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8353 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8354 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8355 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8356 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8357 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8358 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8359 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8360 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8361 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8362 * sysdeps/ia64/bits/atomic.h: New file.
8363 * sysdeps/ia64/Makefile: New file.
8364 * sysdeps/ia64/pthread_spin_init.c: New file.
8365 * sysdeps/ia64/pthread_spin_lock.c: New file.
8366 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8367 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8368 * sysdeps/ia64/pthreaddef.h: New file.
8369 * sysdeps/ia64/tcb-offsets.sym: New file.
8370 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8371 * sysdeps/ia64/tls.h: New file.
8372
8373 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8374 to syscall instead of no arguments.
8375
2b30b2e5
UD
83762003-03-10 Ulrich Drepper <drepper@redhat.com>
8377
db5f2fc9
UD
8378 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8379 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8380 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8381 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8382
8383 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8384 unused code.
8385
6a4263e3
UD
8386 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8387
3de7c2a9
UD
8388 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8389 lowlevelbarrier.sym.
8390 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8391 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8392 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 8393 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 8394
2a544d82
UD
8395 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8396 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8397 (__lll_mutex_timedlock_wait): Likewise.
8398 (lll_mutex_lock): Adjust asm for that.
8399 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8400 (lll_lock): Adjust asm for operand order change.
8401 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8402 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8403
ec06436c
UD
8404 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8405 Reverse order of parameters.
8406 (__lll_timedwait_tid): Remove regparms attribute.
8407 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8408 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8409
3273832c
UD
8410 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8411 (__lll_timedwait_tid): Remove one unnecessary instruction.
8412
51f32ab8
UD
8413 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8414 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8415 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8416 lowlevelmutex.S.
8417
8418 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8419 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8420 for NOT_IN_libc.
8421 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8422 lowlevellock.S.
8423
fad48d9e
UD
8424 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8425 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8426 for libc.so.
8427 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8428 define LOCK here (if UP is not defined). The actual code is in
8429 lowlevelmutex.S.
8430
9356d063
UD
8431 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8432 LOCK is already defined. Don't define lll_unlock_wake_cb and
8433 __lll_timedwait_tid for libc.so.
8434 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8435 define LOCK here (if UP is not defined). The actual code is in
8436 lowlevellock.S.
8437
ebf0cbc5 8438 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
8439 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8440 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8441 instead of lowlevelsem.h.
8442 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8443 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8444 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 8445
c915e5ad
UD
8446 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8447 lowlevelrwlock.sym.
8448 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8449 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 8450 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 8451
4c3c2e8a
UD
8452 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8453 register loading.
8454 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8455 last changed. D'oh.
8456
2b30b2e5
UD
8457 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8458
8459 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8460 of __libc_locking_needed.
8461 (lll_trylock): Initialize %eax to zero.
8462
2b30b2e5
UD
8463 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8464 pthread_cond_t definition.
8465
e48f9638
RM
84662003-03-10 Roland McGrath <roland@redhat.com>
8467
8468 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8469 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8470 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8471 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8472 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8473
8474 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8475 Instead of setting PD->multiple_threads, set globals
8476 __pthread_multiple_threads and __libc_multiple_threads.
8477 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8478 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8479 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8480
8481 * descr.h (struct pthread): Conditionalize first member on
8482 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8483 containing an anonymous tcbhead_t. Move `list' member out.
8484 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8485 * allocatestack.c: Remove use of `header.data.' prefix.
8486 * pthread_create.c: Likewise.
8487 * init.c (__pthread_initialize_minimal_internal): Likewise.
8488 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8489 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8490 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8491 * sysdeps/x86_64/tls.h: Likewise.
8492 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8493 (SINGLE_THREAD_P): Likewise.
8494 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8495 (SINGLE_THREAD_P): Likewise.
8496 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8497 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8498
c37cae9e
UD
84992003-03-09 Ulrich Drepper <drepper@redhat.com>
8500
d38c777e
RM
8501 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8502
7b44a5e0 8503 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 8504 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 8505
c2e5e085
UD
8506 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8507 leftovers from the ia32 code.
8508
8509 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8510 memory load.
8511 (clear_once_control): Don't load %esi.
8512
8513 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8514 handling.
8515
8516 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8517
cd4b2a55
UD
8518 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8519 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8520
c37cae9e
UD
8521 * Makefile (tests): Add tst-cond10.
8522 * tst-cond10.c: New file.
8523
d130a341
UD
85242003-03-08 Ulrich Drepper <drepper@redhat.com>
8525
ccf1d573
UD
8526 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8527 * tst-signal3.c (do_test): Likewise.
8528 * tst-sem5.c (do_test): Likewise.
8529 * tst-kill6.c (do_test): Likewise.
8530 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8531
8532 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8533 of inc/dec.
8534 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8535 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8536 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8537 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8538 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8539 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8540 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8541 Likewise.
8542 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8543 Likewise.
8544 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8545 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8546 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8547 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8548 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8549 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8550 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8551 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8552
d130a341
UD
8553 * allocatestack.c (allocate_stack): If mprotect() fails free the
8554 TLS memory.
8555
bc6389ad
UD
85562003-03-07 Ulrich Drepper <drepper@redhat.com>
8557
41d4d223
UD
8558 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8559
8560 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8561 lll_wake_tid. This was used only to work around kernel limits in
8562 the early days.
8563 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8564 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8565 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8566 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8567
bc6389ad
UD
8568 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8569 (__pthread_initialize_minimal_internal): Change initialization of
8570 __static_tls_align_m1 appropriately.
8571 * pthreadP.h (__static_tls_align_m1): Renamed from
8572 __static_tls_align.
8573 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8574 instead of __static_tls_align-1.
8575
cc775edf
UD
85762003-03-04 Ulrich Drepper <drepper@redhat.com>
8577
0de28d5c 8578 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 8579
518b5308
UD
8580 * pthread_create.c: Define __pthread_keys using nocommon
8581 attribute, not by placing it explicitly in bss.
8582 Remove DEFINE_DEALLOC definition. Not needed anymore.
8583
8584 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8585 Use it in mmap call to allocate stacks.
8586
8587 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8588
cc775edf
UD
8589 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8590 result of the thread function.
8591
4f6f0a8f
UD
85922003-03-03 Ulrich Drepper <drepper@redhat.com>
8593
f04a2721
UD
8594 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8595 version is just fine.
8596
4f6f0a8f
UD
8597 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8598 (__pthread_child_handler): Renamed from pthread_child_handler,
8599 exported, and marked hidden. Change all users.
8600 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8601 free __pthread_child_handler from child list.
8602
7ce5c164
UD
86032003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8604
8605 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8606
8607 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8608 Fix handling of cancellation and failing pthread_mutex_unlock call.
8609 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8610 (__pthread_cond_wait): Likewise.
8611
8612 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8613 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8614 lll_futex_timed_wait call.
8615 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8616 (pthread_rwlock_timedwrlock): Likewise.
8617
8618 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8619 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8620 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8621
8622 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8623 check of lll_futex_wake return value.
8624
ea6a015b
RM
86252003-03-03 Roland McGrath <roland@redhat.com>
8626
8627 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8628
8629 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8630 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8631 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8632
4adacf57
UD
86332003-03-02 Ulrich Drepper <drepper@redhat.com>
8634
1be3d664
UD
8635 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8636 error for CPU clocks.
8637
885bafa1
UD
8638 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8639 _POSIX_MONOTONIC_CLOCK.
8640 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8641
4adacf57
UD
8642 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8643 recent kernels.
8644
86bfff4d
UD
86452003-03-01 Ulrich Drepper <drepper@redhat.com>
8646
8647 * descr.h (struct pthread): Move cleanup field to the front.
8648
d1149385
RM
86492003-03-01 Roland McGrath <roland@redhat.com>
8650
8651 * sem_open.c (sem_open): Braino fix.
8652
bd8bb78b
UD
86532003-03-01 Ulrich Drepper <drepper@redhat.com>
8654
748bec08
UD
8655 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8656 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8657 __pthread_cleanup_pop functionality.
8658 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8659
bd8bb78b
UD
8660 * descr.h (struct pthread): Move tid field to the front now that
8661 it is often used.
8662
8663 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8664 (__lll_mutex_timedlock_wait): Remove.
8665 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8666 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8667 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8668 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8669 (lll_unlock_wake_cb): Don't save and restore %esi.
8670 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8671 %esi.
8672 (__lll_timedwait_tid): Add alignment.
8673 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8674 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8675 %esi.
8676 (__lll_timedwait_tid): Removed.
8677 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8678 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8679 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8680 (pthread_barrier_wait): Don't save, load, and restore %esi for
8681 last thread.
8682 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8683 (__pthread_cond_signal): Don't save, load, and restore %esi.
8684 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8685 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8686 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8687 Don't save, load, and restore %esi.
8688
d2637c70
UD
86892003-02-27 Ulrich Drepper <drepper@redhat.com>
8690
567fb22a
UD
8691 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8692 Release lock before waking up the waiters.
8693
427f5fa1
UD
8694 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8695
a2d83cfb
UD
8696 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8697 (reader_thread): Likewise.
8698
d2637c70
UD
8699 * sysdeps/pthread/pthread_rwlock_unlock.c
8700 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8701 to wake up readers if there are none.
8702
8703 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8704 Release internal lock before wake threads.
8705
b1531183
UD
87062003-02-26 Ulrich Drepper <drepper@redhat.com>
8707
dbf6131c
UD
8708 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8709 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8710 predefined.
8711 * tst-rwlock9.c: Likewise.
8712 * tst-rwlock10.c: New file.
8713 * tst-rwlock11.c: New file.
8714
695799fe
UD
8715 * Makefile (tests): Add tst-dlsym1.
8716 * tst-dlsym1.c: New file.
8717
b1531183
UD
8718 * init.c (__pthread_initialize_minimal_internal): Set
8719 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8720 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8721
3724f268
UD
87222003-02-24 Ulrich Drepper <drepper@redhat.com>
8723
3857ca78
UD
8724 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8725
80d80779
UD
8726 * tst-cond2.c: Fix sychronization with child.
8727
86371308
UD
8728 * tst-rwlock8.c (reader_thread): Remove unused variable.
8729
ffeb4481
UD
8730 * Makefile: Add rules to build and run tst-tls3.
8731 * tst-tls3.c: New file.
8732 * tst-tls3mod.c: New file.
8733
3724f268
UD
8734 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8735 * tst-rwlock8.c: New file.
8736 * tst-rwlock9.c: New file.
8737 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8738 complete broken rwlock implementation.
8739 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8740 Likewise.
8741 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8742 Likewise.
8743 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8744 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
8745 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8746 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8747 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8748 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8749 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 8750
8915cc40
RM
87512003-02-23 Roland McGrath <roland@redhat.com>
8752
8753 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8754
fd1a0d0c
UD
87552003-02-23 Ulrich Drepper <drepper@redhat.com>
8756
ecf28959
UD
8757 * Makefile (tests): Add tst-context1.
8758 * tst-context1.c: New file.
8759
5e47b76b
UD
8760 * Makefile (tests): Add tst-tls1 and tst-tls2.
8761 * tst-tls1.c: New file.
8762 * tst-tls2.c: New file.
8763
5a6bbb41
UD
8764 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8765 for failed cmpxchg.
8766
fd1a0d0c
UD
8767 * pthread_create.c (start_thread): Set EXITING_BIT early.
8768
8769 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8770 (THREAD_GETMEM_NC): Likewise.
8771
757f9fcb
UD
87722003-02-22 Ulrich Drepper <drepper@redhat.com>
8773
b1b8e747
UD
8774 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8775 off 3 more bytes by using offset-less instructions when possible.
8776
c780aa21 8777 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
8778
8779 * eintr.c (eintr_source): Add unnecessary return but the compiler
8780 insists.
8781
8782 * tst-kill3.c: Include <unistd.h>.
8783
5148559c
RM
87842003-02-21 Roland McGrath <roland@redhat.com>
8785
8786 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8787
ab2d98e3
UD
87882003-02-21 Ulrich Drepper <drepper@redhat.com>
8789
71028edd
UD
8790 * Makefile (tests): Add tst-eintr1.
8791 (distribute): Add eintr.c.
8792 * tst-eintr1.c: New file.
8793 * eintr.c: New file.
8794
e814f748
UD
8795 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8796
8797 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8798 Disallow sending SIGCANCEL.
8799
ab2d98e3 8800 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 8801 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
8802 * tst-kill1.c: New file.
8803 * tst-kill2.c: New file.
8804 * tst-kill3.c: New file.
8805 * tst-kill5.c: New file.
9c03686d 8806 * tst-kill6.c: New file.
e814f748
UD
8807 * tst-basic7.c: Renamed to...
8808 * tst-kill4.c: ...this.
ab2d98e3 8809
59fed0e2
RM
88102003-02-21 Roland McGrath <roland@redhat.com>
8811
8812 * Makefile (install-lib-ldscripts): New variable.
8813
49dc759f
UD
88142003-02-21 Ulrich Drepper <drepper@redhat.com>
8815
8c2e9a29
UD
8816 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8817 * pthread_cancel.c: Use INVALID_TD_P.
8818 * pthread_detach.c: Likewise.
8819 * pthread_getschedparam.c: Likewise.
8820 * pthread_setschedparam.c: Likewise.
8821 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8822 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8823 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8824 * pthread_timedjoin.c: Likewise.
8825
8826 * tst-basic7.c: Include <signal.h>.
8827
49dc759f
UD
8828 * pthread_join.c (pthread_join): Limited checking for invalid
8829 descriptors.
8830 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8831
df5803bf
UD
88322003-02-20 Ulrich Drepper <drepper@redhat.com>
8833
c5acd3d7
UD
8834 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8835 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
8836 * Makefile (tests): Add tst-key4.
8837 * tst-key4.c: New file.
8838
729924a0
UD
88392003-02-18 Ulrich Drepper <drepper@redhat.com>
8840
2f7dc594
UD
8841 * Makefile (tests): Add tst-basic7.
8842 * tst-basic7.c: New file.
8843
ba25bb0f
UD
8844 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8845 Add some more __builtin_expect.
8846
12fd3c5f 8847 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 8848
5430d926
UD
88492003-02-17 Ulrich Drepper <drepper@redhat.com>
8850
b0db7fbe
UD
8851 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8852 _POSIX_THREAD_PRIORITY_SCHEDULING.
8853 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8854 _XOPEN_REALTIME_THREADS.
8855 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8856
8857 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8858 kernel returns EINVAL for PID <= 0, work around it.
8859
ecfda9bd
UD
8860 * Makefile (tests): Add tst-signal5.
8861 * tst-signal5.c: New file.
8862
7d78ab99
UD
8863 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8864 and LOGIN_NAME_MAX.
8865
371a2972
UD
8866 * tst-cancel1.c (tf): Block all signals.
8867
5430d926
UD
8868 * Makefile (tests): Add tst-basic6.
8869 * tst-basic6.c: New file.
8870
8871 * tst-basic1.c: Add test for process ID.
8872
8873 * Makefile (tests): Add tst-cancel10.
8874 * tst-cancel10.c: New file.
8875
8876 * Makefile (tests): Add tst-signal4.
8877 * tst-signal4.c: New file.
8878
8879 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8880 __sigismember instead of sigismember. Add __builtin_expect.
8881
1564916a
UD
88822003-02-16 Ulrich Drepper <drepper@redhat.com>
8883
179ff175
UD
8884 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8885 pthread_setcancelstate, and pthread_rwlock_setpshared.
8886
e4335f9a
UD
8887 * tst-cancel7.c (do_test): Make sure the pid file exists before
8888 canceling the thread.
8889
0a37669a
UD
8890 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8891 pthread_rwlock_timedrdlock tests.
8892 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8893 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8894 Check for invalid tv_nsec field.
8895 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8896 Likewise.
8897
8898 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8899 recursive mutex of overflow.
8900
8901 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8902
e4335f9a 8903 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
8904 going into an endless loop.
8905 * Makefile (tests): Add tst-cancel9.
8906 * tst-cancel9.c: New file.
8907
8908 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8909
b270b548
UD
89102003-02-15 Ulrich Drepper <drepper@redhat.com>
8911
1c82b97f
UD
8912 * tst-mutex5.c (do_test): Add more timedlock tests.
8913
b2f05465 8914 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
8915 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8916
e798b60f
UD
8917 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8918 use INLINE_SYSCALL. Error number is returned, not -1.
8919
90491dc4
UD
8920 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8921 and __deallocate_stack with internal_function.
8922 * pthread_create.c: Adjust definitions appropriately.
8923 * allocatestack.c: Likewise.
8924
8925 * pthread_join.c: Add one more __builtin_expect.
8926 * pthread_timedjoin.c: Likewise.
8927
8928 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8929 not data of sequence number does not match.
8930 Add one __builtin_expect.
8931
c6247c9d
UD
8932 * Makefile (tests): Add tst-clock1.
8933 * tst-clock1.c: New file.
8934
b270b548
UD
8935 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8936 negative arguments.
8937 * Makefile (tests): Add tst-basic5.
8938 * tst-basic5.c: New file.
8939
700bf7af
UD
89402003-02-14 Ulrich Drepper <drepper@redhat.com>
8941
757de559
UD
8942 * Makefile (tests): Add tst-basic4.
8943 * tst-basic4.c: New file.
8944
47202270
UD
8945 * pthreadP.h: Add declaraction for __nptl_nthreads.
8946 * pthread_create.c: Define __nptl_nthreads
8947 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 8948 after thread is done. If then zero, call exit(0).
47202270
UD
8949 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8950 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8951 * init.c (pthread_functions): Initialize ptr_nthreads.
8952 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8953 (__reclaim_stacks): Decrement __nptl_nthreads.
8954 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8955 Define.
8956 * Makefile (tests): Add tst-basic3.
8957 * tst-basic3.c: New file.
8958
e320ef46
UD
8959 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8960 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8961 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8962 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8963 if asynchronous canceling is enabled.
8964 * pthread_join.c (pthread_join): When recognizing circular joins,
8965 take into account the other thread might be already canceled.
8966 * Makefile (tests): Add tst-join5.
8967 * tst-join5.c: New file.
8968
700bf7af
UD
8969 * Makefile (tests): Add tst-join4.
8970 * tst-join4.c: New file.
8971
89722003-02-13 Ulrich Drepper <drepper@redhat.com>
8973
8974 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8975
dac0f772
UD
89762003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8977
8978 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8979 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8980 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8981 warning.
8982 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8983 to avoid warning.
8984 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8985 error if lll_futex_wake failed.
8986
e8cda341
UD
89872003-02-13 Ulrich Drepper <drepper@redhat.com>
8988
a7720b5e
UD
8989 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8990 handling of cancellation and failung pthread_mutex_unlock call.
8991 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8992 * Makefile (tests): Add tst-cond8 and tst-cond9.
8993 * tst-cond8.c: New file.
8994 * tst-cond9.c: New file.
8995
a1ea4c06
UD
8996 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8997
8998 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8999 non-standard initializers with __USE_GNU.
9000
e8cda341
UD
9001 * Makefile (tests): Add tst-cleanup3.
9002 * tst-cleanup3.c: New file.
9003
2067577c
UD
90042003-02-12 Ulrich Drepper <drepper@redhat.com>
9005
89e78a95
UD
9006 * Makefile (tests): Add tst-attr1 and tst-attr2.
9007 * tst-attr1.c: New file.
9008 * tst-attr2.c: New file.
9009
dfdd294a
UD
9010 * Makefile: Add rules to build and run tst-atfork2 test.
9011 * tst-atfork2.c: New file.
9012 * tst-atfork2mod.c: New file.
9013
9014 * sysdeps/unix/sysv/linux/unregister-atfork.c
9015 (__unregister_atfork): Free the memory allocated for the handlers
9016 after removing them from the lists.
9017
9018 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9019 cleanup function.
9020
9021 * tst-atfork1.c (do_test): Wait for the child we forked.
9022 Report error in child.
9023
9024 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9025
2067577c
UD
9026 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9027
2a8a8a84
UD
90282003-02-10 Ulrich Drepper <drepper@redhat.com>
9029
d9dd121e
UD
9030 * Makefile (tests): Add tst-cancel8.
9031 * tst-cancel8.c: New file.
9032
2a8a8a84
UD
9033 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9034 clearing of control variable.
defd1870 9035 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 9036 * tst-once3.c: New file.
defd1870 9037 * tst-once4.c: New file.
2a8a8a84 9038
a54e8d33
UD
90392003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9040
9041 * sysdeps/sh/Makefile: New file.
9042 * sysdeps/sh/bits/atomic.h: New file.
9043 * sysdeps/sh/pthread_spin_init.c: New file.
9044 * sysdeps/sh/pthread_spin_lock.c: New file.
9045 * sysdeps/sh/pthread_spin_trylock.S: New file.
9046 * sysdeps/sh/pthread_spin_unlock.S: New file.
9047 * sysdeps/sh/pthreaddef.h: New file.
9048 * sysdeps/sh/tcb-offsets.sym: New file.
9049 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9050 * sysdeps/sh/tls.h: New file.
9051 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9052 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9053 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9054 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9055 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9056 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9057 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9058 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9059 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9060 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9061 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9062 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9063 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9064 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9065 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9066 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9067 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9068 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9069 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9070 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9071 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9072 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9073 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9074 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9075 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9076 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9077 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9078 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9079 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9080 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9081
696e556e
UD
90822003-02-08 Ulrich Drepper <drepper@redhat.com>
9083
9084 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9085 according to POSIX.
9086
9087 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9088
fef710d6
UD
90892003-02-07 Ulrich Drepper <drepper@redhat.com>
9090
c6180643
UD
9091 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9092 (TLS_GET_FS): New #define.
9093 (TLS_SET_FS): New #define.
9094 Correct value of __NR_set_thread_area.
9095
fef710d6
UD
9096 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9097
11090a99
UD
90982003-02-06 Ulrich Drepper <drepper@redhat.com>
9099
65c68990
UD
9100 * Makefile (tests): Add tst-popen1.
9101 * tst-popen1.c: New file.
9102
11090a99
UD
9103 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9104 but inactive generalization.
9105 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9106 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9107 Minor optimization, remove one instruction.
9108 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9109
a88c9263
UD
91102003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9111
9112 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9113
91142003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9115
9116 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9117 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9118 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9119 * sysdeps/pthread/pthread_cond_signal.c: New file.
9120 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9121 * sysdeps/pthread/pthread_cond_wait.c: New file.
9122 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9123 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9124 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9125 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9126 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9127 * sysdeps/s390/Makefile: New file.
9128 * sysdeps/s390/bits/atomic.h: New file.
9129 * sysdeps/s390/pthread_spin_init.c: New file.
9130 * sysdeps/s390/pthread_spin_lock.c: New file.
9131 * sysdeps/s390/pthread_spin_trylock.c: New file.
9132 * sysdeps/s390/pthread_spin_unlock.c: New file.
9133 * sysdeps/s390/pthreaddef.h: New file.
9134 * sysdeps/s390/tcb-offsets.sym: New file.
9135 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9136 * sysdeps/s390/tls.h: New file.
9137 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9138 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9139 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9140 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9141 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9142 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9143 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9144 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9145 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9146 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9147 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9148 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9149 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9150 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9151 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9152 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9153 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9154 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9155 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9156 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9157 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9158 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9159 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9160
6f1cff95
UD
91612003-02-04 Ulrich Drepper <drepper@redhat.com>
9162
ec609a8e
UD
9163 * atomic.h: Add a couple more default implementations.
9164 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
9165 __arch_compare_and_exchange_32_acq in return value definition. It
9166 always exists.
9167 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 9168 Add missing atomic_ prefixes.
e3ec8904 9169
6f1cff95
UD
9170 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9171 thread library is available, use correct value to mark initialized
9172 once variable.
9173
4f088329
UD
91742003-02-03 Ulrich Drepper <drepper@redhat.com>
9175
6f1cff95
UD
9176 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9177 __sysconf to determine pagesize.
9178
3e4fc359 9179 * pthread_create.c: Include <atomic.h>.
4f088329
UD
9180 * allocatestack.c (allocate_stack): Implement coloring of the
9181 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9182 size minus one. Adjust users.
3e4fc359 9183 * sysdeps/i386/i686/Makefile: New file.
4f088329 9184
2f42e8be
UD
91852003-02-02 Ulrich Drepper <drepper@redhat.com>
9186
4301f7e2
UD
9187 * allocatestack.c: Improve comment throughout the file.
9188
2f42e8be 9189 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 9190 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
9191 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9192 (__lll_lock_wait): Likewise.
9193 (lll_unlock_wake_cb): Removed.
9194
4a7d6545
UD
91952003-01-31 Ulrich Drepper <drepper@redhat.com>
9196
9197 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9198 _POSIX_THREAD_PRIORITY_SCHEDULING.
9199
886d5973
UD
92002003-01-30 Jakub Jelinek <jakub@redhat.com>
9201
9202 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9203 Fix return type of ptr___pthread_getspecific.
9204
e474ca78
UD
92052003-01-29 Ulrich Drepper <drepper@redhat.com>
9206
9207 * Makefile (tests): Add tst-umask1.
9208 (tst-umask1-ARGS): Define.
9209 * tst-umask1.c: New file.
9210
e6ebd2e4
UD
92112003-01-28 Ulrich Drepper <drepper@redhat.com>
9212
6cf26f41
UD
9213 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9214 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9215 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9216 pthread_rwlock_unlock.
9217 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9218 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9219 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9220 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9221 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9222 New file.
9223 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9224 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9225 New file.
9226 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9227 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9228 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9229 New file.
9230 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9231 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9232 New file.
9233 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9234 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9235 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9236 New file.
9237 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9238 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9239 New file.
9240 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9241
1d087a7e
UD
9242 * Makefile (libpthread-routines): Remove lowlevelcond and
9243 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9244 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9245 and pthread_cond_broadcast.
4a99d160
UD
9246 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9247 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9248 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9249 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9250 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9251 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9252 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9253 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9254 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9255 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9256 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9257 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9258 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9259 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9260 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9261 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9262 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9263 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9264 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9265 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9266 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9267 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9268 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9269 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9270 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9271 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9272 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9273 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9274 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9275 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9276 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 9277
e6ebd2e4
UD
9278 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9279 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9280 of the code is moved to ...
9281 * sysdeps/pthread/createthread.c: ...here. New file.
9282
a15698cb
UD
92832003-01-27 Ulrich Drepper <drepper@redhat.com>
9284
0566b130
UD
9285 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9286 (__new_sem_post): Clear %eax before returning.
9287 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9288
e6fb8846
UD
9289 * Makefile (tests): Add tst-cleanup2.
9290 * tst-cleanup2.c: New file.
9291
a15698cb
UD
9292 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9293 Interpret first parameter correctly.
9294
8824b0a1
UD
92952003-01-17 Ulrich Drepper <drepper@redhat.com>
9296
9297 * Makefile (headers): Add bits/semaphore.h.
9298
850dcfca
UD
92992003-01-16 Jakub Jelinek <jakub@redhat.com>
9300
9301 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9302 if not SHARED.
9303
574b892e
UD
93042003-01-14 Ulrich Drepper <drepper@redhat.com>
9305
a8d87c92
UD
9306 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9307 must be used and mapping failed.
9308 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9309
574b892e
UD
9310 * Makefile (CFLAGS-pthread_self.os): Define this, not
9311 CFLAGS-pthread_self.c.
9312
fb48047a
UD
93132003-01-13 Ulrich Drepper <drepper@redhat.com>
9314
47805511
UD
9315 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9316 lll_unlock_wake_cb.
9317
fb48047a
UD
9318 * Makefile (libpthread-routines): Add version. Add rules to build
9319 version.os and banner.h.
9320 * version.c: New file.
9321
115bb61d
UD
93222003-01-13 Jakub Jelinek <jakub@redhat.com>
9323
9324 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9325 the alias unconditional.
9326 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9327
93282003-01-13 Ulrich Drepper <drepper@redhat.com>
9329
9330 * Makefile (CFLAGS-pthread_self.c): New definition.
9331
6aca81bb
UD
93322003-01-06 Jakub Jelinek <jakub@redhat.com>
9333
9334 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9335 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9336 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9337 * init.c (__pthread_initialize_minimal_internal): Likewise.
9338
e9c7764e
UD
93392003-01-07 Jakub Jelinek <jakub@redhat.com>
9340
b5facfda
UD
9341 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9342
e9c7764e
UD
9343 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9344 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9345 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9346 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9347 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9348 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9349
bef1e42f
UD
93502003-01-06 Jakub Jelinek <jakub@redhat.com>
9351
9352 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9353 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9354 * tst-cancel-wrappers.sh: Remove all exceptions.
9355
bbd17455
UD
93562003-01-05 Ulrich Drepper <drepper@redhat.com>
9357
a73ab6df
UD
9358 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9359 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9360
bbd17455
UD
9361 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9362 Use __libc_pthread_functions array if SHARED.
9363
9364 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9365 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9366
9367 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9368 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9369 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9370 __libc_ptf_call instead of __libc_maybe_call.
9371 (PTF): New #define.
9372 (__libc_cleanup_region_start): Wrap function name with PTF call.
9373 (__libc_cleanup_region_end): Likewise.
9374 (__libc_cleanup_end): Likewise.
9375
9376 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9377 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9378 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9379 * pthreadP.h: Add prototypes.
9380
9381 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9382 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9383 __pthread_rwlock_unlock aliases.
9384 * pthreadP.h: Add prototypes for new aliases.
9385
9386 * pthreadP.h (struct pthead_functions): Moved to...
9387 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9388 * init.c (pthread_functions): Add initializers for new elements.
9389
9390 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9391 __pthread_cleanup_pop_restore aliases.
9392 * pthreadP.h: Add prototypes.
9393
9394 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9395 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9396 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9397 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9398 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9399 * pthreadP.h: Adjust prototypes and callers.
9400
d27a78be
UD
94012003-01-04 Ulrich Drepper <drepper@redhat.com>
9402
b74121ae
UD
9403 * Makefile (tests): Add tst-cancel7.
9404 (tst-cancel7-ARGS): New variable.
bbd17455 9405 * tst-cancel7.c: New file.
b74121ae 9406
29bc410c
UD
9407 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9408 around gcc defficiencies.
9409 * old_pthread_cond_signal.c: Likewise.
9410 * old_pthread_cond_timedwait.c: Likewise.
9411 * old_pthread_cond_wait.c: Likewise.
9412
d27a78be
UD
9413 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9414
733f25e6
UD
94152003-01-03 Ulrich Drepper <drepper@redhat.com>
9416
7edb2ae3
UD
9417 * Makefile (tests): Add tst-cond7.
9418 * tst-cond7.c: New file.
9419
b1151300
UD
9420 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9421 (condvar_cleanup): Get condvar address from the right place.
9422
733f25e6
UD
9423 * atomic.h: Correct definitions of atomic_full_barrier,
9424 atomic_read_barrier, atomic_write_barrier.
9425
9426 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9427 race-free.
9428 * old_pthread_cond_signal.c: Likewise.
9429 * old_pthread_cond_timedwait.c: Likewise.
9430 * old_pthread_cond_wait.c: Likewise.
9431
686b7223
UD
94322003-01-03 Jakub Jelinek <jakub@redhat.com>
9433
9434 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9435
0e07706e
UD
94362003-01-03 Ulrich Drepper <drepper@redhat.com>
9437
997256dd
UD
9438 * pthreadP.h (pthread_cond_2_0_t): New type.
9439 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9440 Use new type for the 2.0 condvar function prototypes.
9441 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9442 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9443 parameter.
9444 * old_pthread_cond_destroy.c: Likewise.
9445 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9446 * old_pthread_cond_signal.c: Likewise.
9447 * old_pthread_cond_timedwait.c: Likewise.
9448 * old_pthread_cond_wait.c: Likewise.
9449
842d2817
UD
9450 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9451 (__pthread_cond_wait): Don't save cancellation mode and seq value
9452 in same location.
9453
0e07706e
UD
9454 * herrno.c (__h_errno_location): Don't define as weak.
9455
bf293afe
UD
94562003-01-02 Jakub Jelinek <jakub@redhat.com>
9457
9458 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9459 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9460 and pthread_cond_wait.
9461 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9462 Renamed to...
9463 (__pthread_cond_broadcast_2_0): ... this.
9464 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9465 Renamed to...
9466 (__pthread_cond_destroy_2_0): ... this.
9467 * old_pthread_cond_init.c (__old_pthread_cond_init):
9468 Renamed to...
9469 (__pthread_cond_init_2_0): ... this.
9470 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9471 Renamed to...
9472 (__pthread_cond_signal_2_0): ... this.
9473 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9474 Renamed to...
9475 (__pthread_cond_wait_2_0): ... this.
9476 * pthread_cond_destroy.c: Include shlib-compat.h.
9477 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9478 * pthread_cond_init.c: Include shlib-compat.h.
9479 (pthread_cond_init): Change strong_alias into versioned_symbol.
9480 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9481 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9482 fields.
9483 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9484 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9485 __pthread_cond_wait_2_0): New prototypes.
9486 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9487 __old_pthread_cond_init, __old_pthread_cond_signal,
9488 __old_pthread_cond_wait): Removed.
9489 * init.c: Include shlib-compat.h.
9490 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9491 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9492 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9493 ptr___pthread_cond_*_2_0 fields.
9494 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9495 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9496
9497 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9498 LIBC_SIGACTION was not yet defined.
9499 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9500 [!defined LIBC_SIGACTION] (__sigaction): New function and
9501 libc_hidden_weak.
9502 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9503 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9504
95052003-01-02 Jakub Jelinek <jakub@redhat.com>
9506
9507 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9508
05df18c3
UD
95092003-01-02 Ulrich Drepper <drepper@redhat.com>
9510
9511 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9512 New, larger type definition.
9513 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9514 implementation.
9515 * Versions [libpthread]: Add definitions for new pthread_cond_*
9516 interfaces for version GLIBC_2.3.2.
9517 * pthread_cond_init.c: Update initialization for new type definition.
9518 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9519 pthread_cond_timedwait, pthread_cond_signal, and
9520 pthread_cond_broadcast. Add old_pthread_cond_init,
9521 old_pthread_cond_destroy, old_pthread_cond_wait,
9522 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9523 old_pthread_cond_broadcast.
9524 * old_pthread_cond_broadcast.c: New file.
9525 * old_pthread_cond_destroy.c: New file.
9526 * old_pthread_cond_init.c: New file.
9527 * old_pthread_cond_signal.c: New file.
9528 * old_pthread_cond_timedwait.c: New file.
9529 * old_pthread_cond_wait.c: New file.
9530 * pthreadP.h: Add prototypes for the compatibility interfaces.
9531
9532 * pthread_cond_destroy.c: Don't include <errno.h>.
9533
fd8979e4
UD
95342003-01-01 Ulrich Drepper <drepper@redhat.com>
9535
9536 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9537 unnecessary zero offset when addressing MUTEX.
9538
6d6ee629
UD
95392002-12-31 Ulrich Drepper <drepper@redhat.com>
9540
9541 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9542 __register_atfork.
9543 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9544 for __register_atfork.
9545
a4baf360
UD
95462002-12-31 Jakub Jelinek <jakub@redhat.com>
9547
9548 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9549 instead of ASSEMBLER test macro.
9550
9551 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9552 __libc_current_sigrtmax): Add libc_hidden_def.
9553
9554 * sysdeps/pthread/list.h: Remove assert.h include.
9555
e9395a94
UD
95562002-12-31 Ulrich Drepper <drepper@redhat.com>
9557
9558 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9559 __pthread_initialize_minimal_internal not
9560 __pthread_initialize_minimal.
9561
89d6e444
UD
95622002-12-30 Ulrich Drepper <drepper@redhat.com>
9563
416d2de6
UD
9564 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9565 __pthread_initialize_minimal as hidden.
9566
89d6e444
UD
9567 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9568 constructor.
9569
95702002-12-31 Jakub Jelinek <jakub@redhat.com>
9571
9572 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9573 $(common-objpfx)format.lds, include that into the output script.
9574 Fix comment.
9575 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9576
8cac677c
UD
95772002-12-28 Andreas Jaeger <aj@suse.de>
9578
9579 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9580 nsec resolution changes.
9581 (xstat64_conv): Likewise.
9582 (xstat32_conv): Likewise.
9583 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9584 struct kernel_stat.
9585 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9586 structs stat and stat64.
9587 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 9588 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 9589
49e9f864
UD
95902002-12-30 Jakub Jelinek <jakub@redhat.com>
9591
9592 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9593 argument.
9594 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9595 (pthread_exit): Use strong_alias to avoid warnings.
9596 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9597 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9598 ptr___pthread_attr_init_2_*.
9599 * init.c (pthread_functions): Adjust.
9600
bab09b26
UD
96012002-12-29 Ulrich Drepper <drepper@redhat.com>
9602
598d7a42
UD
9603 * forward.c: Make all functions available by default again. It
9604 caused too much trouble.
9605
bab09b26
UD
9606 * pt-siglongjmp.c: Removed.
9607
3b7ed871
UD
96082002-12-28 Jakub Jelinek <jakub@redhat.com>
9609
9610 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9611 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9612 * sysdeps/i386/Makefile: New file.
9613 * sysdeps/i386/tcb-offsets.sym: New file.
9614 * sysdeps/pthread/tcb-offsets.h: New file.
9615 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9616 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9617
9618 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9619 __register_atfork...
9620 (GLIBC_2.3.2): ...here.
9621
96222002-12-28 Ulrich Drepper <drepper@redhat.com>
9623
9624 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9625 pthread_attr_setstackaddr with __attribute_deprecated__.
9626
270d9d47
UD
96272002-12-27 Jakub Jelinek <jakub@redhat.com>
9628
9629 * pt-system.c (system): Remove cancellation handling.
9630 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9631 cancellation routines.
9632
131fd126
UD
96332002-12-28 Ulrich Drepper <drepper@redhat.com>
9634
afb2e954
UD
9635 * descr.h: Include <dl-sysdep.h>.
9636 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
9637 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9638 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9639 (SYSINFO_OFFSEET): Likewise.
9640
96412002-12-27 Jakub Jelinek <jakub@redhat.com>
9642
9643 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9644 Define.
9645 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9646 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9647 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9648 (USE_DL_SYSINFO): Undef.
9649
96502002-12-22 Jakub Jelinek <jakub@redhat.com>
9651
9652 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9653 $(common-objpfx)libc.so.
9654 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9655 it is bigger than pipe buffer size even on arches with bigger
9656 page size.
9657 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9658
a218c9cf
UD
96592002-12-25 Ulrich Drepper <drepper@redhat.com>
9660
9661 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9662 correct errno access for case that USE___THREAD is not defined.
9663
015a2dc9
UD
96642002-12-24 Ulrich Drepper <drepper@redhat.com>
9665
9666 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9667 Patch by Marijn Ros <marijn@mad.scientist.com>.
9668
5220f9ac
RM
96692002-12-22 Roland McGrath <roland@redhat.com>
9670
9671 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9672
1561bf63
UD
96732002-12-20 Ulrich Drepper <drepper@redhat.com>
9674
9675 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9676
3325198e
UD
96772002-12-19 Ulrich Drepper <drepper@redhat.com>
9678
057c823f
UD
9679 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9680 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9681 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9682
097eca29
UD
9683 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9684 of int $0x80.
9685 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9686 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9687 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9688 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9689 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9690 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9691 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9692 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9693
9694 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9695 sysenter.
9696 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9697
9698 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9699
5f5843e3
UD
9700 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9701 in new TCB.
9702 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9703 that sysinfo is properly initialized.
9704 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9705 to 1 only for ld.so.
9706
3325198e
UD
9707 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9708 RTLD_CORRECT_DYNAMIC_WEAK.
9709
74e8f2dc
UD
97102002-12-19 Jakub Jelinek <jakub@redhat.com>
9711
9712 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9713 Use return 0 as 6th argument to FORWARD4.
9714 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9715
df45b31e
UD
97162002-12-18 Ulrich Drepper <drepper@redhat.com>
9717
9718 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9719 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9720 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9721 (INIT_SYSINFO): New #define.
9722 (TLS_TP_INIT): Use INIT_SYSINFO.
9723 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9724 At test to make sure SYSINFO_OFFSET value is correct.
9725 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9726
3d539579
UD
97272002-12-18 Jakub Jelinek <jakub@redhat.com>
9728
9729 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9730 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9731 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9732 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9733 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9734 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9735 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9736
d7913e0e
UD
97372002-12-18 Ulrich Drepper <drepper@redhat.com>
9738
f051627f
UD
9739 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9740 macro instead of using int $0x80 directly.
9741
d7913e0e
UD
9742 * sysdeps/pthread/bits/stdio-lock.h: New file.
9743 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9744 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9745 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9746 * Makefile (routines): Add libc-lowlevelmutex.
9747
9748 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9749 __i686.get_pc_thunk.dx.
9750
f077a4a9
UD
97512002-12-17 Jakub Jelinek <jakub@redhat.com>
9752
9753 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9754 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9755 ($(objpfx)tst-cancel-wrappers.out): New rule.
9756 * tst-cancel-wrappers.sh: New test.
9757 * tst-locale1.c: Include signal.h.
9758 (uselocale): Test static linking of __libc_current_sigrt*.
9759
97602002-12-17 Ulrich Drepper <drepper@redhat.com>
9761
9762 * Makefile (tests): Add tst-cancel6.
9763 * tst-cancel6.c: New file
9764
bd499a3b
UD
97652002-12-17 Jakub Jelinek <jakub@redhat.com>
9766
9767 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9768 Define meaningfully for assembler as well.
9769 * pthreadP.h (struct pthread_functions): Remove
9770 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9771 and ptr_pthread_attr_init_2_1 fields.
9772 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9773 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9774 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9775 (FORWARD3): Define using FORWARD4.
9776 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9777 versions.
9778 * pt-system.c: Remove duplicate stdlib.h include.
9779
0a1063f4
UD
97802002-12-16 Ulrich Drepper <drepper@redhat.com>
9781
87d60668
UD
9782 * sem_init.c: Define sem_init@GLIBC_2.0.
9783 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9784 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9785
0a1063f4
UD
9786 * flockfile.c: Moved to...
9787 * sysdeps/pthread/flockfile.c: ...here. New file.
9788 * funlockfile.c: Moved to...
9789 * sysdeps/pthread/funlockfile.c: ...here. New file.
9790 * ftrylockfile.c: Moved to...
9791 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9792
9634cf9d
UD
97932002-12-16 Jakub Jelinek <jakub@redhat.com>
9794
9795 * libc-cancellation.c: Guard both function with
9796 #if !defined NOT_IN_libc.
9797 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9798 automatically provided pthread wrappers.
9799 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9800 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9801 nor in libpthread.
9802 * pt-open.c: Removed.
9803 * pt-fcntl.c: Removed.
9804 * pt-fsync.c: Removed.
9805 * pt-lseek.c: Removed.
9806 * pt-msgrcv.c: Removed.
9807 * pt-msgsnd.c: Removed.
9808 * pt-msync.c: Removed.
9809 * pt-nanosleep.c: Removed.
9810 * pt-open64.c: Removed.
9811 * pt-pause.c: Removed.
9812 * pt-pread.c: Removed.
9813 * pt-pread64.c: Removed.
9814 * pt-pwrite.c: Removed.
9815 * pt-pwrite64.c: Removed.
9816 * pt-read.c: Removed.
9817 * pt-recv.c: Removed.
9818 * pt-recvfrom.c: Removed.
9819 * pt-recvmsg.c: Removed.
9820 * pt-send.c: Removed.
9821 * pt-sendto.c: Removed.
9822 * pt-sigtimedwait.c: Removed.
9823 * pt-sigwait.c: Removed.
9824 * pt-wait.c: Removed.
9825 * pt-waitpid.c: Removed.
9826 * pt-write.c: Removed.
9827 * pt-accept.c: Removed.
9828 * pt-close.c: Removed.
9829 * pt-connect.c: Removed.
9830 * pt-lseek64.c: Removed.
9831 * pt-sendmsg.c: Removed.
9832 * pt-tcdrain.c: Removed.
9833
6ee8d334
UD
98342002-12-15 Ulrich Drepper <drepper@redhat.com>
9835
81fa9371
UD
9836 * init.c (__pthread_initialize_minimal_internal): Renamed from
9837 __pthread_initialize_minimal. Make old name an alias. This
9838 converts a normal relocation into a relative relocation.
9839
f3015aa5
UD
9840 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9841
4cbc1950
UD
9842 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9843 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9844 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9845 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9846 pt-sigwaitinfo, pt-waitid, and pt-writev.
9847 * pt-creat.c: Removed.
9848 * pt-poll.c: Removed.
9849 * pt-pselect.c: Removed.
9850 * pt-readv.c: Removed.
9851 * pt-select.c: Removed.
9852 * pt-sigpause.c: Removed.
9853 * pt-sigsuspend.c: Removed.
9854 * pt-sigwaitinfo.c: Removed.
9855 * pt-waitid.c: Removed.
9856 * pt-writev.c: Removed.
9857
8454830b
UD
9858 * init.c (pthread_functions): New variable.
9859 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9860 (or NULL) to __libc_pthread_init.
9861 * forward.c: Rewrite to use __libc:pthread_functions array to get
9862 function addresses.
9863 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9864 prototype.
9865 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9866 Take new parameter. Copy content of variable pointed to by it
9867 to __libc_pthread_init.
9868
9869 * pthreadP.h (struct pthread_functions): New type.
9870 (__libc_pthread_init): Declare.
9871
9872 * pthread_attr_destroy.c: Add namespace protected alias.
9873 * pthread_attr_getdetachstate.c: Likewise.
9874 * pthread_attr_getinheritsched.c: Likewise.
9875 * pthread_attr_getschedparam.c: Likewise.
9876 * pthread_attr_getschedpolicy.c: Likewise.
9877 * pthread_attr_getscope.c: Likewise.
9878 * pthread_attr_setdetachstate.c: Likewise.
9879 * pthread_attr_setinheritsched.c: Likewise.
9880 * pthread_attr_setschedparam.c: Likewise.
9881 * pthread_attr_setschedpolicy.c: Likewise.
9882 * pthread_attr_setscope.c: Likewise.
9883 * pthread_cond_broadcast.c: Likewise.
9884 * pthread_cond_destroy.c: Likewise.
9885 * pthread_cond_init.c: Likewise.
9886 * pthread_cond_signal.c: Likewise.
9887 * pthread_cond_wait.c: Likewise.
9888 * pthread_condattr_destroy.c: Likewise.
9889 * pthread_condattr_init.c: Likewise.
9890 * pthread_equal.c: Likewise.
9891 * pthread_exit.c: Likewise.
9892 * pthread_getschedparam.c: Likewise.
9893 * pthread_self.c: Likewise.
9894 * pthread_setcancelstate.c: Likewise.
9895 * pthread_setschedparam.c: Likewise.
9896 * pthread_mutex_destroy.c: Likewise.
9897 * pthread_mutex_init.c: Likewise.
9898 * pthreadP.h: Add prototypes for the aliases.
9899
0d5f4929
UD
9900 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9901 multiple_threads member in correct TCB to 1.
9902
6ee8d334
UD
9903 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9904 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9905 member of thread decriptor, otherwise return unconditionally 1.
9906
2fb6444d
UD
99072002-12-14 Ulrich Drepper <drepper@redhat.com>
9908
9909 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9910 regular Linux version. Remove file.
9911 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9912 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9913 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9914 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9915 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9916 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9917 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9918 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9919 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9920 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9921 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9922 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9923 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9924 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9925 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9926 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9927 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9928 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9929 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9930 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9931 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9932 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9933 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9934 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9935 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9936 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9937 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9938 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9939 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9940 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9941
86b2dc40
UD
99422002-12-14 Jakub Jelinek <jakub@redhat.com>
9943
9944 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9945 * sysdeps/unix/sysv/linux/open.c: Removed.
9946 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9947 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9948 * sysdeps/unix/sysv/linux/msync.c: Removed.
9949 * sysdeps/unix/sysv/linux/read.c: Removed.
9950 * sysdeps/unix/sysv/linux/close.c: Removed.
9951 * sysdeps/unix/sysv/linux/creat.c: Removed.
9952 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9953 * sysdeps/unix/sysv/linux/pause.c: Removed.
9954 * sysdeps/unix/sysv/linux/select.c: Removed.
9955 * sysdeps/unix/sysv/linux/write.c: Removed.
9956
9d263d72
UD
99572002-12-14 Ulrich Drepper <drepper@redhat.com>
9958
9959 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9960 element in TCB to see whether locking is needed.
9961
9962 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9963 MULTIPLE_THREADS_OFFSET value is correct.
9964
9965 * sysdeps/unix/sysv/linux/close.c: New file.
9966 * sysdeps/unix/sysv/linux/connect.S: New file.
9967 * sysdeps/unix/sysv/linux/creat.c: New file.
9968 * sysdeps/unix/sysv/linux/fsync.c: New file.
9969 * sysdeps/unix/sysv/linux/llseek.c: New file.
9970 * sysdeps/unix/sysv/linux/lseek.c: New file.
9971 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9972 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9973 * sysdeps/unix/sysv/linux/msync.c: New file.
9974 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9975 * sysdeps/unix/sysv/linux/open.c: New file.
9976 * sysdeps/unix/sysv/linux/open64.c: New file.
9977 * sysdeps/unix/sysv/linux/pause.c: New file.
9978 * sysdeps/unix/sysv/linux/poll.c: New file.
9979 * sysdeps/unix/sysv/linux/pread.c: New file.
9980 * sysdeps/unix/sysv/linux/pread64.c: New file.
9981 * sysdeps/unix/sysv/linux/pselect.c: New file.
9982 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9983 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9984 * sysdeps/unix/sysv/linux/readv.c: New file.
9985 * sysdeps/unix/sysv/linux/recv.S: New file.
9986 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9987 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9988 * sysdeps/unix/sysv/linux/select.c: New file.
9989 * sysdeps/unix/sysv/linux/send.S: New file.
9990 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9991 * sysdeps/unix/sysv/linux/sendto.S: New file.
9992 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9993 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9994 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9995 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9996 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9997 * sysdeps/unix/sysv/linux/system.c: New file.
9998 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9999 * sysdeps/unix/sysv/linux/wait.c: New file.
10000 * sysdeps/unix/sysv/linux/waitid.c: New file.
10001 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10002 * sysdeps/unix/sysv/linux/writev.c: New file.
10003 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10004
10005 * pt-readv.c: Fix comment.
10006
100072002-12-14 Jakub Jelinek <jakub@redhat.com>
10008
10009 * tst-cleanup1.c: Include stdlib.h.
10010
10011 * tst-cancel5.c: New test.
10012 * Makefile (tests): Add tst-cancel5.
10013 (tst-cancel5): Link against libc.so libpthread.so in that order.
10014
9ae0909b
UD
100152002-12-13 Ulrich Drepper <drepper@redhat.com>
10016
b7bdd9c4
UD
10017 * forward.c (test_loaded): Prevent recursive calls.
10018
9ae0909b
UD
10019 * Makefile (routines): Add libc-cancellation.
10020 * libc-cancellation.c: New file.
10021 * descr.h (struct pthread): Add multiple_threads field.
10022 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10023 new thread descriptor to 1.
10024 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10025 Initialize multiple_thread field after successful thread creation.
10026 * cancellation.c (__do_cancel): Move to pthreadP.h.
10027 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10028 (__pthread_disable_asynccancel): Add internal_function attribute.
10029 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10030 * pthread_setcancelstate.c: Likewise.
10031 * pthread_setcanceltype.c: Likewise.
10032 * pthread_exit.c: Likewise.
10033 * pthreadP.h (CANCELLATION_P): Likewise.
10034 (__do_cancel): Define as static inline.
10035 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10036 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10037 declarations.
10038 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10039 fields. Define MULTIPLE_THREADS_OFFSET.
10040 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10041 declaration.
10042 * sysdeps/unix/sysv/linux/accept.S: New file.
10043 * sysdeps/unix/sysv/linux/read.c: New file.
10044 * sysdeps/unix/sysv/linux/write.c: New file.
10045 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10046 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10047 initialization of __libc_locking_needed.
10048 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10049 __libc_locking_needed, use multiple_threads field in TCB.
10050 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10051
22f20674
UD
100522002-12-12 Ulrich Drepper <drepper@redhat.com>
10053
2ad2e1e7
UD
10054 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10055 version.
10056 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10057
22f20674
UD
10058 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10059 access to __libc_locking_needed for PIC.
10060
aa80bf86
UD
100612002-12-12 Jakub Jelinek <jakub@redhat.com>
10062
10063 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10064 declare for libc.so.
10065 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10066 expression.
10067 (__libc_lock_lock): Put into statement expression.
10068 (__libc_lock_unlock): Remove trailing semicolon.
10069 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10070
24021373
RM
100712002-12-12 Roland McGrath <roland@redhat.com>
10072
10073 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10074 "m" constraint to refer to __libc_locking_needed. Declare it here.
10075
14e7aece
UD
100762002-12-12 Ulrich Drepper <drepper@redhat.com>
10077
10078 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10079 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10080 Initialize __libc_locking_needed.
10081 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10082 instead of __register_pthread_fork_handler.
10083 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10084 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10085 fork-gen with libc_pthread_init.
10086 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10087 of __register_pthread_fork_handler.
10088 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10089 of __register_pthread_fork_handler.
10090 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10091 __libc_locking_needed to determine whether lock prefix can be avoided.
10092 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10093
85631c8e
UD
100942002-12-11 Ulrich Drepper <drepper@redhat.com>
10095
da63009e
UD
10096 * Makefile (tests): Add tst-cleanup1.
10097 * tst-cleanup1.c: New file.
10098 * cancellation.c (__cleanup_thread): Removed.
10099 (__do_cancel): Remove call to __cleanup_thread.
10100 * pthreadP.h: Remove __cleanup_thread prorotype.
10101
000160a2
UD
10102 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10103 Remember function and argument even if cancellation handler
10104 function is not available.
10105 (__libc_cleanup_region_end): Execute registered function directly if
10106 pthread functions are not available.
10107 (__libc_cleanup_end): Likewise.
10108
85631c8e
UD
10109 * init.c (__pthread_initialize_minimal): Fix initialization in
10110 static lib by preventing gcc from being too clever.
10111
dce8f2b6
UD
101122002-12-10 Ulrich Drepper <drepper@redhat.com>
10113
34a075be
UD
10114 * init.c (__pthread_initialize_minimal): Remove unneccesary
10115 sigaddset call.
10116
dce8f2b6
UD
10117 * Makefile (tests): We can run tst-locale2 now.
10118
e5e45b53
UD
101192002-12-09 Ulrich Drepper <drepper@redhat.com>
10120
10121 * Versions: Remove duplicated sigwait entry.
10122
bdb04f92
UD
101232002-12-08 Ulrich Drepper <drepper@redhat.com>
10124
1e506629
UD
10125 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10126 inside libpthread.
10127
a3957dd5
UD
10128 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10129
bdb04f92
UD
10130 * pthreadP.h: Declare __pthread_enable_asynccancel and
10131 __pthread_disable_asynccancel.
10132 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10133 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10134 * cancellation.c (__pthread_enable_asynccancel): New function.
10135 (__pthread_disable_asynccancel): New function.
10136 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10137 * pt-close.c: Likewise.
10138 * pt-connect.c: Likewise.
10139 * pt-creat.c: Likewise.
10140 * pt-fcntl.c: Likewise.
10141 * pt-fsync.c: Likewise.
10142 * pt-lseek.c: Likewise.
10143 * pt-lseek64.c: Likewise.
10144 * pt-msgrcv.c: Likewise.
10145 * pt-msgsnd.c: Likewise.
10146 * pt-msync.c: Likewise.
10147 * pt-nanosleep.c: Likewise.
10148 * pt-open.c: Likewise.
10149 * pt-open64.c: Likewise.
10150 * pt-pause.c: Likewise.
10151 * pt-poll.c: Likewise.
10152 * pt-pread.c: Likewise.
10153 * pt-pread64.c: Likewise.
10154 * pt-pselect.c: Likewise.
10155 * pt-pwrite.c: Likewise.
10156 * pt-pwrite64.c: Likewise.
10157 * pt-read.c: Likewise.
10158 * pt-readv.c: Likewise.
10159 * pt-recv.c: Likewise.
10160 * pt-recvfrom.c: Likewise.
10161 * pt-recvmsg.c: Likewise.
10162 * pt-select.c: Likewise.
10163 * pt-send.c: Likewise.
10164 * pt-sendmsg.c: Likewise.
10165 * pt-sendto.c: Likewise.
10166 * pt-sigpause.c: Likewise.
10167 * pt-sigsuspend.c: Likewise.
10168 * pt-sigtimedwait.c: Likewise.
10169 * pt-sigwait.c: Likewise.
10170 * pt-sigwaitinfo.c: Likewise.
10171 * pt-system.c: Likewise.
10172 * pt-tcdrain.c: Likewise.
10173 * pt-wait.c: Likewise.
10174 * pt-waitid.c: Likewise.
10175 * pt-waitpid.c: Likewise.
10176 * pt-write.c: Likewise.
10177 * pt-writev.c: Likewise.
a3957dd5
UD
10178 * pthread_join.c: Likewise.
10179 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
10180
10181 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10182 (__xpg_sigpause): New function.
10183 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10184
6ccb3834
UD
101852002-12-07 Ulrich Drepper <drepper@redhat.com>
10186
09efc3ba
UD
10187 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10188
10189 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10190 _GI_pthread_cleanup_pop to pthreadP.h.
10191
10192 * ftrylockfile.c: Use _IO_lock_trylock instead of
10193 pthread_mutex_trylock.
10194
10195 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10196 (CANCEL_RESET): Likewise.
10197 (__pthread_setcanceltype_): Declare.
10198 (__pthread_mutex_lock_internal): Declare.
10199 (__pthread_mutex_unlock_internal): Declare.
10200 (__pthread_once_internal): Declare.
10201 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10202 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10203
10204 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10205 and pthread_mutex_unlock.
10206 * pthread_cond_wait.c: Likewise.
10207 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10208 * pthread_mutex_unlock.c: Likewise.
10209
10210 * pthread_setcanceltype.c: Add additional alias
10211 __pthread_setcanceltype.
10212
10213 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10214 * sem_open.c (sem_open): Likewise.
10215 Use __libc_open, __libc_write, and __libc_close instead of
10216 open, write, and close respectively.
10217
10218 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10219 Rewrite as statement expression since it must return a value.
10220
10221 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10222 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10223 __pthread_kill.
10224
10225 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10226 alias __pthread_once_internal.
10227
6ccb3834
UD
10228 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10229
d3c9f895
UD
102302002-12-06 Ulrich Drepper <drepper@redhat.com>
10231
4614167a
UD
10232 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10233 * tst-stdio1.c: New file.
10234 * tst-stdio2.c: New file.
10235
a4548cea
UD
10236 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10237
d3c9f895
UD
10238 * Makefile (tests): Comment out tst-locale2 for now.
10239 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10240
10241 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10242 -D_IO_MTSAFE_IO.
10243 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10244 Use _IO_lock_init instead of explicit assignment.
10245
10246 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10247 Define __libc_lock_* and __libc_lock_recursive macros with
10248 lowlevellock macros, not pthread mutexes.
10249
10250 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10251 of pthread_mutex_lock.
10252 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10253 instead of pthread_mutex_unlock.
10254
fde89ad0
RM
102552002-12-06 Roland McGrath <roland@redhat.com>
10256
10257 * allocatestack.c (__stack_user): Use uninitialized defn.
10258 * init.c (__pthread_initialize_minimal): Initialize it here.
10259
11767d47
RM
102602002-12-05 Roland McGrath <roland@redhat.com>
10261
fde89ad0
RM
10262 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10263 string.
10264 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10265
11767d47
RM
10266 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10267 missing & here too.
10268
440d8bc2
UD
102692002-12-05 Ulrich Drepper <drepper@redhat.com>
10270
10271 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10272 lowlevellock.
10273 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10274 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10275 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10276 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10277 for __libc_lock_* macros.
10278 * Makefile (routines): Add libc-lowlevellock.
10279
102802002-10-09 Roland McGrath <roland@redhat.com>
10281
10282 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10283 Under [__PIC__], call the function via the pointer fetched for
10284 comparison rather than a call by name that uses the PLT.
10285 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10286 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10287 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10288 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10289 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10290
d5ed0118
RM
102912002-12-04 Roland McGrath <roland@redhat.com>
10292
10293 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10294
10295 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10296 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10297
10298 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10299
eaa4099f
UD
103002002-12-04 Ulrich Drepper <drepper@redhat.com>
10301
10302 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10303 a completely opaque, non-integer type.
10304 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10305
33b5d0cc
UD
103062002-12-05 Jakub Jelinek <jakub@redhat.com>
10307
10308 * sysdeps/i386/tls.h: Include stdlib.h.
10309 * sysdeps/x86_64/tls.h: Likewise.
10310
7a5cdb30
UD
103112002-12-04 Ulrich Drepper <drepper@redhat.com>
10312
c4a6d859
UD
10313 * Makefile (tests): Add tst-locale2.
10314 (tests-static): Likewise.
10315 * tst-locale2.c: New file.
10316
7a5cdb30
UD
10317 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10318 volatile and add memory clobbers to lock operations.
10319
d82d5d12
UD
103202002-12-03 Ulrich Drepper <drepper@redhat.com>
10321
69cae3cf
UD
10322 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10323 * sysdeps/i386/i486/bits/atomic.h: New file.
10324 * sysdeps/i386/i586/bits/atomic.h: New file.
10325 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10326 include i486 version.
10327 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10328 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 10329 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 10330
e4044c01
UD
10331 * allocatestack.c (get_cached_stack): Don't crash if we first
10332 found a stack with a larger size then needed.
10333 Reported by Hui Huang <hui.huang@sun.com>.
10334
d82d5d12
UD
10335 * Makefile (tests): Add tst-sysconf.
10336 * tst-sysconf.c: New file.
10337
10338 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10339 PTHREAD_THREADS_MAX.
10340
fa9a4ff0
RM
103412002-12-02 Roland McGrath <roland@redhat.com>
10342
10343 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10344 Declare using hidden_proto instead of attribute_hidden, so there are
10345 non-.hidden static symbols for gdb to find.
10346 (__pthread_keys): Likewise.
10347 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10348 * allocatestack.c (__stack_user): Likewise.
10349 * pthread_create.c (__pthread_keys): Likewise.
10350 (__nptl_threads_events, __nptl_last_event): Make these static instead
10351 of hidden.
10352 * pthread_key_create.c (__pthread_pthread_keys_max,
10353 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10354
91949a33
UD
103552002-12-02 Ulrich Drepper <drepper@redhat.com>
10356
c22b52fa
UD
10357 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10358 statically.
10359 * tst-locale1.c: New file.
10360
beb6aa41
UD
10361 * pthread_cond_timedwait.c: Include <stdlib.h>.
10362
91949a33
UD
10363 * Makefile (tests): Add tst-fork2 and tst-fork3.
10364 * tst-fork2.c: New file.
10365 * tst-fork3.c: New file.
10366
654dff90
UD
103672002-11-28 Ulrich Drepper <drepper@redhat.com>
10368
cb0e76b4
UD
10369 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10370
10371 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10372 require it to 200112L.
10373
10374 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10375 instruction only if HAVE_CMOV is defined.
10376 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10377
975aa229
UD
10378 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10379
654dff90
UD
10380 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10381
10382 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10383
10384 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10385
a3931336
UD
103862002-11-27 Ulrich Drepper <drepper@redhat.com>
10387
c10c099c
UD
10388 * sysdeps/x86_64/bits/atomic.h: New file.
10389
10390 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10391 16-bit operations.
10392
dca99d27
UD
10393 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10394 possible since gettid cannot fail.
10395
f78deea6
UD
10396 * sysdeps/x86_64/pthreaddef.h: New file.
10397
10398 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10399
10400 * sysdeps/x86_64/pthread_spin_init.c: New file.
10401 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10402 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10403 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10404
10405 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10406 Add missing lock prefix. Minute optimization.
10407
10408 * tst-spin2.c (main): Also check successful trylock call.
10409
10410 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10411 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10412
10413 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10414 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10415
10416 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10417 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10418 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
10419
10420 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10421 value in case of an error.
10422
a3931336
UD
10423 * sysdeps/x86_64/tls.h: New file.
10424
76a50749
UD
104252002-11-26 Ulrich Drepper <drepper@redhat.com>
10426
117c452c
UD
10427 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10428 takes the array member name and the index as parameters.
10429 (THREAD_SETMEM_NC): Likewise.
10430 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10431 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10432 interfaces.
10433
10434 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10435 to decide which code to use.
10436 (THREAD_SETMEM_NC): Likewise.
10437
76a50749
UD
10438 * allocatestack.c (queue_stack): Don't remove stack from list here.
10439 Do it in the caller. Correct condition to prematurely terminate
10440 loop to free stacks.
10441 (__deallocate_stack): Remove stack from list here.
10442
104432002-11-26 Ulrich Drepper <drepper@redhat.com>
10444
10445 * Makefile (tests): Add tst-stack1.
10446 * tst-stack1.c: New file.
10447
10448 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10449 provided stack.
10450
10451 * pthread_attr_getstack.c: Return bottom of the thread area.
10452
104532002-11-25 Ulrich Drepper <drepper@redhat.com>
10454
10455 * Makefile (libpthread-routines): Add pt-allocrtsig and
10456 pthread_kill_other_threads.
10457 * pt-allocrtsig.c: New file.
10458 * pthread_kill_other_threads.c: New file.
10459 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10460 all three functions.
10461 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10462 allocrtsig.
10463 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10464 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10465 and __libc_allocate_rtsig_private.
10466 * Versions (libpthread): Export pthread_kill_other_threads_np,
10467 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10468
104692002-11-24 Ulrich Drepper <drepper@redhat.com>
10470
10471 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10472 the end of the stack. Adjust computations.
10473 When mprotect call fails dequeue stack and free it.
10474 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10475 attribute.
10476 * pthread_getattr_np.c: Likewise.
10477
10478 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10479 surprises.
10480
104812002-11-23 Ulrich Drepper <drepper@redhat.com>
10482
10483 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10484 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10485
104862002-11-22 Ulrich Drepper <drepper@redhat.com>
10487
10488 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10489 * pthread_setspecific.c: Likewise.
10490
104912002-11-21 Ulrich Drepper <drepper@redhat.com>
10492
10493 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10494 definitions. Get them from the official place.
10495 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10496
10497 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10498 Use new CLONE_ flags in clone() calls.
10499
10500 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10501 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10502
10503 * Versions: Add pthread_* functions for libc.
10504 * forward.c: New file.
10505
10506 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10507 errno-loc.
10508 * herrno.c: New file.
10509 * res.c: New file.
10510
10511 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10512 sem_trywait, and sem_timedwait. Add herrno and res.
10513 * sem_init.c: Don't initialize lock and waiters members.
10514 * sem_open.c: Likewise.
10515 * sem_post.c: Removed.
10516 * sem_wait.c: Removed.
10517 * sem_trywait.c: Removed.
10518 * sem_timedwait.c: Removed.
10519 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10520 Includes full implementations of sem_post, sem_wait, sem_trywait,
10521 and sem_timedwait.
10522 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10523 for new implementation.
10524 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10525 and waiters fields.
10526
10527 * tst-sem3.c: Improve error message.
10528 * tst-signal3.c: Likewise.
10529
10530 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10531 to tell the kernel about the termination futex and to initialize tid
10532 member. Don't initialize main_thread.
10533 * descr.h (struct pthread): Remove main_thread member.
10534 * cancelllation.c (__do_cancel): Remove code handling main thread.
10535 The main thread is not special anymore.
10536
10537 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10538 size of the stacks to stack_cache_actsize.
10539
10540 * pt-readv.c: Add missing "defined".
10541 * pt-sigwait.c: Likewise.
10542 * pt-writev.c: Likewise.
10543
105442002-11-09 Ulrich Drepper <drepper@redhat.com>
10545
10546 * Versions: Export __connect from libpthread.
10547 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10548
10549 * Makefile (libpthread-routines): Add pt-raise.
10550 * sysdeps/unix/sysv/linux/raise.c: New file.
10551 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10552 * sysdeps/generic/pt-raise.c: New file.
10553
10554 * pthread_cond_init.c: Initialize all data elements of the condvar
10555 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10556
10557 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10558 * pthread_create.c: Likewise.
10559
10560 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10561 * tst-key1.c: New file.
10562 * tst-key2.c: New file.
10563 * tst-key3.c: New file.
10564
10565 * Versions: Export pthread_detach for version GLIBC_2.0.
10566 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10567
105682002-11-08 Ulrich Drepper <drepper@redhat.com>
10569
10570 * pthread_key_create.c: Terminate search after an unused key was found.
10571 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10572
10573 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10574 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10575
105762002-10-10 Ulrich Drepper <drepper@redhat.com>
10577
10578 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10579 dynamic lookup for errno in PIC.
10580
10581 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10582 release the stack lock as soon as possible.
10583 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10584 the static TLS block.
10585 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10586
10587 * cancellation.c: Renamed from cancelation.c.
10588 * Makefile: Adjust accordingly.
10589 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10590 * cleanup_defer.c: Use CANCELLATION_P.
10591 * pthread_testcancel.c: Likewise.
10592 * descr.h: Fix spelling in comments.
10593 * init.c: Likewise.
10594 * pthread_getattr_np.c: Likewise.
10595 * pthread_getschedparam.c: Likewise.
10596 * pthread_setschedparam.c: Likewise.
10597 * Versions: Likewise.
10598
10599 * pt-pselect.c: New file.
10600 * Makefile (libpthread-routines): Add pt-pselect.
10601 * Versions: Add pselect.
10602
10603 * tst-cancel4.c: New file.
10604 * Makefile (tests): Add tst-cancel4.
10605
106062002-10-09 Ulrich Drepper <drepper@redhat.com>
10607
10608 * pthread_mutex_lock.c: Always record lock ownership.
10609 * pthread_mutex_timedlock.c: Likewise.
10610 * pthread_mutex_trylock.c: Likewise.
10611
10612 * pt-readv.c: New file.
10613 * pt-writev.c: New file.
10614 * pt-creat.c: New file.
10615 * pt-msgrcv.c: New file.
10616 * pt-msgsnd.c: New file.
10617 * pt-poll.c: New file.
10618 * pt-select.c: New file.
10619 * pt-sigpause.c: New file.
10620 * pt-sigsuspend.c: New file.
10621 * pt-sigwait.c: New file.
10622 * pt-sigwaitinfo.c: New file.
10623 * pt-waitid.c: New file.
10624 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10625 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10626 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10627 * Versions: Add all the new functions.
10628
10629 * tst-exit1.c: New file.
10630 * Makefile (tests): Add tst-exit1.
10631
10632 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10633
106342002-10-08 Ulrich Drepper <drepper@redhat.com>
10635
10636 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10637
10638 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10639 call. pthread_join is an official cancellation point.
10640 * pthread_timedjoin.c: Likewise.
10641
10642 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10643 and the condvar's mutex are retrieved.
10644 * pthread_cond_timedwait.c: Likewise.
10645 Reported by dice@saros.East.Sun.COM.
10646
106472002-10-07 Ulrich Drepper <drepper@redhat.com>
10648
10649 * pthreadP.h: Cut out all type definitions and move them...
10650 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10651 * pthreadP.h: Include <internaltypes.h>.
10652
10653 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10654 performance tweaks.
10655
10656 * sem_trywait.c: Shuffle #includes around to get right order.
10657 * sem_timedwait.c: Likewise.
10658 * sem_post.c: Likewise.
10659 * sem_wait.c: Likewise.
10660
10661 * nptl 0.3 released.
10662
10663 * Makefile (tests): Add tst-signal3.
10664 * tst-signal3.c: New file.
10665
106662002-10-05 Ulrich Drepper <drepper@redhat.com>
10667
10668 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10669 the asms modify the sem object.
10670 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10671
10672 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10673 the actual members.
10674 * pthreadP.h (struct sem): New type. Actual semaphore type.
10675 * semaphoreP.h: Include pthreadP.h.
10676 * sem_getvalue.c: Adjust to sem_t change.
10677 * sem_init.c: Likewise.
10678 * sem_open.c: Likewise.
10679 * sem_post.c: Likewise.
10680 * sem_timedwait.c: Likewise.
10681 * sem_trywait.c: Likewise.
10682 * sem_wait.c: Likewise.
10683
106842002-10-04 Ulrich Drepper <drepper@redhat.com>
10685
10686 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10687 * tst-basic2.c: New file.
10688 * tst-exec1.c: New file.
10689 * tst-exec2.c: New file.
10690 * tst-exec3.c: New file.
10691
10692 * tst-fork1.c: Remove extra */.
10693
10694 * nptl 0.2 released. The API for IA-32 is complete.