]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Use glibc_likely instead __builtin_expect.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
a1ffb40e
OB
12014-02-10 Ondřej Bílka <neleai@seznam.cz>
2
3 * allocatestack.c (queue_stack, allocate_stack,
4 __deallocate_stack, __reclaim_stacks): Use glibc_likely instead
5 __builtin_expect.
6 * cancellation.c (__pthread_enable_asynccancel,
7 __pthread_disable_asynccancel): Likewise.
8 * cleanup_defer.c (__pthread_register_cancel_defer,
9 __pthread_unregister_cancel_restore): Likewise.
10 * cleanup_defer_compat.c (_pthread_cleanup_push_defer,
11 _pthread_cleanup_pop_restore): Likewise.
12 * cond-perf.c (main): Likewise.
13 * nptl-init.c (sigcancel_handler, sighandler_setxid): Likewise.
14 * perf.c (get_clockfreq): Likewise.
15 * pthread_barrier_destroy.c (pthread_barrier_destroy): Likewise.
16 * pthread_barrier_init.c (pthread_barrier_init): Likewise.
17 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
18 * pthread_cond_wait.c (__pthread_cond_wait): Likewise.
19 * pthread_create.c (__free_tcb, start_thread, __pthread_create_2_1):
20 Likewise.
21 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
22 * pthread_getspecific.c (__pthread_getspecific): Likewise.
23 * pthread_join.c (pthread_join): Likewise.
24 * pthread_key_delete.c (pthread_key_delete): Likewise.
25 * pthread_mutex_init.c (__pthread_mutex_init): Likewise.
26 * pthread_mutex_lock.c (__pthread_mutex_lock,
27 __pthread_mutex_lock_full): Likewise.
28 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
29 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
30 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
31 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
32 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
33 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
34 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
35 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
36 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
37 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
38 * pthread_setspecific.c (__pthread_setspecific): Likewise.
39 * sem_init.c (__new_sem_init): Likewise.
40 * sem_open.c (__where_is_shmfs): Likewise.
41 * sigaction.c: Likewise.
42 * sockperf.c (get_clockfreq): Likewise.
43 * sysdeps/pthread/createthread.c (do_clone, create_thread): Likewise.
44 * sysdeps/pthread/setxid.h: Likewise.
45 * sysdeps/pthread/timer_create.c (timer_create): Likewise.
46 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init,
47 __unwind_freeres, _Unwind_Resume, __gcc_personality_v0,
48 _Unwind_ForcedUnwind): Likewise.
49 * sysdeps/unix/sysv/linux/getpid.c (__getpid): Likewise.
50 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
51 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
52 * sysdeps/unix/sysv/linux/mq_notify.c (mq_notify): Likewise.
53 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
54 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Likewise.
55 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
56 (__pthread_setaffinity_new): Likewise.
57 * sysdeps/unix/sysv/linux/pthread_sigqueue.c (pthread_sigqueue):
58 Likewise.
59 * sysdeps/unix/sysv/linux/pt-raise.c (raise): Likewise.
60 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
61 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_robust_trylock,
62 __lll_robust_lock, __lll_cond_lock, __lll_robust_timedlock): Likewise.
63 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (__lll_lock,
64 __lll_cond_lock, __lll_timedlock, __lll_robust_timedlock): Likewise.
65 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c
66 (pthread_barrier_destroy): Likewise.
67 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c
68 (pthread_barrier_init): Likewise.
69 * sysdeps/unix/sysv/linux/sparc/sem_init.c (__new_sem_init): Likewise.
70 * sysdeps/unix/sysv/linux/x86_64/timer_create.c (__timer_create_old):
71 Likewise.
72 * unwind.c (unwind_stop): Likewise.
73
6fc8123f
MF
742014-02-08 Mike Frysinger <vapier@gentoo.org>
75
76 * sem_open.c (__where_is_shmfs): Compare f.f_type to RAMFS_MAGIC too.
77
f877c4f2
CD
782014-02-05 Carlos O'Donell <carlos@redhat.com>
79
80 * sysdeps/unix/sysv/linux/tst-setgetname.c (do_test): Skip the
81 test if !__ASSUME_PROC_PID_TASK_COMM and get_self_comm returns
82 ENOENT.
83
e6848539
SL
842014-01-23 Stefan Liebler <stli@linux.vnet.ibm.com>
85
86 * tst-tls7.c: Adjust testcase timeout
87
2145f8b5
L
882014-01-18 H.J. Lu <hongjiu.lu@intel.com>
89
90 [BZ #14782]
91 * tst-cancel-wrappers.sh: Remove system.
92
2112e176
PP
932014-01-11 Paul Pluzhnikov <ppluzhnikov@google.com>
94
95 * tst-tls7.c (action): New function.
96 (do_test): Call it.
97 * tst-tls7mod.c (action): Move sem_post to caller.
98
73d61e4f 992011-12-12 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
5b9bf191
AZ
100
101 * sysdeps/powerpc/tls.h (struct tcbhead_t): Add DSO and TAR fields.
102 * nptl/sysdeps/powerpc/tcb-offsets.sym: Likewise.
103
1db94db1
CD
1042013-12-09 Carlos O'Donell <carlos@redhat.com>
105
106 * sysdeps/unix/sysv/linux/tst-setgetname.c: New file.
107 * sysdeps/unix/sysv/linux/Makefile (tests): Add tst-setgetname.
108
caecf2a0
AS
1092013-12-09 Andreas Schwab <schwab@suse.de>
110
111 [BZ #15843]
112 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
113 (__pthread_cond_timedwait): Remove wrong cfi_adjust_cfa_offset
114 before __condvar_tw_cleanup2 label.
115
8b8a692c
UW
1162013-12-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
117
118 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
119 (CANCEL_FRAMESIZE, CANCEL_PARM_SAVE): New macros to save parameters
120 into our own stack frame instead of the caller's.
121 (PSEUDO): Use them. Use symbolic stack frame offsets.
122 (DOCARGS_1, UNDOCARGS_1): Use CANCEL_PARM_SAVE.
123 (DOCARGS_2, UNDOCARGS_2): Likewise.
124 (DOCARGS_3, UNDOCARGS_3): Likewise.
125 (DOCARGS_4, UNDOCARGS_4): Likewise.
126 (DOCARGS_5, UNDOCARGS_5): Likewise.
127 (DOCARGS_6, UNDOCARGS_6): Likewise.
128
d1d9eaf4 1292013-11-26 Ondřej Bílka <neleai@seznam.cz>
b0ef3aec 130
d1d9eaf4
OB
131 * sysdeps/i386/tls.h: Use __glibc_reserved instead __unused.
132 * sysdeps/x86_64/tls.h: Likewise.
133
67ea2c9a
PP
1342013-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
135
136 [BZ #11214]
137 * Makefile (tst-getpid2-ENV): New variable.
138
4b98b2dc 1392013-11-20 Paul Pluzhnikov <ppluzhnikov@google.com>
c8b82b81
PP
140
141 * Makefile (tst-cleanup2, tst-cleanupx2): Add -fno-builtin
142
cb8a6dbd
MF
1432013-10-30 Mike Frysinger <vapier@gentoo.org>
144
145 * sysdeps/pthread/configure.in: Moved to ...
146 * sysdeps/pthread/configure.ac: ... here.
147 * sysdeps/x86_64/configure.in: Moved to ...
148 * sysdeps/x86_64/configure.ac: ... here.
149 * sysdeps/pthread/configure: Regenerated.
150 * sysdeps/x86_64/configure: Likewise.
151
53247a0b
MR
1522013-10-04 Maciej W. Rozycki <macro@codesourcery.com>
153
154 * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure
155 from pthread_mutex_init.
156
ad4e70da
SP
1572013-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
158
159 [BZ #15988]
160 * pthread_cond_broadcast.c (__pthread_cond_broadcast)
161 [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use
162 USE_REQUEUE_PI.
163 * pthread_cond_signal.c (__pthread_cond_signal)
164 [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise.
165
c04d498c
SP
1662013-09-27 Siddhesh Poyarekar <siddhesh@redhat.com>
167
168 * sysdeps/pthread/bits/libc-lock.h [_LIBC && (!NOT_IN_libc ||
169 IS_IN_libpthread)] (__libc_lock_fini_recursive): Use the mutex
170 member of the argument.
171 (__libc_lock_trylock_recursive): Likewise.
172 (__libc_lock_unlock_recursive): Likewise.
173
3f2e46a4
JM
1742013-09-04 Joseph Myers <joseph@codesourcery.com>
175
176 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
177 [SHARED && DO_VERSIONING && !NO_HIDDEN]: Change conditional to
178 [SHARED && !NO_HIDDEN].
179
6c8bbad9
SP
1802013-09-03 Siddhesh Poyarekar <siddhesh@redhat.com>
181
182 [BZ #15921]
183 * tst-cleanup2.c (do_test): New volatile variable RET to
184 return success.
185
382466e0
OB
1862013-08-30 Ondřej Bílka <neleai@seznam.cz>
187
188 * sysdeps/pthread/pthread.h: Fix typos.
189 * sysdeps/unix/sysv/linux/internaltypes.h: Likewise.
190 * tst-cancel4.c: Likewise.
191
c0c3f78a
OB
1922013-08-21 Ondřej Bílka <neleai@seznam.cz>
193
194 * pthread_getschedparam.c: Fix typos.
195 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
196
135529b4
DM
1972013-07-23 David S. Miller <davem@davemloft.net>
198
199 * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
200
e7074e4c
DM
2012013-07-22 David S. Miller <davem@davemloft.net>
202
203 * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
204
d3d3ce98
DV
2052013-07-19 Dominik Vogt <vogt@de.ibm.com>
206
075b9322
DV
207 * pthread_mutex_lock.c: Fix whitespace.
208 * pthread_mutex_trylock.c: Likewise.
209 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
210 * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
211 * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
212 * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
213 * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
214 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
215 * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
216 * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
217 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
218 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
219 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
220 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
221
d3d3ce98
DV
222 * sysdeps/unix/sysv/linux/x86/elision-conf.c:
223 Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
224 (elision_init): Don't set __rwlock_rtm_enabled.
225 * sysdeps/unix/sysv/linux/x86/elision-conf.h:
226 Remove __rwlock_rtm_enabled.
227
e2a32bee
L
2282013-07-03 H.J. Lu <hongjiu.lu@intel.com>
229
230 * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
231 * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
232
1717da59
AK
2332013-07-02 Andi Kleen <ak@linux.intel.com>
234
235 * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
236 Check ENABLE_LOCK_ELISION.
237
49186d21
AK
2382013-07-02 Andi Kleen <ak@linux.intel.com>
239
240 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
241 Disable elision for PTHREAD_MUTEX_DEFAULT.
242
e8c659d7
AK
2432013-07-02 Andi Kleen <ak@linux.intel.com>
244 Hongjiu Lu <hongjiu.lu@intel.com>
245
246 * pthread_mutex_lock.c
247 (__pthread_mutex_lock): Add lock elision support.
248 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
249 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
250 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
251 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
252 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
253 * sysdeps/unix/sysv/linux/x86/Makefile: New file.
254 * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
255 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
256 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
257 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
258 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
259 * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
260
68cc2935
AK
2612013-07-02 Andi Kleen <ak@linux.intel.com>
262
263 * tst-mutex5.c: Include config.h.
264 (do_test): Add checks for ENABLE_LOCK_ELISION.
265 * tst-mutex8.c: Include config.h
266 (tf): Add checks for ENABLE_LOCK_ELISION.
267 (check_type): Likewise.
268
b023e4ca
AK
2692013-07-02 Andi Kleen <ak@linux.intel.com>
270
271 * pthreadP.h: Add elision types.
272 (PTHREAD_MUTEX_TYPE_ELISION): Add.
273 * sysdeps/pthread/pthread.h: Add elision initializers.
274 (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
275 PTHREAD_MUTEX_PSHARED_NP): Add new flags.
276 (__PTHREAD_SPINS): Add.
277
1cdbe579
AK
2782013-07-02 Andi Kleen <ak@linux.intel.com>
279 Hongjiu Lu <hongjiu.lu@intel.com>
280
281 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
282 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
283 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
284 lll_trylock_elision): Add.
285 * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
286 * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
287 * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
288 * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
289 * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
290 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
291 * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
292 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
293 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
294 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
295 lll_trylock_elision): Add.
296 * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
297 * elision-conf.h: New file.
298
e1f0b2cf
VN
2992013-06-24 Vladimir Nikulichev <v.nikulichev@gmail.com>
300
301 [BZ #12310]
302 * pthread_exit.c: Add reference to pthread_create.
303
e781d7c5
JM
3042013-06-22 Joseph Myers <joseph@codesourcery.com>
305
306 * pthread_getattr_default_np.c: Include <string.h>.
307
61dd6208
SP
3082013-06-15 Siddhesh Poyarekar <siddhesh@redhat.com>
309
310 * Versions (libpthread): Add GLIBC_2.18.
311 (GLIBC_2.18): Add pthread_setattr_default_np and
312 pthread_getattr_default_np.
313 * allocatestack.c (allocate_stack): Synchronize read from
314 __default_pthread_attr.
315 (__reclaim_stacks): Initialize __default_pthread_attr_lock.
316 * nptl-init.c (__pthread_initialize_minimal_internal):
317 Synchronize write to __default_pthread_attr.
318 * pthreadP.h (__default_pthread_attr_lock): Declare.
319 * pthread_attr_getstacksize (__pthread_attr_getstacksize):
320 Synchronize read from __default_pthread_attr.
321 * pthread_create.c (__pthread_create_2_1): Make a local copy of
322 __default_pthread_attr. Check value of flags in IATTR even if
323 input ATTR is NULL.
324 * pthread_getattr_default_np.c: New file.
325 * pthread_setattr_default_np.c: New file.
326 * sysdeps/pthread/pthread.h [__USE_GNU]
327 (pthread_getattr_default_np, pthread_setattr_default_np):
328 Declare.
329 * tst-default-attr.c: New test case.
330 * Makefile (libpthread-routines): Add
331 pthread_setattr_default_np and pthread_getattr_default_np.
332 (tests): Add tst-default-attr.
333 * vars.c (__default_pthread_attr_lock): Declare and initialize.
334
5865a56b
SP
3352013-06-13 Siddhesh Poyarekar <siddhesh@redhat.com>
336 Carlos O'Donell <carlos@redhat.com>
337
338 [BZ #15618]
339 * tst-pthread-attr-affinity: New test case.
340 * Makefile (tests): Add it.
341 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
342 (__pthread_attr_getaffinity_new): Copy minimum of source and
343 destination sizes to avoid a buffer overrun.
344
be11d713
CD
3452013-06-10 Carlos O'Donell <carlos@redhat.com>
346
347 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
348 (lll_futex_wake): Return syscall error.
349 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
350 (lll_futex_wake): Return syscall error.
351
e3f36662
OB
3522013-08-06 Ondřej Bílka <neleai@seznam.cz>
353
354 * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
355
350635a5
OB
3562013-06-06 Ondřej Bílka <neleai@seznam.cz>
357
358 * tst-cond22.c: Fix leading whitespaces.
359 * tst-umask1.c: Likewise.
360
c7afae94
JM
3612013-06-06 Joseph Myers <joseph@codesourcery.com>
362
363 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
364 trailing whitespace.
365 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
366 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
367 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
368 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
369 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
370 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
371 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
372 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
373 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
374 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
375 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
376 * tst-mutexpp10.c: Likewise.
377 * tst-stackguard1.c: Likewise.
378
fab7ce3f
JM
3792013-05-31 Joseph Myers <joseph@codesourcery.com>
380
381 * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
382 and ld.so.
383
e054f494
RA
3842013-05-16 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
385
386 * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
387 uint32_t usage.
388 * sysdeps/pthread/createthread.c: Likewise.
389
ecbf4342
AJ
3902013-05-14 Andreas Jaeger <aj@suse.de>
391
392 [BZ #10686]
393 * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
394 * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
395
66c13581
AK
3962013-05-09 Andi Kleen <ak@linux.intel.com>
397
398 * tst-mutex8.c (do_test): Check for ENABLE_PI.
399
da1304bc
SP
4002013-04-22 Siddhesh Poyarekar <siddhesh@redhat.com>
401
402 * pthreadP.h (check_sched_policy_attr): New inline function.
403 (check_sched_priority_attr): Likewise.
404 (check_stacksize_attr): Likewise.
405 (__kernel_cpumask_size, __determine_cpumask_size): Declare
406 extern.
407 (check_cpuset_attr): New inline function.
408 * pthread_attr_setschedparam (__pthread_attr_setschedparam):
409 Use check_sched_priority_attr.
410 * pthread_attr_setschedpolicy.c
411 (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
412 * pthread_attr_setstack.c (__pthread_attr_setstack): Use
413 check_stacksize_attr.
414 * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
415 Likewise.
416 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
417 (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
418
4f682b2a
AS
4192013-04-11 Andreas Schwab <schwab@suse.de>
420
421 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
422 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
423 directly use absolute timeout.
424
96497bb8
CD
4252013-04-07 Carlos O'Donell <carlos@redhat.com>
426
427 * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
428
9ac3b504
SP
4292013-04-04 Siddhesh Poyarekar <siddhesh@redhat.com>
430
431 [BZ #15337]
432 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
433 [IS_IN_libpthread]
434 [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
435 __pthread_unwind hidden.
436
e57b0c61
RM
4372013-03-28 Roland McGrath <roland@hack.frob.com>
438
439 * pthread_create.c (start_thread) [!SHARED]:
440 Call __call_tls_dtors only if it's not NULL.
441
e903a713
SP
4422013-03-19 Siddhesh Poyarekar <siddhesh@redhat.com>
443
5cebee5d
SP
444 * allocatestack.c (allocate_stack): Use __default_pthread_attr
445 instead of __default_stacksize.
e903a713
SP
446 * nptl-init.c (__pthread_initialize_minimal_internal):
447 Likewise. Initialize guardsize.
5cebee5d 448 * pthreadP.h (__default_pthread_attr): Declare.
e903a713 449 * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
5cebee5d 450 Use __default_pthread_attr instead of __default_stacksize.
e903a713 451 * pthread_create.c (default_attr): Remove.
5cebee5d 452 (__pthread_create_2_1): Use __default_pthread_attr instead of
e903a713
SP
453 default_attr.
454 * vars.c (__default_stacksize): Remove.
5cebee5d 455 (__default_pthread_attr): New static variable to store
e903a713
SP
456 default thread attributes.
457
69854bb5
SP
4582013-03-18 Siddhesh Poyarekar <siddhesh@redhat.com>
459
460 * pthread_barrier_init.c (default_attr): Rename to
461 default_barrierattr.
462 (pthread_barrier_init): Adjust for the rename.
463 * pthread_mutex_init.c (default_attr): Rename to
464 default_mutexattr.
465 (__pthread_mutex_init): Adjust for the rename.
466 * pthread_rwlock_init.c (default_attr): Rebane to
467 default_rwlockattr.
468 (__pthread_rwlock_init): Adjust for the rename.
469
05087fbb
CD
4702013-03-12 Carlos O'Donell <carlos@redhat.com>
471
472 * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
473
b43769a3
RM
4742013-03-04 Roland McGrath <roland@hack.frob.com>
475
476 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
477 Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
478 Use #include_next.
479 (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
480 (RTLD_PRIVATE_ERRNO): Likewise.
481 (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
482 Move macros and associated declaration to ...
483 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
484 Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
485 Use #include_next.
486
4e9b5995
CD
4872013-03-01 Carlos O'Donell <carlos@redhat.com>
488
489 * Makefile (tests): Revert last change.
490 (tst-pthread-stack-env-ENV): Likewise.
491 * nptl-init.c (set_default_stacksize): Likewise.
492 (__pthread_initialize_minimal_internal): Likewise.
493 * tst-pthread-stack-env.c: Likewise.
494
e23872c8
SP
4952013-03-01 Siddhesh Poyarekar <siddhesh@redhat.com>
496
ace4acc8
SP
497 * tst-oddstacklimit.c: Include stdlib.h.
498
e23872c8
SP
499 * Makefile (tests): Add tst-pthread-stack-env.
500 (tst-pthread-stack-env-ENV): Set environment for test.
501 * nptl-init.c (set_default_stacksize): New function.
502 (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
503 ENVP. Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
504 * tst-pthread-stack-env.c: New test case.
505
2b7ae1b2
DM
5062013-02-21 David S. Miller <davem@davemloft.net>
507
508 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
509 (FUTEX_WAIT_REQUEUE_PI): Define.
510 (FUTEX_CMP_REQUEUE_PI): Likewise.
511 (lll_futex_wait_requeue_pi): Likewise.
512 (lll_futex_timed_wait_requeue_pi): Likewise.
513 (lll_futex_cmp_requeue_pi): Likewise.
514
9bf95cbc
CD
5152013-02-21 Carlos O'Donell <carlos@redhat.com>
516
517 * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
518
8313cb99
SP
5192013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com>
520
f4804ca2
SP
521 * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
522 of exit.
523 * tst-barrier4.c: Likewise.
524 * tst-robust7.c: Likewise.
525
8313cb99
SP
526 [BZ #14920]
527 * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
528 PI-aware.
529 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
530 PI-aware futex operations if available and mutex is PI-aware.
531 * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
532 * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
533 Likewise.
534 * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
535 cancellation occurred just after futex returned successfully
536 from a PI operation with the mutex held.
537 (__pthread_cond_wait): Use PI-aware futex operations if
538 available and mutex is PI-aware.
539 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
540 (FUTEX_WAIT_REQUEUE_PI): Define.
541 (FUTEX_CMP_REQUEUE_PI): Likewise.
542 (lll_futex_wait_requeue_pi): Likewise.
543 (lll_futex_timed_wait_requeue_pi): Likewise.
544 (lll_futex_cmp_requeue_pi): Likewise.
545 * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
546 (FUTEX_WAIT_REQUEUE_PI): Define.
547 (FUTEX_CMP_REQUEUE_PI): Likewise.
548 (lll_futex_wait_requeue_pi): Likewise.
549 (lll_futex_timed_wait_requeue_pi): Likewise.
550 (lll_futex_cmp_requeue_pi): Likewise.
551 * sysdeps/unix/sysv/linux/kernel-features.h: Define
552 __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
553
903ae060
AS
5542013-02-04 Andreas Schwab <schwab@suse.de>
555
556 [BZ #14142]
557 * tst-cancel14.c: Include <sys/time.h>.
558 * tst-cancel15.c: Likewise.
559 * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
560 * tst-stackguard1.c: Include <tls.h>
561
cfa8054f
AS
5622013-01-16 Andreas Schwab <schwab@suse.de>
563
564 [BZ #14327]
565 * sem_open.c (sem_open): Use __mktemp instead of mktemp.
566
c0609c5c
CD
5672013-01-11 Carlos O'Donell <codonell@redhat.com>
568
569 * allocatestack.c (allocate_stack): Add comment. Remove assert
570 on attr.
571
740b3dbe
L
5722013-01-11 H.J. Lu <hongjiu.lu@intel.com>
573
574 * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
575 with $(host-test-program-cmd).
576 (tst-exec4-ARGS): Likewise.
577 (tst-stackguard1-ARGS): Likewise.
578 ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
579 Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
580 * tst-tls6.sh (elf_objpfx): Removed.
581 (rtld_installed_name): Renamed to ...
582 (test_via_rtld_prefix): This.
583 (tst_tls5): Prepend ${test_via_rtld_prefix}.
584
568035b7
JM
5852013-01-02 Joseph Myers <joseph@codesourcery.com>
586
587 * All files with FSF copyright notices: Update copyright dates
588 using scripts/update-copyrights.
589
f4cf5f2d
JM
5902013-01-01 Joseph Myers <joseph@codesourcery.com>
591
592 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
593 copyright notice.
594
c93c5dec
AK
5952012-12-28 Andi Kleen <ak@linux.intel.com>
596
740b3dbe 597 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
c93c5dec 598 to prototype.
740b3dbe 599 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
c93c5dec
AK
600 Likewise.
601
9c7595bd
DM
6022012-12-27 David S. Miller <davem@davemloft.net>
603
604 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
605 (lll_futex_timed_wait_bitset): New macro.
606
8ebac778
SP
6072012-12-27 Siddhesh Poyarekar <siddhesh@redhat.com>
608
609 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
610 Remove definition.
611 (lll_futex_timed_wait): Replace assembly code with
612 INTERNAL_SYSCALL.
613 (lll_futex_timed_wait_bitset): Likewise.
614 (lll_futex_wake): Likewise.
615 (lll_futex_requeue): Likewise.
616 (lll_futex_wake_unlock): Likewise.
617
56e7d3ad
SP
6182012-12-08 Siddhesh Poyarekar <siddhesh@redhat.com>
619
620 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
621 Declare LOCAL_VAR as char.
622
d39b9545
JM
6232012-12-04 Joseph Myers <joseph@codesourcery.com>
624
625 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
626 Cast result of atomic_increment_val to (void) instead of storing
627 in otherwise-unused variable.
628
e30907c3
AM
6292012-12-03 Allan McRae <allan@archlinux.org>
630
631 * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
632
c515fb51
L
6332012-11-26 H.J. Lu <hongjiu.lu@intel.com>
634
635 * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
636 to THREAD_SETMEM.
637 * sysdeps/i386/tls.h: Include <libc-internal.h>.
638 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
639 (THREAD_SETMEM_NC): Likewise.
640 * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
641 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
642 (THREAD_SETMEM_NC): Likewise.
643
fac9916c
JM
6442012-11-21 Joseph Myers <joseph@codesourcery.com>
645
09e958ed
JM
646 * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
647 of atomic_increment_val to (void) instead of storing in
648 otherwise-unused variable.
649
fac9916c
JM
650 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
651 [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
652 instead of storing in otherwise-unused variable.
653
c485e4d2
MS
6542012-11-14 Marcus Shawcroft <marcus.shawcroft@linaro.org>
655
656 * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
657 (CFLAGS-recv.c, CFLAGS-send.c): Define.
658
91e0d40e
CM
6592012-11-06 Chris Metcalf <cmetcalf@tilera.com>
660
661 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
662 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
663
8f861542
SP
6642012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
665
666 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
667 if absolute timeout is negative.
668 [__ASSUME_FUTEX_CLOCK_REALTIME &&
669 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
670 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
671 Likewise.
672 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
673 Likewise.
674 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
675 (__lll_robust_timedlock_wait): Likewise.
676 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
677 (lll_futex_timed_wait_bitset): New macro.
678 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
679 (lll_futex_timed_wait_bitset): Likewise.
680
d3bd58cf
DM
6812012-11-03 David S. Miller <davem@davemloft.net>
682
683 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
684 Add missing spaces.
685 (__cpu_relax): Likewise.
686
f62c8abc
L
6872012-11-02 H.J. Lu <hongjiu.lu@intel.com>
688
689 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
690 (__128bits): New struct typedef.
691 (tcbhead_t): Replace __m128 with __128bits.
692
a9879fee
AJ
6932012-10-30 Aurelien Jarno <aurelien@aurel32.net>
694 Joseph Myers <joseph@codesourcery.com>
695
696 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
697
19f1dd5f
DM
6982012-10-28 David S. Miller <davem@davemloft.net>
699
700 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
701 Define when we have v9 instructions available.
702 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
703 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
704 file.
705 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
706 file.
707 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
708 to libpthread-routines.
709
b9473651
RM
7102012-10-25 Roland McGrath <roland@hack.frob.com>
711
712 * tst-cond-except.c (TEST_FUNCTION): New macro.
713
6a345e42
JM
7142012-10-25 Joseph Myers <joseph@codesourcery.com>
715
716 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
717 run tst-tls6.sh.
718 * tst-tls6.sh: Use /bin/bash not /bin/sh.
719
c0a1472e
RM
7202012-10-25 Roland McGrath <roland@hack.frob.com>
721
722 * tst-basic2.c (do_test): Return RESULT, not always zero.
723
724 * tst-cond25.c: Include <stdint.h>
725 (waiter): Add casts to uintptr_t between casting integer<->pointer.
726 (timed_waiter): Likewise.
727 (do_test_wait): Likewise.
728 * tst-cond-except.c (thr): Likewise.
729 (do_test): Use prototype definition.
730
cc1290d0
JM
7312012-10-24 Joseph Myers <joseph@codesourcery.com>
732 Jim Blandy <jimb@codesourcery.com>
733
734 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
735 tst-tls6.sh.
736 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
737 programs with LD_PRELOAD set.
738
6e6249d0
RM
7392012-10-24 Roland McGrath <roland@hack.frob.com>
740
741 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
742 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
743 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
744 ($(objpfx)tst-rwlock14): Likewise.
745
0bf57f87
JM
7462012-10-24 Joseph Myers <joseph@codesourcery.com>
747
748 * Makefile (tests): Remove tst-oddstacklimit.
749 (test-srcs): New variable.
750 (tst-oddstacklimit-ENV): Remove.
751 [$(run-built-tests) = yes] (tests): Depend on
752 $(objpfx)tst-oddstacklimit.out.
753 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
754 target.
755 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
756 setrlimit before executing tst-basic1 test passed to --command.
757
03ac099f
JM
7582012-10-23 Joseph Myers <joseph@codesourcery.com>
759
760 * Makefile [$(cross-compiling) = no]: Change condition to
761 [$(run-built-tests) = yes].
762
166bca24
JB
7632012-10-23 Jim Blandy <jimb@codesourcery.com>
764 Joseph Myers <joseph@codesourcery.com>
765
766 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
767 (tst-exec4-ARGS): Likewise.
768 (tst-stackguard1-ARGS): Likewise.
769
aba75984
JB
7702012-10-21 Jim Blandy <jimb@codesourcery.com>
771 Joseph Myers <joseph@codesourcery.com>
772
773 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
774 tst-cancel-wrappers.sh.
775 * tst-cancel-wrappers.sh: Use nm program given as first argument,
776 not hardcoded "nm".
777
37785907
SP
7782012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
779
370539fb 780 * tst-cond25.c (do_test_wait): Don't check for return value from
37785907
SP
781 pthread_cancel.
782
9485a404
SP
7832012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
784
785 [BZ #14652]
786 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
787 (__condvar_tw_cleanup): Adjust the mutex data structure if it
788 was locked by FUTEX_WAIT_REQUEUE_PI.
789 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
790 (__condvar_w_cleanup): Likewise.
791 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
792 (__condvar_cleanup2): Likewise.
793 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
794 (__condvar_cleanup1): Likewise.
795
0d522f64
CD
7962012-10-10 Carlos O'Donell <carlos@systemhalted.org>
797
54a41734
CD
798 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
799 defined __EXCEPTIONS) && defined __USE_GNU]
800 (pthread_cleanup_push_defer_np): Fix formatting.
0d522f64 801
0e3b5d6a
SP
8022012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
803
804 [BZ #14652]
805 * Makefile (tests): New test case tst-cond25.
806 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
808 (__condvar_tw_cleanup): Lock mutex only if we don't already
809 own it.
810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
811 (__condvar_w_cleanup): Likewise.
812 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
813 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
814 (__condvar_cleanup2): Lock mutex only if we don't already
815 own it.
816 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
817 (__condvar_cleanup1): Likewise.
818 * tst-cond25.c: New test case.
819
b8493de0
RM
8202012-10-09 Roland McGrath <roland@hack.frob.com>
821
822 * sysdeps/pthread/configure: Regenerated.
823 * sysdeps/x86_64/configure: Regenerated.
824
f0762164
DM
8252012-10-05 David S. Miller <davem@davemloft.net>
826
827 [BZ #14568]
828 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
829 (DB_THREAD_SELF): Use constants for the register offsets. Correct
830 the case of a 64-bit debugger with a 32-bit inferior.
831
1d1b34df
L
8322012-10-05 H.J. Lu <hongjiu.lu@intel.com>
833
834 [BZ #14557]
835 * Makefile (tests-static): Add tst-cancel24-static,
836 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
837 tst-sem11-static and tst-sem12-static.
838 (tests): Likewise.
839 (LDLIBS-tst-cancel24-static): New macro.
840 * tst-cancel24-static.cc: New file.
841 * tst-cond8-static.c: Likewise.
842 * tst-mutex8-static.c: Likewise.
843 * tst-mutexpi8-static.c: Likewise.
844 * tst-sem11-static.c: Likewise.
845 * tst-sem12-static.c: Likewise.
846
c30e8edf
SP
8472012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
848
849 [BZ #14417]
850 * Makefile (tests): New test case tst-cond24.
851 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
852 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
853 (__pthread_cond_timedwait): Unlock mutex before going back to
854 wait in PI case.
855 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
856 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
857 return from futex_wait.
858 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
859 (__pthread_cond_timedwait): Unlock mutex before going back to
860 wait in PI case. Set requeue_pi flag only if wait returned 0.
861 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
862 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
863 return from futex_wait.
864 * tst-cond24.c: New test case.
865
9043e228
RM
8662012-10-04 Roland McGrath <roland@hack.frob.com>
867
868 * pthread_create.c (start_thread): Use __madvise, not madvise.
869
b2f80a47
L
8702012-10-02 H.J. Lu <hongjiu.lu@intel.com>
871
872 * sysdeps/i386/tls.h: Update copyright years.
873
adcdc775
SP
8742012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
875
876 * pthread_create.c (start_thread): Fix clone flag name in
877 comment to CLONE_CHILD_CLEARTID.
878 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
879 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
880 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
881 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
882 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
883 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
884
55a051c9
SP
8852012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
886
887 [BZ #14477]
888 * Makefile (tests): Add tst-cond-except.
889 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
890 (__pthread_cond_timedwait): Mark instructions where %ebx is
891 incremented in PI case.
892 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
893 for the marked PI case instructions.
894 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
895 (__pthread_cond_wait): Mark instructions where %ebx is
896 incremented in PI case.
897 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
898 for the marked PI case instructions.
899 * tst-cond-except.c: New test case.
900
9a9028b1
DL
9012012-09-24 Dmitry V. Levin <ldv@altlinux.org>
902
57c69bef
DL
903 * tst-tls6.sh: Add "set -e".
904 * Makefile: Do not specify -e option when running testsuite
905 shell scripts.
906
9a9028b1
DL
907 * tst-tls6.sh: Add copyright header.
908
620f3d26
L
9092012-09-24 H.J. Lu <hongjiu.lu@intel.com>
910
911 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
912 to uint64_t for 64-bit store.
913 (THREAD_SETMEM_NC): Likewise.
914
ae30640a
L
9152012-09-19 H.J. Lu <hongjiu.lu@intel.com>
916
917 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
918 64-bit store.
919 (THREAD_SETMEM_NC): Likewise.
920
97bc38d7
JL
9212012-09-14 Jeff Law <law@redhat.com>
922
923 [BZ #14583]
924 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
925
9503345f
L
9262012-09-13 H.J. Lu <hongjiu.lu@intel.com>
927
928 [BZ #14576]
929 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
930 Removed.
931
e9ceaf25
L
9322012-09-07 H.J. Lu <hongjiu.lu@intel.com>
933
70d37fe0 934 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
e9ceaf25
L
935 (LDLIBS-tst-cancel24): This.
936
f5fce062
L
9372012-09-06 H.J. Lu <hongjiu.lu@intel.com>
938
939 [BZ #14545]
940 * Makefile (tests-static): Add tst-cancel21-static.
941 (tests): Likewise.
942 * tst-cancel21-static.c: New file.
943
26889eac
JM
9442012-09-01 Joseph Myers <joseph@codesourcery.com>
945
946 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
947 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
948 [__NR_clock_getres]: Make code unconditional.
949 (pthread_getcpuclockid): Remove code left unreachable by removal
950 of conditionals.
951
033d54a2 9522012-08-31 Joseph Myers <joseph@codesourcery.com>
b2e1c562 953
033d54a2
JM
954 [BZ #14532]
955 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
956 atomic_compare_and_exchange_bool_rel.
957 * tst-sem14.c: New file.
958 * Makefile (tests): Add tst-sem14.
b2e1c562 959
c75ccd4c
RM
9602012-08-15 Roland McGrath <roland@hack.frob.com>
961
962 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
963 of -D_IO_MTSAFE_IO.
964 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
b2e1c562 965 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
c75ccd4c 966
93a78ac4
JM
9672012-08-16 Joseph Myers <joseph@codesourcery.com>
968
969 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
970 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
971 * pthread_condattr_setclock.c (pthread_condattr_setclock)
972 [!__ASSUME_POSIX_TIMERS]: Likewise.
973 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
974 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
975 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
976 [!__ASSUME_POSIX_TIMERS]: Likewise.
977 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
978 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
979 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
980 code unconditional.
981 [!__NR-timer_create]: Remove conditional code.
982 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
983 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
984 code unconditional.
985 [!__NR_timer_delete]: Remove conditional code.
986 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
987 * sysdeps/unix/sysv/linux/timer_getoverr.c
988 [__NR_timer_getoverrun]: Make code unconditional.
989 [!__NR_timer_getoverrun]: Remove conditional code.
990 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
991 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
992 Make code unconditional.
993 [!__NR_timer_gettime]: Remove conditional code.
994 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
995 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
996 Make code unconditional.
997 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
998 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
999 Make code unconditional.
1000 [!__NR_timer_settime]: Remove conditional code.
1001 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
1002 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1003 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
1004 conditional code.
1005
309becf1
MK
10062012-08-15 Tom de Vries <vries@codesourcery.com>
1007 Maxim Kuvyrkov <maxim@codesourcery.com>
1008
1009 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
1010 (__libc_lock_trylock): Allow pre-existing definitions.
1011
ef400973
MK
10122012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
1013
1014 * pthread_spin_lock.c: New file.
1015 * pthread_spin_trylock.c: New file.
1016
b36137f1
JM
10172012-08-08 Joseph Myers <joseph@codesourcery.com>
1018
1019 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
1020 code unconditional.
1021 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
1022 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
1023 unconditional.
1024 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
1025 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
1026 Make code unconditional.
1027 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
1028 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
1029 __NR_tgkill]: Make code unconditional.
1030 (raise) [__ASSUME_TGKILL]: Likewise.
1031 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
1032 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
1033 [__ASSUME_TGKILL]: Make code unconditional.
1034 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
1035 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
1036 __NR_tgkill]: Make code unconditional.
1037 (raise) [__ASSUME_TGKILL]: Likewise.
1038 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
1039
93df14ee
JM
10402012-08-07 Joseph Myers <joseph@codesourcery.com>
1041
1042 * sysdeps/pthread/createthread.c (create_thread)
1043 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
1044
85fe1997
JM
10452012-08-03 Joseph Myers <joseph@codesourcery.com>
1046
1047 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
1048 code unconditional.
1049 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
1050
fc56c5bb
SP
10512012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
1052
1053 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
1054 (pagesize): New static variable.
1055 (allocate_and_test): Return MEM. Rename parameter to TARGET.
1056 (check_stack_top): New local variables MEM and PAGEMASK. Cap
1057 stack size to MAX_STACK_SIZE. Call allocate_and_test for
1058 halfway up the stack top page. Verify that the top page was
1059 written into.
1060 (do_test): Get pagesize using sysconf.
1061
842a39cd
AS
10622012-07-25 Andreas Schwab <schwab@linux-m68k.org>
1063
1064 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
1065 label.
1066 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
1067 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
1068 Likewise.
1069
77b32274
SP
10702012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
1071
1072 * tst-pthread-getattr.c: Revert last change.
1073
b2ae49da
SP
10742012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
1075
1076 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
1077 size.
1078 (_MIN): New macro.
1079 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
1080 of MEM to test.
1081 (check_stack_top): Read valued written into STACKADDR in
1082 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
1083
a9843058
SP
10842012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
1085
1086 * nptl-init.c (sighandler_setxid): Fix the comment that
1087 describes it.
1088
4b2c8da7
TS
10892012-06-23 Thomas Schwinge <thomas@codesourcery.com>
1090
1091 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1092 (__lll_robust_timedlock_wait): Simplify CFI directives.
1093
18b5e737
SP
10942012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
1095
1096 [BZ #12416]
1097 * Makefile (tests): Add test case.
1098 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
1099 the __libc_stack_end page from stacksize. Truncate stacksize to
1100 make it page aligned when it is computed from RLIMIT_STACK.
1101 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
1102 accessible.
1103
24a6dbed
CSLL
11042012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
1105
1106 [BZ #14205]
1107 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
1108 branches.
1109
4af3879c
SP
11102012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
1111 Jakub Jelinek <jakub@redhat.com>
1112
1113 [BZ #14188]
1114 * sysdeps/pthread/pthread.h
1115 [!(defined __GNUC__ && defined __EXCEPTIONS)]
1116 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
1117 __libc_unlikely instead of __builtin_expect.
1118
0e20515a
L
11192012-05-30 H.J. Lu <hongjiu.lu@intel.com>
1120
1121 [BZ #14117]
1122 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
1123 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1124 * sysdeps/unix/sysv/linux/i386/Implies: New file.
1125 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
1126 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
1127 to ...
1128 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
1129 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
1130 to ...
1131 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
1132
865eac65
AS
11332012-05-30 Andreas Schwab <schwab@linux-m68k.org>
1134
1135 [BZ #14132]
1136 * nptl-init.c (pthread_functions): Remove use of INTUSE and
1137 _internal aliases.
1138 (__pthread_initialize_minimal_internal): Likewise.
1139 * sem_open.c: Likewise.
1140 * sem_unlink.c: Likewise.
1141 * pthreadP.h: Replace _internal aliases by hidden_proto
1142 declarations.
1143 * pthread_getspecific.c: Replace _internal alias by hidden_def.
1144 * pthread_key_create.c: Likewise.
1145 * pthread_mutex_destroy.c: Likewise.
1146 * pthread_mutex_init.c: Likewise.
1147 * pthread_mutex_lock.c: Likewise.
1148 * pthread_mutex_unlock.c: Likewise.
1149 * pthread_once.c: Likewise.
1150 * pthread_rwlock_rdlock.c: Likewise.
1151 * pthread_rwlock_unlock.c: Likewise.
1152 * pthread_rwlock_wrlock.c: Likewise.
1153 * pthread_setspecific.c: Likewise.
1154 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1155 Likewise.
1156 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1157 Likewise.
1158 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1159 Likewise.
1160 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1161 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1162 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
1163 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
1164 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1165 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1166 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1167 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1168 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1169 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1170 Likewise.
1171 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1172 Likewise.
1173 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1174 Likewise.
1175
65a4de4e
CLT
11762012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
1177
d701a1ab
CLT
1178 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
1179 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
1180
65a4de4e
CLT
1181 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
1182 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
1183 directives.
1184 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1185 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
1186 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1187 (pthread_barrier_wait): Likewise.
1188 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1189 (__pthread_cond_broadcast): Likewise.
1190 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1191 (__pthread_cond_signal): Likewise.
1192 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1193 (__pthread_cond_timedwait): Likewise.
1194 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1195 Likewise.
1196 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1197 (__pthread_rwlock_rdlock): Likewise.
1198 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1199 (pthread_rwlock_timedrdlock): Likewise.
1200 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1201 (pthread_rwlock_timedwrlock): Likewise.
1202 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1203 (__pthread_rwlock_unlock): Likewise.
1204 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1205 (__pthread_rwlock_wrlock): Likewise.
1206 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1207 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1208 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1209 Likewise.
1210 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1211
9c6ea9fa
SP
12122012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1213
1214 [BZ #12416]
1215 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1216 __libc_stack_end rounded to the end of containing page as the
1217 real stack end.
1218
17557282
RH
12192012-05-25 Rayson Ho <rho@redhat.com>
1220
1221 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1222 probes for i386.
1223 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1224 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1225 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1226 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1228 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1229 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1230 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1231
5acf7263
RM
12322012-05-25 Rayson Ho <rho@redhat.com>
1233 Roland McGrath <roland@hack.frob.com>
1234
1235 * DESIGN-systemtap-probes.txt: New file.
1236 * pthread_cond_broadcast.c: SystemTap probes.
1237 * pthread_cond_init.c: Likewise.
1238 * pthread_cond_signal.c: Likewise.
1239 * pthread_cond_wait.c: Likewise.
1240 * pthread_cond_destroy.c: Likewise.
1241 * pthread_create.c: Likewise.
1242 * pthread_join.c: Likewise.
1243 * pthread_mutex_destroy.c: Likewise.
1244 * pthread_mutex_init.c: Likewise.
1245 * pthread_mutex_lock.c: Likewise.
1246 * pthread_mutex_timedlock.c: Likewise.
1247 * pthread_mutex_unlock.c: Likewise.
1248 * pthread_rwlock_destroy.c: Likewise.
1249 * pthread_rwlock_rdlock.c: Likewise.
1250 * pthread_rwlock_unlock.c: Likewise.
1251 * pthread_rwlock_wrlock.c: Likewise.
1252 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1253 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1254 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1255 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1256 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1257 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1258 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1259 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1260
3a097cc7
RM
12612012-05-24 Roland McGrath <roland@hack.frob.com>
1262
1263 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1264
de7f5ce7
AJ
12652012-05-17 Andreas Jaeger <aj@suse.de>
1266
1267 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1268 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1269 only for older kernels.
1270
04807399
JM
12712012-05-15 Joseph Myers <joseph@codesourcery.com>
1272
1273 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1274 not define.
1275
f16af742
L
12762012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1277
1278 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1279 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
1280 (lll_robust_lock): Likewise.
1281 (lll_cond_lock): Likewise.
1282 (lll_robust_cond_lock): Likewise.
1283 (lll_timedlock): Likewise.
1284 (lll_robust_timedlock): Likewise.
1285 (lll_unlock): Likewise.
1286 (lll_robust_unlock): Likewise.
1287
d9754f55
L
12882012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1289
1290 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1291 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1292
dde05f00
L
12932012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1294
1295 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1296 on NWAITERS.
1297 (__gcc_personality_v0): Replace 8-byte data alignment with
1298 LP_SIZE alignment and .quad with ASM_ADDR.
1299
9dba3b5c
L
13002012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1301
1302 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1303 on NWAITERS.
1304 (__gcc_personality_v0): Replace 8-byte data alignment with
1305 LP_SIZE alignment and .quad with ASM_ADDR.
1306
5f658cf1
L
13072012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1308
1309 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1310 NWAITERS, which is unsigned long int.
1311
6cae4b26
L
13122012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1313
1314 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1315 (__gcc_personality_v0): Replace 8-byte data alignment with
1316 LP_SIZE alignment and .quad with ASM_ADDR.
1317
592f90e6
L
13182012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1319
1320 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1321 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1322 __vdso_clock_gettime pointer into RAX_LP.
1323 (__gcc_personality_v0): Replace 8-byte data alignment with
1324 LP_SIZE alignment and .quad with ASM_ADDR.
1325
0e8860ad
L
13262012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1327
1328 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1329 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1330 __vdso_clock_gettime pointer into RAX_LP.
1331 (__gcc_personality_v0): Replace 8-byte data alignment with
1332 LP_SIZE alignment and .quad with ASM_ADDR.
1333
30996e93
L
13342012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1335
1336 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1337 LP_OP(cmp) and R8_LP on dep_mutex pointer.
1338
289ac435
L
13392012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1340
1341 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1342 to update pointer in memory. Load pointer into RDI_LP.
1343
10f74fbc
L
13442012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1345
1346 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1347 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1348 of 8.
1349 (LLL_STUB_UNWIND_INFO_END): Likewise.
1350 (lll_timedlock): Load timeout pointer into RDX_LP.
1351 (lll_robust_timedlock): Likewise.
1352
439bf404
SP
13532012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
1354 Jakub Jelinek <jakub@redhat.com>
1355
1356 [BZ #13613]
1357 * Makefile (tests): Add test cases.
1358 * descr.h (struct pthread): Add a comment describing multiple_threads.
1359 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1360 single-process case.
1361 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1362 before setting cancelstate of the thread.
1363 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1364 (__libc_multiple_threads): Add explanatory comment.
1365 * tst-cancel-self-cancelstate.c: New test case.
1366 * tst-cancel-self-canceltype.c: Likewise.
1367 * tst-cancel-self-cleanup.c: Supporting file for test cases.
1368 * tst-cancel-self-testcancel.c: New test case.
1369 * tst-cancel-self.c: Likewise.
1370 * vars.c: Expand comment to include single-process case.
1371
2949684c
L
13722012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1373
1374 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1375 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
1376 to 32 bytes.
1377
245a11d7
L
13782012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1379
1380 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1381 New.
1382 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1383 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1384
0b254d8f
L
13852012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1386
1387 * shlib-versions: Move x86_64-.*-linux.* entry to ...
1388 * sysdeps/x86_64/64/shlib-versions: Here. New file.
1389 * sysdeps/x86_64/x32/shlib-versions: New file.
1390
b8caea2c
L
13912012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1392
1393 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1394 __SIZEOF_PTHREAD_XXX_T.
1395 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1396 (pthread_mutex_t): Likewise.
1397 (pthread_rwlock_t): Likewise.
1398 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
1399 is defined.
1400
60d45b36
L
14012012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1402
1403 * sysdeps/x86_64/x32/tls.h: New file.
1404
a04e06bc
L
14052012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1406
1407 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1408 integer.
1409 (THREAD_SETMEM_NC): Likewise.
1410
512ec530
L
14112012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1412
1413 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1414 mov/%0.
1415
c0d2c853
L
14162012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1417
1418 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1419 (__cleanup_fct_attribute): Check __x86_64__ instead of
eae2d36a 1420 __WORDSIZE.
c0d2c853 1421
1f59b0b1
L
14222012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1423
1424 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1425 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1426 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1427 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1428 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1429
c252ec15
L
14302012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1431
1432 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1433 instead of __WORDSIZE.
1434
be971a2b
TS
14352012-05-10 Thomas Schwinge <thomas@schwinge.name>
1436
1437 [BZ #3748]
1438 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1439
e1b4354e
CLT
14402012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
1441
1442 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1443 (__pthread_cond_timedwait): Use CFI directives.
1444 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1445 (__pthread_cond_wait): Likewise.
1446 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1447 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1448
76e835cf
DM
14492012-05-03 David S. Miller <davem@davemloft.net>
1450
1451 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1452 always have to return 0, especially for the pthread_spin_init
1453 alias.
1454 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1455 newline.
1456 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1457 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1458
e2dbf201
DM
14592012-05-02 David S. Miller <davem@davemloft.net>
1460
1461 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1462 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1463 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1464 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1465 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1466 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1467 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1468 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1469 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1470 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1471 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1472 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1473 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1474 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1475 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1476 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1477 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1478 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1479
d4c2917f
AM
14802012-05-02 Allan McRae <allan@archlinux.org>
1481
1482 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1483 (LDFLAGS-tst-cancel24): Likewise.
1484
b93d565a
PP
14852012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1486
1487 * sysdeps/i386/pthread_spin_lock.S: New.
1488 * sysdeps/i386/pthread_spin_lock.c: Delete.
1489 * sysdeps/x86_64/pthread_spin_lock.S: New.
1490 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1491
6d5c57fa
AS
14922012-04-28 Andreas Schwab <schwab@linux-m68k.org>
1493
1494 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1495 run when cross-compiling.
1496
6e236b92
SP
14972012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1498
1499 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1500 instead of libgcc_s.h.
1501
0cec7c54
PP
15022012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
1503
1504 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1505
7ac88e38
DM
15062012-03-27 David S. Miller <davem@davemloft.net>
1507
1508 * tst-cond16.c (do_test): Use a thread stack size which is either
1509 PTHREAD_STACK_MIN or the page size, whichever is larger.
1510 * tst-cond18.c (do_test): Likewise.
1511
24d8f4b7
L
15122012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1513
1514 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1515 register char * __asm__("rsp") to get stack frame.
1516
4adaaafc
L
15172012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1518
1519 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1520 __NR_futex directly.
1521
ca7b8af5
L
15222012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1523
1524 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1525 _Unwind_Ptr first.
1526
7e7fa5f8
DM
15272012-03-16 David S. Miller <davem@davemloft.net>
1528
1529 [BZ #13844]
1530 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1531 instead of "...".
1532 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1533 Delete, not needed.
1534
c4a7b16e
DM
15352012-03-15 David S. Miller <davem@davemloft.net>
1536
1537 [BZ #13844]
1538 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1539
c524201a
PE
15402012-03-09 Paul Eggert <eggert@cs.ucla.edu>
1541
1542 [BZ #13673]
1543 * pt-crti.S: Replace FSF snail mail address with URL.
1544
90ad551f
JM
15452012-03-09 Joseph Myers <joseph@codesourcery.com>
1546
1547 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1548 Do not define before including <time.h>.
1549
c64bf5fe
DM
15502012-03-08 David S. Miller <davem@davemloft.net>
1551
1552 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1553
48aff776
TS
15542012-03-08 Thomas Schwinge <thomas@codesourcery.com>
1555
2edd9a79
TS
1556 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1557 Check for timestamp before the Epoch.
1558
c564a812
TS
1559 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1560 updating nwaiters.
1561
48aff776
TS
1562 * tst-sem13.c (do_test): Add another test case.
1563 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1564 Fix updating nwaiters.
1565
e7dbb1be
JM
15662012-03-07 Joseph Myers <joseph@codesourcery.com>
1567
1568 [BZ #10545]
1569 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1570 link test to a compile test.
1571 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
1572 <stdio.h>.
1573 * sysdeps/pthread/configure: Regenerated.
1574
a4300c7a
UD
15752012-03-07 Ulrich Drepper <drepper@gmail.com>
1576
1577 * Makefile (distribute): Remove variable.
1578
840df61e
TS
15792012-01-23 Thomas Schwinge <thomas@codesourcery.com>
1580
1581 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1582 superfluous assignment.
1583 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1584 Likewise.
1585 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1586 (sem_timedwait): Likewise.
1587
9463518d
UD
15882012-03-06 Ulrich Drepper <drepper@gmail.com>
1589
abdf2e19
UD
1590 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1591 installed headers to...
9463518d
UD
1592 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
1593
e9258400
DM
15942012-03-06 David S. Miller <davem@davemloft.net>
1595
1596 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1597 atomic_increment and remove unused local variable.
1598 (__old_sem_post): Likewise.
1599
22f9d9df
DM
16002012-02-27 David S. Miller <davem@davemloft.net>
1601
9463518d
UD
1602 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1603 non-existing __pthread_attr.
22f9d9df
DM
1604 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1605 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1606 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1607 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1608 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1609
4efeffc1
UD
16102012-02-26 Ulrich Drepper <drepper@gmail.com>
1611
d94a4670
UD
1612 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1613
4efeffc1
UD
1614 * sysdeps/pthread/pthread.h: Define __need_timespec before including
1615 <time.h>.
1616 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1617 union.
1618 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1619 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1620 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1621 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1622 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1623
0e7dfaef
JM
16242012-02-21 Joseph Myers <joseph@codesourcery.com>
1625
1626 [BZ #13695]
1627 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1628 pt-initfini.s.
1629 [crti.S not in sysdirs] (omit-deps): Do not append.
1630 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1631 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1632 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1633 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1634 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1635 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1636 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1637 [crti.S in sysdirs] (extra-objs): Append unconditionally.
1638 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1639 unconditionally.
1640 * sysdeps/pthread/pt-initfini.c: Remove file.
1641
e3b69ca7
RH
16422012-02-16 Richard Henderson <rth@twiddle.net>
1643
959e12e3
UD
1644 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1645 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
e3b69ca7 1646
df83af67
KK
16472012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1648
1649 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1650
f63f3380
DM
16512012-02-16 David S. Miller <davem@davemloft.net>
1652
1653 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1654
d463ab10
MP
16552012-02-15 Marek Polacek <polacek@redhat.com>
1656
1657 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1658
59ba27a6
PE
16592012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1660
1661 Replace FSF snail mail address with URLs, as per GNU coding standards.
1662
28328403
AS
16632012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1664
1665 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1666
3add8e13
JM
16672012-02-08 Joseph Myers <joseph@codesourcery.com>
1668
1669 Support crti.S and crtn.S provided directly by architectures.
1670 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1671 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1672 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1673 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1674 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1675 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1676 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1677 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1678 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1679 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1680 * pt-crti.S: New file.
1681 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1682
9a1d9254
JM
16832012-02-03 Joseph Myers <joseph@codesourcery.com>
1684
1685 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1686 macros for PIC register setup.
1687 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1688 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1689 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1690 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1691 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1692
5452bffe
UD
16932012-01-11 Marek Polacek <polacek@redhat.com>
1694
1695 * forward.c (FORWARD_NORETURN): Define macro.
1696 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1697 (__pthread_exit): Likewise.
1698
356fa562
UD
16992012-01-10 Ulrich Drepper <drepper@gmail.com>
1700
8898f020
UD
1701 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1702
356fa562
UD
1703 * pthreadP.h: Add noreturn to __pthread_exit.
1704 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1705
f5420cf0
AZ
17062011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1707
1708 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1709 Call pthread_attr_setstacksize() with result of
1710 __pthread_get_minstack() to account for application TLS usage.
1711
c473bd1c
MP
17122012-01-08 Marek Polacek <polacek@redhat.com>
1713
1714 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1715
120ced3f
UD
17162012-01-07 Ulrich Drepper <drepper@gmail.com>
1717
a784e502
UD
1718 [BZ #13553]
1719 * pthreadP.h: Use const instead of __const.
1720 * semaphore.h: Likewise.
1721 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1722 * sysdeps/pthread/bits/sigthread.h: Likewise.
1723 * sysdeps/pthread/pthread.h: Likewise.
1724
0269750c
UD
1725 * Makefile: Remove elf=yes test, only ELF is supported.
1726
ecb6fb48
UD
1727 * shlib-versions: Remove entries for ports architectures.
1728
120ced3f
UD
1729 In case anyone cares, the IA-64 architecture could move to ports.
1730 * sysdeps/ia64/*: Removed.
1731 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1732
2c1094bd
UD
17332011-12-22 Ulrich Drepper <drepper@gmail.com>
1734
ee9e0640
UD
1735 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1736 __pthread_get_minstack.
1737 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1738
2c1094bd
UD
1739 [BZ #13088]
1740 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1741 through __pthread_get_minstack.
1742 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1743 directly from _rtld_global_ro.
1744 (__pthread_get_minstack): New function.
1745 * pthreadP.h: Declare __pthread_get_minstack.
1746 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1747
60e8585f
UD
17482011-12-21 Ulrich Drepper <drepper@gmail.com>
1749
1750 [BZ #13515]
1751 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1752 Correct reading name from file.
1753
caafb2b0
CD
17542011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1755
1756 * allocatestack.c (allocate_stack): Return errno on failure.
1757
e988dba9
JL
17582011-12-14 Jeff Law <law@redhat.com>
1759
1760 [BZ #5245]
1761 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1762
ade60c89
UD
17632011-11-28 Andreas Schwab <schwab@redhat.com>
1764
1765 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1766 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1767 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1768
312be3f9
UD
17692011-11-15 Ulrich Drepper <drepper@gmail.com>
1770
1771 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1772 /proc/self/maps.
1773
c2b18f7a
UD
17742011-10-29 Ulrich Drepper <drepper@gmail.com>
1775
1776 [BZ #13358]
1777 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1778 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1779 path for kernels with FUTEX_CLOCK_REALTIME.
1780 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1781
3871f58f
AS
17822011-10-27 Andreas Schwab <schwab@redhat.com>
1783
1784 [BZ #13344]
1785 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1786 for memory synchronization functions.
1787 * semaphore.h: Likewise.
1788
485683c3
UD
17892011-10-24 Ulrich Drepper <drepper@gmail.com>
1790
1791 * tst-cancel7.c: Avoid warning.
1792 * tst-mutex6.c: Likewise.
1793 * tst-mutex9.c: Likewise.
1794 * tst-mutexpi6.c: Likewise.
1795
10d005f7
UD
17962011-10-23 Ulrich Drepper <drepper@gmail.com>
1797
1798 * sysdeps/i386/tls.h: Remove #include <list.h>.
1799
fd5bdc09
UD
18002011-10-15 Ulrich Drepper <drepper@gmail.com>
1801
10d005f7 1802 * pthread_create.c (start_thread): Call __ctype_init.
fd5bdc09 1803
7a775e6b
AS
18042011-09-15 Andreas Schwab <schwab@redhat.com>
1805
1806 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1807 defined.
1808 (list_add): Add atomic_write_barrier.
1809 * descr.h: Define __need_list_t before including <list.h>.
1810 * nptl-init.c: Include <list.h>
1811 * allocatestack.c: Likewise.
1812
83cd1420
UD
18132011-09-11 Ulrich Drepper <drepper@gmail.com>
1814
1815 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1816 * sysdeps/ia64/tls.h: Likewise.
1817 * sysdeps/powerpc/tls.h: Likewise.
1818 * sysdeps/s390/tls.h: Likewise.
1819 * sysdeps/sh/tls.h: Likewise.
1820 * sysdeps/sparc/tls.h: Likewise.
1821 * sysdeps/x86_64/tls.h: Likewise.
1822
3ce1f295
UD
18232011-09-10 Ulrich Drepper <drepper@gmail.com>
1824
02d46fc4
UD
1825 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1826
d063d164
UD
1827 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1828 !USE___THREAD.
1829 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1830 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1831 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1832 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1833 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1834 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1835 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1836 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1837 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1838 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1839 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1840 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1841
3ce1f295
UD
1842 * tst-tls1.c: Support for __thread is now mandatory.
1843 * tst-tls2.c: Likewise.
1844 * tst-tls3.c: Likewise.
1845 * tst-tls3mod.c: Likewise.
1846 * tst-tls4.c: Likewise.
1847 * tst-tls4moda.c: Likewise.
1848 * tst-tls4modb.c: Likewise.
1849 * tst-tls5.h: Likewise.
1850
1e4bd093
L
18512011-09-08 Ulrich Drepper <drepper@gmail.com>
1852
1853 [BZ #12403]
1854 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1855 (pthread_rwlock_timedwrlock): Use correct macro in test.
1856 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1857
a0e1f41b
UD
18582011-09-06 Ulrich Drepper <drepper@gmail.com>
1859
1860 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1861 use gettimeofday vsyscall, just call gettimeofday.
9e5c9dcd
UD
1862 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1863 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1864 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1865 Likewise.
1866 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1867 Likewise.
1868 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1869 Simplify __vdso_clock_gettime use.
a0e1f41b 1870
39c4451c
DM
18712011-09-05 David S. Miller <davem@davemloft.net>
1872
1873 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1874 New function.
1875 (sem_timedwait): Call it to force an exception region around
1876 the async cancel enable and the futex operation.
1877 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1878 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1879 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1880 (__new_sem_wait): Call it to force an exception region around
1881 the async cancel enable and the futex operation.
1882 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1883 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1884
523df511
AS
18852011-08-31 Andreas Schwab <schwab@redhat.com>
1886
1887 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1888 thread is woken up.
1889
e315850c
DM
18902011-08-20 David S. Miller <davem@davemloft.net>
1891
1892 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1893
5744c68d
RM
18942011-08-14 Roland McGrath <roland@hack.frob.com>
1895
1896 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1897 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1898
a724d1b9
AS
18992011-08-08 Andreas Schwab <schwab@redhat.com>
1900
1901 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1902 stack.
1903 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1904 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1905
7a03a9c8
UD
19062011-07-22 Ulrich Drepper <drepper@gmail.com>
1907
1908 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1909 barrier.
1910 (__gcc_personality_v0): Likewise.
1911 (_Unwind_ForcedUnwind): Likewise.
1912 (_Unwind_GetCFA): Likewise.
1913
4b3d3e28
RM
19142011-07-14 Roland McGrath <roland@hack.frob.com>
1915
1916 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1917 UINTMAX_C.
1918
6f8326ca
UD
19192011-06-30 Ulrich Drepper <drepper@gmail.com>
1920
1921 * nptl-init.c (__nptl_set_robust): New function.
1922 (pthread_functions): Add reference.
1923 * npthreadP.h: Declare __nptl_set_robust.
1924 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1925 ptr_set_robust member.
1926 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1927 child if threads are used.
1928
c71ca1f8
AJ
19292011-06-14 Andreas Jaeger <aj@suse.de>
1930
1931 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1932
5bdcc103
UD
19332011-05-11 Ulrich Drepper <drepper@gmail.com>
1934
1935 [BZ #386]
1936 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1937
e6c61494
UD
19382011-04-10 Ulrich Drepper <drepper@gmail.com>
1939
1940 [BZ #12650]
1941 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1942 clearing memory.
1943 Patch partly by Robert Rex <robert.rex@exasol.com>.
1944
c5be0f71
RM
19452011-01-19 Roland McGrath <roland@redhat.com>
1946
1947 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1948 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1949 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1950 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1951 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1952 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1953
1f20b93a
AS
19542011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1955
1956 * Makefile (test-extras): Add tst-cleanup4aux.
1957
70181fdd
UD
19582011-01-14 Ulrich Drepper <drepper@gmail.com>
1959
1960 [BZ #10563]
1961 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1962 (__SETXID_2): Likewise.
1963 (__SETXID_3): Likewise.
1964
451f001b
UD
19652011-01-13 Ulrich Drepper <drepper@gmail.com>
1966
1967 [BZ #10484]
1968 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
a85b5cb4 1969 * alloca_cutoff.c: Add libc_hidden_def.
451f001b 1970
f9068148
L
19712010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1972
1973 [BZ #12113]
1974 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1975 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1976 of "struct pthread".
1977
c3758fee
AS
19782010-09-21 Andreas Schwab <schwab@redhat.com>
1979
1980 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1981 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1982 (pthread_cleanup_push_defer_np): Likewise.
1983
4ac42e19
UD
19842010-09-03 Ulrich Drepper <drepper@redhat.com>
1985
1986 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1987 small.
1988
022f6b89
DG
19892010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1990 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1991
1992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1993 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1994
f8392f40
L
19952010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1996
93f17abf 1997 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
f8392f40 1998
bebff237
AM
19992010-05-01 Alan Modra <amodra@gmail.com>
2000
2001 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2002 (PSEUDO): Use correct cr save. Don't use wrong parm save area
2003 to save temps. Correct cfi for possible later frame manipulation.
2004 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
2005 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
2006 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
2007 (DOCARGS_6, UNDOCARGS_6): Likewise.
2008 (CENABLE, CDISABLE): Add nops for non-shared calls.
2009
e8ee8bdf
AS
20102010-07-06 Andreas Schwab <schwab@redhat.com>
2011
2012 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
2013 Fix type mismatch.
2014
03e87550
UD
20152010-07-03 Ulrich Drepper <drepper@redhat.com>
2016
2017 * tst-abstime.c (do_test): Some more cleanups
2018
145569dc
UD
20192010-07-02 Ulrich Drepper <drepper@redhat.com>
2020
2021 * tst-abstime.c: Correct testing and add test for sem_timedwait.
2022
2983d85e
AS
20232010-07-01 Andreas Schwab <schwab@redhat.com>
2024 Ulrich Drepper <drepper@redhat.com>
2025
2026 * Makefile (tests): Add tst-abstime.
2027 * tst-abstime.c: New file.
2028 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2029 (__lll_timedlock_wait): Check for timestamp before the Epoch.
2030 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2031 (__lll_timedlock_wait): Likewise.
2032 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2033 (__lll_robust_timedlock_wait): Likewise.
2034 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2035 (__pthread_cond_timedwait): Likewise.
2036 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2037 (pthread_rwlock_timedrdlock): Likewise.
2038 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2039 (pthread_rwlock_timedwrlock): Likewise.
2040 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2041 Likewise.
2042
72b6e8c8
UD
20432010-07-01 Ulrich Drepper <drepper@redhat.com>
2044
2045 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
2046
4bc93b30
TY
20472010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
2048
2049 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
2050 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
2051
86a4c67f
UD
20522010-04-09 Ulrich Drepper <drepper@redhat.com>
2053
2054 [BZ #11390]
2055 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
2056 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
2057 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
2058 pthread_setname.
2059 * Makefile (libpthread-routines): Add pthread_getname and
2060 pthread_setname.
2061 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
2062
f571a994
RM
20632010-04-05 Thomas Schwinge <thomas@schwinge.name>
2064
2065 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
2066 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
2067 * sysdeps/pthread/Makefile: Remove csu section and rt section's
2068 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
2069
7749bf5f
LM
20702010-03-23 Luis Machado <luisgpm@br.ibm.com>
2071
2072 * pthread_cond_timedwait.c: Add check for
2073 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
2074 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
2075 INTERNAL_SYSCALL.
2076
1d78f299
UD
20772010-03-09 Ulrich Drepper <drepper@redhat.com>
2078
2079 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
2080 and the call fails wake eventually waiting setxid threads. Don't free
2081 stack here if we try starting a thread.
2082 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
2083 if the clone call failed.
2084
058e9ba9
AS
20852010-03-08 Andreas Schwab <schwab@redhat.com>
2086
2087 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
2088 * allocatestack.c (get_cached_stack): Set setxid_futex.
2089 (allocate_stack): Likewise.
2090
66f1b8ee
UD
20912010-03-05 Andreas Schwab <schwab@redhat.com>
2092 Ulrich Drepper <drepper@redhat.com>
2093
2094 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
2095 it is creating a thread or it is just being created.
2096 * pthread_create.c (start_thread): Wake setxid thread if it is
2097 waiting.
2098 (__pthread_create_2_1): Initialize setxid_futex.
2099 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
2100 is waiting.
2101
893549c5
MS
21022010-01-15 Ulrich Drepper <drepper@redhat.com>
2103
2104 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2105 Fix unwind info.
2106 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2107
21082010-01-15 Michal Schmidt <mschmidt@redhat.com>
2109
2110 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2111 Fix pthread_cond_timedwait with requeue-PI.
2112 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2113 Fix pthread_cond_wait with requeue-PI.
2114
402cd987
UD
21152010-01-14 Ulrich Drepper <drepper@redhat.com>
2116
78ee2185
UD
2117 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
2118 and pthread_mutexattr_setrobust for GLIBC_2.12.
402cd987 2119 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
78ee2185
UD
2120 * pthread_mutexattr_getrobust.c: Define alias
2121 pthread_mutexattr_getrobust.
2122 * pthread_mutexattr_setrobust.c: Define alias
2123 pthread_mutexattr_setrobust.
402cd987 2124
d3c7e686
UD
21252010-01-12 Ulrich Drepper <drepper@redhat.com>
2126
2127 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
2128
f095bb72
UD
21292010-01-08 Ulrich Drepper <drepper@redhat.com>
2130
2131 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
2132
d34bd80f
TS
21332009-12-18 Thomas Schwinge <thomas@codesourcery.com>
2134
2135 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
2136 call __gmon_start__.
2137 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
2138
f01c2359
UD
21392009-12-17 Ulrich Drepper <drepper@redhat.com>
2140
2141 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
2142 using memset.
2143
75956694
DG
21442009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
2145
2146 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
2147 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
2149 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2150 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2151 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
2152 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2154
9554ebf2
UD
21552009-12-12 Ulrich Drepper <drepper@redhat.com>
2156
2157 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2158 Don't update nwaiters after invalid timeout is recognized.
2159
ebb92a49
TS
21602009-11-27 Thomas Schwinge <thomas@codesourcery.com>
2161
2162 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
2163 __gmon_start__.
2164
b55ec98c
AS
21652009-11-27 Andreas Schwab <schwab@redhat.com>
2166
2167 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
2168 THREAD_SELF->cancelhandling after returning from futex call.
2169
80b3a4ea
UD
21702009-11-24 Ulrich Drepper <drepper@redhat.com>
2171
2172 * tst-sem13.c: New file.
2173 * Makefile (tests): Add tst-sem13.
2174
57a299fe
RM
21752009-11-22 Roland McGrath <roland@redhat.com>
2176
2177 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
2178 instead of recapitulating its contents.
2179
dfedb126
UD
21802009-11-18 Ulrich Drepper <drepper@redhat.com>
2181
2182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
2183 optimizations and cleanups.
2184
dd7106b3
DG
21852009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
2186
2187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2188 Remove redundant code. Fix cfi offsets.
2189 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2190 Fix cfi offsets.
2191
f8c10bb4
UD
21922009-11-17 Ulrich Drepper <drepper@redhat.com>
2193
62616842
UD
2194 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
2195 reduce size of unwind info.
2196
f8c10bb4
UD
2197 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2198 cfi directives.
2199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2200 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2201
13f6812f
AS
22022009-11-03 Andreas Schwab <schwab@linux-m68k.org>
2203
2204 [BZ #4457]
2205 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2206 LIBGCC_S_SO.
2207 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2208
25db0f6c
DJ
22092009-10-30 Ulrich Drepper <drepper@redhat.com>
2210
9c04f7c1
UD
2211 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2212
25db0f6c
DJ
2213 [BZ #3270]
2214 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2215 steps to avoid races with creation and terminations.
2216 * nptl-init.c (sighandler_setxid): Adjust.
2217 Patch by Daniel Jacobowitz.
2218
3d60eb17
AS
22192009-09-07 Andreas Schwab <schwab@redhat.com>
2220
2221 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2222
38eb6136
SP
22232009-09-02 Suzuki K P <suzuki@in.ibm.com>
2224 Joseph Myers <joseph@codesourcery.com>
2225
2226 [BZ #7094]
2227 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2228 Initialize the sigev_notify field for newly created timer to make sure
01034d75 2229 the timer gets deleted from the active timer's list upon timer_delete.
38eb6136 2230
7812c65b
AS
22312009-08-27 Andrew Stubbs <ams@codesourcery.com>
2232
2233 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2234 Correct a logic error.
2235
84088310
UD
22362009-08-25 Ulrich Drepper <drepper@redhat.com>
2237
2238 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2239 of the field in local variables.
2240 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2241 variable and don't unconditionally clear it.
2242
b42a214c
UD
22432009-08-24 Ulrich Drepper <drepper@redhat.com>
2244
2245 * pthread_create.c (start_thread): Hint to the kernel that memory for
2246 the stack can be reused. We do not mark all the memory. The part
2247 still in use and some reserve are kept.
2248
2d094b73
UD
22492009-08-23 Ulrich Drepper <drepper@redhat.com>
2250
2251 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2252
ae0d5450
UD
22532009-08-11 Ulrich Drepper <drepper@redhat.com>
2254
2255 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2256 directives.
2257
1bc2b97e
UD
22582009-08-10 Ulrich Drepper <drepper@redhat.com>
2259
2260 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2261 directives.
2262 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2263
ec492239
AS
22642009-08-10 Andreas Schwab <schwab@redhat.com>
2265
2266 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2267 (__pthread_cond_signal): Don't clobber register used for syscall
2268 number.
2269
49eea97b
UD
22702009-08-08 Ulrich Drepper <drepper@redhat.com>
2271
efa0569d
UD
2272 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2273 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2274
49eea97b
UD
2275 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2276 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2277 register.
2278
9083bcc5
UD
22792009-08-07 Ulrich Drepper <drepper@redhat.com>
2280
2281 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2282 enabled by the special *_asynccancel functions.
2283 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2284 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2285
2286 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2287
421665c4
UD
22882009-08-04 Ulrich Drepper <drepper@redhat.com>
2289
2290 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2291 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2292 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2293 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2294 since we can assume the special __*_{en,dis}able_asynccancel
2295 functions.
2296 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2297 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2298 and PTHREAD_CANCELED.
2299
bd03a1af
UD
23002009-07-31 Ulrich Drepper <drepper@redhat.com>
2301
2302 * descr.h: Better definition of *_BITMASK macros for cancellation.
2303
b48a267b
UD
23042009-07-29 Ulrich Drepper <drepper@redhat.com>
2305
586fa886
UD
2306 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2307
b48a267b 2308 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
586fa886
UD
2309 dynamic linker might have to save.
2310 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2311 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
2312 printing.
2313
b48a267b
UD
2314 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2315
b0948ffd
UD
23162009-07-28 Ulrich Drepper <drepper@redhat.com>
2317
2318 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2319 New function.
2320 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2321 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2322 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2323 requeue_pi for robust mutexes.
2324 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2325 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2326 Don't only skip __pthread_mutex_cond_lock. Call instead
2327 __pthread_mutex_cond_lock_adjust.
2328 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2329
2330 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2331 optimization of PI mutex handling.
2332
e73e694e
UD
23332009-07-27 Ulrich Drepper <drepper@redhat.com>
2334
2335 [BZ #10418]
2336 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2337 instead of of _acq variants of cmpxchg.
2338
f1adf1f4
UD
23392009-07-23 Ulrich Drepper <drepper@redhat.com>
2340
01b597da
UD
2341 * sysdeps/x86_64/configure.in: New file.
2342
f1adf1f4
UD
2343 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2344 path when not using absolute timeout futex.
2345
c3db953c
UD
23462009-07-20 Ulrich Drepper <drepper@redhat.com>
2347
2348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2349 optimizations of last changes.
2350 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2351
515a8908
UD
23522009-07-19 Ulrich Drepper <drepper@redhat.com>
2353
42e69bcf
UD
2354 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2355 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2356 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2357 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2358 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2359 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2360 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2361 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2362
515a8908
UD
2363 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2364 (__pthread_cond_timedwait): Make more robust.
2365
30b1954a
UD
23662009-07-18 Ulrich Drepper <drepper@redhat.com>
2367
e2dca2fe
UD
2368 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2369 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2370 directly use absolute timeout.
2371
3d77b268
UD
2372 * tst-sem5.c (do_test): Add test for premature timeout.
2373 * Makefile: Linu tst-sem5 with librt.
2374
d979611e
UD
2375 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2376 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2377 directly use absolute timeout.
32c6c342
UD
2378 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2379 (pthread_rwlock_timedrdlock): Likewise.
d979611e 2380
f8b6cd21
UD
2381 * tst-cond11.c (run_test): Add test to check that the timeout is
2382 long enough.
2383
e88726b4
UD
2384 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2385 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2386 directly use absolute timeout.
2387
30b1954a
UD
2388 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2389 (__pthread_cond_wait): Convert to using exception handler instead of
2390 registered unwind buffer.
92618c95
UD
2391 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2392 (__pthread_cond_timedwait): Likewise.
30b1954a 2393
d52c96e7
UD
23942009-07-17 Ulrich Drepper <drepper@redhat.com>
2395
f351f2b7
UD
2396 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2397 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2398 use absolute timeout.
2399
0adae468
UD
2400 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2401 handling of uncontested semaphore.
2402
d52c96e7
UD
2403 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2404 (__condvar_cleanup): Rewrite to use cfi directives instead of
2405 hand-coded unwind tables.
63601ccd
UD
2406 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2407 Likewise.
c3c2f3cf 2408 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
aee2665a
UD
2409 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2410 Likewise.
d52c96e7 2411
bfdb73e1
UD
24122009-06-12 Ulrich Drepper <drepper@redhat.com>
2413
2414 * Makefile (libpthread-routines): Add pthread_sigqueue.
2415 * Versions: Add pthread_sigqueue for GLIBC_2.11.
2416 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2417 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2418
1828530f
BK
24192009-06-11 Ulrich Drepper <drepper@redhat.com>
2420
2421 [BZ #10262]
2422 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2423 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2424 cannot be assumed.
2425 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2426
a5b8b56d
UD
24272009-05-16 Ulrich Drepper <drepper@redhat.com>
2428
e20c4ef0
UD
2429 * libc-cancellation.c: Move __libc_cleanup_routine to...
2430 * libc-cleanup.c: ...here. New file.
2431 * Makefile (routines): Add libc-cleanup.
2432
cba0ca79
UD
2433 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2434 test.
2435 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2436 * sysdeps/pthread/librt-cancellation.c: Likewise.
2437
a5b8b56d
UD
2438 [BZ #9924]
2439 * nptl-init.c: Renamed from init.c.
2440 * Makefile: Change all occurences of init.c to nptl-init.c.
2441
1a7f254b
UD
24422009-05-15 Ulrich Drepper <drepper@redhat.com>
2443
9437b427
UD
2444 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2445 to test when deciding on the delay.
2446 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2447 * pthread_cancel.c: Close race between deciding on sending a signal
2448 and setting the CANCELING_BIT bit.
2449
1a7f254b
UD
2450 * cancellation.c (__pthread_disable_asynccancel): Don't return if
2451 thread is canceled.
2452 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2453
d5c157a9
UD
24542009-04-27 Ulrich Drepper <drepper@redhat.com>
2455
2456 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2457 is available.
2458 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2459 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2460 * sysdeps/i386/tls.h: Likewise.
2461 (tcbhead_t): Add __private_tm member.
2462
f521be31
UD
24632009-04-26 Ulrich Drepper <drepper@redhat.com>
2464
5efe8650
UD
2465 * sem_open.c (sem_open): Rewrite initialization of initsem to
2466 avoid warnings.
2467
f521be31
UD
2468 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2469 Avoid warning by using may_alias attribute on ptrhack.
2470
d301a6e1
UD
24712009-04-22 Ulrich Drepper <drepper@redhat.com>
2472
5497de87 2473 [BZ #10090]
d301a6e1
UD
2474 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2475 Check policy and priority for validity.
2476 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2477
71a5bd3e
UD
24782009-03-15 Ulrich Drepper <drepper@redhat.com>
2479
2480 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2481 (__pthread_cond_timedwait): Change to use cfi directives instead of
2482 hand-coded unwind sections.
2483
30991b8b
UD
24842009-03-10 Ulrich Drepper <drepper@redhat.com>
2485
2486 * init.c (nptl_freeres): Compile only for SHARED.
2487
9920a6b8
JJ
24882009-03-09 Jakub Jelinek <jakub@redhat.com>
2489
2490 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2491 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2492 FUTEX_BITSET_MATCH_ANY.
2493
e965d514
RM
24942009-02-27 Roland McGrath <roland@redhat.com>
2495
2496 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2497 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2498
6cbe890a
UD
24992009-02-26 Ulrich Drepper <drepper@redhat.com>
2500
2501 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2502 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2503 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
2504 200112L to 200809L.
2505
77db439e
UD
25062009-02-25 Ulrich Drepper <drepper@redhat.com>
2507
2508 * sysdeps/pthread/pthread.h: The robust mutex functions are in
2509 POSIX 2008.
2510
5be0a688
UD
25112009-02-24 Ulrich Drepper <drepper@redhat.com>
2512
2513 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2514 Unify name of include protector macro.
2515
4c869eb6
UD
25162009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
2517
2518 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2519 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2520
cca50323
UD
25212009-01-29 Ulrich Drepper <drepper@redhat.com>
2522
7f901dd7
UD
2523 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2524 pointer variables.
2525
cca50323
UD
2526 * allocatestack.c (__free_stacks): Renamed from free_stacks.
2527 (__free_stack_cache): Removed. Change callers to call __free_stacks.
2528 * init.c (nptl_freeres): New function.
2529 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2530 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
2531 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2532 variable.
2533 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2534 load DSO. Assign last.
2535 (__unwind_freeres): New function.
2536
2537 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2538 for better debugging. No need to use stack_list_add here.
2539
a7bd183f
UD
25402009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2541
2542 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2543 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2544 instead of computing relative timeout.
2545 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2546 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2547
563ee1cb
UD
25482009-01-25 Ulrich Drepper <drepper@redhat.com>
2549
2550 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2551
f25c7b08
UD
25522009-01-08 Ulrich Drepper <drepper@redhat.com>
2553
2554 * sysdeps/pthread/list.h (list_add): Initialize new element first.
2555 (list_add_tail): Removed.
2556
40de0fe3
JJ
25572009-01-07 Ulrich Drepper <drepper@redhat.com>
2558
2559 * (in_flight_stack): New variable.
2560 (stack_list_del): New function. Use instead of list_del.
2561 (stack_list_add): New function. Use instead of list_add when adding to
2562 stack_cache and stack_used lists.
2563 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2564 when the fork call interrupted another thread.
2565
3c612057
UD
25662009-01-04 Ulrich Drepper <drepper@redhat.com>
2567
2568 * init.c (__pthread_initialize_minimal_internal): Optimize test
2569 FUTEX_CLOCK_REALTIME a bit.
2570
19834b42
UD
25712009-01-03 Ulrich Drepper <drepper@redhat.com>
2572
2573 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2574 only passing five parameters to FUTEX_WAIT_BITSET call.
2575
2576 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a9fa090b 2577 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
19834b42
UD
2578 instead of computing relative timeout.
2579
7dd650d7
UD
25802009-01-02 Ulrich Drepper <drepper@redhat.com>
2581
cbd8aeb8
UD
2582 * init.c (__pthread_initialize_minimal_internal): Check for
2583 FUTEX_CLOCK_REALTIME flag.
2584 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
a9fa090b 2585 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
cbd8aeb8
UD
2586 relative timeout.
2587
7dd650d7
UD
2588 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2589 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2590 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2591 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2592 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2593 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2594
217d45cd
UD
25952008-12-09 Ulrich Drepper <drepper@redhat.com>
2596
2597 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2598 loop body instead of ; to avoid gcc warnings.
2599 (pthread_cleanup_pop_restore_np): Likewise.
2600 Patch by Caolán McNamara <caolanm@redhat.com>.
2601
6de79a49
UD
26022008-12-09 Jakub Jelinek <jakub@redhat.com>
2603
2604 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2605 fast path here, for robust/PI/PP mutexes call
2606 __pthread_mutex_lock_full. Don't use switch, instead use a series
2607 of ifs according to their probability.
2608 (__pthread_mutex_lock_full): New function.
2609 * pthread_mutex_unlock.c: Include assert.h.
2610 (__pthread_mutex_unlock_usercnt): Handle only the
2611 fast path here, for robust/PI/PP mutexes call
2612 __pthread_mutex_unlock_full. Don't use switch, instead use a series
2613 of ifs according to their probability.
2614 (__pthread_mutex_unlock_full): New function.
2615 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2616 (__pthread_mutex_lock_full): Define.
2617
71bb2639
UD
26182008-12-08 Ulrich Drepper <drepper@redhat.com>
2619
2620 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2621 implementation. Add necessary padding and.
2622 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2623 words.
2624
247626f3
UD
26252008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2626
2627 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2628 and FUTEX_WAKE_BITSET.
2629
da5ac135
UD
26302008-12-02 Ulrich Drepper <drepper@redhat.com>
2631
2632 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2633 and FUTEX_WAKE_BITSET.
2634 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2635 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2636 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2637 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2638
c0439b95
RM
26392008-11-25 Roland McGrath <roland@redhat.com>
2640
2641 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2642 Subdirectories moved to ports repository as
2643 sysdeps/.../nptl subdirectories.
2644
0e54a725
UD
26452008-11-12 Jakub Jelinek <jakub@redhat.com>
2646
2647 [BZ #7008]
2648 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2649 of old value.
2650 * pthread_cond_init.c (__pthread_cond_init): Fix
2651 cond->__data.__nwaiters initialization.
2652 * Makefile (tests): Add tst-cond23.
2653 * tst-cond23.c: New test.
2654
4b23f9bd
JJ
26552008-11-07 Jakub Jelinek <jakub@redhat.com>
2656
2657 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2658 arguments.
2659 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2660 arguments.
2661
efac1fce
UD
26622008-11-01 Ulrich Drepper <drepper@redhat.com>
2663
2664 [BZ #6955]
2665 * pthread_mutex_lock.c: Add support for private PI mutexes.
2666 * pthread_mutex_timedlock.c: Likewise.
2667 * pthread_mutex_trylock.c: Likewise.
2668 * pthread_mutex_unlock.c: Likewise.
2669 Patch mostly by Ben Jackson <ben@ben.com>.
2670
bf837fa3
UD
26712008-10-31 Ulrich Drepper <drepper@redhat.com>
2672
2673 [BZ #6843]
2674 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2675 Increase stack size for helper thread.
2676
208bc836
UD
26772008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2678
2679 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2680 assembly with a clobber list for access registers a0 and a1.
2681
17f8b4a9
UD
26822008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2683
2684 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2685 to force runp->refcntr to be read from memory.
2686
2458c748
AJ
26872008-09-08 Richard Guenther <rguenther@suse.de>
2688
2689 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2690 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2691 lll_timedlock, lll_robust_timedlock, lll_unlock,
2692 lll_robust_unlock): Promote private to int.
2693
965805e8
UD
26942008-08-15 Ulrich Drepper <drepper@redhat.com>
2695
2696 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2697 ARCH_RETRY_MMAP definitions.
2698 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2699 Define MAP_STACK when not defined.
2700 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2701 handling of ARCH_RETRY_MMAP.
2702
bd7f4857
UD
27032008-07-30 Ulrich Drepper <drepper@redhat.com>
2704
2705 * tst-align2.c (f): Print message that f is reached.
2706
619cc2f6
UD
27072008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2708
2709 [BZ #6740]
2710 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2711 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2712
8ccf22f9
UD
27132008-07-25 Ulrich Drepper <drepper@redhat.com>
2714
2715 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2716 SOCK_CLOEXEC if possible.
2717
27182008-05-29 Ulrich Drepper <drepper@redhat.com>
2719
2720 * Makefile (tests): Add tst-rwlock2a.
2721 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2722 * tst-rwlock2a.c: New file.
2723
5a337776
UD
27242008-06-12 Ulrich Drepper <drepper@redhat.com>
2725
2726 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2727
e4d6e7f5
UD
27282008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2729
2730 * sysdeps/pthread/pthread.h: Fix typo in comment.
2731
d6296e88
UD
27322008-05-28 Ulrich Drepper <drepper@redhat.com>
2733
2734 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2735 of CPU set to the kernel.
2736
62605cbf
UD
27372008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2738
2739 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2740 cfi directives.
2741 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2742 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2743 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2744 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2745 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2746 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2747
27482008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2749
2750 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2751 cfi directives.
2752 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2753 Likewise.
2754 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2755 Likewise.
2756 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2757 Likewise.
2758
4b2c85c0
UD
27592008-05-26 Ulrich Drepper <drepper@redhat.com>
2760
2761 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2762
b72f5692 27632008-05-20 Jakub Jelinek <jakub@redhat.com>
4b2c85c0
UD
2764
2765 David S. Miller <davem@davemloft.net>
3b15b590 2766
b72f5692 2767 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3b15b590 2768
cdffaaa6
UD
27692008-05-10 Ulrich Drepper <drepper@redhat.com>
2770
2771 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2772 __pshared correctly.
2773 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2774 Likewise.
2775 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2776 Likewise.
2777 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2778 Likewise.
2779 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2780 Likewise.
2781 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2782
2313c48f
JJ
27832008-04-14 David S. Miller <davem@davemloft.net>
2784
2785 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2786 (__old_sem_wait): Fix argument to lll_futex_wait().
2787
2f611ada
UD
27882007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2789
2790 * pthread_create.c: Require pthread_mutex_trylock and
2791 pthread_key_delete for libgcc.
2792
d24be489
JJ
27932008-04-08 Jakub Jelinek <jakub@redhat.com>
2794
2795 [BZ #6020]
2796 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2797 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2798 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2799
f96853be
UD
28002008-03-27 Ulrich Drepper <drepper@redhat.com>
2801
8ccf22f9 2802 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
f96853be
UD
2803 <linux/limits.h> has defined it.
2804 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2805 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2806 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2807 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2808
354b7527
JJ
28092008-03-18 Jakub Jelinek <jakub@redhat.com>
2810
2811 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2812 of ASSEMBLER.
2813 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2814 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2815
702ae329
UD
28162008-03-14 Ulrich Drepper <drepper@redhat.com>
2817
2818 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2819 HAVE_DL_DISCOVER_OSVERSION.
2820 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2821 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2822
443db178
UD
28232008-03-07 Ulrich Drepper <drepper@redhat.com>
2824
2825 [BZ #5778]
2826 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2827 _POSIX_CHOWN_RESTRICTED value to zero.
2828
67fbfa5c
RM
28292008-01-31 Roland McGrath <roland@redhat.com>
2830
2831 * Makefile (omit-deps): Variable removed.
2832
dd3113da
UD
28332008-01-30 Ulrich Drepper <drepper@redhat.com>
2834
2835 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2836 unnecessary addr32 prefix.
2837
16cd816f
RM
28382008-01-29 Roland McGrath <roland@redhat.com>
2839
2840 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2841
b4b166af
UD
28422008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2843
2844 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2845
28462008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2847
2848 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2849 a scratch register.
2850 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2851 (__lll_lock_wait_private): Fix typo.
2852 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2853 (pthread_barrier_wait): Likewise. Adjust XADD use.
2854 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2855 Adjust XADD use.
2856 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2857 (pthread_rwlock_timedrdlock): Return correct return value.
2858 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
16cd816f 2859 (pthread_rwlock_timedwrlock): Likewise.
b4b166af 2860
eaf95a26
UD
28612008-01-15 Ulrich Drepper <drepper@redhat.com>
2862
2863 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2864 thread returns the program exits with an error code.
2865
ab355d9a
UD
28662008-01-10 Ulrich Drepper <drepper@redhat.com>
2867
2868 * pthread-errnos.sym: Add EOVERFLOW.
2869 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2870 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2871 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2872 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2873
b8cca206
UD
28742007-12-14 Ulrich Drepper <drepper@redhat.com>
2875
2876 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2877 parameter. Passed it as permission to mmap.
2878 * allocatestack.c (allocate_stack): Pass prot as second parameter
2879 to ARCH_RETRY_MMAP.
2880
189dce4f
UD
28812007-12-12 Ulrich Drepper <drepper@redhat.com>
2882
3eb0e1c6
UD
2883 * tst-basic7.c: Allocate memory for the stack.
2884
189dce4f
UD
2885 [BZ #5465]
2886 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2887 (__pthread_cond_timedwait): Don't use VDSO.
58d11795 2888 Patch by Michal Januszewski.
189dce4f 2889
26e21e75
UD
28902007-12-07 Ulrich Drepper <drepper@redhat.com>
2891
2892 [BZ #5455]
2893 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2894 Allow label before pthread_cleanup_pop.
2895 (pthread_cleanup_pop_restore_np): Likewise.
2896
191ec77f
UD
28972007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2898
2899 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2900 Store 2 before returning ETIMEDOUT.
2901
c012be6f
UD
29022007-11-23 Ulrich Drepper <drepper@redhat.com>
2903
2904 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2905 Store 2 before returning ETIMEDOUT.
2906 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2907 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2908 (__lll_lock_wait_private): Optimize.
2909 (__lll_lock_wait): Likewise.
2910
77f1e09a
UD
29112007-11-20 Jakub Jelinek <jakub@redhat.com>
2912
2913 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2914 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2915 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2916
0f7e0ee5
UD
29172007-11-08 Ulrich Drepper <drepper@redhat.com>
2918
cbed6a60
UD
2919 [BZ #5240]
2920 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2921 If we time out, try one last time to lock the futex to avoid
2922 losing a wakeup signal.
2923 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2924 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2925
0f7e0ee5
UD
2926 [BZ #5245]
2927 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2928 if necessary.
2929
f6ed654c
UD
29302007-11-07 Ulrich Drepper <drepper@redhat.com>
2931
2932 [BZ #5245]
2933 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2934 mmap failed to EAGAIN.
2935 * Makefile (tests): Add tst-basic7.
2936 * tst-basic7.c: New file.
2937
b92e3780
UD
29382007-11-05 Ulrich Drepper <drepper@redhat.com>
2939
2940 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2941 Use __linkin_atfork.
2942
94a749f6
UD
29432007-11-03 Mike Frysinger <vapier@gentoo.org>
2944
2945 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2946 missing line continuations.
2947 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2948 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2949
f160a450
UD
29502007-10-28 Ulrich Drepper <drepper@redhat.com>
2951
2952 [BZ #5220]
2953 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2954 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2955 (struct timer): Add next element.
2956 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2957 enqueue timer structure into __active_timer_sigev_thread list.
2958 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2959 remove timer struct from __active_timer_sigev_thread.
2960 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2961 Before using timer structure make sure it is still on the
2962 __active_timer_sigev_thread list. Keep lock until done.
2963 Define __active_timer_sigev_thread and
2964 __active_timer_sigev_thread_lock.
2965
94833f11
UD
29662007-10-27 Ulrich Drepper <drepper@redhat.com>
2967
2968 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2969 Redefine thread_atfork for use of ATFORK_MEM.
2970 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2971 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2972 function.
2973 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2974 Use atomic operation when removing first element of list.
2975
96c06e08
JJ
29762007-10-17 Jakub Jelinek <jakub@redhat.com>
2977
2978 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2979 routine instead of an alias to __new_sem_post.
2980
e807818b
JJ
29812007-10-15 Jakub Jelinek <jakub@redhat.com>
2982
2983 * init.c (__pthread_initialize_minimal): Initialize word to appease
2984 valgrind.
2985
59d430c6
UD
29862007-10-10 Jakub Jelinek <jakub@redhat.com>
2987
2988 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2989 libc.so just clear NAME.
2990 (__libc_rwlock_fini): Nop inside of libc.so.
2991 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2992 all zeros.
2993
221d9d8e
UD
29942007-09-02 Ulrich Drepper <drepper@redhat.com>
2995
2996 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2997 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2998 unlocking failed.
2999 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
3000
2a01ce56
UD
30012007-08-21 Ulrich Drepper <drepper@redhat.com>
3002
3003 [BZ #4938]
3004 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
3005 reclaimed stack if necessary.
3006 * Makefile (tests): Add tst-tsd6.
3007 * tst-tsd6.c: New file.
3008
c273641b
JJ
30092007-08-21 Jakub Jelinek <jakub@redhat.com>
3010
3011 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
3012 Add private argument.
3013
fb84593c
UD
30142007-08-20 Ulrich Drepper <drepper@redhat.com>
3015
3016 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3017 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
3018
3e8d1eab
JJ
30192007-08-16 Jakub Jelinek <jakub@redhat.com>
3020
3021 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
3022 (__lll_robust_timedlock): Pass private as last argument to
3023 __lll_robust_timedlock_wait.
3024 (__lll_unlock): Fix a pasto.
3025
e4720b0e
JJ
30262007-08-15 Jakub Jelinek <jakub@redhat.com>
3027
3028 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
3029 sparc_old_sem): New structs.
3030 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
3031 (__sem_wait_cleanup): New function.
3032 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
3033 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
3034 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3035 lll_futex_wait.
3036 (__old_sem_wait): New function.
3037 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
3038 nptl/sysdeps/unix/sysv/linux/sparc version.
3039 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
3040 Likewise.
3041 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
3042 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
3043 (__new_sem_trywait): Use sparc_old_sem structure.
3044 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
3045 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
3046 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
3047 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3048 lll_futex_timed_wait.
3049 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
3050 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
3051 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3052 lll_futex_wake.
3053 (__old_sem_post): New function.
3054 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
3055 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
3056 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
3057 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
3058 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
3059 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
3060
d13f4a43
UD
30612007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3062
3063 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3064 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3065 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3066 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3067 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
3068 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3069 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3070 Use FUTEX_WAKE_OP.
3071 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3072 kernel-features.h and tcb-offsets.h.
3073 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3074 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3075 process private.
3076 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3077 tcb-offsets.h.
3078 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
3079 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3080 process private.
3081 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
3082 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3083 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3084 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3085 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3086 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3087 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3088
702a9414
JJ
30892007-08-14 Jakub Jelinek <jakub@redhat.com>
3090
467d1345
JJ
3091 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
3092 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3093 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
3094 lll_futex_timed_wait.
3095
702a9414
JJ
3096 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
3097 __lll_robust_unlock): Rewrite as macros instead of inline functions.
3098 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
3099 __lll_robust_unlock, __lll_wait_tid): Likewise.
3100
22502ea2
UD
31012007-08-13 Jakub Jelinek <jakub@redhat.com>
3102
3103 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3104 Fix a pasto.
3105 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3106 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3107 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3108 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3109 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3110 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3111 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3112 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
3113 kernel-features.h.
3114 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3115 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3116 process private. Switch DW_CFA_advance_loc1 and some
3117 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3119 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
3120 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3121 process private. Switch DW_CFA_advance_loc{1,2} and some
3122 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3123 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
3124 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3125 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3126 Likewise.
3127 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3128 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3129 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3130 Likewise.
3131 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3132 (__pthread_cond_broadcast): Compare %r8 instead of
3133 dep_mutex-cond_*(%rdi) with $-1.
3134 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3135 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
3136 of oring.
3137
4baf59ad
UD
31382007-08-13 Ulrich Drepper <drepper@redhat.com>
3139
3140 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
3141
9c6f6953
UD
31422007-08-13 Jakub Jelinek <jakub@redhat.com>
3143
3144 * allocatestack.c: Include kernel-features.h.
3145 * pthread_create.c: Likewise.
3146 * pthread_mutex_init.c: Likewise.
3147 * init.c: Likewise.
3148 * pthread_cond_timedwait.c: Likewise.
3149 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3150 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3151 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3152 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3153 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3154 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3155 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3156 Likewise.
3157 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3158 Likewise.
3159 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3160 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3161 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3162 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3163
974a1f0f
UD
31642007-08-12 Jakub Jelinek <jakub@redhat.com>
3165
3166 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3167 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3168 byte elements. One of them is the new __shared element.
3169 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3170 adjust names of other padding elements.
3171 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3172 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3173 byte elements. One of them is the new __shared element.
3174 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3175 adjust names of other padding elements.
3176 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
3177 Renamed __pad1 element to __shared, adjust names of other padding
3178 elements.
3179 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3180 (pthread_rwlock_t): Likewise.
3181 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
3182 typo.
3183
31842007-08-09 Anton Blanchard <anton@samba.org>
3185
3186 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
3187
f47e2626
UD
31882007-08-12 Ulrich Drepper <drepper@redhat.com>
3189
3190 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
3191 <kernel-features.h>.
3192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3193
5bd8a249
UD
31942007-08-11 Ulrich Drepper <drepper@redhat.com>
3195
3196 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3197 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3198 dealing with robust mutexes.
3199 * pthread_mutex_timedlock.c: Likewise.
3200 * pthread_mutex_trylock.c: Likewise.
3201 * pthread_mutex_unlock.c: Likewise.
3202 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3203
32042007-08-06 Jakub Jelinek <jakub@redhat.com>
3205
3206 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3207 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3208 (PTHREAD_MUTEX_PSHARED): Define.
3209 * pthread_mutex_init.c (__pthread_mutex_init): Set
3210 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3211 mutexes.
3212 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3213 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3214 as second argument to lll_lock.
3215 (LLL_MUTEX_TRYLOCK): Take mutex as argument
3216 instead of its __data.__lock field.
3217 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3218 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3219 to lll_robust_lock.
3220 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3221 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3222 instead of mutex->__data.__kind directly, pass
3223 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3224 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3225 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3226 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3227 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3228 to lll_timedlock, lll_robust_timedlock, lll_unlock and
3229 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
3230 of mutex->__data.__kind directly.
3231 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3232 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3233 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
3234 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3235 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3236 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3237 and lll_futex_wake.
3238 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3239 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3240 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3241 directly.
3242 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3243 Take mutex as argument instead of its __data.__lock field, pass
3244 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3245 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3246 __data.__lock field.
3247 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3248 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3249 to lll_robust_cond_lock.
3250 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3251 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3252 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
3253 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3254 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3255 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3256 lll_futex_wait.
3257 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3258 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3259 lll_futex_wake.
3260 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3261 pshared variable, pass it to lll_lock, lll_unlock,
3262 lll_futex_timedwait and lll_futex_wake.
3263 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3264 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3265 and lll_futex_wake.
3266 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3267 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3268 macro.
3269 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3270 lll_futex_wake_unlock): Likewise.
3271 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3272 Likewise.
3273 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3274 lll_futex_wake_unlock): Likewise.
3275 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3276 Likewise.
3277 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3278 lll_futex_wake_unlock): Likewise.
3279 (lll_futex_wake): Fix a typo.
3280 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3281 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3282 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3283 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3284 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3285 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3286 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3287 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3288 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3289 (__pthread_cond_timedwait): Likewise.
3290 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3291 (__condvar_cleanup, __pthread_cond_wait): Likewise.
3292
0470fa46
JJ
32932007-08-05 Jakub Jelinek <jakub@redhat.com>
3294
3295 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3296 Don't use CGOTSETUP and CGOTRESTORE macros.
3297 (CGOTSETUP, CGOTRESTORE): Remove.
3298 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3299 @local symbol.
3300
64f6281c
UD
33012007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3302
3303 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3304 definitions for private futexes.
3305 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3306 kernel-features.h and lowlevellock.h. Use private futexes if
3307 they are available.
3308 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3309 (__lll_mutex_lock_wait): Rename to
3310 (__lll_lock_wait): ... this. Don't compile in for libc.so.
3311 (__lll_mutex_timedlock_wait): Rename to ...
3312 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
3313 Don't compile in for libc.so.
3314 (__lll_mutex_unlock_wake): Rename to ...
3315 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
3316 (__lll_timedwait_tid): Use __NR_gettimeofday.
3317 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3318 the header from assembler. Renamed all lll_mutex_* resp.
3319 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3320 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3321 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3322 Define.
3323 (__lll_lock_wait_private): Add prototype.
3324 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3325 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3326 __lll_unlock_wake): Likewise.
3327 (lll_lock): Add private argument. Call __lll_lock_wait_private
3328 if private is constant LLL_PRIVATE.
3329 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3330 lll_timedlock, lll_robust_timedlock): Add private argument.
3331 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
3332 if private is constant LLL_PRIVATE.
3333 (lll_robust_unlock, lll_robust_dead): Add private argument.
3334 (lll_lock_t): Remove.
3335 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3336 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3337 lll_cond_wake, lll_cond_broadcast): Remove.
3338 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3339 kernel-features.h and lowlevellock.h.
3340 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3341 (LOAD_FUTEX_WAIT): Define.
3342 (__lll_robust_mutex_lock_wait): Rename to ...
3343 (__lll_robust_lock_wait): ... this. Add private argument.
3344 Use LOAD_FUTEX_WAIT macro.
3345 (__lll_robust_mutex_timedlock_wait): Rename to ...
3346 (__lll_robust_timedlock_wait): ... this. Add private argument.
3347 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
3348 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3349 lowlevellock.h.
3350 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3351 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3352 __lll_mutex_{lock,unlock}_*.
3353 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3354 lowlevellock.h and pthread-errnos.h.
3355 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3356 FUTEX_CMP_REQUEUE, EINVAL): Remove.
3357 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3358 __lll_mutex_{lock,unlock}_*.
3359 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3360 lowlevellock.h and pthread-errnos.h.
3361 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3362 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3363 __lll_mutex_{lock,unlock}_*.
3364 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3365 lowlevellock.h.
3366 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3367 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3368 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3369 (__condvar_tw_cleanup): Likewise.
3370 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3371 lowlevellock.h.
3372 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3373 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3374 __lll_mutex_{lock,unlock}_*.
3375 ( __condvar_w_cleanup): Likewise.
3376 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3377 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3378 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3379 lowlevellock.h.
3380 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3381 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3382 __lll_mutex_{lock,unlock}_*.
3383 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3384 lowlevellock.h.
3385 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3386 FUTEX_PRIVATE_FLAG): Remove.
3387 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3388 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3389 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3390 lowlevellock.h.
3391 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3392 FUTEX_PRIVATE_FLAG): Remove.
3393 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3394 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3395 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3396 lowlevellock.h.
3397 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3398 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3399 __lll_mutex_{lock,unlock}_*.
3400 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3401 lowlevellock.h.
3402 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3403 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3404 __lll_mutex_{lock,unlock}_*.
3405 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3406 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3407 (__new_sem_post): Use standard initial exec code sequences.
3408 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3409 lowlevellock.h.
3410 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3411 FUTEX_PRIVATE_FLAG): Remove.
3412 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
3413 exec code sequences.
3414 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3415 (__new_sem_trywait): Use standard initial exec code sequences.
3416 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3417 (__new_sem_wait): Use standard initial exec code sequences.
3418
e51deae7
UD
34192007-07-31 Anton Blanchard <anton@samba.org>
3420
3421 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3422 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3423 atomic_full_barrier.
3424
34252007-07-31 Jakub Jelinek <jakub@redhat.com>
3426
3427 * allocatestack.c (stack_cache_lock): Change type to int.
3428 (get_cached_stack, allocate_stack, __deallocate_stack,
3429 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3430 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3431 as second argument to lll_lock and lll_unlock macros on
3432 stack_cache_lock.
3433 * pthread_create.c (__find_in_stack_list): Likewise.
3434 (start_thread): Similarly with pd->lock. Use lll_robust_dead
3435 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3436 as second argument.
3437 * descr.h (struct pthread): Change lock and setxid_futex field
3438 type to int.
3439 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3440 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3441 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3442 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3443 Likewise.
3444 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3445 * pthread_cond_init.c (__pthread_cond_init): Likewise.
3446 * pthreadP.h (__attr_list_lock): Change type to int.
3447 * pthread_attr_init.c (__attr_list_lock): Likewise.
3448 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3449 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3450 lll_{,un}lock.
3451 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3452 also for lll_futex_{wake,wait}.
3453 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3454 a pointer to const.
3455 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3456 LLL_SHARED as second argument to lll_{,un}lock.
3457 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3458 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3459 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3460 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3461 Likewise.
3462 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3463 as second argument to lll_{,un}lock macros on pd->lock.
3464 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3465 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3466 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3467 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3468 Likewise.
3469 * sysdeps/pthread/createthread.c (do_clone, create_thread):
3470 Likewise.
3471 * pthread_once.c (once_lock): Change type to int.
3472 (__pthread_once): Pass LLL_PRIVATE as second argument to
3473 lll_{,un}lock macros on once_lock.
3474 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3475 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3476 rwlock->__data.__shared as second argument to them and similarly
3477 for lll_futex_w*.
3478 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3479 Likewise.
3480 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3481 Likewise.
3482 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3483 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3484 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3485 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3486 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3487 to lll_{,un}lock macros on __sem_mappings_lock.
3488 * sem_open.c (check_add_mapping): Likewise.
3489 (__sem_mappings_lock): Change type to int.
3490 * semaphoreP.h (__sem_mappings_lock): Likewise.
3491 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3492 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3493 instead of lll_*mutex_*, pass LLL_SHARED as last
3494 argument.
3495 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3496 pass LLL_SHARED as last argument.
3497 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3498 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3499 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3500 pass LLL_SHARED as last argument.
3501 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3502 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3503 LLL_SHARED as last argument.
3504 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3505 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3506 Similarly.
3507 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3508 __libc_lock_lock_recursive, __libc_lock_unlock,
3509 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3510 argument to lll_{,un}lock.
3511 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3512 _IO_lock_unlock): Likewise.
3513 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3514 compound literal.
3515 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3516 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3517 __fork_lock.
3518 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3519 free_mem): Likewise.
3520 (__fork_lock): Change type to int.
3521 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3522 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3523 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3524 lll_futex_wake.
3525 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3526 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3527 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3528 New function.
3529 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3530 pass it through to lll_futex_*wait, only compile in when
3531 IS_IN_libpthread.
3532 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3533 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3534 argument and pass it through to lll_futex_*wait.
3535 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3536 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3537 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3538 inline functions to __lll_* resp. __lll_robust_*.
3539 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3540 (lll_mutex_dead): Add private argument.
3541 (__lll_lock_wait_private): New prototype.
3542 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3543 __lll_robust_lock_timedwait): Add private argument to prototypes.
3544 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3545 call __lll_lock_wait_private, otherwise pass private to
3546 __lll_lock_wait.
3547 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3548 __lll_robust_timedlock): Add private argument, pass it to
3549 __lll_*wait functions.
3550 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3551 call __lll_unlock_wake_private, otherwise pass private to
3552 __lll_unlock_wake.
3553 (__lll_robust_unlock): Add private argument, pass it to
3554 __lll_robust_unlock_wake.
3555 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3556 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3557 argument, pass it through to __lll_* inline function.
3558 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3559 (lll_lock_t): Remove.
3560 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3561 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3562 lll_cond_wake, lll_cond_broadcast): Remove.
3563 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3564 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3565 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3566 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3567 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3568 the header from assembler. Renamed all lll_mutex_* resp.
3569 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3570 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3571 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3572 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3573 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3574 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3575 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3576 Remove prototype.
3577 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3578 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3579 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3580 (lll_trylock): Likewise, use __lll_trylock_asm, pass
3581 MULTIPLE_THREADS_OFFSET as another asm operand.
3582 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3583 MULTIPLE_THREADS_OFFSET as last asm operand, call
3584 __lll_lock_wait_private if private is constant LLL_PRIVATE,
3585 otherwise pass private as another argument to __lll_lock_wait.
3586 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3587 lll_timedlock, lll_robust_timedlock): Add private argument, pass
3588 private as another argument to __lll_*lock_wait call.
3589 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3590 MULTIPLE_THREADS_OFFSET as another asm operand, call
3591 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3592 otherwise pass private as another argument to __lll_unlock_wake.
3593 (lll_robust_unlock): Add private argument, pass private as another
3594 argument to __lll_unlock_wake.
3595 (lll_robust_dead): Add private argument, use __lll_private_flag
3596 macro.
3597 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3598 LLL_MUTEX_LOCK_INITIALIZER.
3599 (lll_lock_t): Remove.
3600 (LLL_LOCK_INITIALIZER_WAITERS): Define.
3601 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3602 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3603 lll_cond_wake, lll_cond_broadcast): Remove.
3604 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3605 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3606 2007-05-2{3,9} changes.
3607 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3608 kernel-features.h and lowlevellock.h.
3609 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3610 (LOAD_FUTEX_WAIT): Rewritten.
3611 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3612 define.
3613 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3614 (__lll_mutex_lock_wait): Rename to ...
3615 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
3616 %ecx, %ecx is now private argument. Don't compile in for libc.so.
3617 (__lll_mutex_timedlock_wait): Rename to ...
3618 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
3619 contains private argument. Don't compile in for libc.so.
3620 (__lll_mutex_unlock_wake): Rename to ...
3621 (__lll_unlock_wake): ... this. %ecx contains private argument.
3622 Don't compile in for libc.so.
3623 (__lll_timedwait_tid): Use __NR_gettimeofday.
3624 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3625 kernel-features.h and lowlevellock.h.
3626 (LOAD_FUTEX_WAIT): Define.
3627 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3628 define.
3629 (__lll_robust_mutex_lock_wait): Rename to ...
3630 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
3631 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
3632 macro.
3633 (__lll_robust_mutex_timedlock_wait): Rename to ...
3634 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
3635 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3636 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3637 lowlevellock.h.
3638 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3639 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3640 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3641 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3642 to __lll_lock_wait in %edx.
3643 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3644 Include lowlevellock.h and pthread-errnos.h.
3645 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3646 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3647 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3648 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3649 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3650 __lll_unlock_wake.
3651 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3652 Include lowlevellock.h and pthread-errnos.h.
3653 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3654 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3655 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3656 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3657 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3658 __lll_unlock_wake.
3659 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3660 Include lowlevellock.h.
3661 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3662 Don't define.
3663 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3664 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3665 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3666 __lll_unlock_wake. Use __NR_gettimeofday.
3667 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3668 Include lowlevellock.h.
3669 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3670 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3671 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3672 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3673 and __lll_unlock_wake.
3674 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3675 Include lowlevellock.h.
3676 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3677 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3678 MUTEX(%ebx) address in %edx rather than %ecx to
3679 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3680 and __lll_unlock_wake. Move return value from %ecx to %edx
3681 register.
3682 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3683 Include lowlevellock.h.
3684 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3685 Don't define.
3686 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3687 MUTEX(%ebp) address in %edx rather than %ecx to
3688 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3689 and __lll_unlock_wake. Move return value from %ecx to %edx
3690 register. Use __NR_gettimeofday.
3691 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3692 Include lowlevellock.h.
3693 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3694 Don't define.
3695 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3696 MUTEX(%ebp) address in %edx rather than %ecx to
3697 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3698 and __lll_unlock_wake. Move return value from %ecx to %edx
3699 register. Use __NR_gettimeofday.
3700 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3701 Include lowlevellock.h.
3702 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3703 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3704 MUTEX(%edi) address in %edx rather than %ecx to
3705 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3706 and __lll_unlock_wake.
3707 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3708 Include lowlevellock.h.
3709 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3710 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3711 MUTEX(%ebx) address in %edx rather than %ecx to
3712 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3713 and __lll_unlock_wake. Move return value from %ecx to %edx
3714 register.
3715 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3716 lowlevellock.h.
3717 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3718 define.
3719 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3720 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3721 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3722 lowlevellock.h.
3723 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3724 (sem_timedwait): Use __NR_gettimeofday.
3725 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3726 lowlevellock.h.
3727 (LOCK): Don't define.
3728 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3729 lowlevellock.h.
3730 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3731 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3732 are waiters.
3733 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3734 2007-05-2{3,9} changes.
3735 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3736 kernel-features.h and lowlevellock.h.
3737 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3738 (LOAD_FUTEX_WAIT): Rewritten.
3739 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3740 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3741 (__lll_mutex_lock_wait): Rename to ...
3742 (__lll_lock_wait): ... this. %esi is now private argument.
3743 Don't compile in for libc.so.
3744 (__lll_mutex_timedlock_wait): Rename to ...
3745 (__lll_timedlock_wait): ... this. %esi contains private argument.
3746 Don't compile in for libc.so.
3747 (__lll_mutex_unlock_wake): Rename to ...
3748 (__lll_unlock_wake): ... this. %esi contains private argument.
3749 Don't compile in for libc.so.
3750 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3751 kernel-features.h and lowlevellock.h.
3752 (LOAD_FUTEX_WAIT): Define.
3753 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3754 (__lll_robust_mutex_lock_wait): Rename to ...
3755 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3756 Use LOAD_FUTEX_WAIT macro.
3757 (__lll_robust_mutex_timedlock_wait): Rename to ...
3758 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3759 private, use LOAD_FUTEX_WAIT macro.
3760 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3761 lowlevellock.h.
3762 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3763 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3764 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3765 __lll_lock_wait and __lll_unlock_wake.
3766 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3767 Include lowlevellock.h and pthread-errnos.h.
3768 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3769 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3770 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3771 pass LLL_SHARED in %esi to both __lll_lock_wait and
3772 __lll_unlock_wake.
3773 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3774 Include lowlevellock.h and pthread-errnos.h.
3775 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3776 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3777 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3778 pass LLL_SHARED in %esi to both __lll_lock_wait and
3779 __lll_unlock_wake.
3780 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3781 Include lowlevellock.h.
3782 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3783 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3784 pass LLL_SHARED in %esi to both __lll_lock_wait and
3785 __lll_unlock_wake.
3786 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3787 Include lowlevellock.h.
3788 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3789 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3790 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3791 and __lll_unlock_wake.
3792 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3793 Include lowlevellock.h.
3794 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3795 Don't define.
3796 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3797 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3798 and __lll_unlock_wake.
3799 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3800 Include lowlevellock.h.
3801 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3802 Don't define.
3803 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3804 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3805 and __lll_unlock_wake.
3806 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3807 Include lowlevellock.h.
3808 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3809 Don't define.
3810 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3811 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3812 and __lll_unlock_wake.
3813 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3814 Include lowlevellock.h.
3815 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3816 Don't define.
3817 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3818 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3819 and __lll_unlock_wake.
3820 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3821 Include lowlevellock.h.
3822 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3823 Don't define.
3824 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3825 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3826 and __lll_unlock_wake.
3827 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3828 lowlevellock.h.
3829 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3830 define.
3831 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3832 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3833 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3834 lowlevellock.h.
3835 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3836 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3837 lowlevellock.h.
3838 (LOCK): Don't define.
3839 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3840 lowlevellock.h.
3841 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3842 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3843 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3844 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3845 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3846 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3847 (__lll_lock_wait_private): New function.
3848 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3849 it to lll_futex_*wait. Don't compile in for libc.so.
3850 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3851 Remove.
3852 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3853 (struct sparc_pthread_barrier): Remove.
3854 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3855 struct sparc_pthread_barrier. Pass
3856 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3857 and lll_futex_wait macros.
3858 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3859 Remove.
3860 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3861 Include sparc pthread_barrier_wait.c instead of generic one.
3862
6f59d56e
UD
38632007-07-30 Jakub Jelinek <jakub@redhat.com>
3864
1475e201
UD
3865 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3866
6f59d56e
UD
3867 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3868 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3869 %ecx.
3870 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3871 (pthread_rwlock_timedwrlock): Likewise.
3872 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3873 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3874
558f0300
JJ
38752007-07-31 Jakub Jelinek <jakub@redhat.com>
3876
3877 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3878
cedb4109
UD
38792007-07-26 Jakub Jelinek <jakub@redhat.com>
3880
3881 * tst-locale2.c (useless): Add return statement.
3882
085a4412
UD
38832007-07-24 Jakub Jelinek <jakub@redhat.com>
3884
3885 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3886 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3887 * pthread_create.c (start_thread): Likewise.
3888 * init.c (sighandler_setxid): Likewise.
3889 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3890 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3891 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3892 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3893 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3894 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3895 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3896 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3897 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3898 Likewise.
3899 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3900 Likewise.
3901 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3902 Likewise.
3903 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3904 __rtld_notify): Likewise.
3905 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3906 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3907 __pthread_once): Likewise.
3908 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3909 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3910 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3911 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3912 (lll_futex_wait): Add private argument, define as wrapper around
3913 lll_futex_timed_wait.
3914 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3915 use __lll_private_flag macro.
3916 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3917 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3918 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3919 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3920 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3921 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3922 (lll_futex_wait): Add private argument, define as wrapper around
3923 lll_futex_timed_wait.
3924 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3925 use __lll_private_flag macro.
3926 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3927 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3928 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3929 Define.
3930 (lll_futex_timed_wait, lll_futex_wake): Use it.
3931 (lll_private_futex_wait, lll_private_futex_timed_wait,
3932 lll_private_futex_wake): Removed.
3933 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3934 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3935 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3936 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3937 (lll_futex_wait): Add private argument, define as wrapper around
3938 lll_futex_timed_wait.
3939 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3940 use __lll_private_flag macro.
3941 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3942 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3943 to lll_futex_*.
3944 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3945 (lll_private_futex_wait, lll_private_futex_timed_wait,
3946 lll_private_futex_wake): Removed.
3947 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3948 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3949 (lll_private_futex_wait, lll_private_futex_timed_wait,
3950 lll_private_futex_wake): Removed.
3951 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3952 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3953 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3954 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3955 (lll_futex_wait): Add private argument, define as wrapper around
3956 lll_futex_timed_wait.
3957 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3958 use __lll_private_flag macro.
3959 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3960 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3961 to lll_futex_*.
3962 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3963 Define.
3964 (lll_futex_timed_wait, lll_futex_wake): Use it.
3965 (lll_private_futex_wait, lll_private_futex_timed_wait,
3966 lll_private_futex_wake): Removed.
3967
ef0af159
JJ
39682007-07-27 Jakub Jelinek <jakub@redhat.com>
3969
3970 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3971 of the structure for sparc32.
3972
39732007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3974
3975 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3976
eb4f5909
UD
39772007-07-23 Ulrich Drepper <drepper@redhat.com>
3978
3979 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3980 code used when private futexes are assumed.
3981 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3982 Likewise.
3983
b5f13526
UD
39842007-07-23 Jakub Jelinek <jakub@redhat.com>
3985
3986 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3987 (__lll_private_flag): Define.
3988 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3989 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3990 __lll_private_flag.
3991 (lll_private_futex_wait, lll_private_futex_timedwait,
3992 lll_private_futex_wake): Define as wrapper around non-_private
3993 macros.
3994 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3995 (__lll_private_flag): Define.
3996 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3997 (lll_private_futex_wait, lll_private_futex_timedwait,
3998 lll_private_futex_wake): Define as wrapper around non-_private
3999 macros.
4000
eb7721f2
UD
40012007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
4002
4003 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
4004 parameter to lll_futex_wait call.
4005 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
4006
4007 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4008 Replace lll_futex_wait with lll_private_futex_wait.
4009 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4010 Add LLL_SHARED parameter to lll_futex_wake().
4011
4012 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
4013 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
4014 lll_private_futex_wake.
4015 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
4016 bit from private parm before syscall.
4017 (lll_futex_timed_wait): Likewise.
4018 (lll_futex_wake): Likewise.
4019 (lll_futex_wake_unlock): Likewise.
4020 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
4021 (lll_robust_mutex_unlock): Likewise.
4022 (lll_mutex_unlock_force): Likewise.
4023 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
4024
defc45f2
UD
40252007-07-23 Ulrich Drepper <drepper@redhat.com>
4026
4027 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
4028 compilation when unconditionally using private futexes.
4029 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4030 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4031 Likewise.
4032 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4033 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4034
087722b8
UD
40352007-07-17 Jakub Jelinek <jakub@redhat.com>
4036
4037 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
4038 Define.
4039
765c6b0c
UD
40402007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4041
4042 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
4043 kernel-features.h.
4044
7d9d8bd1
RM
40452007-05-16 Roland McGrath <roland@redhat.com>
4046
4047 * init.c (__nptl_initial_report_events): New variable.
4048 (__pthread_initialize_minimal_internal): Initialize pd->report_events
4049 to that.
4050
a4915df2
UD
40512007-06-22 Jakub Jelinek <jakub@redhat.com>
4052
4053 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
4054 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
4055
e4eb675d
UD
40562007-06-19 Ulrich Drepper <drepper@redhat.com>
4057
4058 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
4059 implementation.
4060
ae1ad3ae
UD
40612007-06-18 Ulrich Drepper <drepper@redhat.com>
4062
4063 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
4064 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
4065 * pthread_mutex_timedlock.c: Likewise.
4066 * pthread_mutex_trylock.c: Likewise.
4067 * pthread_mutex_unlock.c: Likewise.
4068
89074592
UD
40692007-06-17 Andreas Schwab <schwab@suse.de>
4070
4071 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
4072 sections.
4073
d4201cc4
UD
40742007-06-17 Ulrich Drepper <drepper@redhat.com>
4075
4076 * allocatestack.c (allocate_stack): Make code compile if
4077 __ASSUME_PRIVATE_FUTEX is set.
4078
339dbf0e
UD
40792007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4080
4081 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
4082 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
4083 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
4084 (__pthread_rwlock_wrlock): Likewise.
4085 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4086 (pthread_rwlock_timedrdlock): Likewise.
4087 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4088 (pthread_rwlock_timedwrlock): Likewise.
4089 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
4090 (__pthread_rwlock_unlock): Likewise.
4091
40922007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4093
4094 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
4095 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
4096 Split __flags into __flags, __shared, __pad1 and __pad2.
4097 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
b42a214c 4098 futexes if they are available.
339dbf0e 4099 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
b42a214c 4100 in libc-lowlevellock.S allow using private futexes.
339dbf0e
UD
4101 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
4102 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
4103 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
4104 to call lll_futex_timed_wait. Add lll_private_futex_wait,
4105 lll_private_futex_timed_wait and lll_private_futex_wake.
4106 (lll_robust_mutex_unlock): Fix typo.
4107 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
b42a214c 4108 field in futex command setup.
339dbf0e
UD
4109 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
4110 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
4111 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4112 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
b42a214c 4113 if they are available. Remove clear_once_control.
339dbf0e
UD
4114 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
4115 futexes if they are available.
4116 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4117 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4118 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4119 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4120 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
4121 Wake only when there are waiters.
4122 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
4123 support. Indicate that there are waiters. Remove unnecessary
b42a214c 4124 extra cancellation test.
339dbf0e
UD
4125 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
4126 left-over duplication of __sem_wait_cleanup.
4127
26f56c1c
UD
41282007-06-07 Ulrich Drepper <drepper@redhat.com>
4129
4130 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
4131 parameter to lll_futex_wait, lll_futex_timed_wait, and
4132 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
4133 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
4134 lll_private_futex_wake.
4135 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4136 * allocatestack.c: Adjust use of lll_futex_* macros.
4137 * init.c: Likewise.
4138 * lowlevellock.h: Likewise.
4139 * pthread_barrier_wait.c: Likewise.
4140 * pthread_cond_broadcast.c: Likewise.
4141 * pthread_cond_destroy.c: Likewise.
4142 * pthread_cond_signal.c: Likewise.
4143 * pthread_cond_timedwait.c: Likewise.
4144 * pthread_cond_wait.c: Likewise.
4145 * pthread_create.c: Likewise.
4146 * pthread_mutex_lock.c: Likewise.
4147 * pthread_mutex_setprioceiling.c: Likewise.
4148 * pthread_mutex_timedlock.c: Likewise.
4149 * pthread_mutex_unlock.c: Likewise.
4150 * pthread_rwlock_timedrdlock.c: Likewise.
4151 * pthread_rwlock_timedwrlock.c: Likewise.
4152 * pthread_rwlock_unlock.c: Likewise.
4153 * sysdeps/alpha/tls.h: Likewise.
4154 * sysdeps/i386/tls.h: Likewise.
4155 * sysdeps/ia64/tls.h: Likewise.
4156 * sysdeps/powerpc/tls.h: Likewise.
4157 * sysdeps/pthread/aio_misc.h: Likewise.
4158 * sysdeps/pthread/gai_misc.h: Likewise.
4159 * sysdeps/s390/tls.h: Likewise.
4160 * sysdeps/sh/tls.h: Likewise.
4161 * sysdeps/sparc/tls.h: Likewise.
4162 * sysdeps/unix/sysv/linux/fork.c: Likewise.
4163 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4164 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
4165 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
4166 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4167 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4168 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4169 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4170 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
4171 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
4172 Likewise.
4173 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
4174 * sysdeps/x86_64/tls.h: Likewise.
4175
ee5d5755
UD
41762007-05-29 Ulrich Drepper <drepper@redhat.com>
4177
b03b0c29
UD
4178 * pthread_getattr_np.c: No need to install a cancellation handler,
4179 this is no cancellation point.
4180 * pthread_getschedparam.c: Likewise.
4181 * pthread_setschedparam.c: Likewise.
4182 * pthread_setschedprio.c: Likewise.
4183 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
4184 lll_unlock_wake_cb.
4185 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4186 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4187 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4188 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4189 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4190 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4191 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4192 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4193 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4194 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
4195 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4196 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 4197
0154658d
UD
4198 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4199 whether there are more than one thread makes no sense here since
4200 we only call the slow path if the locks are taken.
4201 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4202
ee5d5755
UD
4203 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4204 COND_NWAITERS_SHIFT.
4205 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4206 COND_CLOCK_BITS.
4207 * pthread_cond_init.c: Likewise.
4208 * pthread_cond_timedwait.c: Likewise.
4209 * pthread_cond_wait.c: Likewise.
4210 * pthread_condattr_getclock.c: Likewise.
4211 * pthread_condattr_setclock.c: Likewise.
4212 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4213 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4214 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4215 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4216 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4217
991fa82b
UD
42182007-05-28 Jakub Jelinek <jakub@redhat.com>
4219
40f57573
UD
4220 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4221 unistd.h.
4222
991fa82b
UD
4223 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4224 insn suffix.
4225 (THREAD_GSCOPE_GET_FLAG): Remove.
4226 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4227 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4228 changes.
4229 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4230 (THREAD_GSCOPE_GET_FLAG): Remove.
4231 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4232 instead of THREAD_GSCOPE_GET_FLAG.
4233 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
4234 it.
4235 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4236 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4237 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4238 THREAD_GSCOPE_WAIT): Define.
4239 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4240 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4241 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4242 THREAD_GSCOPE_WAIT): Define.
4243 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4244 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4245 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4246 THREAD_GSCOPE_WAIT): Define.
4247 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4248 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4249 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4250 THREAD_GSCOPE_WAIT): Define.
4251
42522007-05-24 Richard Henderson <rth@redhat.com>
4253
4254 * descr.h (struct pthread): Add header.gscope_flag.
4255 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4256 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4257 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4258 THREAD_GSCOPE_WAIT): Define.
4259
e59660bc
UD
42602007-05-27 Ulrich Drepper <drepper@redhat.com>
4261
4262 * init.c: Make it compile with older kernel headers.
4263
4264 * tst-initializers1.c: Show through exit code which test failed.
4265
4266 * pthread_rwlock_init.c: Also initialize __shared field.
4267 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4268 element in rwlock structure into four byte elements. One of them is
4269 the new __shared element.
4270 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4271 Likewise.
cd0dbd89 4272 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
4273 __shared, adjust names of other padding elements.
4274 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4275 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4276 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4277 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4278 FUTEX_PRIVATE_FLAG.
4279 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4280 futex to use private operations if possible.
4281 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4282 Likewise.
4283 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4284 Likewise.
4285 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4286 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
4287 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4288 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4289 Likewise.
4290 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4291 Likewise.
4292 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4293 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 4294
d8ff3792
UD
42952007-05-26 Ulrich Drepper <drepper@redhat.com>
4296
546346b6
UD
4297 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4298 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4299 * pthread_rwlock_timedrdlock.c: Likewise.
4300 * pthread_rwlock_tryrdlock.c: Likewise.
4301
a2dd3360
UD
4302 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4303 optimization.
4304
6df7ffad
UD
4305 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4306 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4307 duplication of __sem_wait_cleanup.
4308
4309 * allocatestack.c: Revert last change.
4310 * init.c: Likewise.
4311 * sysdeps/i386/tls.h: Likewise.
4312 * sysdeps/x86_64/tls.h: Likewise.
4313 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4314 header structure.
4315 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4316
d8ff3792
UD
4317 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4318 Add private field.
4319 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4320 * pthread_barrier_init.c: Set private flag if pshared and private
4321 futexes are supported.
4322 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4323 private field in futex command setup.
4324 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4325
3d2dd6ca
UD
43262007-05-25 Ulrich Drepper <drepper@redhat.com>
4327
42e6c665
UD
4328 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4329 support.
4330 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4331 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4332 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4333 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4334 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4335
3d2dd6ca
UD
4336 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4337 * sem_init.c (__new_sem_init): Rewrite to initialize all three
4338 fields in the structure.
4339 (__old_sem_init): New function.
4340 * sem_open.c: Initialize all fields of the structure.
4341 * sem_getvalue.c: Adjust for renamed element.
4342 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4343 (gen-as-const-headers): Add structsem.sym.
4344 * sysdeps/unix/sysv/linux/structsem.sym: New file.
4345 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4346 struct new_sem. Add struct old_sem.
4347 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4348 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4349 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4350 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4351 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4352 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4353 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4354 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4355 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4356 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4357 * tst-sem10.c: New file.
4358 * tst-sem11.c: New file.
4359 * tst-sem12.c: New file.
4360 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4361 of struct sem.
4362
20a4d722
JJ
43632007-05-25 Ulrich Drepper <drepper@redhat.com>
4364 Jakub Jelinek <jakub@redhat.com>
4365
4366 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4367 Move __pthread_enable_asynccancel right before futex syscall.
4368 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4369 Likewise.
4370
43712007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
4372
4373 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4374 THREAD_COPY_PRIVATE_FUTEX): Define.
4375 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4376 THREAD_COPY_PRIVATE_FUTEX): Define.
4377 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4378 * init.c (__pthread_initialize_minimal_internal): Use
4379 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
4380
4381 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4382 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4383 THREAD_GSCOPE_FLAG_WAIT): Define.
4384 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4385 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4386 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4387 PTR_DEMANGLE.
4388 (THREAD_GSCOPE_GET_FLAG): Define.
4389 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4390 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4391 instead of ->header.gscope_flag directly.
4392
5a8075b1
UD
43932007-05-23 Ulrich Drepper <drepper@redhat.com>
4394
4395 * init.c (__pthread_initialize_minimal_internal): Check whether
4396 private futexes are available.
4397 * allocatestack.c (allocate_stack): Copy private_futex field from
4398 current thread into the new stack.
4399 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4400 futexes if they are available.
4401 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4402 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4403 in libc-lowlevellock.S allow using private futexes.
4404 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4405 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4406 FUTEX_PRIVATE_FLAG.
4407 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4408 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4409 if they are available.
4410 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4411 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4412 * sysdeps/i386/tcb-offsets.sym: Likewise.
4413 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4414 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4415
6d59823c
UD
44162007-05-21 Ulrich Drepper <drepper@redhat.com>
4417
4418 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4419 Remove ptr_wait_lookup_done again.
4420 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4421 (__pthread_initialize_minimal_internal): Initialize
4422 _dl_wait_lookup_done pointer in _rtld_global directly.
4423 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4424 Remove code to code _dl_wait_lookup_done.
4425 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4426 encrypted for now.
4427
2c9718f3
JJ
44282007-05-21 Jakub Jelinek <jakub@redhat.com>
4429
4430 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4431 pthread_mutex_init failed with ENOTSUP.
4432
df94b641
UD
44332007-05-19 Ulrich Drepper <drepper@redhat.com>
4434
4435 * allocatestack.c (__wait_lookup_done): New function.
4436 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4437 Add ptr_wait_lookup_done.
4438 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4439 * pthreadP.h: Declare __wait_lookup_done.
4440 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4441 Define macros to implement reference handling of global scope.
4442 * sysdeps/x86_64/tls.h: Likewise.
4443 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4444 Initialize GL(dl_wait_lookup_done).
4445
bec51a30
UD
44462007-05-17 Ulrich Drepper <drepper@redhat.com>
4447
113ad5fc
UD
4448 [BZ #4512]
4449 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4450 is detected.
4451 * pthread_mutex_timedlock.c: Likewise.
4452 * pthread_mutex_trylock.c: Likewise.
4453 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4454
4455 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4456 * tst-robust9.c: New file.
4457 * tst-robustpi9.c: New file.
4458
bec51a30
UD
4459 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4460 unnecessary extra cancellation test.
4461
83d87915
UD
44622007-05-14 Ulrich Drepper <drepper@redhat.com>
4463
83d87915
UD
4464 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4465 extra cancellation test.
4466 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4467
3771196d
UD
44682007-05-10 Ulrich Drepper <drepper@redhat.com>
4469
341c566f
UD
4470 * descr.h (struct pthread): Rearrange members to fill hole in
4471 64-bit layout.
4472
3771196d
UD
4473 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4474 (__pthread_setaffinity_new): If syscall was successful and
4475 RESET_VGETCPU_CACHE is defined, use it before returning.
4476 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4477
7d29b542
JJ
44782007-05-10 Jakub Jelinek <jakub@redhat.com>
4479
4480 [BZ #4455]
4481 * tst-align2.c: Include stackinfo.h.
4482 * tst-getpid1.c: Likewise.
4483
16105fe0
UD
44842007-05-02 Carlos O'Donell <carlos@systemhalted.org>
4485
29c113f0
UD
4486 [BZ #4455]
4487 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4488 * tst-getpid1.c (do_test): Likewise.
4489
16105fe0
UD
4490 [BZ #4456]
4491 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4492 (allocate_stack): Likewise.
4493
6780bc44
UD
44942007-05-07 Ulrich Drepper <drepper@redhat.com>
4495
4496 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4497 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4498 (__lll_robust_timedlock_wait): Likewise.
4499 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4500
aa75f64c
UD
45012007-05-06 Mike Frysinger <vapier@gentoo.org>
4502
15eca720 4503 [BZ #4465]
aa75f64c
UD
4504 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4505 * tst-cancel4.c (tf_fdatasync): New test.
4506
f672076e
UD
45072007-04-27 Ulrich Drepper <drepper@redhat.com>
4508
1bb5f5a1
UD
4509 [BZ #4392]
4510 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4511 check mutexes like normal mutexes.
4512
f672076e
UD
4513 [BZ #4306]
4514 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4515 Initialize the whole sigevent structure to appease valgrind.
4516
bce20b9a
UD
45172007-04-25 Ulrich Drepper <drepper@redhat.com>
4518
4519 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4520 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4521
0c786eac
UD
45222007-04-06 Ulrich Drepper <drepper@redhat.com>
4523
4524 * tst-locale1.c: Avoid warnings.
4525 * tst-locale2.c: Likewise.
4526
e1f0c5bc
UD
45272007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
4528
4529 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4530 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4531
965cba04
UD
45322007-03-16 Jakub Jelinek <jakub@redhat.com>
4533
4534 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4535 __extern_always_inline where appropriate.
4536 * sysdeps/pthread/pthread.h: Likewise.
4537
a5ea509b
RH
45382007-03-13 Richard Henderson <rth@redhat.com>
4539
4540 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4541 separate cfi regions for the two subsections.
4542
00a1430e
UD
45432007-02-25 Ulrich Drepper <drepper@redhat.com>
4544
4545 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4546 new thread, don't just decrement it.
4547 Patch by Suzuki K P <suzuki@in.ibm.com>.
4548
63a2f305
UD
45492007-02-21 Ulrich Drepper <drepper@redhat.com>
4550
4551 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4552 PTHFCT_CALL definition.
4553
2484468b
UD
45542007-02-18 Ulrich Drepper <drepper@redhat.com>
4555
4556 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4557 available, don't use it.
4558
5ed61e0f
UD
45592007-02-09 Jakub Jelinek <jakub@redhat.com>
4560
4561 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4562 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4563 call into the kernel to delay.
4564
10ccaa5c
UD
45652007-01-18 Ulrich Drepper <drepper@redhat.com>
4566
f8a17855
UD
4567 * tst-initializers1.c: We want to test the initializers as seen
4568 outside of libc, so undefined _LIBC.
4569
10ccaa5c
UD
4570 * pthread_join.c (cleanup): Avoid warning.
4571
ea1533e0
UD
45722007-01-17 Ulrich Drepper <drepper@redhat.com>
4573
1476bce6
UD
4574 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4575 (__lll_timedwait_tid): Add unwind info.
4576
ea1533e0
UD
4577 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4578 function table, mangle the pointers.
4579 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4580 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4581 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4582 demangle pointers before use.
4583 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4584 demangle pointer.
4585 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4586 * sysdeps/pthread/setxid.h: Likewise.
4587
8980796b
UD
45882007-01-12 Ulrich Drepper <drepper@redhat.com>
4589
4590 * tst-rwlock7.c: Show some more information in case of correct
4591 behavior.
4592
a1d87b5d
UD
45932007-01-11 Ulrich Drepper <drepper@redhat.com>
4594
4595 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4596 (lll_futex_timed_wait): Undo part of last change, don't negate
4597 return value.
4598
11bf311e 45992007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 4600
11bf311e
UD
4601 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
4602 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 4603
11bf311e 46042006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 4605
11bf311e 4606 * shlib-versions: Fix sparc64 linux target specification.
a744da90 4607
11bf311e 46082007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 4609
11bf311e
UD
4610 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4611 Adjust include path for pthread_barrier_wait.c move.
fc242bef 4612
11bf311e 46132006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 4614
11bf311e
UD
4615 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4616 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 4617
11bf311e
UD
46182006-12-06 Jakub Jelinek <jakub@redhat.com>
4619
4620 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4621 6 argument cancellable syscalls.
4622 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4623 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4624 6 argument cancellable syscalls.
4625 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 4626
66f17705
UD
46272006-12-09 Ulrich Drepper <drepper@redhat.com>
4628
4629 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4630 (__rtld_mrlock_initialize): Add missing closing parenthesis.
4631
11bf311e
UD
46322006-10-30 Jakub Jelinek <jakub@redhat.com>
4633
4634 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4635 __sync_lock_release instead of __sync_lock_release_si.
4636
536e40e2
UD
46372006-10-29 Jakub Jelinek <jakub@redhat.com>
4638
4639 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4640 Define.
4641 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4642 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4643 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4644 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4645 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4646 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4647 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4648 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4649 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4650 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4651 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4652
11bf311e
UD
46532006-10-27 Ulrich Drepper <drepper@redhat.com>
4654
4655 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4656 * pthread_barrier_wait.c: ...here.
4657 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4658 * pthread_cond_broadcast.c: ...here.
4659 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4660 * pthread_cond_signal.c: ...here.
4661 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4662 * pthread_cond_timedwait.c: ...here.
4663 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4664 * pthread_cond_wait.c: ...here.
4665 * sysdeps/pthread/pthread_once.c: Move to...
4666 * pthread_once.c: ...here.
4667 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4668 * pthread_rwlock_rdlock.c: ...here.
4669 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4670 * pthread_rwlock_timedrdlock.c: ...here.
4671 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4672 * pthread_rwlock_timedwrlock.c: ...here.
4673 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4674 * pthread_rwlock_unlock.c: ...here.
4675 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4676 * pthread_rwlock_wrlock.c: ...here.
4677 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4678 * pthread_spin_destroy.c: ...here.
4679 * sysdeps/pthread/pthread_spin_init.c: Move to...
4680 * pthread_spin_init.c: ...here.
4681 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4682 * pthread_spin_unlock.c: ...here.
4683 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4684 * pthread_getcpuclockid.c: ...here.
4685
4686 * init.c: USE_TLS support is now always enabled.
4687 * tst-tls5.h: Likewise.
4688 * sysdeps/alpha/tls.h: Likewise.
4689 * sysdeps/i386/tls.h: Likewise.
4690 * sysdeps/ia64/tls.h: Likewise.
4691 * sysdeps/powerpc/tls.h: Likewise.
4692 * sysdeps/s390/tls.h: Likewise.
4693 * sysdeps/sh/tls.h: Likewise.
4694 * sysdeps/sparc/tls.h: Likewise.
4695 * sysdeps/x86_64/tls.h: Likewise.
4696
006a8f6f 46972006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
4698
4699 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4700 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4701 failed.
4702
4703 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4704 Define to THREAD_SELF->header.multiple_threads.
4705 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4706 Likewise.
4707 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4708 Likewise.
4709 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4710 (SINGLE_THREAD_P): Likewise.
4711 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4712 (SINGLE_THREAD_P): Likewise.
4713 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4714 (SINGLE_THREAD_P): Likewise.
4715 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4716 (SINGLE_THREAD_P): Likewise.
4717 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4718 Likewise.
4719 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4720 (SINGLE_THREAD_P): Likewise.
4721 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4722 (SINGLE_THREAD_P): Likewise.
4723 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4724 Likewise.
4725
11bf311e 47262006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 4727
11bf311e
UD
4728 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4729 by default rather than 2_3_3.
32c075e1 4730
11bf311e 47312006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 4732
11bf311e
UD
4733 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4734 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4735 atomic_* instead of catomic_* macros.
4736
47372006-10-12 Ulrich Drepper <drepper@redhat.com>
4738
4739 [BZ #3285]
4740 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4741 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4742 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4743 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4744 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4745 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4746 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4747 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4748 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4749 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4750 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4751 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4752 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4753
47542006-10-11 Ulrich Drepper <drepper@redhat.com>
4755
4756 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4757 cancelable syscalls with six parameters.
4758
4759 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4760 operations instead of atomic_*.
32c075e1 4761
11bf311e 47622006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 4763
11bf311e 4764 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 4765
11bf311e 47662006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 4767
11bf311e
UD
4768 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4769 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4770 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4771 New file.
4772 * pthread_attr_setstack.c: Allow overwriting the version number of the
4773 new symbol.
4774 * pthread_attr_setstacksize.c: Likewise.
4775 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4776 it.
4777 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4778 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 4779
457b559e
UD
47802006-09-24 Ulrich Drepper <drepper@redhat.com>
4781
4782 [BZ #3251]
4783 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4784 Patch by Petr Baudis.
4785
0466106e
UD
47862006-09-18 Jakub Jelinek <jakub@redhat.com>
4787
4788 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4789
4790 * tst-cancel2.c (tf): Loop as long as something was written.
4791
bd6d3b7d
UD
47922006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4793
4794 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4795 mutexes wake all mutexes.
4796 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4797 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4798 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4799
30aa5785
UD
48002006-09-12 Ulrich Drepper <drepper@redhat.com>
4801
4802 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4803 to guarantee the thread is always canceled.
4804
2b6a801e
UD
48052006-09-08 Jakub Jelinek <jakub@redhat.com>
4806
4807 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4808 Include stdlib.h.
4809 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4810 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4811 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4812 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4813 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 4814
346e6ad4
UD
48152006-09-08 Ulrich Drepper <drepper@redhat.com>
4816
4817 [BZ #3123]
4818 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4819 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
4820 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4821 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4822 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
4823 * Makefile (tests): Add tst-cond22.
4824 * tst-cond22.c: New file.
4825
b051fc44
UD
48262006-09-05 Ulrich Drepper <drepper@redhat.com>
4827
4828 [BZ #3124]
4829 * descr.h (struct pthread): Add parent_cancelhandling.
4830 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4831 cancelhandling value to child.
4832 * pthread_create.c (start_thread): If parent thread was canceled
4833 reset the SIGCANCEL mask.
4834 * Makefile (tests): Add tst-cancel25.
4835 * tst-cancel25.c: New file.
4836
d052233c 48372006-09-05 Jakub Jelinek <jakub@redhat.com>
b42a214c 4838 Ulrich Drepper <drepper@redhat.com>
d052233c
UD
4839
4840 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4841 counterp if it is already zero.
4842 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4843
cd248c3f 48442006-03-04 Jakub Jelinek <jakub@redhat.com>
b42a214c 4845 Roland McGrath <roland@redhat.com>
cd248c3f
UD
4846
4847 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4848 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4849 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4850 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4851 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4852 lll_robust_mutex_timedlock, lll_mutex_unlock,
4853 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4854 Add _L_*_ symbols around the subsection.
4855 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4856 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4857
48582006-03-03 Jakub Jelinek <jakub@redhat.com>
b42a214c 4859 Roland McGrath <roland@redhat.com>
cd248c3f
UD
4860
4861 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4862 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4863 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4864 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4865 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4866 lll_robust_mutex_timedlock, lll_mutex_unlock,
4867 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4868 Add _L_*_ symbols around the subsection.
4869 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4870 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4871
b80770b2
UD
48722006-08-31 Ulrich Drepper <drepper@redhat.com>
4873
4874 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4875 change because it can disturb too much existing code. If real hard
4876 reader preference is needed we'll introduce another type.
4877 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4878 (pthread_rwlock_timedwrlock): Likewise.
4879 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4880 Likewise.
4881
bee2df0b
UD
48822006-08-30 Ulrich Drepper <drepper@redhat.com>
4883
4884 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4885 reader preference.
4886 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4887 (pthread_rwlock_timedwrlock): Likewise.
4888 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4889 Likewise.
4890
d678ebc1
UD
48912006-08-25 Jakub Jelinek <jakub@redhat.com>
4892
4893 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4894 Only define ifdef SHARED.
4895
ba408f84
UD
48962006-08-23 Ulrich Drepper <drepper@redhat.com>
4897
4898 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4899 (free_stacks): ...here.
4900 (__free_stack_cache): New function.
4901 * pthreadP.h: Declare __free_stack_cache.
4902 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4903 ptr_freeres.
4904 * init.c (pthread_functions): Initialize ptr_freeres.
4905 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4906 New freeres function.
4907
376e973a
UD
49082006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4909
4910 [BZ #3018]
4911 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4912
2b34af01
UD
49132006-08-20 Ulrich Drepper <drepper@redhat.com>
4914
4915 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4916 _XOPEN_REALTIME_THREADS.
4917
89c85f87
UD
49182006-08-15 Jakub Jelinek <jakub@redhat.com>
4919
4920 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4921 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4922 HAVE_CLOCK_GETTIME_VSYSCALL.
4923 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4924
f17efcb4
UD
49252006-08-14 Jakub Jelinek <jakub@redhat.com>
4926
4927 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4928 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4929 * descr.h (struct priority_protection_data): New type.
4930 (struct pthread): Add tpp field.
4931 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4932 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4933 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4934 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4935 TPP mutexes.
4936 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4937 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4938 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4939 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4940 * tpp.c: New file.
4941 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4942 boosted by TPP.
4943 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4944 * pthread_mutexattr_getprioceiling.c
4945 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4946 in the SCHED_FIFO priority range.
4947 * pthread_mutexattr_setprioceiling.c
4948 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4949 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4950 if mutex is not TPP. Ceiling is now in __data.__lock.
4951 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4952 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4953 is now in __data.__lock. Add locking.
4954 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4955 * Makefile (libpthread-routines): Add tpp.
4956 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4957 * tst-tpp.h: New file.
4958 * tst-mutexpp1.c: New file.
4959 * tst-mutexpp6.c: New file.
4960 * tst-mutexpp10.c: New file.
4961 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4962 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4963
22bb134c
UD
49642006-08-12 Ulrich Drepper <drepper@redhat.com>
4965
4966 [BZ #2843]
4967 * pthread_join.c (pthread_join): Account for self being canceled
4968 when checking for deadlocks.
4969 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4970 (tf1): Don't print anything after pthread_join returns, this would be
4971 another cancellation point.
4972 (tf2): Likewise.
4973 * tst-join6.c: New file.
4974 * Makefile (tests): Add tst-join6.
4975
f1762c0c
UD
49762006-08-03 Ulrich Drepper <drepper@redhat.com>
4977
9c06eb66
UD
4978 [BZ #2892]
4979 * pthread_setspecific.c (__pthread_setspecific): Check
4980 out-of-range index before checking for unused key.
4981
f1762c0c
UD
4982 * sysdeps/pthread/gai_misc.h: New file.
4983
7bb1b2c9
UD
49842006-08-01 Ulrich Drepper <drepper@redhat.com>
4985
4986 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4987 file. Don't use sysctl.
4988 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4989 overwrite the file if this is likely not true.
4990
b06e7e9a
UD
49912006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4992
4993 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4994 * Makefile (tests): Add tst-getpid3.
4995 * tst-getpid3.c: New file.
4996
b894c2ea
RM
49972006-07-30 Roland McGrath <roland@redhat.com>
4998
4999 * Makefile (libpthread-routines): Add ptw-sigsuspend.
5000
5001 * sysdeps/unix/sysv/linux/i386/not-cancel.h
5002 (pause_not_cancel): New macro.
5003 (nanosleep_not_cancel): New macro.
5004 (sigsuspend_not_cancel): New macro.
5005 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
5006 nanosleep_not_cancel macro from <not-cancel.h>.
5007 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
5008 macro from <not-cancel.h>.
5009
df47504c
UD
50102006-07-28 Ulrich Drepper <drepper@redhat.com>
5011 Jakub Jelinek <jakub@redhat.com>
5012
5013 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
5014 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
5015 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
5016 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
5017 * pthread_mutex_init.c: Add support for priority inheritance mutex.
5018 * pthread_mutex_lock.c: Likewise.
5019 * pthread_mutex_timedlock.c: Likewise.
5020 * pthread_mutex_trylock.c: Likewise.
5021 * pthread_mutex_unlock.c: Likewise.
5022 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
5023 all mutexes.
5024 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
5025 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
5026 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
5027 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
5028 pthread-pi-defines.sym.
5029 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
5030 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
5031 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
5032 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
5033 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5034 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5035 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5036 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
5037 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
5038 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5039 _POSIX_THREAD_PRIO_INHERIT to 200112L.
5040 * tst-mutex1.c: Adjust to allow use in PI mutex test.
5041 * tst-mutex2.c: Likewise.
5042 * tst-mutex3.c: Likewise.
5043 * tst-mutex4.c: Likewise.
5044 * tst-mutex5.c: Likewise.
5045 * tst-mutex6.c: Likewise.
5046 * tst-mutex7.c: Likewise.
5047 * tst-mutex7a.c: Likewise.
5048 * tst-mutex8.c: Likewise.
5049 * tst-mutex9.c: Likewise.
5050 * tst-robust1.c: Likewise.
5051 * tst-robust7.c: Likewise.
5052 * tst-robust8.c: Likewise.
5053 * tst-mutexpi1.c: New file.
5054 * tst-mutexpi2.c: New file.
5055 * tst-mutexpi3.c: New file.
5056 * tst-mutexpi4.c: New file.
5057 * tst-mutexpi5.c: New file.
5058 * tst-mutexpi6.c: New file.
5059 * tst-mutexpi7.c: New file.
5060 * tst-mutexpi7a.c: New file.
5061 * tst-mutexpi8.c: New file.
5062 * tst-mutexpi9.c: New file.
5063 * tst-robust1.c: New file.
5064 * tst-robust2.c: New file.
5065 * tst-robust3.c: New file.
5066 * tst-robust4.c: New file.
5067 * tst-robust5.c: New file.
5068 * tst-robust6.c: New file.
5069 * tst-robust7.c: New file.
5070 * tst-robust8.c: New file.
5071 * Makefile (tests): Add the new tests.
5072
5073 * pthread_create.c (start_thread): Add some casts to avoid warnings.
5074 * pthread_mutex_destroy.c: Remove unneeded label.
5075
f3be81a9
UD
50762006-07-01 Ulrich Drepper <drepper@redhat.com>
5077
5078 * pthread_mutex_init.c (__pthread_mutex_init): Move some
5079 computations to compile time.
5080
c26ca5e1
UD
50812006-06-04 Ulrich Drepper <drepper@redhat.com>
5082
5083 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
5084
6f8a7dff
UD
50852006-05-15 Ulrich Drepper <drepper@redhat.com>
5086
c26ca5e1 5087 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 5088
3d237e42
UD
50892006-05-11 Ulrich Drepper <drepper@redhat.com>
5090
04974d63
UD
5091 * pthread_key_create.c (__pthread_key_create): Do away with
5092 __pthread_keys_lock.
5093
5094 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5095 (__kernel_cpumask_size): Mark as hidden.
5096 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5097
3d237e42
UD
5098 * sem_open.c (__sem_mappings_lock): Mark as hidden.
5099 * semaphoreP.h (__sem_mappings_lock): Likewise.
5100
790fc6e4
UD
51012006-05-10 Ulrich Drepper <drepper@redhat.com>
5102
5103 * pthread_atfork.c: Mark __dso_handle as hidden.
5104
be434a72
UD
51052006-05-09 Ulrich Drepper <drepper@redhat.com>
5106
5107 [BZ #2644]
5108 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
5109 the reload problem. Change the one path in pthread_cancel_init
5110 which causes the problem. Force gcc to reload. Simplify callers.
5111 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
5112 (_Unwind_GetBSP): Undo last patch.
5113
3142b1ac
UD
51142006-05-07 Ulrich Drepper <drepper@redhat.com>
5115
bf3635d3
UD
5116 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
5117 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
5118
5119 [BZ #2644]
5120 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
5121 pointers are reloaded after pthread_cancel_init calls.
5122
27488789
UD
51232006-05-01 Ulrich Drepper <drepper@redhat.com>
5124
5125 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
5126 __always_inline.
5127
a6375d11
UD
51282006-04-27 Ulrich Drepper <drepper@redhat.com>
5129
5130 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5131 Allocate new object which is passed to timer_sigev_thread so that
5132 the timer can be deleted before the new thread is scheduled.
5133
16a1d952
RM
51342006-04-26 Roland McGrath <roland@redhat.com>
5135
5136 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
5137
7960f2a7
UD
51382006-04-08 Ulrich Drepper <drepper@redhat.com>
5139
ab9a9ff8
UD
5140 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
5141 suffix for conditional jumps.
5142 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5143 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5144 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5145 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5146 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5147 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5148
7960f2a7
UD
5149 * init.c (sigcancel_handler): Compare with correct PID even if the
5150 thread is in the middle of a fork call.
5151 (sighandler_setxid): Likewise.
5152 Reported by Suzuki K P <suzuki@in.ibm.com> .
5153
2035d91c
UD
51542006-04-07 Jakub Jelinek <jakub@redhat.com>
5155
5156 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
5157
0292b0dd
UD
51582006-04-06 Ulrich Drepper <drepper@redhat.com>
5159
5160 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
5161 fails [Coverity CID 105].
5162
6738b3c0
UD
51632006-04-05 Ulrich Drepper <drepper@redhat.com>
5164
5165 * sysdeps/pthread/pthread.h: Add nonnull attributes.
5166
359157a5
RM
51672006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
5168
5169 [BZ #2505]
5170 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
5171 Define __lll_rel_instr using lwsync.
5172
cd277b2d
UD
51732006-03-27 Ulrich Drepper <drepper@redhat.com>
5174
5175 * allocatestack.c (allocate_stack): Always initialize robust_head.
5176 * descr.h: Define struct robust_list_head.
5177 (struct pthread): Use robust_list_head in robust mutex list definition.
5178 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
5179 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
5180 (__pthread_initialize_minimal_internal): Register robust_list with
5181 the kernel.
5182 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
5183 Declare __set_robust_list_avail.
5184 * pthread_create.c (start_thread): Register robust_list of new thread.
5185 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
5186 waiters.
5187 * pthread_mutex_destroy.c: For robust mutexes don't look at the
5188 number of users, it's unreliable.
5189 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
5190 set_robust_list syscall is available.
5191 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
5192 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
5193 Set robust_head.list_op_pending before trying to lock a robust mutex.
5194 * pthread_mutex_timedlock.c: Likewise.
5195 * pthread_mutex_trylock.c: Likewise.
5196 * pthread_mutex_unlock.c: Likewise for unlocking.
5197 * Makefile (tests): Add tst-robust8.
5198 * tst-robust8.c: New file.
5199
facac085
UD
52002006-03-08 Andreas Schwab <schwab@suse.de>
5201
5202 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5203 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5204
7ccbe1a1
RM
52052006-03-05 Roland McGrath <roland@redhat.com>
5206
5207 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5208 and $config_os doesn't match *linux*.
5209
043cee37
RM
52102006-03-05 David S. Miller <davem@sunset.davemloft.net>
5211
5212 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5213 Use __syscall_error.
5214 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5215 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5216 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5217 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5218 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5219 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5220
88bce79e
UD
52212006-03-02 Ulrich Drepper <drepper@redhat.com>
5222
5223 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5224
672ec465
UD
52252006-03-01 Ulrich Drepper <drepper@redhat.com>
5226
5227 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5228 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5229 mutex.
5230 (__lll_robust_timedlock_wait): Likewise.
5231 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5232 (__lll_robust_lock_wait): Likewise.
5233 (__lll_robust_timedlock_wait): Likewise.
5234 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5235 (__lll_robust_lock_wait): Likewise.
5236 (__lll_robust_timedlock_wait): Likewise.
5237
c4a4875d
RM
52382006-03-01 Jakub Jelinek <jakub@redhat.com>
5239
5240 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5241 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5242 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5243 lll_robust_mutex_unlock): Define.
5244 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5245
3192fd8e
RM
52462006-02-28 H.J. Lu <hongjiu.lu@intel.com>
5247
5248 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5249 instead of <clone.S>.
5250
14d44b19
RM
52512006-02-27 Jakub Jelinek <jakub@redhat.com>
5252
5253 * Makefile (libpthread-routines): Add
5254 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5255 and pthread_mutex_[sg]etprioceiling.
5256 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5257 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5258 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5259 pthread_mutex_setprioceiling.
5260 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5261 PTHREAD_PRIO_PROTECT): New enum values.
5262 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5263 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5264 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5265 prototypes.
5266 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5267 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5268 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5269 Define.
5270 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5271 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5272 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5273 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5274 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5275 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5276 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5277 protocol mutexes.
5278 * pthread_mutex_getprioceiling.c: New file.
5279 * pthread_mutex_setprioceiling.c: New file.
5280 * pthread_mutexattr_getprioceiling.c: New file.
5281 * pthread_mutexattr_setprioceiling.c: New file.
5282 * pthread_mutexattr_getprotocol.c: New file.
5283 * pthread_mutexattr_setprotocol.c: New file.
5284
62f6b9b2
RM
52852006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5286
5287 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5288
e0a3ed4f
RM
52892006-02-27 Roland McGrath <roland@redhat.com>
5290
5291 * sysdeps/pthread/Subdirs: List nptl here too.
5292 * configure (libc_add_on_canonical): New variable.
5293
5294 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5295
5296 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5297 self to get main source tree's file.
5298 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5299 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5300 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5301 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5302 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5303 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5304 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5305 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5306 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5307 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5308 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5309 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5310 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5311
5312 * Makefile: Use $(sysdirs) in vpath directive.
5313
5314 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5315 (CPPFLAGS-timer_routines.c): Likewise.
5316
5317 * Makeconfig (includes): Variable removed.
5318
84cfa284
RM
53192006-02-26 Roland McGrath <roland@redhat.com>
5320
5321 * sysdeps/generic/pt-raise.c: Moved to ...
5322 * pt-raise.c: ... here.
5323 * sysdeps/generic/lowlevellock.h: Moved to ...
5324 * lowlevellock.h: ... here.
5325
c5132ca1
RM
53262006-02-23 Roland McGrath <roland@redhat.com>
5327
5328 * descr.h (struct pthread): Add final member `end_padding'.
5329 (PTHREAD_STRUCT_END_PADDING): Use it.
5330
53312006-02-20 Roland McGrath <roland@redhat.com>
5332
5333 * sysdeps/mips: Directory removed, saved in ports repository.
5334 * sysdeps/unix/sysv/linux/mips: Likewise.
5335
a93317a1
UD
53362006-02-18 Ulrich Drepper <drepper@redhat.com>
5337
5338 * tst-robust1.c: Add second mutex to check that the mutex list is
5339 handled correctly.
5340
f1740bc4
UD
53412006-02-17 Jakub Jelinek <jakub@redhat.com>
5342
5343 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5344 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5345 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5346 lll_robust_mutex_unlock): New macros.
5347 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5348 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5349 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5350 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5351 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5352
a7245bf5
UD
53532006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5354
5355 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5356 definitions.
5357 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5358
49bfc1fe
UD
53592006-02-17 Ulrich Drepper <drepper@redhat.com>
5360
5361 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5362 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5363 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5364 (lll_robust_mutex_unlock): Likewise.
5365
56e987ac
UD
53662006-02-13 Jakub Jelinek <jakub@redhat.com>
5367
5368 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5369 Set robust_list.__next rather than robust_list.
5370 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5371 (__pthread_list_t): New typedef.
5372 (pthread_mutex_t): Replace __next and __prev fields with __list.
5373 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5374 (__pthread_list_t): New typedef.
5375 (pthread_mutex_t): Replace __next and __prev fields with __list.
5376 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5377 (__pthread_list_t, __pthread_slist_t): New typedefs.
5378 (pthread_mutex_t): Replace __next and __prev fields with __list.
5379 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5380 (__pthread_list_t, __pthread_slist_t): New typedefs.
5381 (pthread_mutex_t): Replace __next and __prev fields with __list.
5382 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5383 (__pthread_list_t, __pthread_slist_t): New typedefs.
5384 (pthread_mutex_t): Replace __next and __prev fields with __list.
5385 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5386 (__pthread_slist_t): New typedef.
5387 (pthread_mutex_t): Replace __next field with __list.
5388
683040c3
UD
53892006-02-15 Ulrich Drepper <drepper@redhat.com>
5390
25bc77e6 5391 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
5392 PTHREAD_MUTEX_OWNERDEAD.
5393 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5394 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5395 * Makefile (libpthread-routines): Add lowlevelrobustlock.
5396 * pthread_create.c (start_thread): Very much simplify robust_list loop.
5397 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5398 to PTHREAD_MUTEX_INCONSISTENT.
5399 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5400 * pthread_mutex_lock.c: Reimplement robust mutex handling.
5401 * pthread_mutex_trylock.c: Likewise.
5402 * pthread_mutex_timedlock.c: Likewise.
5403 * pthread_mutex_unlock.c: Likewise.
5404 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5405 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5406 lowlevelrobustlock.sym.
5407 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5408 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5409 definitions.
5410 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5411 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5412 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5413 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5414 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5415
bbf209a4
UD
54162006-02-12 Ulrich Drepper <drepper@redhat.com>
5417
b007ce7c
UD
5418 * allocatestack.c (allocate_stack): Initialize robust_list.
5419 * init.c (__pthread_initialize_minimal_internal): Likewise.
5420 * descr.h (struct xid_command): Pretty printing.
5421 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5422 robust_list. Adjust macros.
5423 * pthread_create.c (start_thread): Adjust robust_list handling.
5424 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5425 but the owner for all robust mutex types.
5426 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5427 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 5428 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
5429 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5430
bbf209a4 5431 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
b42a214c 5432 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
bbf209a4 5433
b576fca1
UD
54342006-02-08 Jakub Jelinek <jakub@redhat.com>
5435
5436 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5437 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5438
a6df7387
UD
54392006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5440
5441 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5442 Return status.
5443 (lll_futex_timed_wait): Define.
5444
7c65e900
UD
54452006-01-19 Ulrich Drepper <drepper@redhat.com>
5446
5447 * tst-cancel4.c: Test ppoll.
5448
5f9f21e8
AJ
54492006-01-18 Andreas Jaeger <aj@suse.de>
5450
cf407dfb 5451 [BZ #2167]
5f9f21e8
AJ
5452 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5453 (pthread_mutex_t): Follow changes for other archs. Based on patch
5454 by Jim Gifford <patches@jg555.com>.
5455
251278c6
UD
54562006-01-13 Richard Henderson <rth@redhat.com>
5457
5458 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5459
de59a291
RM
54602006-01-10 Roland McGrath <roland@redhat.com>
5461
5462 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5463 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5464 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5465 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5466 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5467 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5468 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5469 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5470 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 5471 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 5472
931786ee
RM
54732006-01-09 Roland McGrath <roland@redhat.com>
5474
5d42c8c3
RM
5475 * tst-initializers1-c89.c: New file.
5476 * tst-initializers1-c99.c: New file.
5477 * tst-initializers1-gnu89.c: New file.
5478 * tst-initializers1-gnu99.c: New file.
5479 * Makefile (tests): Add them.
5480 (CFLAGS-tst-initializers1-c89.c): New variable.
5481 (CFLAGS-tst-initializers1-c99.c): New variable.
5482 (CFLAGS-tst-initializers1-gnu89.c): New variable.
5483 (CFLAGS-tst-initializers1-gnu99.c): New variable.
5484
931786ee
RM
5485 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5486 Use __extension__ on anonymous union definition.
5487 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5488 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5489 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5490 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 5491 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 5492
8dd18431
RM
54932006-01-08 Jakub Jelinek <jakub@redhat.com>
5494
5495 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5496 Don't give the union a name because it changes the mangled name.
5497 Instead name the struct for __data.
5498 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5499 Likewise.
5500 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5501 Likewise.
5502
ae11e412
UD
55032006-01-09 Jakub Jelinek <jakub@redhat.com>
5504
5505 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5506 stack bias to mc_ftp field.
5507
c6885aa1
UD
55082006-01-07 Ulrich Drepper <drepper@redhat.com>
5509
5510 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 5511 being too clever and reloading the futex value where it shouldn't.
c6885aa1 5512
ae4ad00a
UD
55132006-01-06 Ulrich Drepper <drepper@redhat.com>
5514
5515 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5516 correct type.
5517
ced368f7
UD
55182006-01-06 Jakub Jelinek <jakub@redhat.com>
5519
5520 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5521 Add cfi directives.
5522
d804f5df
UD
55232006-01-06 Ulrich Drepper <drepper@redhat.com>
5524
cbbbb188 5525 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
5526 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5527 rename in tcbhead_t.
5528
d804f5df
UD
5529 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5530 Don't give the union a name because it changes the mangled name.
5531 Instead name the struct for __data.
5532 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5533 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5534 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5535 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5536 * pthread_create.c (start_thread): Adjust robust mutex free loop.
5537 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5538
679d83ba
UD
55392006-01-05 Ulrich Drepper <drepper@redhat.com>
5540
5541 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5542 Return status.
5543 (lll_futex_timed_wait): Define.
5544 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5545 * sysdeps/pthread/aio_misc.h: New file.
5546
06dc5bf3
RM
55472006-01-03 Joseph S. Myers <joseph@codesourcery.com>
5548
5549 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5550
9759bbf1
UD
55512006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
5552
5553 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5554 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5555 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5556
db59b28b
UD
55572006-01-04 Ulrich Drepper <drepper@redhat.com>
5558
5559 * tst-cancel24.cc: Use C headers instead of C++ headers.
5560
b01fe5f7
UD
55612006-01-03 Jakub Jelinek <jakub@redhat.com>
5562
5563 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5564 sparc-linux configured glibc.
5565 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5566 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5567 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5568 atomic_compare_and_exchange_val_24_acq instead of
5569 atomic_compare_and_exchange_val_acq.
5570 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5571 instead of atomic_exchange_rel.
5572 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5573 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5574 file.
5575 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5576 file.
5577 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5578 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5579 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5580 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5581 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5582 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5583 New file.
5584 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5585 New file.
5586 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5587 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5588 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5589 file.
5590 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5591 file.
5592 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5593
35c2fd59
UD
55942006-01-03 Ulrich Drepper <drepper@redhat.com>
5595
5596 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5597 mutex initializers.
5598
305bb37e
UD
55992006-01-02 Jakub Jelinek <jakub@redhat.com>
5600
5601 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5602 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5603 THREAD_COPY_POINTER_GUARD): Define.
5604 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5605 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5606
cc792128
UD
56072006-01-01 Ulrich Drepper <drepper@redhat.com>
5608
5609 * version.c: Update copyright year.
5610
db0a00d3
UD
56112005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5612
5613 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5614 .eh_frame section, use cfi_* directives.
5615 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5616
b36205c4
UD
56172005-12-30 Ulrich Drepper <drepper@redhat.com>
5618
5619 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5620 now.
5621
8b4f1598
UD
56222005-12-29 Ulrich Drepper <drepper@redhat.com>
5623
5624 * sysdeps/pthread/sigaction.c: Removed.
5625 * sigaction.c: New file.
5626 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5627
fec5592d
UD
56282005-12-28 Ulrich Drepper <drepper@redhat.com>
5629
5630 * Makefile (tests): Add tst-signal7.
5631 * tst-signal7.c: New file.
5632
db169ed5
RM
56332005-12-27 Roland McGrath <roland@redhat.com>
5634
5635 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5636 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5637 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5638 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5639 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5640 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5641 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5642 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5643 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5644 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5645 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5646
bfffffae
UD
56472005-12-27 Jakub Jelinek <jakub@redhat.com>
5648
5649 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5650 and __prev field to pthread_mutex_t.
5651 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5652 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5653 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5654 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5655 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5656 to pthread_mutex_t.
5657
1bcfb5a5
UD
56582005-12-26 Ulrich Drepper <drepper@redhat.com>
5659
5660 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5661 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5662 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5663 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5664 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5665 and PTHREAD_MUTEXATTR_FLAG_BITS.
5666 * descr.h (struct pthread): Add robust_list field and define
5667 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5668 * pthread_mutexattr_getrobust.c: New file.
5669 * pthread_mutexattr_setrobust.c: New file.
5670 * pthread_mutex_consistent.c: New file.
5671 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5672 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5673 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5674 Adjust pthread_mutex_t initializers.
5675 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5676 field to pthread_mutex_t.
5677 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5678 and __prev field to pthread_mutex_t.
5679 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5680 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5681 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5682 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5683 * pthread_mutexattr_gettype.c: Likewise.
5684 * pthread_mutexattr_setpshared.c: Likewise.
5685 * pthread_mutexattr_settype.c: Likewise.
5686 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5687 Initialize mutex kind according to robust flag.
5688 * pthread_mutex_lock.c: Implement local robust mutex.
5689 * pthread_mutex_timedlock.c: Likewise.
5690 * pthread_mutex_trylock.c: Likewise.
5691 * pthread_mutex_unlock.c: Likewise.
5692 * pthread_create.c (start_thread): Mark robust mutexes which remained
5693 locked as dead.
5694 * tst-robust1.c: New file.
5695 * tst-robust2.c: New file.
5696 * tst-robust3.c: New file.
5697 * tst-robust4.c: New file.
5698 * tst-robust5.c: New file.
5699 * tst-robust6.c: New file.
5700 * tst-robust7.c: New file.
5701 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5702 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5703 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5704 tst-robust5, tst-robust6, and tst-robust7.
5705
5706 * tst-typesizes.c: New file.
5707 * Makefile (tests): Add tst-typesizes.
5708
5709 * tst-once3.c: More debug output.
5710
9333ed0d
UD
57112005-12-24 Ulrich Drepper <drepper@redhat.com>
5712
d4d138a4
UD
5713 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5714 missing after last change.
5715
bfffffae 5716 * version.c: Update copyright year.
9333ed0d 5717
dcc73a8d
UD
57182005-12-23 Ulrich Drepper <drepper@redhat.com>
5719
5720 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5721 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5722 * pthread_mutex_trylock.c: Likewise.
5723 * pthread_mutex_timedlock.c: Likewise.
5724 * pthread_mutex_unlock.c: Likewise.
5725
879f3ca6
RM
57262005-12-22 Roland McGrath <roland@redhat.com>
5727
5728 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5729 so that #include_next's search location is not reset to the -I..
5730 directory where <nptl/...> can be found.
5731
077a0da7
UD
57322005-12-22 Ulrich Drepper <drepper@redhat.com>
5733
5734 [BZ #1913]
5735 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5736 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
5737 * tst-cancel24.cc: New file.
5738 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 5739
8dea90aa
RM
57402005-12-21 Roland McGrath <roland@redhat.com>
5741
5742 * libc-cancellation.c: Use <> rather than "" #includes.
5743 * pt-cleanup.c: Likewise.
5744 * pthread_create.c: Likewise.
5745 * pthread_join.c: Likewise.
5746 * pthread_timedjoin.c: Likewise.
5747 * pthread_tryjoin.c: Likewise.
5748 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5749 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5750 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5751 * unwind.c: Likewise.
5752
8da21f96
UD
57532005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5754
5755 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5756 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5757 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5758 THREAD_COPY_POINTER_GUARD): Define.
5759
00c2b3b9
UD
57602005-12-19 Jakub Jelinek <jakub@redhat.com>
5761
5762 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5763 rather than one.
5764 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5765 THREAD_COPY_POINTER_GUARD): Define.
5766 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5767 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5768 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5769 THREAD_COPY_POINTER_GUARD): Define.
5770 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5771 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5772 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5773 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5774 Use PTR_DEMANGLE for B0 if defined.
5775
827b7087
UD
57762005-12-17 Ulrich Drepper <drepper@redhat.com>
5777
5778 * pthread_create.c (__pthread_create_2_1): Use
5779 THREAD_COPY_POINTER_GUARD if available.
5780 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5781 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5782 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5783 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5784 * sysdeps/x86_64/tls.h: Likewise.
5785
2826ac7e
RM
57862005-12-15 Roland McGrath <roland@redhat.com>
5787
5788 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5789
b6ab06ce
UD
57902005-12-13 Ulrich Drepper <drepper@redhat.com>
5791
5792 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5793 sysdeps/generic.
5794 * errno-loc.c: New file.
5795
f0d1a3b5
RM
57962005-12-12 Roland McGrath <roland@redhat.com>
5797
5798 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5799 adjustments before choosing stack size. Update minimum stack size
5800 calculation to match allocate_stack change.
5801
db13ddbc
UD
58022005-12-12 Ulrich Drepper <drepper@redhat.com>
5803
5804 * allocatestack.c (allocate_stack): Don't demand that there is an
5805 additional full page available on the stack beside guard, TLS, the
5806 minimum stack.
5807
088f460f
UD
58082005-11-24 Ulrich Drepper <drepper@redhat.com>
5809
5810 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5811 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5812
5813 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5814 compiling 32-bit code we must define __cleanup_fct_attribute.
5815
16feadf2
UD
5816005-11-24 Jakub Jelinek <jakub@redhat.com>
5817
5818 [BZ #1920]
5819 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5820 __attribute__ instead of __attribute.
5821 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5822 (__cleanup_fct_attribute): Likewise.
5823
e6e493bb
UD
58242005-11-17 Jakub Jelinek <jakub@redhat.com>
5825
5826 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5827 a write barrier before writing libgcc_s_getcfa.
5828
8e635611
UD
58292005-11-06 Ulrich Drepper <drepper@redhat.com>
5830
5831 * sysdeps/unix/sysv/linux/configure: Removed.
5832
ce33ee7c
UD
58332005-11-05 Ulrich Drepper <drepper@redhat.com>
5834
5835 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5836 optional init_array/fini_array support.
5837
20d511e0
RM
58382005-10-24 Roland McGrath <roland@redhat.com>
5839
5840 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5841 versioned_symbol use.
5842
fe60d146
RM
58432005-10-16 Roland McGrath <roland@redhat.com>
5844
5845 * init.c (__pthread_initialize_minimal_internal): Even when using a
5846 compile-time default stack size, apply the minimum that allocate_stack
5847 will require, and round up to page size.
5848
0faa1cf5
RM
58492005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5850
5851 * Makefile ($(test-modules)): Remove static pattern rule.
5852
f9126cc2 58532005-10-14 Jakub Jelinek <jakub@redhat.com>
b42a214c 5854 Ulrich Drepper <drepper@redhat.com>
f9126cc2
UD
5855
5856 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5857 alignment in callback function.
5858 * Makefile: Add rules to build and run tst-align3.
5859 * tst-align3.c: New file.
5860
015a5d22
RM
58612005-10-03 Jakub Jelinek <jakub@redhat.com>
5862
5863 * allocatestack.c (setxid_signal_thread): Add
5864 INTERNAL_SYSCALL_DECL (err).
5865
b71ce910
UD
58662005-10-02 Jakub Jelinek <jakub@redhat.com>
5867
5868 * allocatestack.c (setxid_signal_thread): Need to use
5869 atomic_compare_and_exchange_bool_acq.
5870
dff9a7a1 58712005-10-01 Ulrich Drepper <drepper@redhat.com>
b42a214c 5872 Jakub Jelinek <jakub@redhat.com>
dff9a7a1
UD
5873
5874 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5875 CANCEL_RESTMASK.
5876 (struct pthread): Move specific_used field to avoid padding.
5877 Add setxid_futex field.
5878 * init.c (sighandler_setxid): Reset setxid flag and release the
5879 setxid futex.
5880 * allocatestack.c (setxid_signal_thread): New function. Broken
5881 out of the bodies of the two loops in __nptl_setxid. For undetached
5882 threads check whether they are exiting and if yes, don't send a signal.
5883 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5884 * pthread_create.c (start_thread): For undetached threads, check
5885 whether setxid bit is set. If yes, wait until signal has been
5886 processed.
5887
5888 * allocatestack.c (STACK_VARIABLES): Initialize them.
5889 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5890
560b4709
UD
58912004-09-02 Jakub Jelinek <jakub@redhat.com>
5892
5893 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5894 waiters, awake all waiters on the associated mutex.
5895
5eac4760
RM
58962005-09-22 Roland McGrath <roland@redhat.com>
5897
5898 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5899 ../sysdeps/x86_64/hp-timing.h).
5900
a3615024
UD
59012005-08-29 Jakub Jelinek <jakub@redhat.com>
5902
5903 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5904 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5905 (lll_futex_wake_unlock): Define.
5906 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5907 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5908 (lll_futex_wake_unlock): Define.
5909 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5910 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5911 (lll_futex_wake_unlock): Define.
5912 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5913 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5914 (lll_futex_wake_unlock): Define.
5915 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5916 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5917 (lll_futex_wake_unlock): Define.
5918 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5919 lll_futex_wake_unlock.
5920 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5921 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5922 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5923 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5924 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5925 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5926
bf017034
UD
59272005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5928
5929 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5930 Fix typo in register name.
5931
fd4af664
UD
59322005-08-23 Ulrich Drepper <drepper@redhat.com>
5933
8558d715
UD
5934 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5935 Use __sigfillset. Document that sigfillset does the right thing wrt
5936 to SIGSETXID.
fd4af664 5937
3fd1bc67
UD
59382005-07-11 Jakub Jelinek <jakub@redhat.com>
5939
44d75caf 5940 [BZ #1102]
3fd1bc67
UD
5941 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5942 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5943 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5944 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5945 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5946 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5947 in the structure.
5948 * Makefile (tests): Add tst-initializers1.
5949 (CFLAGS-tst-initializers1.c): Set.
5950 * tst-initializers1.c: New test.
5951
553185e2
UD
59522005-07-11 Jakub Jelinek <jakub@redhat.com>
5953
5954 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5955 Make sure __flags are located at offset 48 from the start of the
5956 structure.
5957
8df08cb2
RM
59582005-07-02 Roland McGrath <roland@redhat.com>
5959
5960 * Makeconfig: Comment fix.
5961
253eb3a0
UD
59622005-07-05 Jakub Jelinek <jakub@redhat.com>
5963
5964 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5965 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5966 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5967 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5968 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5969 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5970 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5971 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5972 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5973 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5974
bb6e8ca3
UD
59752005-06-25 Jakub Jelinek <jakub@redhat.com>
5976
5977 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5978 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5979 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5980 fields.
5981 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5982 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5983 field. Put in sysinfo field unconditionally.
5984 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5985 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5986 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5987 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5988 fields.
5989 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5990 * pthread_create.c (__pthread_create_2_1): Use
5991 THREAD_COPY_STACK_GUARD macro.
5992 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5993 tests.
5994 * tst-stackguard1.c: New file.
5995 * tst-stackguard1-static.c: New file.
5996
99c7f870
UD
59972005-06-14 Alan Modra <amodra@bigpond.net.au>
5998
5999 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6000 Invoke CGOTSETUP and CGOTRESTORE.
6001 (CGOTSETUP, CGOTRESTORE): Define.
6002
8074c5c5
RM
60032005-05-29 Richard Henderson <rth@redhat.com>
6004
6005 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
6006 (tf_write, tf_writev): Use it.
6007 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
6008 the system minimum.
6009
c179df4e
UD
60102005-05-23 Jakub Jelinek <jakub@redhat.com>
6011
6012 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6013 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
6014 __librt_*_asynccancel@local.
6015
b0e196a4
UD
60162005-05-17 Alan Modra <amodra@bigpond.net.au>
6017
6018 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
6019 all occurrences of JUMPTARGET. Instead append @local to labels.
6020
f7d78e18
UD
60212005-05-20 Jakub Jelinek <jakub@redhat.com>
6022
6023 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
6024 size/alignment of struct pthread rather than tcbhead_t.
6025 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6026 Likewise.
6027 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6028 Likewise.
6029 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6030 Likewise.
6031
363dd976
UD
60322005-05-19 Richard Henderson <rth@redhat.com>
6033
6034 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
6035 __sync_val_compare_and_swap, not explicit _si variant.
6036 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
6037
1ad9da69
UD
60382005-05-03 Ulrich Drepper <drepper@redhat.com>
6039
6040 [BZ #915]
6041 * sysdeps/pthread/pthread.h: Avoid empty initializers.
6042
5085cd1f
UD
60432005-05-03 Jakub Jelinek <jakub@redhat.com>
6044
6045 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
6046 .eh_frame section, use cfi_* directives.
6047
ad529081
UD
60482005-04-27 Jakub Jelinek <jakub@redhat.com>
6049
6050 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
6051 of "" includes.
6052
dea99685
UD
60532005-04-27 Ulrich Drepper <drepper@redhat.com>
6054
c06aad09 6055 [BZ #1075]
dea99685
UD
6056 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
6057 aio_write blocks.
6058
84060bad
RM
60592005-04-27 Roland McGrath <roland@redhat.com>
6060
5e2d8ac8
RM
6061 * Makefile (tests): Remove tst-clock2.
6062
84060bad
RM
6063 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
6064 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
6065 translating to the kernel clockid_t for our own process/thread clock.
6066
6067 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
6068
4a035b9d
RM
60692005-04-15 Jakub Jelinek <jakub@redhat.com>
6070
6071 * old_pthread_cond_init.c: Include <errno.h>.
6072 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
6073 process shared or uses clock other than CLOCK_REALTIME.
6074 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
6075
edac0e8f
UD
60762005-04-13 David S. Miller <davem@davemloft.net>
6077
6078 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
6079 * sysdeps/sparc/sparc64/clone.S: New file.
6080
613d8d52
RM
60812005-04-05 Jakub Jelinek <jakub@redhat.com>
6082
44d75caf 6083 [BZ #1102]
613d8d52
RM
6084 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
6085 __inline instead of inline.
6086 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
6087
ee618985
UD
60882005-03-31 Jakub Jelinek <jakub@redhat.com>
6089
6090 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
6091 functionally equivalent, but shorter instructions.
6092 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6093 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6094 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6095 Likewise.
6096 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
6097 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6098 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6099 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6100 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6101 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6102 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6103 Likewise.
6104 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6105 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6106 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6107 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6108 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6109
f850220b
AJ
61102005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
6111
6112 * sysdeps/mips/Makefile: New file.
6113 * sysdeps/mips/nptl-sysdep.S: New file.
6114 * sysdeps/mips/tcb-offsets.sym: New file.
6115 * sysdeps/mips/pthread_spin_lock.S: New file.
6116 * sysdeps/mips/pthread_spin_trylock.S: New file.
6117 * sysdeps/mips/pthreaddef.h: New file.
6118 * sysdeps/mips/tls.h: New file.
6119 * sysdeps/mips/jmpbuf-unwind.h: New file.
6120 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
6121 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
6122 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
6123 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
6124 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
6125 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
6126 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
6127 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
6128 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
6129 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
6130
1e6da2b0
UD
61312005-03-23 Ulrich Drepper <drepper@redhat.com>
6132
c06aad09 6133 [BZ #1112]
1e6da2b0
UD
6134 * pthread_create.c (__pthread_create_2_1): Rename syscall error
6135 variable to scerr.
6136
5233d576
RM
61372005-03-10 Jakub Jelinek <jakub@redhat.com>
6138
6139 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
6140
3053ff11
RM
61412005-02-25 Roland McGrath <roland@redhat.com>
6142
6143 * alloca_cutoff.c: Correct license text.
6144 * tst-unload.c: Likewise.
6145 * sysdeps/pthread/allocalim.h: Likewise.
6146 * sysdeps/pthread/pt-initfini.c: Likewise.
6147 * sysdeps/pthread/bits/libc-lock.h: Likewise.
6148 * sysdeps/pthread/bits/sigthread.h: Likewise.
6149 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
6150 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6151
9cfe5381
RM
61522005-02-16 Roland McGrath <roland@redhat.com>
6153
6154 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6155 Use unsigned int * for ptr_nthreads.
6156
7de00121
RM
61572005-02-14 Alan Modra <amodra@bigpond.net.au>
6158
20d511e0 6159 [BZ #721]
7de00121
RM
6160 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
6161 gcc4.
6162
4bae262d
UD
61632005-02-07 Richard Henderson <rth@redhat.com>
6164
613d8d52 6165 [BZ #787]
4bae262d
UD
6166 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
6167 argument.
6168
75df54b7
RM
61692004-11-03 Marcus Brinkmann <marcus@gnu.org>
6170
6171 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
6172 order of arguments in invocation of atomic_add_zero.
6173
ea9c93cc
UD
61742005-01-26 Jakub Jelinek <jakub@redhat.com>
6175
9cfe5381 6176 [BZ #737]
ea9c93cc
UD
6177 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
6178 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
6179 at least gotntpoff relocation and addition.
6180 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6181 Likewise.
6182 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6183 Likewise.
6184 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6185 Likewise.
6186
9dcafc55
UD
61872005-01-06 Ulrich Drepper <drepper@redhat.com>
6188
6189 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
6190 entry for static tls deallocation fix.
6191 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
6192 also contains information whether the memory pointed to is static
6193 TLS or not.
6194 * sysdeps/i386/tls.h: Likewise.
6195 * sysdeps/ia64/tls.h: Likewise.
6196 * sysdeps/powerpc/tls.h: Likewise.
6197 * sysdeps/s390/tls.h: Likewise.
6198 * sysdeps/sh/tls.h: Likewise.
6199 * sysdeps/sparc/tls.h: Likewise.
6200 * sysdeps/x86_64/tls.h: Likewise.
6201
a71c152c
UD
62022004-12-27 Ulrich Drepper <drepper@redhat.com>
6203
6204 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6205
d143c49e
UD
62062004-12-21 Jakub Jelinek <jakub@redhat.com>
6207
6208 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6209 %esp.
6210 * Makefile (tests): Add tst-align2.
6211 * tst-align2.c: New test.
6212 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6213 -mpreferred-stack-boundary=4.
6214
50130ded
RM
62152004-12-18 Roland McGrath <roland@redhat.com>
6216
6217 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6218 New file removed withdrawn for the moment.
6219
cbc53df0
RH
62202004-12-17 Richard Henderson <rth@redhat.com>
6221
6222 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6223 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 6224
fb9d5c73
UD
62252004-12-16 Ulrich Drepper <drepper@redhat.com>
6226
03332aa6
UD
6227 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6228 Increased PTHREAD_STACK_MIN.
6229
fb9d5c73
UD
6230 * tst-context1.c (stacks): Use bigger stack size.
6231
e853ea00
UD
62322004-12-16 Jakub Jelinek <jakub@redhat.com>
6233
6234 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6235 * sysdeps/sparc/tcb-offsets.sym: Add TID.
6236
f23673fc
UD
62372004-12-15 Jakub Jelinek <jakub@redhat.com>
6238
6239 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6240 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6241 * sysdeps/s390/tcb-offsets.sym (TID): Add.
6242
917fbe70
UD
62432004-12-15 Ulrich Drepper <drepper@redhat.com>
6244
6245 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6246
1f9d7c27
UD
62472004-12-14 Ulrich Drepper <drepper@redhat.com>
6248
6249 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6250 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6251
6252 * tst-getpid1.c: If child crashes, report this first. Print which
6253 signal.
6254
bf7c04cd
UD
62552004-12-09 Ulrich Drepper <drepper@redhat.com>
6256
6257 * init.c (__pthread_initialize_minimal_internal): Also unblock
6258 SIGSETXID.
6259
62602004-12-01 Jakub Jelinek <jakub@redhat.com>
6261
6262 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6263 _POSIX_THREAD_CPUTIME): Define to 0.
6264 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6265 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6266 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6267 __timer_signal_thread_tclk): Remove.
6268 (init_module): Remove their initialization.
6269 (thread_cleanup): Remove their cleanup assertions.
6270 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6271 __timer_signal_thread_tclk): Remove.
6272 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 6273 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
6274 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6275
484cc801
UD
62762004-12-07 Jakub Jelinek <jakub@redhat.com>
6277
6278 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6279 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6280
6281 * Makefile (tests): Add tst-getpid2.
6282 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6283 (do_test): Use it. Use __clone2 instead of clone on ia64.
6284 * tst-getpid2.c: New test.
6285
2da9a6a1
UD
62862004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6287
6288 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6289
1ff241b8
UD
62902004-12-04 Ulrich Drepper <drepper@redhat.com>
6291
6292 * Makefile (tests): Add tst-getpid1.
6293 * tst-getpid1.c: New file.
6294 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6295 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6296
3f488b9c
RM
62972004-12-02 Roland McGrath <roland@redhat.com>
6298
6299 * Makefile (libpthread-nonshared): Variable removed.
6300 ($(objpfx)libpthread_nonshared.a): Target removed.
6301 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6302 These are now handled by generic magic from
6303 libpthread-static-only-routines being set.
6304
597ce09c
UD
63052004-11-27 Ulrich Drepper <drepper@redhat.com>
6306
6307 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6308 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6309 _POSIX_THREAD_PRIO_PROTECT): Define.
6310 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6311 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6312 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6313
60e4523a
UD
63142004-11-26 Jakub Jelinek <jakub@redhat.com>
6315
6316 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6317 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6318 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6319 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6320 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6321 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6322 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6323
f1f2cafc
UD
63242004-11-24 Ulrich Drepper <drepper@redhat.com>
6325
bca2d208
UD
6326 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6327
f1f2cafc
UD
6328 * Makefile (libpthread-routines): Add pthread_setschedprio.
6329 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6330 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6331 * pthread_setschedprio.c: New file.
6332
b639d0c9
UD
63332004-11-20 Jakub Jelinek <jakub@redhat.com>
6334
ef2bb413
UD
6335 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6336 * pthread_cancel.c (pthread_create): Likewise.
6337
b639d0c9
UD
6338 * Makefile (libpthread-routines): Add vars.
6339 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6340 * init.c (__default_stacksize, __is_smp): Remove.
6341 * vars.c: New file.
6342 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6343 and define a wrapper macro.
6344 (PTHREAD_STATIC_FN_REQUIRE): Define.
6345 * allocatestack.c (__find_thread_by_id): Undefine.
6346 * pthread_create (__pthread_keys): Remove.
6347 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6348 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6349 PTHREAD_STATIC_FN_REQUIRE.
6350
3defcff3
UD
63512004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6352
6353 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6354 parameter to REGISTER macro.
6355
ec188f92
RM
63562004-11-17 Roland McGrath <roland@redhat.com>
6357
6358 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6359 Make sure SIGCANCEL is blocked as well.
6360
ccd8de9a
UD
63612004-11-10 Jakub Jelinek <jakub@redhat.com>
6362
6363 * sysdeps/pthread/setxid.h: New file.
6364 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6365 (struct xid_command): Add forward decl.
6366 (struct pthread_functions): Change return type of __nptl_setxid hook
6367 to int.
6368 * pthreadP.h (__nptl_setxid): Change return type to int.
6369 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6370 calling thread, return its return value and set errno on failure.
6371 * descr.h (struct xid_command): Change id type to long array.
6372
6373 * Makefile: Add rules to build and test tst-setuid1 and
6374 tst-setuid1-static.
6375 * tst-setuid1.c: New test.
6376 * tst-setuid1-static.c: New test.
6377
ed2ced8a
UD
63782004-11-10 Jakub Jelinek <jakub@redhat.com>
6379
6380 * Makefile (tests): Add tst-exit3.
6381 * tst-exit3.c: New test.
6382
948603ee
UD
63832004-11-09 Ulrich Drepper <drepper@redhat.com>
6384
6385 * Makefile (tests): Add tst-exit2.
6386 * tst-exit2.c: New file.
6387
ba5ffd2a
RM
63882004-11-09 Roland McGrath <roland@redhat.com>
6389
6390 [BZ #530]
6391 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6392 here, before calling clone.
6393 * pthread_create.c (start_thread): Don't do it here.
6394
c4d7bd39
RM
63952004-11-02 Jakub Jelinek <jakub@redhat.com>
6396
6397 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6398
543fb0c8
UD
63992004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6400
6401 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6402 Set ETIMEDOUT to errno when time is up. Tweak to avoid
6403 assembler warning.
6404
a1fbd858
UD
64052004-10-28 Jakub Jelinek <jakub@redhat.com>
6406
6407 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6408 if sched_priority is not between minprio and maxprio.
6409
c2a4357a
UD
64102004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6411
6412 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6413 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6414
6415 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6416 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6417
78d8d211
UD
64182004-10-24 Ulrich Drepper <drepper@redhat.com>
6419
6420 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6421 not-cancelable I/O functions.
6422
dd28590f
UD
64232004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6424
6425 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6426 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6427 make sure 2 is stored in the futex and we looked at the old value.
6428 Fix a few other problems to return the correct value.
6429
f8c97af7
RH
64302004-10-14 Richard Henderson <rth@redhat.com>
6431
6432 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6433 make gcc4 happy.
6434
3feb8efa
UD
64352004-10-06 Jakub Jelinek <jakub@redhat.com>
6436
6437 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6438 of pthread-functions.h and pthreaddef.h.
6439 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6440
6441 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6442 Change __data.__nwaiters from int to unsigned int.
6443
6444 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6445 sysconf (_SC_THREAD_CPUTIME) returns negative value.
6446
6447 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6448 before return type.
6449
6450 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6451 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6452
67060ef5
UD
64532004-10-06 Ulrich Drepper <drepper@redhat.com>
6454
6455 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
6456 test fails, remove message queue.
6457 (tf_msgsnd): Likewise.
6458
f38a3086
UD
64592004-10-05 Jakub Jelinek <jakub@redhat.com>
6460
6461 * tst-clock1.c: Change #ifdef to #if defined.
6462 * tst-clock2.c: Likewise.
6463 * tst-cond11.c: Likewise.
6464
2c03b6db
UD
6465 * sysdeps/pthread/timer_create.c (timer_create): Use
6466 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6467 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6468 THREAD_CPUTIME.
6469
6ab5f50d
UD
64702004-10-05 Jakub Jelinek <jakub@redhat.com>
6471
6472 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6473 _POSIX_THREAD_CPUTIME): Define to 0.
6474
e4bb4853
UD
64752004-10-04 Ulrich Drepper <drepper@redhat.com>
6476
6477 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6478 and _POSIX_THREAD_CPUTIME to zero.
6479 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6480 * tst-barrier2.c: Fix testing for POSIX feature.
6481 * tst-clock1.c: Likewise.
6482 * tst-clock2.c: Likewise.
6483 * tst-cond11.c: Likewise.
6484 * tst-cond4.c: Likewise.
6485 * tst-cond6.c: Likewise.
6486 * tst-flock2.c: Likewise.
6487 * tst-mutex4.c: Likewise.
6488 * tst-mutex9.c: Likewise.
6489 * tst-rwlock12.c: Likewise.
6490 * tst-rwlock4.c: Likewise.
6491 * tst-signal1.c: Likewise.
6492 * tst-spin2.c: Likewise.
6493 * sysdeps/pthread/posix-timer.h: Likewise.
6494 * sysdeps/pthread/timer_create.c: Likewise.
6495 * sysdeps/pthread/timer_routines.c: Likewise.
6496
c1b48791
UD
64972004-10-01 Ulrich Drepper <drepper@redhat.com>
6498
927f0673
UD
6499 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6500 (__lll_mutex_timedlock_wait): Address futex correctly.
6501
c1b48791 6502 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 6503 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
6504 make sure 2 is stored in the futex and we looked at the old value.
6505 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6506 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
6507 which might very well made the code not working at all before.
7b87aca6 6508 [BZ #417]
c1b48791 6509
e9f4e844
UD
65102004-09-28 Ulrich Drepper <drepper@redhat.com>
6511
4f21c95d
UD
6512 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6513 allow SIGSETXID to be sent.
6514 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6515 for SIGSETXID to be defined.
6516 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6517 SIGSETXID cannot be blocked.
6518
e9f4e844
UD
6519 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6520 Add __extension__ to long long types.
6521 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6522 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6523 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6524 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6525 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6526 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6527 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6528
5f66b766
UD
65292004-09-25 Ulrich Drepper <drepper@redhat.com>
6530
6531 * descr.h (struct pthread): Add stopped_start field.
6532 * sysdeps/pthread/createthread.c (create_thread): Set
6533 start_stopped flag in descriptor for new thread appropriately.
6534 * pthread_create.c (start_thread): Only take lock to be stopped on
6535 startup if stopped_start flag says so.
6536
362038b0
UD
65372004-09-24 Ulrich Drepper <drepper@redhat.com>
6538
3f80a99b
UD
6539 * pthread_create.c (__pthread_create_2_1): Remember whether thread
6540 is created detached and if yes, do not try to free the stack in case
6541 the thread creation failed.
6542 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6543 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6544 case there has been no error. [BZ #405]
6545
362038b0
UD
6546 * pthread_create.c (start_thread): Don't wait for scheduler data
6547 etc to be set at the beginning of the function. The cancellation
6548 infrastructure must have been set up. And enable async
6549 cancellation before potentially going to sleep. [BZ #401]
6550
65f0beb9
UD
65512004-09-20 Ulrich Drepper <drepper@redhat.com>
6552
3c12b91a 6553 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
6554 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6555 for now.
6556 * Makefile: Don't build pthread_set*id code for now.
6557
2edb61e3
UD
65582004-09-19 Ulrich Drepper <drepper@redhat.com>
6559
6560 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6561 internal use.
6562 * allocatestack.c (__nptl_setxid): New function.
6563 * descr.h (struct xid_command): Define type.
6564 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6565 (sighandler_setxid): New function.
6566 (__pthread_initialize_minimal): Register sighandler_setxid for
6567 SIGCANCEL.
6568 * pt-allocrtsig.c: Update comment.
6569 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
6570 Declare __nptl_setxid.
6571 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6572 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6573 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6574 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6575 and pthread_setresuid_np.
6576 * pthread_setgid_np.c: New file.
6577 * pthread_setuid_np.c: New file.
6578 * pthread_setegid_np.c: New file.
6579 * pthread_seteuid_np.c: New file.
6580 * pthread_setregid_np.c: New file.
6581 * pthread_setreuid_np.c: New file.
6582 * pthread_setresgid_np.c: New file.
6583 * pthread_setresuid_np.c: New file.
6584 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6585 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6586 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6587 and pthread_setresuid_np.
6588 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6589 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6590 pthread_setregid, and pthread_setresgid.
6591
1ab1fa6f
UD
65922004-09-18 Ulrich Drepper <drepper@redhat.com>
6593
6594 * allocatestack.c (allocate_stack): Return EAGAIN instead of
6595 ENOMEM when out of memory.
6596
ae9e6b36
RM
65972004-09-10 Roland McGrath <roland@redhat.com>
6598
6599 [BZ #379]
6600 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6601 code, since we don't try to use the broken CLONE_STOPPED any more.
6602 * pthread_create.c (start_thread): Likewise.
6603
424bd2f8
RH
66042004-09-15 Richard Henderson <rth@redhat.com>
6605
6606 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6607
17b8a52d
UD
66082004-09-01 David Mosberger <davidm@hpl.hp.com>
6609
6610 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6611 (__libc_unwind_longjmp): Delete macro and declare as function.
6612 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6613 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6614 nptl directory.
6615 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6616 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6617 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6618
ccc63b07
UD
66192004-09-12 Ulrich Drepper <drepper@redhat.com>
6620
6621 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6622 for __USE_XOPEN2K.
6623 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6624 types also for __USE_XOPEN2K.
6625 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6626 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6627 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6628 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6629 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6630 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6631 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6632 [BZ #320]
6633
31f93b3b
UD
66342004-09-08 Ulrich Drepper <drepper@redhat.com>
6635
6636 * sysdeps/pthread/pthread.h
6637 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6638 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6639 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6640 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6641 [BZ #375]
6642
e0329987
UD
66432004-09-07 Ulrich Drepper <drepper@redhat.com>
6644
590b40f7
UD
6645 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6646 PSEUDO to be used with . prefix.
6647
67254a97
UD
6648 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6649 Use atomic_increment instead of atomic_exchange_and_add.
6650 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6651 Likewise.
6652 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6653 Likewise.
6654 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6655 Likewise.
6656
6657 * allocatestack.c (allocate_stack): Use atomic_increment_val
6658 instead of atomic_exchange_and_add.
6659 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6660 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6661 Likewise.
6662 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6663 Likewise.
6664
e0329987
UD
6665 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6666 the initialization function might throw.
6667
42d86dd6 66682005-09-05 Richard Henderson <rth@redhat.com>
e0329987 6669
42d86dd6
RH
6670 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6671 Move definition inside libpthread, libc, librt check. Provide
6672 definition for rtld.
6673
73f7c32c
UD
66742004-09-02 Ulrich Drepper <drepper@redhat.com>
6675
f76c8499
UD
6676 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6677 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6678 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6679 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6680 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6681 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6682 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6683 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6684 * unwind.c: Use it.
6685
73f7c32c
UD
6686 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6687 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6688 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6689 Likewise.
6690 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6691 Decrement __nwaiters. If pthread_cond_destroy has been called and
6692 this is the last waiter, signal pthread_cond_destroy caller and
6693 avoid using the pthread_cond_t structure after unlock.
6694 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6695 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6696 Read clock type from the least significant bits of __nwaiters instead
6697 of __clock.
6698 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6699 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6700
67012004-08-31 Jakub Jelinek <jakub@redhat.com>
6702
6703 [BZ #342]
6704 * Makefile (tests): Add tst-cond20 and tst-cond21.
6705 * tst-cond20.c: New test.
6706 * tst-cond21.c: New test.
6707 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6708 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6709 it unsigned int.
6710 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6711 Likewise.
6712 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6713 (pthread_cond_t): Likewise.
6714 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6715 Likewise.
6716 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6717 Likewise.
6718 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6719 Likewise.
6720 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6721 (cond_nwaiters): New.
6722 (clock_bits): New.
6723 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6724 if there are waiters not signalled yet.
6725 Wait until all already signalled waiters wake up.
6726 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6727 __nwaiters. If pthread_cond_destroy has been called and this is the
6728 last waiter, signal pthread_cond_destroy caller and avoid using
6729 the pthread_cond_t structure after unlock.
6730 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6731 decrement it when leaving. If pthread_cond_destroy has been called
6732 and this is the last waiter, signal pthread_cond_destroy caller.
6733 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6734 Likewise. Read clock type from the least significant bits of
6735 __nwaiters instead of __clock.
6736 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6737 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6738 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6739 clock type just from the last COND_CLOCK_BITS bits of value.
6740 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6741 instead of __clock, just from second bit of condattr's value.
6742
409f7493
UD
67432004-08-30 Jakub Jelinek <jakub@redhat.com>
6744
6745 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6746 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6747 != 64.
6748 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6749
92c6ccd1
RM
67502004-08-15 Roland McGrath <roland@frob.com>
6751
6752 * pthread_atfork.c: Update copyright terms including special exception
6753 for these trivial files, which are statically linked into executables
6754 that use dynamic linking for the significant library code.
6755
4d004cfb
UD
67562004-08-09 Jakub Jelinek <jakub@redhat.com>
6757
6758 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6759 pthread_rwlock_rdlock.
6760 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6761 Decrease __nr_readers_queued after reacquiring lock.
6762 * sysdeps/pthread/pthread_rwlock_timedrdlock
6763 (pthread_rwlock_timedrdlock): Likewise.
6764 Reported by Bob Cook <bobcook47@hotmail.com>.
6765
90595fb6
RM
67662004-08-11 Jakub Jelinek <jakub@redhat.com>
6767
6768 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6769 before pthread_barrier_wait.
6770
fa46f7ab
UD
67712004-08-07 Ulrich Drepper <drepper@redhat.com>
6772
6773 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6774 Remove unnecessary exception handling data.
6775
15ef4b55
UD
67762004-07-23 Jakub Jelinek <jakub@redhat.com>
6777
6778 [BZ #284]
6779 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6780 instead of clockid_t.
6781
4fb907b7
RM
67822004-07-21 Roland McGrath <roland@redhat.com>
6783
6784 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6785
67862004-07-19 Roland McGrath <roland@redhat.com>
6787
6788 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6789
8f73811b
RM
67902004-07-02 Roland McGrath <roland@redhat.com>
6791
6792 * configure: Don't exit.
6793
290639c3
UD
67942004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6795
6796 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6797 (__pthread_cond_timedwait): Check for invalid nanosecond in
6798 timeout value.
6799
8e5aaad9
UD
68002004-07-07 Ulrich Drepper <drepper@redhat.com>
6801
6802 * Makefile: Add rules to build and run tst-fini1.
6803 * tst-fini1.c: New file.
6804 * tst-fini1mod.c: New file.
6805
ce6e047f
UD
68062004-07-05 Ulrich Drepper <drepper@redhat.com>
6807
6808 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6809 if no cancellation support is needed.
6810 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6811 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6812 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6813 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6814 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6815 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6816 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6817 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6818 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6819
6820 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6821 only if not already defined.
6822
9b9ef823
UD
68232004-07-05 Jakub Jelinek <jakub@redhat.com>
6824
2dd18ce2
UD
6825 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6826 constraint "m" instead of "0" for futex.
6827
9b9ef823
UD
6828 * shlib-versions: Add powerpc64-.*-linux.*.
6829
38205402
UD
68302004-07-04 Jakub Jelinek <jakub@redhat.com>
6831
6832 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6833 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6834 for valid tv_nsec.
6835 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6836 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6837 bits.
6838
78a9c837
RM
68392004-06-29 Roland McGrath <roland@redhat.com>
6840
6841 * Banner: NPTL no longer has its own version number.
6842 * Makefile (nptl-version): Variable removed.
6843 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6844 using $(version), the glibc version number.
6845
d3d35527
UD
68462004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6847
6848 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6849 Fix branch offset for a PLT entry.
6850 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6851 Likewise.
6852 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6853 Likewise.
6854 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6855 Likewise.
6856 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6857 Likewise.
6858
346f18ae
UD
68592004-06-28 Jakub Jelinek <jakub@redhat.com>
6860
6861 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6862 unconditionally.
6863
f3a19754
UD
68642004-06-28 Jakub Jelinek <jakub@redhat.com>
6865
6866 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6867 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6868 instead of tv_sec.
6869 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6870 (pthread_rwlock_timedrdlock): Likewise.
6871
539842a4
UD
68722004-06-22 Jakub Jelinek <jakub@redhat.com>
6873
6874 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6875 Set __r7 to val, not mutex.
6876
46f4c578
UD
68772004-06-27 Ulrich Drepper <drepper@redhat.com>
6878
6879 * Makefile: Add rules to build tst-rwlock14.
6880 * tst-rwlock14.c: New file.
6881
68822004-06-24 Boris Hu <boris.hu@intel.com>
6883
6884 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6885 check.
6886 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6887
9898e99c
AJ
68882004-06-19 Andreas Jaeger <aj@suse.de>
6889
6890 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6891 assembler in last patch.
6892
7c3164bc
UD
68932004-06-17 Ulrich Drepper <drepper@redhat.com>
6894
6895 * sysdeps/pthread/pthread_cond_timedwait.c
6896 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6897 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6898 (__pthread_cond_timedwait): Check for invalid nanosecond in
6899 timeout value.
6900 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6901 * tst-cond19.c: New file.
6902 * Makefile: Add rules to build and run tst-cond19.
6903
72e61500
UD
69042004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6905
6906 * tst-context1.c (GUARD_PATTERN): Defined.
6907 (tst_context_t): Define struct containing ucontext_t & guard words.
6908 (ctx): Declare as an array of tst_context_t.
6909 (fct): Verify uc_link & guard words are still valid.
6910 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6911
7c370086
UD
69122004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6913
6914 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6915 Add __data.__futex field, reshuffle __data.__clock.
6916 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6917 (__pthread_cond_signal): Increment __futex at the same time as
6918 __wakeup_seq or __total_seq. Pass address of __futex instead of
6919 address of low 32-bits of __wakeup_seq to futex syscall.
6920 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6921 (__pthread_cond_wait): Likewise. Pass __futex value from before
6922 releasing internal lock to FUTEX_WAIT.
6923 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6924 (__pthread_cond_timedwait): Likewise.
6925 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6926 (FUTEX_CMP_REQUEUE): Define.
6927 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6928 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6929 Pass __futex value from before the unlock and __futex address instead
6930 of address of low 32-bits of __wakeup_seq to futex syscall.
6931 Fallback to FUTEX_WAKE all on any errors.
6932
a9e526e7
RM
69332004-06-08 Jakub Jelinek <jakub@redhat.com>
6934
6935 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6936 comment typo.
6937 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6938 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6939 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6940 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6941 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6942
f1847a84
RM
69432004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6944
6945 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6946 Add memory clobber to inline assembly.
6947 (__lll_mutex_trylock): Likewise.
6948 (__lll_mutex_cond_trylock): Likewise.
6949
f7c81e1a
UD
69502004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6951
6952 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6953 Pass val argument as 6th system call argument in %r7.
6954
75fccede
UD
69552004-05-21 Jakub Jelinek <jakub@redhat.com>
6956
6957 * Makefile (tests): Add tst-cond16.
6958 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6959 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6960 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6961 Add __data.__futex field, reshuffle __data.__clock.
6962 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6963 (__pthread_cond_signal): Increment __futex at the same time as
6964 __wakeup_seq or __total_seq. Pass address of __futex instead of
6965 address of low 32-bits of __wakeup_seq to futex syscall.
6966 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6967 (__pthread_cond_wait): Likewise. Pass __futex value from before
6968 releasing internal lock to FUTEX_WAIT.
6969 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6970 (__pthread_cond_timedwait): Likewise.
6971 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6972 (FUTEX_CMP_REQUEUE): Define.
6973 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6974 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6975 Pass __futex value from before the unlock and __futex address instead
6976 of address of low 32-bits of __wakeup_seq to futex syscall.
6977 Fallback to FUTEX_WAKE all on any errors.
6978 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6979 Define.
6980 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6981 internally. Return non-zero if error, zero if success.
6982 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6983 Add __data.__futex field, reshuffle __data.__clock.
6984 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6985 Define.
6986 (lll_futex_requeue): Add val argument, return 1 unconditionally
6987 for the time being.
6988 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6989 Add __data.__futex field, reshuffle __data.__clock.
6990 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6991 Define.
6992 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6993 internally. Return non-zero if error, zero if success.
6994 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6995 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6996 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6997 Define.
6998 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6999 internally. Return non-zero if error, zero if success.
7000 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
7001 Add __data.__futex field, reshuffle __data.__clock.
7002 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
7003 Define.
7004 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7005 internally. Return non-zero if error, zero if success.
7006 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
7007 Add __data.__futex field, reshuffle __data.__clock.
7008 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
7009 Add __data.__futex field, reshuffle __data.__clock.
7010 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
7011 Increment __futex at the same time as __wakeup_seq or __total_seq.
7012 Pass address of __futex instead of address of low 32-bits of
7013 __wakeup_seq to futex syscall.
7014 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7015 Pass __futex value from before releasing internal lock
7016 to FUTEX_WAIT.
7017 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7018 Likewise. Avoid unnecessary shadowing of variables.
7019 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
7020 Set __futex to 2 * __total_seq. Pass __futex value from before the
7021 unlock and __futex address instead of address of low 32-bits of
7022 __wakeup_seq to futex_requeue macro, adjust for new return value
7023 meaning.
7024 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
7025 (__pthread_cond_signal): Increment __futex at the same time as
7026 __wakeup_seq or __total_seq. Pass address of __futex instead of
7027 address of low 32-bits of __wakeup_seq to futex syscall.
7028 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7029 (__pthread_cond_wait): Likewise. Pass __futex value from before
7030 releasing internal lock to FUTEX_WAIT.
7031 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7032 (__pthread_cond_timedwait): Likewise.
7033 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7034 (FUTEX_CMP_REQUEUE): Define.
7035 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
7036 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
7037 Pass __futex value from before the unlock and __futex address instead
7038 of address of low 32-bits of __wakeup_seq to futex syscall.
7039 Fallback to FUTEX_WAKE all on any errors.
7040
70412004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7042
7043 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
7044 Add nop to align the end of critical section.
7045 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
7046
fbf86dda
UD
70472004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7048
7049 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7050 Add __broadcast_seq field.
7051 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
7052 all waiters as woken with woken_seq and bump broadcast counter.
7053 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
7054 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
7055 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7056 Comment typo fixes. Avoid returning -ETIMEDOUT.
7057
70582004-06-01 Ulrich Drepper <drepper@redhat.com>
7059
7060 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7061 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
7062 Reported by Kaz Kojima.
7063
ffdd5e50
UD
70642004-05-25 Jakub Jelinek <jakub@redhat.com>
7065
7066 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
7067
3abc82c8
UD
70682004-05-21 Jakub Jelinek <jakub@redhat.com>
7069
7070 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
7071 __broadcast_seq with bc_seq after acquiring internal lock instead of
7072 before it.
7073
893a3511
UD
70742004-05-18 Jakub Jelinek <jakub@redhat.com>
7075
7076 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
7077 compilation.
7078 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7079 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
7080 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7081 (pthread_cond_t): Add __data.__broadcast_seq field.
7082 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7083 (FRAME_SIZE): Define.
7084 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
7085 Comment typo fixes.
7086 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
7087 Define.
7088 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
7089 typo fixes.
7090 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7091 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
7092 fixes.
7093
70942004-05-18 Ulrich Drepper <drepper@redhat.com>
7095
7096 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
7097 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
7098 Add __broadcast_seq field.
7099 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7100 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7101 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7102 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7103 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7104 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
7105 all waiters as woken with woken_seq and bump broadcast counter.
7106 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
7107 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
7108 __broadcast_seq field.
7109 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7110 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7111 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7112 * pthread_cond_init.c: Initialize __broadcast_seq field.
7113 * Makefile (tests): Add tst-cond17 and tst-cond18.
7114 Add .NOTPARALLEL goal.
7115 * tst-cond16.c: New file. From Jakub.
7116 * tst-cond17.c: New file. From Jakub.
7117 * tst-cond18.c: New file. From Jakub.
7118
4123718e
UD
71192004-05-16 Ulrich Drepper <drepper@redhat.com>
7120
7121 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
7122 unwind info.
7123
7124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
7125 Parametrize frame size. Correct some unwind info.
7126 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7127
2d7ae210
UD
71282004-05-04 Jakub Jelinek <jakub@redhat.com>
7129
7130 * tst-stack3.c: Note testing functionality beyond POSIX.
7131
50c2b6d7
UD
71322004-05-04 Jakub Jelinek <jakub@redhat.com>
7133
7134 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
7135 Change conditional from ifdef to if.
7136
27b02589
UD
71372004-04-23 Jakub Jelinek <jakub@redhat.com>
7138
7139 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
7140 SYSDEP_CANCEL_ERROR): Define.
7141 (PSEUDO): Use it.
7142
4bb8fc33
UD
71432004-05-01 Jakub Jelinek <jakub@redhat.com>
7144
7145 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
7146
f9a06dc1
UD
71472004-04-20 Jakub Jelinek <jakub@redhat.com>
7148
7149 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
7150
d3b52028
UD
71512004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7152
7153 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
7154 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7155 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
7156 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7157
a5dd0a6c
UD
71582004-04-19 Ulrich Drepper <drepper@redhat.com>
7159
7160 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
7161 thread has all signals blocked.
7162
620c3354
AJ
71632004-04-18 Andreas Jaeger <aj@suse.de>
7164
7165 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
7166 (SEM_VALUE_MAX): Add missing brace.
7167
1683daeb
UD
71682004-04-17 Jakub Jelinek <jakub@redhat.com>
7169
7170 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
7171 in rt subdir.
7172 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
7173 * sysdeps/pthread/tst-mqueue8x.c: New test.
7174 * tst-cancel4.c: Update comment about message queues.
7175
7176 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
7177 return it_value { 0, 0 }.
7178 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
7179 like SIGEV_SIGNAL.
7180 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
7181 assertion for SIGEV_NONE.
7182 (thread_attr_compare): Compare all attributes, not just a partial
7183 subset.
7184
71852004-04-17 Jakub Jelinek <jakub@redhat.com>
7186
7187 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
7188
f532641d
UD
71892004-04-17 Ulrich Drepper <drepper@redhat.com>
7190
7191 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
7192 Just use a plain number.
7193 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
7194 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
7195 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7196 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7197 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7198 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7199 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7200
7eb7fdda
UD
72012004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7202
53392906
UD
7203 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7204 frame info.
7205 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 7206
d7ba1313
UD
72072004-04-15 Jakub Jelinek <jakub@redhat.com>
7208
7209 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7210 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7211 of calling sigwaitinfo.
7212
5adac0e4
UD
72132004-04-16 Ulrich Drepper <drepper@redhat.com>
7214
7215 * allocatestack.c (allocate_stack): Set reported_guardsize
7216 unconditionally.
7217 * pthread_getattr_np.c (pthread_getattr_np): Use
7218 reported_guardsize instead of guardsize.
7219 * descr.h (struct pthread): Add reported_guardsize field.
7220
f93fa7d4
UD
72212004-04-13 Jakub Jelinek <jakub@redhat.com>
7222
7223 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7224
1b82c6c7
UD
72252004-04-12 Ulrich Drepper <drepper@redhat.com>
7226
7227 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7228
72292004-04-08 Jakub Jelinek <jakub@redhat.com>
7230
7231 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7232 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7233 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7234 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7235 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7236 Define.
7237 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7238 (_POSIX_MESSAGE_PASSING): Define.
7239 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7240 (_POSIX_MESSAGE_PASSING): Define.
7241 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7242 (_POSIX_MESSAGE_PASSING): Define.
7243
e6eb894e
UD
72442004-04-04 Ulrich Drepper <drepper@redhat.com>
7245
7246 * tst-context1.c (fct): Check whether correct stack is used.
7247
1e084487
UD
72482004-04-03 Ulrich Drepper <drepper@redhat.com>
7249
4e73e115
UD
7250 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7251 matching constraints for asm mem parameters.
7252
1e084487
UD
7253 * tst-clock2.c (tf): Don't define unless needed.
7254
feca5e0b
UD
72552004-03-30 H.J. Lu <hongjiu.lu@intel.com>
7256
7257 * Makefile (link-libc-static): Use $(static-gnulib) instead of
7258 $(gnulib).
7259
3fa21fd8
UD
72602004-03-30 Ulrich Drepper <drepper@redhat.com>
7261
7262 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7263 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7264 * pthreadP.h: Declare __nptl_deallocate_tsd.
7265 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7266 Adjust caller.
7267
7268 * Makefile (tests): Add tst-tsd5.
7269 * tst-tsd5.c: New file.
7270
8e32efa6
UD
72712004-03-29 Ulrich Drepper <drepper@redhat.com>
7272
7273 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7274 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7275 is SHLIB_COMPAT check.
7276 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7277 (__pthread_attr_getaffinity_old): Likewise.
7278 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7279 (__pthread_getaffinity_old): Likewise.
7280 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7281 (__pthread_setaffinity_old): Likewise.
7282
eec8b6ca
UD
72832004-03-26 Ulrich Drepper <drepper@redhat.com>
7284
7285 * allocatestack.c (_make_stacks_executable): Call
7286 _dl_make_stack_executable first.
7287
db2f05ba
RM
72882004-03-24 Roland McGrath <roland@redhat.com>
7289
7290 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7291 constraint instead of "0".
7292
6abbc501
UD
72932004-03-24 Ulrich Drepper <drepper@redhat.com>
7294
68dc4dcb
UD
7295 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7296 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7297
6abbc501
UD
7298 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7299 code to avoid warning.
7300
865e14d9
AJ
73012004-03-24 Andreas Jaeger <aj@suse.de>
7302
7303 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7304 (__pthread_attr_setaffinity_old): Remove const.
7305
16b06b70
UD
73062004-03-23 Ulrich Drepper <drepper@redhat.com>
7307
2c0b891a
UD
7308 * sysdeps/unix/sysv/linux/smp.h: New file.
7309 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7310 * init.c: Define __is_smp.
7311 (__pthread_initialize_minimal_internal): Call is_smp_system to
7312 initialize __is_smp.
7313 * pthreadP.h: Declare __is_smp.
7314 Define MAX_ADAPTIVE_COUNT is necessary.
7315 * pthread_mutex_init.c: Add comment regarding __spins field.
7316 * pthread_mutex_lock.c: Implement adaptive mutex type.
7317 * pthread_mutex_timedlock.c: Likewise.
7318 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7319 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7320 Add __spins field.
7321 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7322 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7323 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7324 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7325 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7326 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7327 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7328 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7329 lll_mutex_cond_trylock.
7330 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7331 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7332 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7333 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7334 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7335 Define BUSY_WAIT_NOP.
7336 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7337 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7338
7339 * tst-mutex5.c: Add support for testing adaptive mutexes.
7340 * tst-mutex7.c: Likewise.
7341 * tst-mutex5a.c: New file.
7342 * tst-mutex7a.c: New file.
7343 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7344
565699e4
UD
7345 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7346 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 7347 vgettimeofday call might destroy the content.
565699e4 7348
7fe1586f
UD
7349 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7350 @pause in the loop.
7351
e408880b
UD
7352 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7353 No need to restrict type of ret. Make it int. Add comment.
7354
16b06b70
UD
7355 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7356 Remove unnecessary setne instruction.
7357
61645263
UD
73582004-03-22 Jakub Jelinek <jakub@redhat.com>
7359
7360 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7361 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7362 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7363 If realloc fails, break out of the loop.
7364
e3d4c585
AJ
73652004-03-20 Andreas Jaeger <aj@suse.de>
7366
7367 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7368 (__pthread_setaffinity_old): Fix interface.
7369 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7370 (__pthread_getaffinity_old): Likewise.
7371
7372 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7373 (__pthread_setaffinity_new): Remove duplicate declaration.
7374
3abb1ff7
UD
73752004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7376
7377 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7378 the return value to a safe register.
7379 (CDISABLE): Set the function argument correctly.
7380
07bd2a3f
UD
73812004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7382
7383 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7384 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7385 Rewrite so that only one locked memory operation per round is needed.
7386 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7387 (pthread_barrier_wait): After wakeup, release lock only when the
7388 last thread stopped using the barrier object.
7389 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7390 (__pthread_cond_wait): Don't store mutex address if the current
7391 value is ~0l. Add correct cleanup support and unwind info.
7392 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7393 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7394 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7395 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7396 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7397 Add correct cleanup support and unwind info.
7398 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7399 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7400 information for syscall wrappers.
7401
14c35863
UD
74022004-03-18 Ulrich Drepper <drepper@redhat.com>
7403
7404 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7405 cpusetsize field, remove next.
7406 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7407 parameter for size of the CPU set.
7408 (pthread_setaffinity_np): Likewise.
7409 (pthread_attr_getaffinity_np): Likewise.
7410 (pthread_attr_setaffinity_np): Likewise.
7411 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7412 interface change, keep compatibility code.
7413 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7414 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7415 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7416 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
7417 __pthread_getaffinity_np.
7418 * Versions: Add version for changed interfaces.
7419 * tst-attr3.c: Adjust test for interface change.
7420 * pthread_getattr_np.c: Query the kernel about the affinity mask with
7421 increasing buffer sizes.
7422 * pthread_attr_destroy.c: Remove unused list handling.
7423 * pthread_attr_init.c: Likewise.
7424
8e115d80
RM
74252004-03-17 Roland McGrath <roland@redhat.com>
7426
7427 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7428 first argument to clock_getres so we ever enable kernel timers.
7429
e3b22ad3
UD
74302004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
7431
7432 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7433
841153fa
RH
74342004-03-12 Richard Henderson <rth@redhat.com>
7435
e3b22ad3
UD
7436 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7437 oldvalue from CENABLE to CDISABLE.
841153fa 7438
932dfea7
UD
74392004-03-12 Ulrich Drepper <drepper@redhat.com>
7440
7441 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7442 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7443 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7444 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7445
9852f6dc
RH
74462004-03-11 Richard Henderson <rth@redhat.com>
7447
7448 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7449 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7450 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7451
43513fb7
UD
74522004-03-11 Jakub Jelinek <jakub@redhat.com>
7453
7454 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7455 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7456 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7457
74582004-03-11 Jakub Jelinek <jakub@redhat.com>
7459
7460 * forward.c (__pthread_cond_broadcast_2_0,
7461 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7462 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7463 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7464
8a3e10e0
UD
74652004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7466
7467 * sysdeps/sh/tcb-offsets.sym: Add PID.
7468 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7469 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7470
6d3a2bec
UD
74712004-03-10 Ulrich Drepper <drepper@redhat.com>
7472
7473 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7474 include <sysdep-cancel.h>, vfork is no cancellation point.
7475 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7476 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7477 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7478
d3a4a571
UD
74792004-03-10 Jakub Jelinek <jakub@redhat.com>
7480
73b4ce64
UD
7481 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7482 libc_hidden_def.
7483 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7484 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7485 Likewise.
7486 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7487 Likewise.
7488 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7489 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7490 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7491 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7492 of DO_CALL_VIA_BREAK. Work around a gas problem.
7493
d682a515
UD
7494 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7495 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7496 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7497 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7498 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7499 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7500
7501 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7502 a local register for saving old PID. Negate PID in parent upon exit.
7503
d3a4a571
UD
7504 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7505 tcb-offsets.h.
7506 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7507 before syscall, set to the old value in the parent afterwards.
7508 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7509 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7510 tcb-offsets.h.
7511 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7512 before syscall, set to the old value in the parent afterwards.
7513 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7514 * sysdeps/s390/tcb-offsets.sym: Add PID.
7515
7516 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7517 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7518 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7519 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7520 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7521 * sysdeps/sparc/tcb-offsets.sym: Add PID.
7522
75232004-03-10 Andreas Schwab <schwab@suse.de>
7524
7525 * sysdeps/ia64/tcb-offsets.sym: Add PID.
7526 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7527 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7528
3f2fb223 75292004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 7530
3f2fb223
UD
7531 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7532 * tst-cancel21.c (do_one_test): Likewise.
7533 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 7534
8b9d6054
UD
75352004-02-09 Jakub Jelinek <jakub@redhat.com>
7536
7537 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7538 if non-zero and set to INT_MIN if zero.
7539 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7540 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7541 (SAVE_PID, RESTORE_PID): Define.
7542 (__vfork): Use it.
7543 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7544 Use relative path to avoid including NPTL i386/vfork.S.
7545 (SAVE_PID, RESTORE_PID): Define.
7546 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7547 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7548 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7549 tst-vfork2x.
7550 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7551 * tst-vfork1.c: New test.
7552 * tst-vfork2.c: New test.
7553 * tst-vfork1x.c: New test.
7554 * tst-vfork2x.c: New test.
7555
02287d05
UD
75562004-03-08 Ulrich Drepper <drepper@redhat.com>
7557
c072ef6d 7558 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 7559 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 7560 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 7561 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 7562
d4acd24b
UD
75632004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
7564
7565 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7566
8acb4b81
UD
75672004-03-08 H.J. Lu <hongjiu.lu@intel.com>
7568
7569 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7570 _rtld_global_ro.
7571
4d1a02ef
UD
75722004-03-07 Ulrich Drepper <drepper@redhat.com>
7573
001836c8 7574 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 7575 _rtld_global_ro.
001836c8 7576
4d1a02ef
UD
7577 * tst-once4.c: Remove unnecessary macro definition.
7578
7579 * tst-mutex7.c (do_test): Limit thread stack size.
7580 * tst-once2.c (do_test): Likewise.
7581 * tst-tls3.c (do_test): Likewise.
7582 * tst-tls1.c (do_test): Likewise.
7583 * tst-signal3.c (do_test): Likewise.
7584 * tst-kill6.c (do_test): Likewise.
7585 * tst-key4.c (do_test): Likewise.
7586 * tst-join4.c (do_test): Likewise.
7587 * tst-fork1.c (do_test): Likewise.
7588 * tst-context1.c (do_test): Likewise.
7589 * tst-cond2.c (do_test): Likewise.
7590 * tst-cond10.c (do_test): Likewise.
7591 * tst-clock2.c (do_test): Likewise.
7592 * tst-cancel10.c (do_test): Likewise.
7593 * tst-basic2.c (do_test): Likewise.
7594 * tst-barrier4.c (do_test): Likewise.
7595
aa420660
UD
75962004-03-05 Ulrich Drepper <drepper@redhat.com>
7597
7598 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7599
cff08c81
UD
76002004-03-01 Ulrich Drepper <drepper@redhat.com>
7601
7602 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7603 (__pthread_cond_timedwait): Optimize wakeup test.
7604 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7605 (__pthread_cond_wait): Likewise.
7606 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7607 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7608 Likewise.
7609
b7fe377c
UD
76102004-02-29 Ulrich Drepper <drepper@redhat.com>
7611
7612 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7613 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
7614 the atomic instruction needed.
7615 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7616 (__lll_mutex_lock_wait): Likewise.
7617
4c771a3b
UD
76182004-02-28 Ulrich Drepper <drepper@redhat.com>
7619
7620 * Makefile (tests): Add tst-cond14 and tst-cond15.
7621 * tst-cond14.c: New file.
7622 * tst-cond15.c: New file.
7623
a2c33d5a
UD
76242004-02-27 Ulrich Drepper <drepper@redhat.com>
7625
7626 * sysdeps/pthread/createthread.c (create_thread): Remove use of
7627 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
7628 needs to be implemented differently to be useful.
7629
261eada2
UD
76302004-02-26 Ulrich Drepper <drepper@redhat.com>
7631
14ffbc83
UD
7632 * pthread_attr_setschedparam.c: Don't test priority against limits
7633 here. Set ATTR_FLAG_SCHED_SET flag.
7634 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7635 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7636 from parent thread to child. If attribute is used and scheduling
7637 parameters are not inherited, copy parameters from attribute or
7638 compute them. Check priority value.
7639 * pthread_getschedparam.c: If the parameters aren't known yet get
7640 them from the kernel.
7641 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7642 ATTR_FLAG_POLICY_SET flag for thread.
7643 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7644 and ATTR_FLAG_POLICY_SET.
7645
7646 * sysdeps/pthread/createthread.c: Use tgkill if possible.
7647
261eada2
UD
7648 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7649 fail if stack address hasn't been set. Just return 0.
7650
701d185c
UD
76512004-02-25 Ulrich Drepper <drepper@redhat.com>
7652
25b8e63c
UD
7653 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
7654 libpthread for the files in this list.
7655 (CFLAGS-tst-unload): Removed.
7656 * tst-unload.c (do_test): Don't use complete path for
7657 LIBPHREAD_SO.
7658
701d185c
UD
7659 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7660 tst-_res1mod2.
7661
a8fd5a02
UD
76622004-02-22 Ulrich Drepper <drepper@redhat.com>
7663
7664 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7665 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7666 operation per round is needed.
7667 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7668 (__lll_mutex_lock_wait): Likewise.
7669
dd0b7b19
UD
76702004-02-20 Ulrich Drepper <drepper@redhat.com>
7671
7672 * tst-cancel9.c (cleanup): Don't print to stderr.
7673
5990e1fe
UD
76742004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7675
7676 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7677
33ab3b66
UD
76782004-02-20 Jakub Jelinek <jakub@redhat.com>
7679
1be3130e
UD
7680 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7681 (__syscall_error_handler2): Call CDISABLE.
7682 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7683 (__syscall_error_handler2): Call CDISABLE.
7684
8ba5025a
UD
7685 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7686 Release lock before the loop, don't reacquire it.
8ba5025a 7687
33ab3b66
UD
7688 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7689
11986c68
UD
76902004-02-19 Andreas Schwab <schwab@suse.de>
7691
7692 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7693 Fix last change.
7694
dc391246
UD
76952004-02-18 Ulrich Drepper <drepper@redhat.com>
7696
37c054c7
UD
7697 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7698 (pthread_barrier_wait): After wakeup, release lock only when the
7699 last thread stopped using the barrier object.
7700 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7701 (pthread_barrier_wait): Likewise.
7702 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7703 Likewise.
7704 * Makefile (tests): Add tst-barrier4.
7705 * tst-barrier4.c: New file.
dc391246
UD
7706
7707 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7708 (__pthread_cond_timedwait): Perform timeout test while holding
7709 internal lock to prevent wakeup race.
7710 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7711 * sysdeps/pthread/pthread_cond_timedwait.c
7712 (__pthread_cond_timedwait): Likewise.
7713 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7714 (__pthread_cond_timedwait): Likewise.
7715
4a08113c
UD
77162004-02-18 Jakub Jelinek <jakub@redhat.com>
7717
7718 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7719 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7720 * Makefile (tests): Add tst-rwlock13.
7721 * tst-rwlock13.c: New test.
7722
71b1675e
UD
77232004-02-16 Ulrich Drepper <drepper@redhat.com>
7724
7725 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7726 (__condvar_tw_cleanup): Little optimization.
7727 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7728
cd9fdc72
UD
77292004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7730
7731 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7732 libpthread as "lib" parameter to SHLIB_COMPAT.
7733 (__novmx_siglongjmp): Fix typo in function name.
7734 (__novmx_longjmp): Fix typo in function name.
7735
82038750
UD
77362004-02-13 Ulrich Drepper <drepper@redhat.com>
7737
b078c591
UD
7738 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7739 __builtin_expect.
7740
82038750
UD
7741 * sysdeps/generic/pt-longjmp.c: Moved to...
7742 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7743
e2982bf0
UD
77442004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7745
7746 * Makefile (libpthread-routines): Add pt-cleanup.
7747 * pt-longjmp.c: Removed.
7748 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7749 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7750 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7751 Version longjmp, siglongjmp for GLIBC_2.3.4.
7752 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7753
3730d95c
UD
77542004-02-13 Ulrich Drepper <drepper@redhat.com>
7755
219304ec
UD
7756 * sysdeps/pthread/pthread_cond_timedwait.c
7757 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7758 Reuse code. Add __builtin_expects.
7759
3730d95c
UD
7760 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7761 (__pthread_cond_timedwait): Get internal lock in case timeout has
7762 passed before the futex syscall.
7763 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7764
5673ccc1
UD
77652004-01-20 Ulrich Drepper <drepper@redhat.com>
7766
debddf64
UD
7767 * allocatestack.c: Pretty printing.
7768
5673ccc1
UD
7769 * sysdeps/pthread/createthread.c (create_thread): Don't add
7770 CLONE_DETACHED bit if it is not necessary.
7771
6bae8725
UD
77722004-01-16 Ulrich Drepper <drepper@redhat.com>
7773
7774 * pthread_getattr_np.c: Include ldsodefs.h.
7775
ff151400
RH
77762004-01-16 Richard Henderson <rth@redhat.com>
7777
6bae8725
UD
7778 * allocatestack.c: Don't declare __libc_stack_end.
7779 * init.c (__pthread_initialize_minimal_internal): Likewise.
7780 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 7781
ba683832
RH
77822004-01-15 Richard Henderson <rth@redhat.com>
7783
7784 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7785 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7786 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7787 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7788 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7789 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7790 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7791 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7792
630d93a7
UD
77932004-01-14 Ulrich Drepper <drepper@redhat.com>
7794
219304ec 7795 * init.c (pthread_functions): Make array const.
630d93a7 7796
d1fc817e
UD
77972004-01-13 Ulrich Drepper <drepper@redhat.com>
7798
7799 * allocatestack.c (__make_stacks_executable): Change interface.
7800 Check parameters. Pass parameter on to libc counterpart.
7801 * pthreadP.h: Change declaration.
7802
dc927809
RH
78032004-01-13 Richard Henderson <rth@redhat.com>
7804
10677727
UD
7805 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7806 prototype form.
7807 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7808 Likewise.
7809
d1fc817e
UD
7810 * sysdeps/alpha/Makefile: New file.
7811 * sysdeps/alpha/tcb-offsets.sym: New file.
7812 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7813 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 7814
d1fc817e
UD
7815 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7816 on powerpc version.
dc927809 7817
249a3d0c
UD
78182004-01-08 Jakub Jelinek <jakub@redhat.com>
7819
7820 * Makefile (tests): Add tst-backtrace1.
7821 * tst-backtrace1.c: New test.
7822
763c0490
RM
78232003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7824
7825 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7826 register as second parameter to the REGISTER macro.
7827 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7828 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7829 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7830 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7831 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7832 of thread register as second parameter to REGISTER macro in 64 case.
7833
c7baafd5
UD
78342004-01-03 Ulrich Drepper <drepper@redhat.com>
7835
7836 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7837 (CFLAGS-getpid.o): Defined.
7838 (CFLAGS-getpid.os): Defined.
7839
25ac0258
UD
78402003-12-31 Ulrich Drepper <drepper@redhat.com>
7841
7842 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7843 returned for main thread does not overlap with any other VMA.
7844 Patch by Jakub Jelinek.
7845
795985e4
UD
78462003-12-29 Jakub Jelinek <jakub@redhat.com>
7847
7848 * tst-raise1.c: Include stdio.h.
7849
cb5b9388
UD
78502003-12-23 Jakub Jelinek <jakub@redhat.com>
7851
7852 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7853 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7854 If pid is 0, set it to selftid.
7855 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7856 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7857 != 0, return self->tid without doing a syscall.
7858 * descr.h (struct pthread): Move pid field after tid.
7859
7860 * Makefile (tests): Add tst-raise1.
7861 * tst-raise1.c: New file.
7862
432aaf5b
RM
78632003-12-23 Roland McGrath <roland@redhat.com>
7864
7865 * tst-oddstacklimit.c: New file.
7866 * Makefile (tests): Add it.
7867 (tst-oddstacklimit-ENV): New variable.
7868
7869 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7870 value up to page size for __default_stacksize.
7871
33ebea17
UD
78722003-12-21 Ulrich Drepper <drepper@redhat.com>
7873
7874 * Makefile (tests): Add tst-eintr5.
7875 * tst-eintr5.c: New file.
7876
7877 * eintr.c (eintr_source): Prevent sending signal to self.
7878
7879 * tst-eintr2.c (tf1): Improve error message.
7880
bbe35eb5
UD
78812003-12-20 Ulrich Drepper <drepper@redhat.com>
7882
7883 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7884 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
7885 * pthread_cancel.c: Add comment explaining use of PID field.
7886 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7887 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7888 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7889 temporarily to signal the field must not be relied on and updated
7890 by getpid().
7891 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7892 temporarily negative.
7893 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 7894
4efdd8d3
UD
78952003-12-19 Ulrich Drepper <drepper@redhat.com>
7896
7897 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7898 (eintr_source): If ARG != NULL, use pthread_kill.
7899 * tst-eintr1.c: Adjust for this change.
7900 * tst-eintr2.c: Likewise.
7901 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7902 * tst-eintr3.c: New file.
7903 * tst-eintr4.c: New file.
7904
79052003-12-19 Jakub Jelinek <jakub@redhat.com>
7906
7907 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7908 if CANCELSTATE_BITMASK is set.
7909 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7910 Likewise.
7911
7912 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7913 (tests-reverse): Add tst-cancel23.
7914 * tst-cancel22.c: New test.
7915 * tst-cancel23.c: New test.
7916
675620f7
UD
79172003-12-18 Ulrich Drepper <drepper@redhat.com>
7918
7919 * tst-eintr1.c: Better error messages.
7920
7921 * Makefile (tests): Add tst-eintr2.
7922 * tst-eintr2.c: New file.
7923
79242003-12-18 Jakub Jelinek <jakub@redhat.com>
7925
7926 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7927 (CFLAGS-tst-cancelx21.c): Set.
7928 * tst-cancel21.c: New test.
7929 * tst-cancelx21.c: New test.
7930
7931 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7932 comparison operand.
7933 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7934 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7935 * pt-longjmp.c: Include jmpbuf-unwind.h.
7936 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7937 _JMPBUF_UNWINDS. Adjust compared pointers.
7938 * init.c (__pthread_initialize_minimal_internal): Initialize
7939 pd->stackblock_size.
7940 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7941 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7942 * sysdeps/i386/jmpbuf-unwind.h: New file.
7943 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7944 * sysdeps/s390/jmpbuf-unwind.h: New file.
7945 * sysdeps/sh/jmpbuf-unwind.h: New file.
7946 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7947 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 7948 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
7949 (_JMPBUF_CFA_UNWINDS): Remove.
7950 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7951
79522003-12-12 Jakub Jelinek <jakub@redhat.com>
7953
7954 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7955 (CFLAGS-tst-cancelx20.c): Set.
7956 * tst-cancel20.c: New test.
7957 * tst-cancelx20.c: New test.
7958
2d951ab6
UD
79592003-12-17 Ulrich Drepper <drepper@redhat.com>
7960
7961 * init.c (__pthread_initialize_minimal_internal): Don't treat
7962 architectures with separate register stack special here when
7963 computing default stack size.
7964
f8a3a2e7
RM
79652003-12-17 Roland McGrath <roland@redhat.com>
7966
7967 * Makefile (tst-cancelx7-ARGS): New variable.
7968 Reportd by Greg Schafer <gschafer@zip.com.au>.
7969
e796f92f
UD
79702003-12-17 Jakub Jelinek <jakub@redhat.com>
7971
7972 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7973 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7974 (tst-stack3-ENV): Set.
7975 ($(objpfx)tst-stack3-mem): New.
7976 * tst-stack3.c: New test.
7977
092eb73c
UD
79782003-12-10 David Mosberger <davidm@hpl.hp.com>
7979
7980 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7981 Add unwind directives. Drop unused .regstk directive.
7982 (_fini_EPILOG_BEGINS): Add unwind directives.
7983
ff48874d
UD
79842003-12-11 Ulrich Drepper <drepper@redhat.com>
7985
7986 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7987 Assume parameter is a pointer.
7988 (lll_futex_wake): Likewise.
20945457
UD
7989 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7990 Likewise.
7991 (lll_futex_wake): Likewise.
ff48874d
UD
7992 Reported by Boris Hu.
7993 * sysdeps/unix/sysv/linux/unregister-atfork.c
7994 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7995
7996 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7997
1d9d0b80
UD
79982003-12-10 Ulrich Drepper <drepper@redhat.com>
7999
8000 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
8001 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
8002 __rtld_lock_initialize for ld.so lock.
8003 Patch in part by Adam Li <adam.li@intel.com>.
8004
c776b3d7
UD
80052003-12-02 David Mosberger <davidm@hpl.hp.com>
8006
8007 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
8008 in $(gnulib). Also, remove stale comment.
8009
80102003-11-12 David Mosberger <davidm@hpl.hp.com>
8011
8012 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
8013 advantage of new syscall stub and optimize accordingly.
8014
8015 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
8016 from SYS_futex, to match expectations of
8017 sysdep.h:DO_INLINE_SYSCALL.
8018 (lll_futex_clobbers): Remove.
8019 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
8020 (lll_futex_wake): Likewise.
8021 (lll_futex_requeue): Likewise.
8022 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
8023 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
8024 Jelinek).
8025 (__lll_mutex_lock): Likewise.
8026 (__lll_mutex_cond_lock): Likewise.
8027 (__lll_mutex_timed_lock): Likewise.
8028 (__lll_mutex_unlock): Likewise.
8029 (__lll_mutex_unlock_force): Likewise.
8030
8031 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
8032 comes before the include of <sysdep.h>.
8033 (THREAD_SELF_SYSINFO): New macro.
8034 (THREAD_SYSINFO): Likewise.
8035 (INIT_SYSINFO): New macro.
8036 (TLS_INIT_TP): Call INIT_SYSINFO.
8037
8038 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
8039
8040 * sysdeps/pthread/createthread.c (create_thread): Use
8041 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
8042 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
8043 THREAD_SELF_SYSINFO instead of open code.
8044 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
8045 (THREAD_SYSINFO): Likewise.
8046
8047 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
8048
8049 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
8050
57d20ee7
UD
80512003-12-06 Ulrich Drepper <drepper@redhat.com>
8052
8053 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
8054 instead of .init. Patch by David Mosberger.
8055
67aeab2a
AJ
80562003-11-30 Thorsten Kukuk <kukuk@suse.de>
8057
8058 * sysdeps/pthread/configure.in: Remove broken declaration in C
8059 cleanup handling check.
8060
8ca203e6
AJ
80612003-11-30 Andreas Jaeger <aj@suse.de>
8062
8063 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
8064 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
8065 Likewise.
8066
46bf9de7
UD
80672003-11-27 Jakub Jelinek <jakub@redhat.com>
8068
8069 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
8070 * pthread_attr_destroy.c: Include shlib-compat.h.
8071 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
8072 is set in iattr->flags.
8073 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
8074
1d9b73ab
UD
80752003-11-21 Jakub Jelinek <jakub@redhat.com>
8076
8077 * Makefile (distribute): Add tst-cleanup4aux.c.
8078
8079 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
8080 include.
8081
53f9084e
UD
80822003-11-21 Ulrich Drepper <drepper@redhat.com>
8083
1d9b73ab
UD
8084 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
8085 pthread_cond_signal.
8086
e42a990e
UD
8087 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
8088 store mutex address if the current value is ~0l.
8089 * sysdeps/pthread/pthread_cond_timedwait.c
8090 (__pthread_cond_timedwait): Likewise.
8091 * sysdeps/pthread/pthread_cond_broadcast.c
8092 (__pthread_cond_broadcast): Don't use requeue for pshared
8093 condvars.
8094
8095 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8096 (__pthread_cond_wait): Don't store mutex address if the current
8097 value is ~0l.
8098 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
8099 (__pthread_cond_timedwait): Likewise.
8100 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
8101 (__pthread_cond_broadcast): Don't use requeue for pshared
8102 condvars.
8103
8104 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
8105 element with ~0l for pshared condvars, with NULL otherwise.
8106
8107 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8108 (__pthread_cond_wait): Don't store mutex address if the current
8109 value is ~0l.
8110 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8111 (__pthread_cond_timedwait): Likewise.
8112 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8113 (__pthread_cond_broadcast): Don't use requeue for pshared
8114 condvars.
8115
bf68b236 8116 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 8117 * tst-cond12.c: New file.
bf68b236 8118 * tst-cond13.c: New file.
53f9084e 8119
9780c971
UD
81202003-11-17 Ulrich Drepper <drepper@redhat.com>
8121
8122 * sysdeps/pthread/configure.in: Make missing forced unwind support
8123 fatal.
8124
74e12fbc
UD
81252003-11-11 Ulrich Drepper <drepper@redhat.com>
8126
8127 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
8128
c685b2b0
UD
81292003-11-06 Ulrich Drepper <drepper@redhat.com>
8130
8131 * Makefile: Add magic to clean up correctly.
8132
44e94149
UD
81332003-11-05 Jakub Jelinek <jakub@redhat.com>
8134
8135 * unwind.c (FRAME_LEFT): Define.
8136 (unwind_stop): Handle old style cleanups here.
8137 (__pthread_unwind): Handle old style cleanups only if
8138 !HAVE_FORCED_UNWIND.
8139 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
8140 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
8141 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
8142 ($(objpfx)tst-cleanupx4): Likewise.
8143 * tst-cleanup4.c: New test.
8144 * tst-cleanup4aux.c: New.
8145 * tst-cleanupx4.c: New test.
8146
c28422b5
UD
81472003-11-04 Ulrich Drepper <drepper@redhat.com>
8148
8149 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
8150 lll_mutex_*lock macros to skip atomic operations on some archs.
8151
27176677
UD
81522003-11-03 Ulrich Drepper <drepper@redhat.com>
8153
8154 * sysdeps/pthread/tst-timer.c (main): Initialize
8155 sigev2.sigev_value as well.
8156
026395a2
RM
81572003-10-15 Roland McGrath <roland@redhat.com>
8158
8159 * sysdeps/pthread/configure.in: Barf if visibility attribute support
8160 is missing.
8161 * sysdeps/pthread/configure: Regenerated.
8162
fa3cbe3d
UD
81632003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8164
8165 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
8166 locking macros. No distinction between normal and mutex locking
8167 anymore.
8168 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
8169 Merge bits from lowlevelmutex.S we still need.
8170 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
8171 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8172 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
8173 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
8174 new mutex implementation.
8175 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
8176 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8177 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8178 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8179 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8180 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8181 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8182 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8183 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8184 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
8185 symbol for entry point to avoid cancellation.
8186
e700a908
UD
81872003-10-07 Jakub Jelinek <jakub@redhat.com>
8188
8189 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
8190 changes.
8191 (SAVE_OLDTYPE_0): Fix a typo.
8192
c70a86b6
UD
81932003-10-03 Ulrich Drepper <drepper@redhat.com>
8194
8195 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8196 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
8197
134abcb5
UD
81982003-10-02 Ulrich Drepper <drepper@redhat.com>
8199
8200 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8201 correct offset.
8202
b77ca0e8
UD
82032003-10-02 Jakub Jelinek <jakub@redhat.com>
8204
8205 * Makefile (tests): Add tst-cancel19.
8206 * tst-cancel19.c: New test.
8207
4d961dc7
UD
82082003-10-02 Ulrich Drepper <drepper@redhat.com>
8209
8210 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8211 restoring of the old cancellation type.
8212
1d5b20ad 82132003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 8214
1d5b20ad
UD
8215 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8216
4106a403
RM
82172003-09-27 Wolfram Gloger <wg@malloc.de>
8218
4d961dc7 8219 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 8220
fca9d8e4
RM
82212003-09-24 Roland McGrath <roland@redhat.com>
8222
8223 * allocatestack.c (__make_stacks_executable): Don't ignore return
8224 value from _dl_make_stack_executable.
8225
c9c60884
UD
82262003-09-24 Ulrich Drepper <drepper@redhat.com>
8227
69c9fa04
UD
8228 * allocatestack.c (__make_stacks_executable): Also change
8229 permission of the currently unused stacks.
8230
279f1143
UD
8231 * allocatestack.c (change_stack_perm): Split out from
8232 __make_stacks_executable.
8233 (allocate_stack): If the required permission changed between the time
8234 we started preparing the stack and queueing it, change the permission.
8235 (__make_stacks_executable): Call change_stack_perm.
8236
c9c60884
UD
8237 * Makefile: Build tst-execstack-mod locally.
8238 * tst-execstack-mod.c: New file.
8239
54ee14b3
UD
82402003-09-23 Jakub Jelinek <jakub@redhat.com>
8241
8242 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8243
82442003-09-23 Roland McGrath <roland@redhat.com>
8245
8246 * tst-execstack.c: New file.
8247 * Makefile (tests): Add it.
8248 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8249 (LDFLAGS-tst-execstack): New variable.
8250
8251 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8252 whether to use PROT_EXEC for stack mmap.
8253 (__make_stacks_executable): New function.
8254 * pthreadP.h: Declare it.
8255 * init.c (__pthread_initialize_minimal_internal): Set
8256 GL(dl_make_stack_executable_hook) to that.
8257
365b1602
UD
82582003-09-22 Ulrich Drepper <drepper@redhat.com>
8259
8260 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8261 recommendation from AMD re avoidance of lock prefix.
8262
39358e8b
UD
82632003-09-22 Jakub Jelinek <jakub@redhat.com>
8264
8265 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8266 lll_futex_timed_wait instead of lll_futex_wait.
8267 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8268 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8269 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8270 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8271 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8272 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8273 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8274 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8275 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8276 Completely revamp the locking macros. No distinction between
8277 normal and mutex locking anymore.
8278 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8279 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8280 __lll_lock_timedwait): Fix prototypes.
8281 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8282 __lll_lock_timedwait): Likewise.
8283 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8284 macros, add __builtin_expect.
8285 (lll_mutex_timedlock): Likewise. Fix return value.
8286 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8287 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8288 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8289 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8290 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8291 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8292 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8293 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8294
9d08fbbb
UD
82952003-09-22 Ulrich Drepper <drepper@redhat.com>
8296
c0df57e1
UD
8297 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8298 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8299 operation if possible.
8300
9d08fbbb
UD
8301 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8302 like jumping over the lock prefix.
8303
71451de2
UD
83042003-09-21 Ulrich Drepper <drepper@redhat.com>
8305
8306 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8307 locking macros. No distinction between normal and mutex locking
8308 anymore.
3a226d33 8309 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
8310 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8311 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
8312 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8313 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 8314 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 8315 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 8316 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 8317 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
8318 * Makefile (routines): Remove libc-lowlevelmutex.
8319 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
8320 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8321 for new mutex implementation.
8322 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8323 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8324 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8325 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8326 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8327 Likewise.
8328 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8329 Likewise.
8330 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8331 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8332 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8333 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8334 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8335 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8336 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8337 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8338 Likewise.
8339 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8340 Likewise.
8341 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8342 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8344 Don't use requeue.
8345 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 8346 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 8347
8f31c0ef
UD
83482003-09-20 Ulrich Drepper <drepper@redhat.com>
8349
56a4aa98
UD
8350 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8351 in parameters of asm with output parameters.
8352
8f31c0ef
UD
8353 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8354 type of DECR parameter to int.
8355 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8356
8b8074da
UD
83572003-09-18 Jakub Jelinek <jakub@redhat.com>
8358
8359 * tst-attr3.c (tf, do_test): Print stack start/end/size and
8360 guardsize for each thread.
8361
65af7e61
UD
83622003-09-17 Jakub Jelinek <jakub@redhat.com>
8363
9ba96eda
UD
8364 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8365 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8366 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8367
06f6ca90
UD
8368 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8369 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8370 NULL.
8371 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8372 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8373 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8374 (pthread_getaffinity_np): Add hidden_def.
8375
8376 * Makefile (tests): Add tst-attr3.
8377 * tst-attr3.c: New test.
8378
65af7e61
UD
8379 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8380
3402852c
UD
83812003-09-15 Jakub Jelinek <jakub@redhat.com>
8382
8383 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8384 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8385
a4db3439
UD
83862003-09-17 Jakub Jelinek <jakub@redhat.com>
8387
8388 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8389 * tst-align.c: Include tst-stack-align.h.
8390 (tf, do_test): Use TEST_STACK_ALIGN macro.
8391
83922003-09-17 Ulrich Drepper <drepper@redhat.com>
8393
8394 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8395 variable.
8396
92ce4676
UD
83972003-09-16 Ulrich Drepper <drepper@redhat.com>
8398
8399 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8400 stack-related values for the initial thread.
8401
e07bb02a
UD
84022003-09-15 Jakub Jelinek <jakub@redhat.com>
8403
8404 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8405
d087b5dc
UD
84062003-09-11 Ulrich Drepper <drepper@redhat.com>
8407
8408 * pthread_mutex_lock.c: Minor code rearrangements.
8409
7f08f55a
RM
84102003-09-05 Roland McGrath <roland@redhat.com>
8411
8412 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8413 Instead, include ../nptl_db/db_info.c to do its magic.
8414 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8415 (__pthread_pthread_key_2ndlevel_size): Likewise.
8416 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8417 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8418 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8419 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8420 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8421 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8422 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8423 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8424 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8425 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8426 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8427 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8428 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8429 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8430 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8431 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8432 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8433
806e4a4a
UD
84342003-09-08 Ulrich Drepper <drepper@redhat.com>
8435
8436 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8437 of pthread_t to be compatible with LT.
8438 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8439 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8440 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8441 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8442 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8443 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8444 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8445
17f83e56
UD
84462003-09-04 Ulrich Drepper <drepper@redhat.com>
8447
8448 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8449
58e8ec84
UD
84502003-09-04 Jakub Jelinek <jakub@redhat.com>
8451
8452 * unwind-forcedunwind.c: Move to...
8453 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8454 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8455 * sysdeps/pthread/jmpbuf-unwind.h: New file.
8456 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8457 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8458 * unwind.c: Include jmpbuf-unwind.h.
8459 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8460
abf1cf21
JJ
84612003-09-02 Jakub Jelinek <jakub@redhat.com>
8462
4a244f0d
UD
8463 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8464 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8465 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8466 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8467 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8468 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8469 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8470 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8471 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8472 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8473 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8474 function.
8475 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8476 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8477 * Makefile (tests): Add tst-stack2.
8478 * tst-stack2.c: New test.
8479 * tst-stack1.c: Include limits.h and sys/param.h.
8480 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8481
e29ef647
UD
8482 * pthread_condattr_setpshared.c: Include errno.h.
8483 (pthread_condattr_setpshared): Return EINVAL if pshared
8484 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8485
5777d565
UD
8486 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8487 defined symbol for entry point to avoid cancellation.
8488 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8489 Likewise.
8490 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8491 Likewise.
8492 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8493 Likewise.
8494 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8495 Likewise.
8496 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8497 Likewise.
8498 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8499 __close_nocancel, __read_nocancel, __write_nocancel,
8500 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
8501 libpthread.so or librt.so, define to corresponding function
8502 without _nocancel suffix.
8503 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8504 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8505 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8506
abf1cf21
JJ
8507 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8508
8348dcc8
UD
85092003-09-02 Ulrich Drepper <drepper@redhat.com>
8510
8511 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 8512 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
8513
8514 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8515 in subsections has a symbol associated with it.
8516
8517 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8518 defined symbol for entry point to avoid cancellation.
8519 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8520
c874a32e
UD
85212003-09-01 Jakub Jelinek <jakub@redhat.com>
8522
8523 * Makefile (tests): Add tst-tls5.
8524 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8525 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8526 ($(objpfx)tst-tls5): New.
8527 ($(objpfx)tst-tls6.out): Likewise.
8528 (tests): Depend on $(objpfx)tst-tls6.out.
8529 * tst-tls3.c: Include stdint.h and pthreaddef.h.
8530 (do_test): Check pthread_self () return value alignment.
8531 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8532 (tf): Check pthread_self () return value alignment.
8533 * tst-tls5.c: New test.
8534 * tst-tls5.h: New.
8535 * tst-tls5mod.c: New.
8536 * tst-tls5moda.c: New.
8537 * tst-tls5modb.c: New.
8538 * tst-tls5modc.c: New.
8539 * tst-tls5modd.c: New.
8540 * tst-tls5mode.c: New.
8541 * tst-tls5modf.c: New.
8542 * tst-tls6.sh: New test.
8543
c503d3dc
UD
8544 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8545 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8546 * init.c (pthread_functions): Initialize them.
8547 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8548 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8549 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8550 pthread_cond_timedwait@@GLIBC_2.3.2.
8551
48614753
JJ
85522003-09-01 Jakub Jelinek <jakub@redhat.com>
8553
56a1b877
JJ
8554 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8555 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8556 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8557 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8558 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8559 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8560
8561 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8562
48614753
JJ
8563 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8564 _POSIX_THREAD_PRIORITY_SCHEDULING.
8565 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8566
28c97261
UD
85672003-08-31 Ulrich Drepper <drepper@redhat.com>
8568
eef80cf8
UD
8569 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8570 nested function, use static inline function from libio.h.
8571 Code by Richard Henderson.
8572
28c97261
UD
8573 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8574 weak.
8575
cd2fbe58
UD
85762003-08-30 Jakub Jelinek <jakub@redhat.com>
8577
8578 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8579 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8580 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8581 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8582 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8583 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8584 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8585 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8586 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8587 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8588 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8589 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8590 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8591 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8592 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8593 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8594 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8595 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8596 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8597 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8598 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8599 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8600 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8601 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8602 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8603 * sysdeps/sparc/tls.h: New file.
8604 * sysdeps/sparc/tcb-offsets.sym: New file.
8605 * sysdeps/sparc/Makefile: New file.
8606 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8607 * init.c [__sparc__] (__NR_set_tid_address): Define.
8608
feda52c0
UD
86092003-08-29 Jakub Jelinek <jakub@redhat.com>
8610
8611 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8612 _IO_release_lock): Define.
8613
7c868816
JJ
86142003-08-29 Jakub Jelinek <jakuB@redhat.com>
8615
0261d33f 8616 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
8617 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
8618
68b9e1ae
UD
86192003-08-27 Ulrich Drepper <drepper@redhat.com>
8620
8621 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8622 (__pthread_cleanup_class): Add missing return types of member
8623 functions.
8624
13b3edfc
UD
86252003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
8626
8627 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8628 (lll_mutex_unlock_force): Add memory barrier between store and futex
8629 syscall.
8630
bb606fbe
UD
86312003-08-25 Ulrich Drepper <drepper@redhat.com>
8632
8633 * tst-cancel4.c (do_test): Also unlink tempfname and remove
8634 tempmsg in first loop.
8635
ee4e5a3d
UD
86362003-08-18 Ulrich Drepper <drepper@redhat.com>
8637
8638 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8639 _POSIX_THREAD_PRIORITY_SCHEDULING.
8640 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8641
334fcf2a
UD
86422003-08-07 Jakub Jelinek <jakub@redhat.com>
8643
8644 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8645 (__rtld_lock_default_lock_recursive,
8646 __rtld_lock_default_unlock_recursive): Define.
8647 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8648 __rtld_lock_unlock_recursive): Define using
8649 GL(_dl_rtld_*lock_recursive).
8650 * init.c (__pthread_initialize_minimal_internal): Initialize
8651 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8652 Lock GL(_dl_load_lock) the same number of times as
8653 GL(_dl_load_lock) using non-mt implementation was nested.
8654
8655 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8656 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8657
a30fb2df
UD
86582003-08-06 Jakub Jelinek <jakub@redhat.com>
8659
8660 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8661 PIPE_BUF.
8662
ce0d30a0
JJ
86632003-08-07 Jakub Jelinek <jakub@redhat.com>
8664
8665 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8666
9c988b83
UD
86672003-08-03 Jakub Jelinek <jakub@redhat.com>
8668
8669 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8670 to first syscall error check. Move syscall error check for tkill
8671 into __ASSUME_CLONE_STOPPED #ifdef.
8672
5c5252bd
UD
86732003-08-02 Ulrich Drepper <drepper@redhat.com>
8674
f1205aa7
UD
8675 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8676 is not defined, do explicit synchronization.
8677 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8678 is not defined also unlock pd->lock for non-debugging case in case
8679 it is necessary.
8680 * pthread_create.c (start_thread): Always get and release pd->lock
8681 if __ASSUME_CLONE_STOPPED is not defined.
8682 (start_thread_debug): Removed. Adjust users.
8683 * allocatestack.c (allocate_stack): Always initialize lock if
8684 __ASSUME_CLONE_STOPPED is not defined.
8685 * Makefile (tests): Add tst-sched1.
8686 * tst-sched1.c: New file.
8687
5c5252bd
UD
8688 * sysdeps/pthread/createthread.c (do_clone): Only use
8689 sched_setschduler and pass correct parameters.
8690
973d66e4
UD
86912003-07-31 Jakub Jelinek <jakub@redhat.com>
8692
8693 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8694 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8695 PTHREAD_STACK_MIN in comments.
8696
d347a4ab
UD
86972003-07-31 Jakub Jelinek <jakub@redhat.com>
8698
8699 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8700 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8701 argument.
8702 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8703 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8704 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8705 (__pthread_cleanup_upto): Fix prototype.
8706 (_longjmp_unwind): Adjust caller.
8707 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8708 Change second argument to const struct pointer.
8709 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8710 * tst-sem9.c (main): Likewise.
8711 * unwind.c: Include string.h for strlen prototype.
8712
1b26e9a5
UD
87132003-07-31 Ulrich Drepper <drepper@redhat.com>
8714
8715 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8716 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8717 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8718 Define HAVE_CMOV.
8719 Patch by Nicholas Miell <nmiell@attbi.com>.
8720
adc12574
UD
87212003-07-30 Jakub Jelinek <jakub@redhat.com>
8722
8723 * init.c (__pthread_initialize_minimal_internal): Initialize
8724 GL(dl_init_static_tls).
8725 * pthreadP.h (__pthread_init_static_tls): New prototype.
8726 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8727 New functions.
8728 * Makefile (tests): Add tst-tls4.
8729 (modules-names): Add tst-tls4moda and tst-tls4modb.
8730 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8731 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8732 tst-tls4modb.so.
8733 * tst-tls4.c: New file.
8734 * tst-tls4moda.c: New file.
8735 * tst-tls4modb.c: New file.
8736
a7f6c66e
RM
87372003-06-19 Daniel Jacobowitz <drow@mvista.com>
8738
8739 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8740 before __timer_dealloc.
8741 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8742 Don't call list_unlink.
8743
172ce013
RM
87442003-07-29 Roland McGrath <roland@redhat.com>
8745
8746 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8747
7b787f85
UD
87482003-07-25 Jakub Jelinek <jakub@redhat.com>
8749
8750 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8751 Don't reuse struct aiocb A if it failed.
8752 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8753 not just one byte, as that does not block.
8754
0e9d6240
UD
87552003-07-22 Jakub Jelinek <jakub@redhat.com>
8756
9d79e037
UD
8757 * sysdeps/pthread/unwind-resume.c: New file.
8758 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8759 unwind-resume in csu subdir.
8760 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8761 exceptions.
8762 (librt-sysdep_routines, librt-shared-only-routines): Add
8763 rt-unwind-resume.
8764 * sysdeps/pthread/rt-unwind-resume.c: New file.
8765 * unwind-forcedunwind.c: New file.
8766 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8767 (libpthread-shared-only-routines): Likewise.
8768 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8769 * pthreadP.h (pthread_cancel_init): New prototype.
8770 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8771
8772 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8773 attr argument const struct pthread_attr *.
8774
0e9d6240
UD
8775 * res.c (__res_state): Return __resp.
8776 * descr.h: Include resolv.h.
8777 (struct pthread): Add res field.
8778 * pthread_create.c: Include resolv.h.
8779 (start_thread): Initialize __resp.
8780 * Makefile (tests): Add tst-_res1.
8781 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8782 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8783 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8784 libpthread.
8785 * tst-_res1.c: New file.
8786 * tst-_res1mod1.c: New file.
8787 * tst-_res1mod2.c: New file.
8788
1a379ea0
UD
87892003-07-21 Ulrich Drepper <drepper@redhat.com>
8790
7e939b21
UD
8791 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8792
1a379ea0
UD
8793 * Makefile: Define various *-no-z-defs variables for test DSOs
8794 which has undefined symbols.
8795
ca86a763
UD
87962003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8797
8798 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8799 Retry if the stwcx fails to store once_control.
8800
80f536db
UD
88012003-07-20 Ulrich Drepper <drepper@redhat.com>
8802
8803 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8804 pthread_attr_setaffinity.
8805 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8806 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8807 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8808 * pthread_attr_destroy.c: Free cpuset element if allocated.
8809 * pthread_create.c: Pass iattr as additional parameter to
8810 create_thread.
8811 * sysdeps/pthread/createthread.c: If attribute is provided and
8812 a new thread is created with affinity set or scheduling parameters,
8813 start thread with CLONE_STOPPED.
8814 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8815 pthread_attr_setaffinity.
8816 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8817 cpuset element.
8818
73299943
UD
88192003-07-15 Ulrich Drepper <drepper@redhat.com>
8820
8821 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8822
da35d15e
UD
88232003-07-14 Ulrich Drepper <drepper@redhat.com>
8824
8825 * sysdeps/pthread/configure.in: Require CFI directives also for
8826 ppc and s390.
8827
75540d8a
UD
88282003-07-15 Jakub Jelinek <jakub@redhat.com>
8829
8830 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8831 Add cfi directives.
8832
4a17085f
UD
88332003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8834
8835 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8836 CLEANUP_JMP_BUF.
8837 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8838 registers as variables. Call __pthread_mutex_unlock_usercnt.
8839 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8840 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8841 not self pointer in __writer. Compare with TID to determine
8842 deadlocks.
8843 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8844 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8845 Likewise.
8846 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8847 Likewise.
8848 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8849 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8850 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8851 macros also when compiling librt.
8852
6080ecdf
UD
88532003-07-11 Jakub Jelinek <jakub@redhat.com>
8854
8855 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8856 -fasynchronous-unwind-tables.
8857 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8858 (PSEUDO): Add cfi directives.
8859 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8860 Likewise.
8861 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8862 Likewise.
8863
da0c02ee
UD
88642003-07-08 Jakub Jelinek <jakub@redhat.com>
8865
8866 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8867 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8868 * unwind.c (__pthread_unwind_next): Add hidden_def.
8869 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8870 Likewise.
8871 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8872 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8873 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8874 Likewise.
8875 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8876 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8877 Likewise.
8878 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8879 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8880 __pthread_unregister_cancel and __pthread_unwind_next.
8881
57a5ea02
UD
88822003-07-04 Jakub Jelinek <jakub@redhat.com>
8883
8884 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8885 different symbol for the cancellation syscall wrapper and
8886 non-cancellation syscall wrapper.
8887 (PSEUDO_END): Define.
8888
d810b358
UD
88892003-07-05 Richard Henderson <rth@redhat.com>
8890
8891 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8892 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
8893 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8894 return actual return value from the syscall, not 0.
d810b358 8895
db54f488
UD
88962003-07-07 Ulrich Drepper <drepper@redhat.com>
8897
8898 * descr.h (struct pthread): Add pid field.
8899 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8900 (__reclaim_stacks): Likewise.
8901 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8902 also check for PID of the signal source.
8903 (__pthread_initialize_minimal_internal): Also initialize pid field
8904 of initial thread's descriptor.
8905 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8906 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8907 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8908 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8909 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8910
5e497a41
UD
89112003-07-05 Ulrich Drepper <drepper@redhat.com>
8912
8913 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8914 Fix use of parameter.
8915 (__libc_cleanup_pop): Likewise.
8916
86a0c4fa
UD
89172003-07-04 Ulrich Drepper <drepper@redhat.com>
8918
8919 * init.c (sigcancel_handler): Change parameters to match handler
8920 for SA_SIGACTION. Check signal number and code to recognize
8921 invalid invocations.
8922
bdbecaa3
RM
89232003-07-03 Roland McGrath <roland@redhat.com>
8924
8925 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8926 Apply sizeof (struct pthread) bias to r13 value.
8927
56421b23
UD
89282003-07-03 Ulrich Drepper <drepper@redhat.com>
8929
fbd90f6c
UD
8930 * sysdeps/pthread/configure.in: Require CFI directives.
8931
56421b23
UD
8932 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8933 definition.
8934 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8935 libpthread compilation.
8936 * unwind.c (__pthread_unwind): Add hidden_def.
8937 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8938
ca2b4cd7
UD
89392003-07-01 Ulrich Drepper <drepper@redhat.com>
8940
8941 * libc-cancellation.c (__libc_cleanup_routine): Define.
8942 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8943 (__pthread_cleanup_pop): Define.
8944
f036e569
UD
89452003-07-01 Richard Henderson <rth@redhat.com>
8946
8947 * sysdeps/alpha/elf/pt-initfini.c: New file.
8948 * sysdeps/alpha/pthread_spin_lock.S: New file.
8949 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8950 * sysdeps/alpha/pthreaddef.h: New file.
8951 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8952 * sysdeps/alpha/tls.h: New file.
8953 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8954 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8955 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8956 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8957 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8958 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8959 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8960 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8961 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8962 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8963
3b985826
UD
89642003-07-01 Ulrich Drepper <drepper@redhat.com>
8965
8966 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8967 cleanup support and unwind info.
8968
3a4d1e1e
UD
89692003-06-30 Ulrich Drepper <drepper@redhat.com>
8970
8971 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8972 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
8973 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8974 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
8975 * tst-once3.c: Add cleanup handler and check it is called.
8976 * tst-once4.c: Likewise.
8977 * tst-oncex3.c: New file.
8978 * tst-oncex4.c: New file.
8979 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8980
e479cc8e
UD
89812003-06-29 Ulrich Drepper <drepper@redhat.com>
8982
8983 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8984
7d7ff54c
UD
89852003-06-27 Ulrich Drepper <drepper@redhat.com>
8986
483e95d0
UD
8987 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8988 (tf_msgsnd): Likewise.
8989
7d7ff54c
UD
8990 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8991 premature returns a bit more.
8992
7539c7ec
UD
89932003-06-26 Ulrich Drepper <drepper@redhat.com>
8994
8995 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8996 definition to the front.
8997
8998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8999 the cleanup functions to make the names unique. Fix dwarf opcode
9000 un unwind table.
9001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
9002 functions to make the names unique. Fix CFA offset for two blocks.
9003
0af6a1d9
UD
90042003-06-25 Ulrich Drepper <drepper@redhat.com>
9005
9006 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
9007 missing closing braces.
9008 Patch by Christophe Saout <christophe@saout.de>.
9009
eef4a9f3
RM
90102003-06-24 Roland McGrath <roland@redhat.com>
9011
9012 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
9013
4165d44d
UD
90142003-06-24 Ulrich Drepper <drepper@redhat.com>
9015
7f8f7b9d
UD
9016 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
9017 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
9018
4165d44d
UD
9019 * pthreadP.h: Declare __find_thread_by_id.
9020 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
9021 * pthread_clock_gettime.c: Allow using other thread's clock.
9022 * pthread_clock_settime.c: Likewise.
9023 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9024 * Makefile: Add rules to build and run tst-clock2.
9025 * tst-clock2.c: New file.
9026
67b78ef9
UD
90272003-06-23 Ulrich Drepper <drepper@redhat.com>
9028
9029 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
9030 to use exception-based cleanup handler.
9031 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9032
9033 * tst-cond8.c (ch): Announce that we are done.
9034
9035 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
9036
9037 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
9038 Also test aio_suspend with timeout value.
9039
61623643
UD
90402003-06-22 Ulrich Drepper <drepper@redhat.com>
9041
3a4f2043
UD
9042 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
9043 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
9044 attribute_hidden.
9045
61623643
UD
9046 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
9047 (__pthread_mutex_lock_internal): Likewise.
9048 (__pthread_mutex_unlock_internal): Likewise.
9049 (__pthread_mutex_unlock_usercnt): Declare.
9050 * pthread_mutex_destroy.c: Always fail if used in any way.
9051 * pthread_mutex_init.c: Update comment.
9052 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
9053 * pthread_mutex_timedlock.c: Adjust __nusers.
9054 * pthread_mutex_trylock.c: Adjust __nusers.
9055 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
9056 and public interfaces are wrapper with pass additional parameter.
9057 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
9058 parameter zero.
9059 * tst-mutex8.c: New file.
9060 * Makefile (tests): Add tst-mutex8.
9061 * sysdeps/pthread/pthread_cond_timedwait.c: Call
9062 __pthread_mutex_unlock_usercnt.
9063 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9064 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9065 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9066 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9067 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9068 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
9069 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9070 Add __nusers.
9071 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9072 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9073 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9074 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9075 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9076
9077 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
9078 * pthread_mutex_timedlock.c: Likewise.
9079 * pthread_mutex_trylock.c: Adjust __nusers.
9080 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
9081 * tst-mutex9.c: New file.
9082 * Makefile (tests): Add tst-mutex9.
9083 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
9084 * sysdeps/ia64/tls.h: Likewise.
9085 * sysdeps/powerpc/tls.h: Likewise.
9086 * sysdeps/s390/tls.h: Likewise.
9087 * sysdeps/sh/tls.h: Likewise.
9088 * sysdeps/x86_64/tls.h: Likewise.
9089 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9090 Change type of __owner.
9091 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9092 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9093 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9094 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9095 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9096
9bdabb94
UD
90972003-06-19 Jakub Jelinek <jakub@redhat.com>
9098
9099 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
9100 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
9101
9102 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
9103 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
9104 instead of nr to lll_futex_wake. Only set errno and return -1
9105 if err < 0.
9106
9107 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
9108 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
9109 return actual return value from the syscall, not 0.
9110
f6c93bd9
UD
91112003-06-18 Ulrich Drepper <drepper@redhat.com>
9112
ca343e73
UD
9113 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
9114 find a random value.
9115 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
9116 errno==EIDRM.
9117
50441a98
UD
9118 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
9119 compat_timer_settime.
9120 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
9121 compat_timer_gettime.
9122 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 9123 compat_timer_getoverrun.
50441a98
UD
9124 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
9125 compat_timer_delete.
9126
f6c93bd9
UD
9127 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
9128 error-checking mutex detect busy mutexes.
9129
047aec8f
UD
91302003-06-17 Ulrich Drepper <drepper@redhat.com>
9131
1d53508d
UD
9132 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
9133 Add ax to clobber list.
9134 (lll_mutex_cond_lock): Likewise.
9135 (lll_mutex_unlock): Likewise.
9136 (lll_lock): Likewise.
9137 (lll_unlock): Likewise.
9138
f23b30e2
UD
9139 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
9140 * tst-cancel18.c: New file.
9141 * tst-cancelx18.c: New file.
9142
9143 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
9144 and tcdrain.
9145
9146 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
9147 * tst-cancel17.c: New file.
9148 * tst-cancelx17.c: New file.
9149
9150 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9151 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9152 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9153
047aec8f
UD
9154 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
9155
bbde8527
UD
91562003-06-16 Jakub Jelinek <jakub@redhat.com>
9157
9158 * sysdeps/pthread/createthread.c (create_thread): Set
9159 header.multiple_threads unconditionally.
9160 * allocatestack.c (allocate_stack): Likewise.
9161 * descr.h (struct pthread): Add header.multiple_threads
9162 unconditionally.
9163 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
9164 Define for librt. #error if neither libpthread, libc nor librt.
9165 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
9166 Likewise.
9167 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
9168 CDISABLE): Likewise.
9169 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
9170 CDISABLE): Likewise.
9171 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
9172 CDISABLE): Likewise.
9173 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
9174 CDISABLE): Likewise. Access header.multiple_threads outside of
9175 libc and libpthread.
9176 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
9177 Likewise.
9178 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
9179 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
9180
26676450
UD
91812003-06-17 Ulrich Drepper <drepper@redhat.com>
9182
9183 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
9184 Also test early cancellation before the thread reaches the cancellation
9185 point.
9186
9187 * Makefile: Compile forward.c with exceptions.
9188
9189 * sysdeps/unix/sysv/linux/sleep.c: New file.
9190
301a6724
UD
91912003-06-16 Ulrich Drepper <drepper@redhat.com>
9192
0e0deb03
UD
9193 * Makefile: Add CFLAGS definition to compile function wrappers
9194 duplicated from libc with exceptions.
9195 * tst-cancel4.c: Also check cancellation handlers.
9196
301a6724
UD
9197 * Makefile: Add rules to build and run tst-cancel16 and
9198 tst-cancelx16. Add missing CFLAGS definitions.
9199 * tst-cancel16.c: New file.
9200 * tst-cancelx16.c: New file.
9201
7a114794
UD
92022003-06-15 Ulrich Drepper <drepper@redhat.com>
9203
452aea84
UD
9204 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9205 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9206 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9207 (DL_SYSINFO_IMPLEMENTATION): Likewise.
9208
7a114794
UD
9209 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9210 (LIBC_CANCEL_RESET): Likewise.
9211 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9212 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9213 librt-cancellation.
9214 (CFLAGS-libcrt-cancellation.c): Define.
9215 * sysdeps/pthread/librt-cancellation.c: New file.
9216 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9217 macros also when compiling librt.
9218 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9219 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9220 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9221 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9222 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9223 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9224 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9225
9226 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9227 compat_timer_create.
9228
8ba1d429
UD
92292003-06-14 Ulrich Drepper <drepper@redhat.com>
9230
cc8fb6f3
UD
9231 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9232
8ba1d429
UD
9233 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9234 __register_atfork.
9235 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9236 Add libc_hidden_def.
9237
d4f100e2
RM
92382003-06-13 Roland McGrath <roland@redhat.com>
9239
9240 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9241 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9242
dd9423a6
UD
92432003-06-11 Ulrich Drepper <drepper@redhat.com>
9244
9245 * allocatestack.c (queue_stack): Always inline.
9246 * ptreadhP.h (__do_cancel): Likewise.
9247
ed24330d
JJ
92482003-06-10 Jakub Jelinek <jakub@redhat.com>
9249
9250 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9251 a typo.
9252
06120d79
UD
92532003-06-10 Ulrich Drepper <drepper@redhat.com>
9254
9255 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9256 (__pthread_cond_signal): Remove incorrect second addition for
9257 cond_lock!=0.
9258
b1720346
UD
92592003-06-09 Ulrich Drepper <drepper@redhat.com>
9260
5b318f85
UD
9261 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9262 (__pthread_cond_signal): Use correct futex pointer in
9263 __lll_mutex_lock_wait call.
9264
b1720346
UD
9265 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9266 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9267
3e36c37d
UD
92682003-06-08 Ulrich Drepper <drepper@redhat.com>
9269
ecf7955d
UD
9270 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9271 cancelable.
ed24330d 9272 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
9273 Likewise.
9274
3e36c37d
UD
9275 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9276 hand-written CFI generation code. Since ENTRY/END also initiated
9277 CFI frames this caused two CFI sets to be generated.
9278
7726edc2
UD
92792003-06-07 Ulrich Drepper <drepper@redhat.com>
9280
9281 * cleanup_routine.c: New file.
9282 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9283 * sysdeps/pthread/pthread.h: Add support for fully exception-based
9284 cleanup handling.
9285 * Makefile (libpthread-routines): Add cleanup_routine.
9286 Add more CFLAGS variables to compile with exceptions. Add comments
9287 why which file needs unwind tables.
9288 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9289 tests.
9290 * tst-cancelx1.c: New file.
9291 * tst-cancelx2.c: New file.
9292 * tst-cancelx3.c: New file.
9293 * tst-cancelx4.c: New file.
9294 * tst-cancelx5.c: New file.
9295 * tst-cancelx6.c: New file.
9296 * tst-cancelx7.c: New file.
9297 * tst-cancelx8.c: New file.
9298 * tst-cancelx9.c: New file.
9299 * tst-cancelx10.c: New file.
9300 * tst-cancelx11.c: New file.
9301 * tst-cancelx12.c: New file.
9302 * tst-cancelx13.c: New file.
9303 * tst-cancelx14.c: New file.
9304 * tst-cancelx15.c: New file.
9305 * tst-cleanupx0.c: New file.
9306 * tst-cleanupx0.expect: New file.
9307 * tst-cleanupx1.c: New file.
9308 * tst-cleanupx2.c: New file.
9309 * tst-cleanupx3.c: New file.
9310
9311 * tst-cleanup0.c: Make standard compliant.
9312 * tst-cleanup1.c: Likewise.
9313
9314 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9315 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9316 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9317 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9318 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9319 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9320 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9321 CLEANUP_JMP_BUF.
9322 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9323 * tst-cancel12.c: New file.
9324 * tst-cancel13.c: New file.
9325 * tst-cancel14.c: New file.
9326 * tst-cancel15.c: New file.
9327 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9328 and tst-cancel15.
9329
9330 * tst-cancel1.c: Add some comments.
9331
9332 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9333 timeout correctly.
9334
7a8a8e21
UD
93352003-06-06 Ulrich Drepper <drepper@redhat.com>
9336
9337 * Makefile (CFLAGS-pthread_cancel.c): Define.
9338
4ad0bbf4
UD
93392003-06-05 Ulrich Drepper <drepper@redhat.com>
9340
9341 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9342 Change type of __writer element to int.
9343 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9344 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9345 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9346 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9347 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9348 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9349 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9350 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9351 Compare with TID to determine deadlocks.
9352 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9353 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9354 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9355 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9356 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9357 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9358 Likewise.
9359 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9360 Likewise.
9361 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9362 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9363 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9364 Likewise.
9365 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9366 Likewise.
9367 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9368 * Makefile (tests): Add tst-rwlock12.
9369 * tst-rwlock12.c: New file.
9370
332faa96
JJ
93712003-06-05 Jakub Jelinek <jakub@redhat.com>
9372
9373 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9374 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9375 Remove bogus hidden_proto.
9376 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9377 Likewise.
9378 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9379 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9380 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9381 ___lll_mutex_timedlock): Likewise.
9382
29d9e2fd
UD
93832003-06-04 Ulrich Drepper <drepper@redhat.com>
9384
9385 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9386 (__pthread_cond_signal): Add some code to eventually handle
9387 cond_lock!=0.
9388
6f1acb30
UD
93892003-06-01 Ulrich Drepper <drepper@redhat.com>
9390
9391 * Makefile (tests): Add tst-exec4.
9392 (tst-exec4-ARGS): Define.
9393 * tst-exec4.c: New file.
9394
49b65043
UD
93952003-05-31 Ulrich Drepper <drepper@redhat.com>
9396
31195be2
UD
9397 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9398 Also fail if tv_nsec < 0.
9399 (__lll_timedwait_tid): Likewise.
9400 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9401 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9402 Likewise.
9403 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9404 Likewise.
9405 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9406 Likewise.
9407 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9408 Likewise.
80b54217
UD
9409 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9410 Likewise.
9411 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9412 Likewise.
31195be2 9413
dcfc8224
UD
9414 * Makefile (tests): Add tst-sem8 and tst-sem9.
9415 * tst-sem8.c: New file.
9416 * tst-sem9.c: New file.
9417 * sem_open.c: Fix creation of in_use record if the file exists but
9418 no internal record.
9419
49b65043
UD
9420 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9421 definitions.
9422
9423 * sysdeps/pthread/timer_create.c (timer_create): In case
9424 evp==NULL, assign timer ID to sival_ptr.
9425
9426 * descr.h (struct pthread_unwind_buf): Change type of prev element to
9427 struct pthread_unwind_buf *.
9428 (struct pthread): Likewise for cleanup_jmp_buf element.
9429
9430 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9431 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9432 * unwind.c (__pthread_unwind_next): Likewise.
9433
50794a45
UD
94342003-05-30 Ulrich Drepper <drepper@redhat.com>
9435
5d4f57bd
UD
9436 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9437 (lll_futex_timed_wait): Use int for futex value parameter.
9438 (lll_futex_wake): Likewise.
9439 (lll_futex_requeue): Likewise.
9440
9441 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9442 Replace one memory operation with one register operation.
9443
9444 * tst-join4.c (do_test): Fix error message.
9445
7ab7ea33
UD
9446 * tst-rwlock6.c (do_test): Use correct format specifier.
9447
9448 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9449 (__lll_mutex_lock_wait): Replace one memory operation with one
9450 register operation.
9451 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9452 (__lll_mutex_lock_wait): Likewise.
9453
50794a45
UD
9454 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9455 (__lll_mutex_cond_lock): Add one to value parameter of
9456 __lll_lock_wait to reflect reality in the futex syscall.
9457 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9458 (lll_mutex_cond_lock): Likewise.
9459
5a70784e
JJ
94602003-05-30 Jakub Jelinek <jakub@redhat.com>
9461
9462 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9463 New function.
9464 (lll_mutex_cond_lock): Define.
9465
e7c5ac68
UD
94662003-05-29 Ulrich Drepper <drepper@redhat.com>
9467
586d1748
UD
9468 * Makefile (tests): Add tst-signal6.
9469 * tst-signal6.c: New file.
9470
b8ba4a27
UD
9471 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9472 (__lll_mutex_unlock_force): New function
9473 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9474
65d46efe
UD
9475 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9476 (__lll_mutex_unlock_force): New function.
9477 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9478
9479 * tst-rwlock7.c (do_test): Use correct format specifier.
9480
e7c5ac68
UD
9481 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9482 Find break parameter in correct asm argument.
9483
284bdc42
UD
94842003-05-27 Jakub Jelinek <jakub@redhat.com>
9485
9486 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9487 Remove out4.
9488 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9489 error occured.
9490 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9491 Add __mutex.
9492 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9493 lll_futex_requeue, lll_mutex_unlock_force): Define.
9494
e7c5ac68
UD
94952003-05-30 Jakub Jelinek <jakub@redhat.com>
9496
9497 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9498 (pthread_cond_t): Add __mutex.
9499 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9500 lll_futex_requeue, lll_mutex_unlock_force): Define.
9501
ea2630c6
UD
95022003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9503
9504 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9505 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 9506 Add __mutex field.
ea2630c6
UD
9507 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9508 Define.
9509 (lll_futex_wait, lll_futex_wake): Define.
9510 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9511 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9512 FUTEX_REQUEUE instead of FUTEX_WAIT.
9513 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9514 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9515 mutex which was used in condvar structure. Call
9516 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9517 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9518
9519 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9520 include tcb-offsets.h. Read wakeup value in locked region.
9521 Use the value of gbr register as THREAD_ID.
9522 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9523 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9524 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9525
9526 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9527 macros.
9528
5a77f150
UD
95292003-05-28 Ulrich Drepper <drepper@redhat.com>
9530
9531 * sysdeps/pthread/pthread_cond_broadcast.c
9532 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9533
7661d9f7
UD
95342003-05-26 Ulrich Drepper <drepper@redhat.com>
9535
9536 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9537 typo in register name.
9538 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9539 correctly. Actually use requeue. Little optimization.
9540 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9541 mutex address early. Handle cancellation state as 32-bit value.
9542 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9543 Remove unnecessary label.
9544
69431c9a
UD
95452003-05-25 Ulrich Drepper <drepper@redhat.com>
9546
9547 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9548 instead of FUTEX_WAIT.
9549 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9550 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9551 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9552 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9553 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9554 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9555 used in condvar structure. Call __pthread_mutex_cond_lock instead
9556 of __pthread_mutex_lock_internal.
9557 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9558 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9559 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9560 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9561 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9562 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9563 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9564 Add pthread_mutex_cond_lock.
9565 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9566 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9567 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9568 lll_mutex_cond_lock.
9569 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9570 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 9571 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 9572 Add __mutex field.
248a3490 9573 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
9574 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9575
9576 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9577 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9578
9579 * pthreadP.h: Declare __pthread_mutex_cond_lock.
9580 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9581 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
9582 macro don't define aliases.
9583
9584 * cancellation.c: Remove __pthread_enable_asynccancel_2.
9585 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9586 * sysdeps/pthread/pthread_cond_timedwait.c: Use
9587 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9588 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9589 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9590 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9591 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9592 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9593
fddfebbd
UD
95942003-05-17 Ulrich Drepper <drepper@redhat.com>
9595
9596 * sem_open.c: Fix one endless loop. Implement correct semantics
9597 wrt opening the same semaphore more then once.
9598 * sem_close.c: Adjust for sem_open change.
9599 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
9600 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9601 * Makefile (tests): Add tst-sem7.
9602 * tst-sem7.c: New file.
9603
1eefffb0
RM
96042003-05-16 Roland McGrath <roland@redhat.com>
9605
9606 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9607 uninitialized variable braino.
9608
6e66dc78
UD
96092003-05-16 Ulrich Drepper <drepper@redhat.com>
9610
23ae6451
UD
9611 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9612 test for syscall availability.
9613
9614 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9615 __no_posix_timers to -1 if the syscalls don't exist.
9616
7ac5b8e2
UD
9617 * pthread_join.c (pthread_join): Set tid field of the joined
9618 thread to -1. This isn't necessary but helps to recognize some
9619 error conditions with almost no cost.
9620
9621 * allocatestack.c (FREE_P): Also negative values indicate an
9622 unused stack.
9623
6e66dc78
UD
9624 * unwind.c: Include <unistd.h>.
9625
855dba3c
UD
96262003-05-14 Ulrich Drepper <drepper@redhat.com>
9627
9628 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9629
81f3ac4c
UD
96302003-05-14 Jakub Jelinek <jakub@redhat.com>
9631
9632 * Makefile (crti-objs, crtn-objs): New variables.
9633 (omit-deps, extra-objs): Add crtn.
9634 ($(objpfx)libpthread.so): Depend on both crti and crtn
9635 and links to them in multidir.
9636 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9637
7158eae4
UD
96382003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
9639
9640 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9641 (lll_mutex_unlock): Use atomic_exchange_rel.
9642
edf205d5
UD
96432003-05-11 Ulrich Drepper <drepper@redhat.com>
9644
9645 * cond-perf.c (cons): Add missing locking around setting of alldone.
9646
a3f979a7
UD
96472003-05-10 Ulrich Drepper <drepper@redhat.com>
9648
9649 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9650 related macros.
9651 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9652
880867a4
UD
96532003-05-09 Ulrich Drepper <drepper@redhat.com>
9654
949ec764
UD
9655 * tst-sem6.c: New file.
9656 * Makefile (tests): Add tst-sem6.
9657
9658 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9659 Use atomic_exchange_rel instead of atomic_exchange.
9660 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9661 Likewise.
9662
9663 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9664 code for lll_futex_wait and lll_futex_wake in static apps. Use
9665 vsyscall is possible.
9666
9667 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9668 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9669 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9670 pthread_setaffinity_np.
9671 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9672 and pthread_setaffinity_np.
9673 * Makefile (libpthread-routines): Add pthread_getaffinity and
9674 pthread_setaffinity.
9675
880867a4
UD
9676 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9677 use it in case mmap to allocate the stack fails.
9678 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9679 ARCH_MAP_FLAGS here.
9680 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9681 ARCH_RETRY_MMAP.
9682
92d83c72
UD
96832003-05-08 Ulrich Drepper <drepper@redhat.com>
9684
9685 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9686 handler implementation. It is now lockless in fork().
9687 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9688 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9689 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9690 declare the __fork_*_lists.
9691 (struct fork_handler): Include pointers to all three functions.
9692 Add next, refcntr and need_signal elements.
9693 (__fork_handlers): New declaration.
9694 (__register_atfork_malloc): Remove declaration.
9695 (HAVE_register_atfork_malloc): Remove definition.
9696 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9697 __pthread_child_handler variable.
9698 (__libc_pthread_init): Use __register_atfork instead of explicitly
9699 adding to the list.
9700 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9701 and lll_futex_wake.
9702 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9703
9704 * unwind.c (unwind_cleanup): Print error message and then abort. This
9705 function must never be reached.
9706
9707 * cond-perf.c: New file.
9708
be4d8038
UD
97092003-05-05 Ulrich Drepper <drepper@redhat.com>
9710
9711 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9712
c6696b79
RM
97132003-05-04 Roland McGrath <roland@redhat.com>
9714
9715 * Makefile ($(objpfx)../libc.so): New target.
9716
7da168bf
UD
97172003-05-02 Ulrich Drepper <drepper@redhat.com>
9718
9719 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9720 (pthread_condattr_t): Size is only an int, don't use long for
9721 alignment.
9722 (pthread_mutexattr_t): Likewise.
7da168bf
UD
9723 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9724 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9725 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9726
9a7178d6
UD
97272003-05-01 Ulrich Drepper <drepper@redhat.com>
9728
9729 * sysdeps/i386/tls.h: Define THREAD_ID.
9730 * sysdeps/ia64/tls.h: Likewise.
9731 * sysdeps/powerpc/tls.h: Likewise.
9732 * sysdeps/s390/tls.h: Likewise.
9733 * sysdeps/sh/tls.h: Likewise.
9734 * sysdeps/x86_64/tls.h: Likewise.
9735 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9736 record ownership.
9737 * pthread_mutex_timedlock.c: Likewise.
9738 * pthread_mutex_trylock.c: Likewise.
9739 * pthread_mutex_unlock.c: Likewise.
9740 * pthread_rwlock_trywrlock.c: Likewise.
9741 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9742 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9743 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9744 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9745
9746 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9747 flag.
9748
a234e27d
UD
97492003-04-29 Jakub Jelinek <jakub@redhat.com>
9750
9751 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9752 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9753 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9754 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9755 Make __align long long instead of long.
9756 (pthread_rwlock_t): Formatting.
9757 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9758 (pthread_rwlock_t): Formatting.
9759 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9760 (pthread_cond_t): Make __align long long instead of long.
9761 (pthread_rwlock_t): Move __flags field to the same position as in
9762 linuxthreads.
9763
f025c136
UD
97642003-04-30 Ulrich Drepper <drepper@redhat.com>
9765
9766 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9767 * tst-rwlock7.c (do_test): Likewise.
9768
7531ab9e
RM
97692003-04-26 Roland McGrath <roland@redhat.com>
9770
9771 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9772
299601a1
UD
97732003-04-22 Jakub Jelinek <jakub@redhat.com>
9774
299601a1
UD
9775 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9776 sizeof (struct pthread).
9777 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 9778 1 struct pthread.
299601a1
UD
9779 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9780 to 0.
9781 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9782 struct pthread.
9783 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9784 to 32-bit bytes.
9785 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9786 tcbp.
9787 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9788 unneccessarily.
9789 (NO_TLS_OFFSET): Define.
299601a1
UD
9790 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9791 add TLS_TCB_SIZE unnecessarily.
299601a1 9792
950094f8
RM
97932003-04-22 Roland McGrath <roland@redhat.com>
9794
9795 * Makeconfig (shared-thread-library): Reverse link order to work
9796 around linker bug.
9797
dc2f6455
UD
97982003-04-22 Ulrich Drepper <drepper@redhat.com>
9799
9800 * semaphore.h: Fix typo in comment.
9801
e7608d77
UD
98022003-04-21 Ulrich Drepper <drepper@redhat.com>
9803
6a87ee19
UD
9804 * sysdeps/pthread/sigfillset.c: New file.
9805
e7608d77
UD
9806 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9807 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9808 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9809 * sysdeps/pthread/sigaction.c: Likewise.
9810 * sysdeps/pthread/sigprocmask.c: New file.
9811 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9812 __SIGRTMIN+1.
9813 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9814 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9815 in this case.
9816
0b3df49e
UD
98172003-04-19 Ulrich Drepper <drepper@redhat.com>
9818
58a7a325
UD
9819 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9820 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9821
0b3df49e
UD
9822 * sysdeps/unix/sysv/linux/unregister-atfork.c
9823 (__unregister_atfork): Don't free memory not allocated dynamically.
9824
9825 * semaphore.h: Remove __THROW marker from cancellation points.
9826 * nptl/sysdeps/pthread/pthread.h: Likewise.
9827
7d74651e
UD
98282003-04-18 Ulrich Drepper <drepper@redhat.com>
9829
76a67697
UD
9830 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9831 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
9832 __THROW.
9833
dd9d6538
JJ
98342003-04-16 Jakub Jelinek <jakub@redhat.com>
9835
9836 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9837
4ab6f47c
RM
98382003-04-15 Roland McGrath <roland@redhat.com>
9839
9840 * forward.c (__pthread_unwind): Tweak to avoid warning.
9841
162434a6
UD
98422003-04-15 Ulrich Drepper <drepper@redhat.com>
9843
9844 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9845
35909161
UD
98462003-04-14 Ulrich Drepper <drepper@redhat.com>
9847
18ddd3aa 9848 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
9849 overflow CFA advance instructions.
9850 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9851
18a8e730
UD
98522003-04-14 Jakub Jelinek <jakub@redhat.com>
9853
bd4f43b4
UD
9854 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9855 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9856 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9857 defined.
9858
18a8e730
UD
9859 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9860 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9861 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9862 DW_CFA_advance_loc for .Laddl-.Lsubl.
9863
08c765fa
UD
98642003-04-13 Ulrich Drepper <drepper@redhat.com>
9865
18a8e730
UD
9866 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9867 position-independent unwind data for static libraries.
9868 Add missing unwind info. Add comments.
9869
ad2be852
UD
9870 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9871 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9872 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
9873 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9874
177d1ad3
UD
98752003-04-12 Ulrich Drepper <drepper@redhat.com>
9876
08c765fa
UD
9877 * Makefile: Make sure all cancellation points are compiled with
9878 exception and asynchronous unwind tables.
9879
177d1ad3
UD
9880 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9881 which mishandles loading of global object addresses in PIC.
9882 (THREAD_SETMEM_NC): Likewise.
9883
09d65ff3
UD
98842003-04-11 Ulrich Drepper <drepper@redhat.com>
9885
9886 * pthread.h: Define new data structure for cleanup buffer. Declare
9887 new cleanup handler interfaces.
9888 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9889 (struct pthread): Add cleanup_jmp_buf pointer. Define
9890 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9891 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9892 it. Declare old cleanup handler installation functions.
9893 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9894 handling.
9895 * cleanup_defer.c: Likewise.
9896 * cleanup_compat.c: New file. Old cleanup code.
9897 * cleanup_def_compat.c: New file. Old cleanup code.
9898 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9899 if own thread descriptor.
9900 * unwind.c: New file.
9901 * forward.c: Add __pthread_unwind.
9902 * init.c (pthread_functions): Add __pthread_unwind.
9903 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9904 Add ptr___pthread_unwind.
9905 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9906 and unwind function.
9907 * Makefile (libpthread-routines): Add cleanup_compat,
9908 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9909 table generation if necessary.
9910 * version.c: Record whether unwind support is compiled in.
9911 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9912 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9913 handler interfaces.
9914 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9915 complication to generate unwind information for syscall wrappers.
68107ec0 9916 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
9917 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9918 __cleanup_fct_attribute.
9919
9920 * Makefile: Add rules to build and run tst-cleanup0.
9921 * tst-cleanup0.c: New file.
9922 * tst-cleanup0.expect: New file.
9923
9924 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9925 caller. Optimize to avoid often unecessary local variable.
9926
0dc44b51
RM
99272003-04-11 Roland McGrath <roland@redhat.com>
9928
9929 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9930 sets variable `multidir'; include that.
9931 (generated): Add it.
9932 ($(objpfx)$(multidir)/crti.o): New target.
9933 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9934
84a80719
UD
99352003-04-11 Ulrich Drepper <drepper@redhat.com>
9936
9937 * tst-attr2.c (do_test): Add cast to avoid warning.
9938 * tst-mutex4.c (do_test): Likewise.
9939
88ff4759
UD
99402003-04-10 Ulrich Drepper <drepper@redhat.com>
9941
9942 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9943 in child.
9944
b2041097
UD
99452003-04-09 Ulrich Drepper <drepper@redhat.com>
9946
9947 * Makefile (tests): Add tst-detach1.
9948 * tst-detach1.c: New file.
9949
f9657e88
UD
99502003-04-08 Ulrich Drepper <drepper@redhat.com>
9951
9afe4964
UD
9952 * sysdeps/pthread/pthread.h: Remove duplicate
9953 pthread_cleanup_{push,pop} definitions.
9954
f9657e88
UD
9955 * tst-barrier2.c: Eliminate warnings.
9956 * tst-cancel4.c: Likewise.
9957 * tst-cond4.c: Likewise.
9958 * tst-cond6.c: Likewise.
9959 * tst-detach1.c: Likewise.
9960 * tst-rwlock4.c: Likewise.
9961 * tst-rwlock6.c: Likewise.
9962 * tst-rwlock7.c: Likewise.
9963 * tst-sem3.c: Likewise.
9964 * tst-spin2.c: Likewise.
9965 * tst-umask1.c: Likewise.
9966
69b35e86
UD
99672003-04-07 Ulrich Drepper <drepper@redhat.com>
9968
9969 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9970
c70ad7d7
UD
99712003-04-06 Ulrich Drepper <drepper@redhat.com>
9972
9973 * descr.h (struct pthread): Move cancelhandling member to the front.
9974
54e0138f
UD
99752003-04-05 Ulrich Drepper <drepper@redhat.com>
9976
9977 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9978 malloc_parent, and malloc_child statically.
9979 (__register_atfork_malloc): New function.
9980 (free_mem): Don't free any of the malloc_* variables on the list.
9981 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9982 Define HAVE_register_atfork_malloc.
9983
b22d701b
UD
99842003-04-04 Ulrich Drepper <drepper@redhat.com>
9985
9986 * sysdeps/pthread/createthread.c (create_thread): Add some more
9987 comments explaining when to set multiple_threads and when not.
9988
9989 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9990 THREAD_ATOMIC_BIT_SET if not already defined.
9991 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9992 THREAD_ATOMIC_BIT_SET:
9993 * sysdeps/x86_64/tls.h: Likewise.
9994 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9995 THREAD_ATOMIC_CMPXCHG_VAL.
9996 (_pthread_cleanup_pop_restore): Likewise.
9997 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9998 (__pthread_enable_asynccancel_2): Likewise.
9999 (__pthread_disable_asynccancel): Likewise.
10000 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
10001 (__libc_disable_asynccancel): Likewise.
10002 * init.c (sigcancel_handler): Likewise.
10003 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
10004 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
10005
86246935
UD
100062003-04-03 Ulrich Drepper <drepper@redhat.com>
10007
10008 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
10009 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
10010 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
10011 * Makefile (tests): Add tst-cancel11.
10012 * tst-cancel11.c: New file.
10013
6b4686a5
UD
100142003-04-01 Ulrich Drepper <drepper@redhat.com>
10015
10016 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
10017 round, not the first. Use specific_used flag instead of local
10018 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
10019 (__free_tcb): Don't call deallocate_tsd here.
10020 (start_thread): Call deallocate_tsd here.
10021 * pthread_setspecific.c: Set specific_used flag really only when
10022 needed.
0d73a73b 10023 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 10024 * tst-tsd3.c: New file.
0d73a73b 10025 * tst-tsd4.c: New file.
6b4686a5 10026
42b2395d
UD
100272003-03-31 Ulrich Drepper <drepper@redhat.com>
10028
211d90c5
UD
10029 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
10030 Use atomic_exchange_and_add instead of __lll_add.
10031 (__lll_mutex_timedlock): Likewise.
10032 Patch by Ian Wienand.
10033
100342003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
10035
10036 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10037 (SINGLE_THREAD_P): Fix typo.
10038 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
10039
100402003-03-31 Ulrich Drepper <drepper@redhat.com>
10041
10042 * Makefile (tests): Add tst-align.
10043 * tst-align.c: New file.
10044 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 10045
42b2395d
UD
10046 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
10047 function correctly.
10048
211d90c5
UD
10049 * tst-tsd2.c: Add casts to avoid warnings.
10050
163b180f
UD
100512003-03-30 Ulrich Drepper <drepper@redhat.com>
10052
10053 * descr.h (struct pthread): Move most often used elements to the front.
10054
ea473bad
UD
100552003-03-29 Ulrich Drepper <drepper@redhat.com>
10056
10057 * Makefile (libpthread-routines): Add pthread_atfork.
10058 (libpthread-static-only-routines): Add pthread_atfork.
10059
dd731d53
UD
100602003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
10061
10062 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
10063 of TLS_DTV_AT_TP.
10064 (INSTALL_DTV): Add parens.
10065 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
10066 Use passed descr instead of THREAD_SELF.
10067 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
10068 (__lll_mutex_timedlock_wait): Correct expected value after
10069 spurious wakeup.
10070 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
10071 Release lock before waking up the waiters.
10072 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
10073 criteria. Reorderstruct passed to cleanup handler. Fix
10074 handling of cancellation and failung pthread_mutex_unlock call.
10075 Use __pthread_enable_asynccancel_2 instead of
10076 __pthread_enable_asynccancel.
10077 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10078 Return result of lock re-get if it fails.
10079 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
10080 for __pthread_cleanup_push.
10081 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
10082 completely broken rwlock implementation.
10083 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10084 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10085 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10086 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
10087 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10088 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
10089 versioned_symbol macro.
10090 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
10091 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10092
c75d02f0
UD
100932003-03-27 Ulrich Drepper <drepper@redhat.com>
10094
5f5004df
UD
10095 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
10096 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
10097 and __helper_tid.
10098 (struct timer): Remove th and bar field.
10099 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
10100 debugging code. Create only one helper thread.
10101 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
10102 helper thread.
10103 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
10104 Renamed. Define statically. Use thread info from siginfo.
10105 (__helper_once): New variable.
10106 (__helper_tid): New variable.
10107 (__reset_helper_control): New function.
10108 (__start_helper_thread): New function.
10109
18d009ca
UD
10110 * pthread_create.c (start_thread): Don't use setjmp inside
10111 __builtin_expect to work around gcc bug.
10112
c75d02f0
UD
10113 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
10114 timer_delete syscall fails, but not with ENOSYS, set
10115 __no_posix_timers.
10116
10117 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
10118 (timer_settime): Fix typo.
28cf3058
UD
10119 * sysdeps/unix/sysv/linux/timer_getoverr.c
10120 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 10121
049ac259
JJ
101222003-03-27 Jakub Jelinek <jakub@redhat.com>
10123
10124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
10125 offset of cleanupbuf.__prev.
10126
f93d39dd
JJ
101272003-03-26 Jakub Jelinek <jakub@redhat.com>
10128
10129 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
10130 of included file.
10131
f064e4c5
UD
101322003-03-26 Ulrich Drepper <drepper@redhat.com>
10133
10134 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
10135 NULL provide default definition to syscall.
10136
83e886a3
RM
101372003-03-25 Roland McGrath <roland@redhat.com>
10138
10139 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
10140 (timer_id2ptr): Fix typo.
10141
09402f5b
UD
101422003-03-25 Ulrich Drepper <drepper@redhat.com>
10143
10144 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
10145 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
10146 * sysdeps/ia64/pthreaddef.h: Likewise.
10147 * sysdeps/powerpc/pthreaddef.h: Likewise.
10148 * sysdeps/s390/pthreaddef.h: Likewise.
10149 * sysdeps/sh/pthreaddef.h: Likewise.
10150 * sysdeps/x86_64/pthreaddef.h: Likewise.
10151 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
10152 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
10153 being changed.
10154 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
10155 SIGTIMER is not unblocked.
10156 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
10157 RT signal taken.
10158 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
10159 be send.
10160 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
10161 pass pointer through as ID.
10162 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
10163 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
10164 * sysdeps/unix/sysv/linux/timer_create.c: New file.
10165 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
10166 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
10167 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
10168 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
10169 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
10170 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
10171 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
10172 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
10173 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
10174 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
10175 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
10176 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
10177 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
10178 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
10179 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
10180 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
10181 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
10182 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
10183 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
10184 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
10185 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
10186 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
10187 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
10188 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
10189 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
10190 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
10191 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
10192 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
10193 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
10194 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10195
10196 * pthreadP.h: Remove FRAME_LEFT definition.
10197 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10198 already left frame. Programs which have this problem are not POSIX
10199 compliant.
10200 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10201
5e826ab5
UD
102022003-03-24 Ulrich Drepper <drepper@redhat.com>
10203
10204 * sysdeps/pthread/tst-timer.c: Check return values of the
10205 functions we test.
10206
b910f788
RM
102072003-03-23 Roland McGrath <roland@redhat.com>
10208
3045a1fe
RM
10209 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10210 * tst-tls3mod.c: Likewise.
10211 * tst-tls1.c: Likewise.
10212 * tst-tls2.c: Likewise.
10213
85047fe3
RM
10214 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10215 undefined behavior.
10216
b910f788
RM
10217 * tst-join5.c (tf1, tf2): Add a cast.
10218
10219 * Makeconfig (includes): Append -I$(..)nptl to this variable.
10220
10221 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10222 Don't test anything.
10223 * tst-cond4.c: Likewise.
10224 * tst-cond6.c: Likewise.
10225 * tst-flock2.c: Likewise.
10226 * tst-mutex4.c: Likewise.
10227 * tst-rwlock4.c: Likewise.
10228 * tst-signal1.c: Likewise.
10229 * tst-spin2.c: Likewise.
10230 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10231
10232 * tst-mutex4.c: Use test-skeleton.c.
10233 * tst-spin2.c: Likewise.
10234 * tst-sysconf.c: Likewise.
10235 * tst-barrier2.c: Likewise.
10236 * tst-cond4.c: Likewise.
10237 * tst-cond6.c: Likewise.
10238 * tst-rwlock4.c: Likewise.
10239 * tst-unload.c: Likewise.
10240 * tst-flock2.c (do_test): Use return instead of exit.
10241
4baa087a
RM
102422003-03-22 Jakub Jelinek <jakub@redhat.com>
10243
10244 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10245
5a3ab2fc
UD
102462003-03-21 Ulrich Drepper <drepper@redhat.com>
10247
9f07eae2
UD
10248 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10249 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10250 instead of __lll_compare_and_swap.
10251 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10252 Likewise.
10253 Removed definition if __lll_compare_and_swap.
10254
5a3ab2fc
UD
10255 * cancellation.c: Adjust for new form of compare&exchange macros.
10256 * cleanup_defer.c: Likewise.
10257 * init.c: Likewise.
10258 * libc-cancellation.c: Likewise.
10259 * old_pthread_cond_broadcast.c: Likewise.
10260 * old_pthread_cond_signal.c: Likewise.
10261 * old_pthread_cond_timedwait.c: Likewise.
10262 * old_pthread_cond_wait.c: Likewise.
10263 * pthread_cancel.c: Likewise.
10264 * pthread_create.c: Likewise.
10265 * pthread_detach.c: Likewise.
10266 * pthread_join.c: Likewise.
10267 * pthread_key_delete.c: Likewise.
10268 * pthread_setcancelstate.c: Likewise.
10269 * pthread_setcanceltype.c: Likewise.
10270 * pthread_timedjoin.c: Likewise.
10271 * pthread_tryjoin.c: Likewise.
10272 * sysdeps/pthread/createthread.c: Likewise.
10273
b1aea098
UD
102742003-03-20 Ulrich Drepper <drepper@redhat.com>
10275
10276 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 10277 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
10278 definitions. Replace uses with calls to atomic_* functions.
10279 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10280 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10281 __lll_test_and_set calls with atomic_exchange_and_add and
10282 atomic_exchange calls respectively.
10283 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10284 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10285 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10286 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10287 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10288 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10289 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10290
10291 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10292 returns the old value.
10293
100a7100
RM
102942003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
10295
10296 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10297 int for variable OLDVAL and correct inline assembler contraint.
10298 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10299 type int for variable OLD.
10300
10301 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10302 only for s390-32.
10303 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10304 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10305 instead of multiple_threads field in the TCB.
10306
95767b36
UD
103072003-03-19 Ulrich Drepper <drepper@redhat.com>
10308
4009bf40
UD
10309 * sysdeps/i386/i686/bits/atomic.h: Removed.
10310 * sysdeps/i386/i586/bits/atomic.h: Removed.
10311 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
10312 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
10313 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
10314 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
10315 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
10316 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
10317 * atomic.h: Removed. Moved to glibc.
10318
560a784f
UD
10319 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10320 support for clock selection.
10321
95767b36
UD
10322 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10323 signalling waiters.
10324
043ad426
RM
103252003-03-18 Roland McGrath <roland@redhat.com>
10326
94659495
RM
10327 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10328 Add __lll_rel_instr first. Add memory clobber.
10329 (lll_mutex_unlock): Use __lll_test_and_set.
10330 From Paul Mackerras <paulus@samba.org>.
10331
10332 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10333 unconditionally.
10334 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10335 (SINGLE_THREAD_P): Add `header.' prefix.
10336 From Paul Mackerras <paulus@samba.org>.
10337
043ad426
RM
10338 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10339 pthread_timedjoin_np to ...
10340 (libpthread: GLIBC_2.3.3): ... here.
10341 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10342
10343 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10344 Avoid shadowing VAL variable.
10345
10346 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10347 New macro.
10348
86a9ee5e
UD
103492003-03-18 Ulrich Drepper <drepper@redhat.com>
10350
ac9e0aa1
UD
10351 * Makefile (tests): Add tst-cond11.
10352 * tst-cond11.c: New file.
10353
a14b373c
UD
10354 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10355 struct passed to cleanup handler to eliminate one more
10356 instruction.
10357 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10358
24a49f38
UD
10359 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10360 (pthrad_cond_t): Replace __unused field with __clock.
10361
10362 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10363 waken all waiters in cleanup handler.
10364 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10365 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10366
86a9ee5e
UD
10367 * pthread_condattr_getclock.c: New file.
10368 * pthread_condattr_setclock.c: New file.
10369 * sysdeps/pthread/pthread.h: Declare these new functions.
10370 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10371 * Makefile (libpthread-routines): Add the new functions.
10372 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10373 Renamed field to value. Document use of the bits.
10374 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10375 change.
10376 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 10377 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
10378 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10379 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10380 Add __clock field.
10381 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10382 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10383 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10384 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10385 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10386 Implement clock selection.
10387 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10388 * pthread-errnos.sym: Add ENOSYS.
10389 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10390 _POSIX_CLOCK_SELECTION.
10391 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10392
10393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10394 invalid .size directive.
10395
98054a05
RM
103962003-03-17 Roland McGrath <roland@redhat.com>
10397
10398 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10399 Formatting tweaks.
10400
001bea71
UD
104012003-03-17 Ulrich Drepper <drepper@redhat.com>
10402
4773086e
UD
10403 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10404 Use __lll_add instead of spelling it out. Use protected symbol names.
10405 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10406 Use __lll_add.
10407 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10408 Renamed from lll_compare_and_swap. Use new name where necessary.
10409 (__lll_add): Defined.
10410 (__lll_dec_if_positive): Defined.
10411 (__lll_test_and_set): Defined.
10412 * sysdeps/ia64/pthread_spin_init.c: Removed.
10413 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10414 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10415 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10416 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10417 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10418 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10419 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
10420 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10421 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10422 __sync_lock_release_si.
10423 Patch by Jakub Jelinek.
10424
10425 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10426 Fix timeout handling.
10427 (__lll_timedwait_tid): Likewise.
10428 (lll_unlock_wake_cb): Wake up other waiters if necessary.
10429 Patch by Jakub Jelinek.
10430
10431 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10432
de4471dd
RM
104332003-03-17 Roland McGrath <roland@redhat.com>
10434
10435 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10436 * sysdeps/pthread/pthread_spin_init.c: New file.
10437 * sysdeps/pthread/pthread_spin_unlock.c: New file.
10438 * sysdeps/powerpc/Makefile: New file.
10439 * sysdeps/powerpc/pthread_spin_lock.c: New file.
10440 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10441 * sysdeps/powerpc/pthreaddef.h: New file.
10442 * sysdeps/powerpc/tcb-offsets.sym: New file.
10443 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10444 * sysdeps/powerpc/tls.h: New file.
10445 * sysdeps/powerpc/bits/atomic.h: New file.
10446 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10447 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10448 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 10449
de4471dd
RM
10450 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10451 * sysdeps/unix/sysv/linux/sem_post.c: New file.
10452 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10453 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10454 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10455 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10456 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10457 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10458 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10459 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10460 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10461 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10462 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10463 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10464 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10465
10466 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10467 not gettimeofday.
10468 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10469 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10470 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10471 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10472 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10473
5778033f
UD
104742003-03-17 Ulrich Drepper <drepper@redhat.com>
10475
10476 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10477 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10478 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10479 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10480 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10481
796038f8
RM
104822003-03-16 Roland McGrath <roland@redhat.com>
10483
10484 * tst-fork4.c: Include <string.h>.
10485 * tst-signal2.c: Likewise.
10486 * tst-mutex5.c (do_test): exit -> return.
10487 * tst-mutex2.c: Include <stdlib.h>.
10488
51d0678c
UD
104892003-03-16 Ulrich Drepper <drepper@redhat.com>
10490
5778033f
UD
10491 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10492 (__lll_mutex_timedlock_wait): Correct expected value after
10493 spurious wakeup. Otherwise we would never wait again.
10494
b6e2f87a
UD
10495 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10496 zone versus inline asm stupidity. Use correct instructions.
10497
51d0678c
UD
10498 * tst-rwlock6.c: Add some more status output.
10499
8112cc70
RM
105002003-03-15 Roland McGrath <roland@redhat.com>
10501
10502 * sysdeps/pthread/configure.in: New file.
10503 * sysdeps/pthread/configure: New file (generated).
10504
49773c19
UD
105052003-03-15 Ulrich Drepper <drepper@redhat.com>
10506
10507 * allocatestack.c (allocate_stack): Store the exact stack size of
10508 user allocated stacks.
10509
eec0ca9f
JJ
105102003-03-15 Jakub Jelinek <jakub@redhat.com>
10511
10512 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10513 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10514 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10515 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10516 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10517 Use `header.' prefix.
10518 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10519
a87731e2
UD
105202003-03-15 Ulrich Drepper <drepper@redhat.com>
10521
10522 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10523 __builtin_frame_address, use stack pointer.
10524
10525 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10526 instead of __builtin_frame_pointer.
10527
e22a221d
UD
105282003-03-14 Ulrich Drepper <drepper@redhat.com>
10529
92ed3daf
UD
10530 * tst-basic1.c (do_test): Add cast to avoid warning.
10531 * tst-basic2.c (do_test): Likewise.
10532
9b89567d
UD
10533 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10534 amount of stack correction.
10535
e22a221d
UD
10536 * tst-fork4.c: Use test-skeleton.c.
10537
2e49caba
RM
105382003-03-14 Roland McGrath <roland@redhat.com>
10539
10540 * init.c: Fix typo "#eli" for "#else".
10541
415ef7d8
RM
105422003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
10543
10544 * allocatestack.c (__stack_user): Use hidden_data_def.
10545 * pthread_create.c (__pthread_keys): Likewise.
10546
10547 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10548
52287505
RM
105492003-03-14 Roland McGrath <roland@redhat.com>
10550
415ef7d8
RM
10551 * tst-fork4.c: New file.
10552 * Makefile (tests): Add it.
10553
52287505
RM
10554 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10555 we always define the padding space.
10556 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10557 stopped supporting its own extensions fully.
10558 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10559 struct also called `header', so `header.multiple_threads' is the field
10560 name to use on all machines.
10561 * allocatestack.c (allocate_stack): Use `header.' prefix.
10562 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10563 * pthread_create.c (__pthread_create_2_1): Likewise.
10564 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10565 (THREAD_SELF): Likewise.
10566 * sysdeps/x86_64/tls.h: Likewise.
10567 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10568 (SINGLE_THREAD_P): Likewise.
10569 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10570 (SINGLE_THREAD_P): Likewise.
10571 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10572 (SINGLE_THREAD_P): Likewise.
10573
10574 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10575 value directly.
10576
c44bf9aa
UD
105772003-03-14 Ulrich Drepper <drepper@redhat.com>
10578
e22a221d
UD
10579 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10580 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10581
0eb18281
UD
10582 * pthread_create.c (start_thread): setjmp is expected to return 0.
10583
c44bf9aa
UD
10584 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10585 (THREAD_GETMEM_NC): Likewise.
10586
564cd8b6
UD
105872003-03-13 Ulrich Drepper <drepper@redhat.com>
10588
10589 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10590 and the size of the stack which must be allocated is a multiple,
10591 allocate one more page.
10592 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10593 MULTI_PAGE_ALIASING.
10594
6461e577
RM
105952003-03-13 Roland McGrath <roland@redhat.com>
10596
10597 * pthread_create.c (start_thread): Set EXITING_BIT after the
10598 event-reporting (and destructors), not before.
10599
b5ec5617
UD
106002003-03-13 Jakub Jelinek <jakub@redhat.com>
10601
6461e577
RM
10602 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10603 lll_futex_wake): Declare register variables as long int instead of
10604 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10605 Make syscall arguments clobbered by the syscall.
10606 (lll_futex_wait): Define using lll_futex_timed_wait.
10607
10608 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10609 to void *.
10610
10611 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10612 PPID if [! NDEBUG].
10613
10614 * allocatestack.c (nptl_ncreated): Only declare if
10615 COLORING_INCREMENT != 0.
10616
10617 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10618 (__libc_enable_asynccancel_2): Remove prototype.
10619
b5ec5617
UD
10620 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10621 ctid to match kernel.
10622
d0369fb8
UD
106232003-03-12 Ulrich Drepper <drepper@redhat.com>
10624
7588880f
UD
10625 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10626 libc_multiple_threads.
10627 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10628 __libc_multiple_threads to...
10629 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
10630
10631 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10632 versioning.
10633 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10634 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10635
10636 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10637 (__pthread_once_internal): Define.
10638
10639 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10640 macros instead of .symver directly.
10641 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10642 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10643
d0369fb8
UD
10644 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10645 * sysdeps/x86_64/tcb-offsets.sym: New file.
10646 * sysdeps/x86_64/Makefile: New file.
10647
10648 * sysdeps/i386/tcb-offsets.sym: Add SELF.
10649 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10650 to access own pthread_t in TCB.
10651 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10652 Likewise.
10653 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10654 Likewise.
10655 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10656
0bb2ac85
RM
106572003-03-12 Roland McGrath <roland@redhat.com>
10658
10659 * pthread-errnos.sym: New file.
10660 * Makefile (gen-as-const-headers): New variable, list that file.
10661 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10662 header <pthread-errnos.h> instead of defining errno values here.
10663 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10664 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10665 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10666 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10667 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10668 Likewise.
10669 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10670 Likewise.
10671 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10672 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10673 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10674 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10675 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10676 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10677 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10678 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10679 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10680 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10681 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10682 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10683 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10684 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10685 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10686 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10687 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10688 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10689 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10690 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10691 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10692 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10693 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10694 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10695 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10696 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10697 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10698
10699 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10700 CLONE_CHILD_SETTID worked.
10701
35e148cb
UD
107022003-03-12 Ulrich Drepper <drepper@redhat.com>
10703
d0369fb8
UD
10704 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10705 file.
10706 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10707 file.
10708
10709 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10710 (pthread_cond_t): Add padding.
10711
da49194d
UD
10712 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10713 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10714 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10715
35e148cb
UD
10716 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10717 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10718 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10719 (__pthread_rwlock_timedrdlock): Likewise.
10720 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10721 (__pthread_rwlock_wrlock): Likewise.
10722 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10723 (__pthread_rwlock_rdlock): Likewise.
10724
10725 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10726
10727 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10728 result of lock re-get if it fails.
10729
3e976b96
UD
107302003-03-11 Ulrich Drepper <drepper@redhat.com>
10731
5a03acfe
UD
10732 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10733 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10734 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10735 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10736 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10737 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10738 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10739 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10740 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10741 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10742
10743 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10744 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10745
10746 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10747 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10748 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10749 (create_thread): Likewise.
10750 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10751 * init.c (__pthread_initialize_minimal_internal): Initialize
10752 __libc_multiple_threads_ptr if necessary.
10753 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10754 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10755 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10756 __libc_multiple_threads.
10757 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10758 necessary.
10759
10760 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10761 (THREAD_SETMEM_NC): Likewise.
10762
10763 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10764 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10765 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10766 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10767
10768 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10769 Eliminate one entire instruction.
10770
32a589b1
UD
10771 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10772 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10773 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10774 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10775 instead of __pthread_enable_asynccancel.
10776 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10777 (__pthread_cond_wait): Likewise.
10778 * sysdeps/pthread/pthread_cond_timedwait.c
10779 (__pthread_cond_timedwait): Likewise.
10780 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10781
3e976b96
UD
10782 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10783 (__condvar_cleanup): Wake up all waiters in case we got signaled
10784 after being woken up but before disabling asynchronous
10785 cancellation.
10786 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10787 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10788 (__condvar_cleanup): Likewise.
10789
10790 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10791 Make it an error if architecture has no #if case. Add x86-64.
10792
10793 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10794 pt-initfini.s generation.
10795
10796 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10797 (TLS_INIT_TP): Fix typo.
10798
6c477888
UD
107992003-03-11 Jakub Jelinek <jakub@redhat.com>
10800
10801 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10802 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10803
10804 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10805 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10806 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10807 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10808 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10809 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10810 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10811 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10812
ea694823
UD
108132003-03-11 Ulrich Drepper <drepper@redhat.com>
10814
6c477888
UD
10815 * sysdeps/pthread/pthread_cond_timedwait.c
10816 (__pthread_cond_timedwait): Return the result of the final
10817 locking. If it succeeds, the regular function return value.
10818
10819 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10820 Return result of the final locking.
10821 * version.c (__nptl_main): Work around problems with the strange
10822 INTERNAL_SYSCALL macro on ppc32.
10823 * init.c (__pthread_initialize_minimal_internal): Unblock
10824 SIGCANCEL in case the parent blocked it.
10825 Reported by Paul Mackerras <paulus@samba.org>.
10826
ea694823
UD
10827 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10828 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10829 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10830
b33e6163
RM
108312003-03-11 Jakub Jelinek <jakub@redhat.com>
10832
10833 * sysdeps/pthread/pthread_cond_timedwait.c
10834 (__pthread_cond_timedwait): Unlock and fail if
10835 __pthread_mutex_unlock_internal failed.
10836
10837 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10838 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10839 Use ARCH_CLONE.
10840 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10841 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10842 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10843 ALLOCATE_STACK): New macros.
10844 (TLS_TPADJ): New macro.
10845 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10846 (allocate_stack): Handle TLS_DTV_AT_TP and
10847 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10848 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10849 Don't set PD->self.
10850 * init.c [__ia64__] (__NR_set_tid_address): Define.
10851
10852 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10853 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10854 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10855 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10856 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10857 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10858 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10859 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10860 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10861 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10862 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10863 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10864 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10865 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10866 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10867 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10868 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10869 * sysdeps/ia64/bits/atomic.h: New file.
10870 * sysdeps/ia64/Makefile: New file.
10871 * sysdeps/ia64/pthread_spin_init.c: New file.
10872 * sysdeps/ia64/pthread_spin_lock.c: New file.
10873 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10874 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10875 * sysdeps/ia64/pthreaddef.h: New file.
10876 * sysdeps/ia64/tcb-offsets.sym: New file.
10877 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10878 * sysdeps/ia64/tls.h: New file.
10879
10880 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10881 to syscall instead of no arguments.
10882
2b30b2e5
UD
108832003-03-10 Ulrich Drepper <drepper@redhat.com>
10884
db5f2fc9
UD
10885 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10886 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10887 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10888 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10889
10890 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10891 unused code.
10892
6a4263e3
UD
10893 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10894
3de7c2a9
UD
10895 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10896 lowlevelbarrier.sym.
10897 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10898 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10899 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 10900 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 10901
2a544d82
UD
10902 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10903 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10904 (__lll_mutex_timedlock_wait): Likewise.
10905 (lll_mutex_lock): Adjust asm for that.
10906 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10907 (lll_lock): Adjust asm for operand order change.
10908 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10909 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10910
ec06436c
UD
10911 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10912 Reverse order of parameters.
10913 (__lll_timedwait_tid): Remove regparms attribute.
10914 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10915 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10916
3273832c
UD
10917 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10918 (__lll_timedwait_tid): Remove one unnecessary instruction.
10919
51f32ab8
UD
10920 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10921 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10922 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10923 lowlevelmutex.S.
10924
10925 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10926 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10927 for NOT_IN_libc.
10928 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10929 lowlevellock.S.
10930
fad48d9e
UD
10931 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10932 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10933 for libc.so.
10934 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10935 define LOCK here (if UP is not defined). The actual code is in
10936 lowlevelmutex.S.
10937
9356d063
UD
10938 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10939 LOCK is already defined. Don't define lll_unlock_wake_cb and
10940 __lll_timedwait_tid for libc.so.
10941 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10942 define LOCK here (if UP is not defined). The actual code is in
10943 lowlevellock.S.
10944
ebf0cbc5 10945 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
10946 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10947 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10948 instead of lowlevelsem.h.
10949 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10950 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10951 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 10952
c915e5ad
UD
10953 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10954 lowlevelrwlock.sym.
10955 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10956 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 10957 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 10958
4c3c2e8a
UD
10959 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10960 register loading.
10961 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10962 last changed. D'oh.
10963
2b30b2e5
UD
10964 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10965
10966 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10967 of __libc_locking_needed.
10968 (lll_trylock): Initialize %eax to zero.
10969
2b30b2e5
UD
10970 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10971 pthread_cond_t definition.
10972
e48f9638
RM
109732003-03-10 Roland McGrath <roland@redhat.com>
10974
10975 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10976 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10977 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10978 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10979 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10980
10981 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10982 Instead of setting PD->multiple_threads, set globals
10983 __pthread_multiple_threads and __libc_multiple_threads.
10984 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10985 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10986 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10987
10988 * descr.h (struct pthread): Conditionalize first member on
10989 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10990 containing an anonymous tcbhead_t. Move `list' member out.
10991 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10992 * allocatestack.c: Remove use of `header.data.' prefix.
10993 * pthread_create.c: Likewise.
10994 * init.c (__pthread_initialize_minimal_internal): Likewise.
10995 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10996 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10997 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10998 * sysdeps/x86_64/tls.h: Likewise.
10999 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
11000 (SINGLE_THREAD_P): Likewise.
11001 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
11002 (SINGLE_THREAD_P): Likewise.
11003 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
11004 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
11005
c37cae9e
UD
110062003-03-09 Ulrich Drepper <drepper@redhat.com>
11007
d38c777e
RM
11008 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
11009
7b44a5e0 11010 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 11011 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 11012
c2e5e085
UD
11013 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
11014 leftovers from the ia32 code.
11015
11016 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
11017 memory load.
11018 (clear_once_control): Don't load %esi.
11019
11020 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
11021 handling.
11022
11023 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
11024
cd4b2a55
UD
11025 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
11026 * sysdeps/unix/sysv/linux/createthread.c: ...here.
11027
c37cae9e
UD
11028 * Makefile (tests): Add tst-cond10.
11029 * tst-cond10.c: New file.
11030
d130a341
UD
110312003-03-08 Ulrich Drepper <drepper@redhat.com>
11032
ccf1d573
UD
11033 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
11034 * tst-signal3.c (do_test): Likewise.
11035 * tst-sem5.c (do_test): Likewise.
11036 * tst-kill6.c (do_test): Likewise.
11037 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
11038
11039 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
11040 of inc/dec.
11041 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11042 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
11043 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
11044 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
11045 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11046 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11047 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11048 Likewise.
11049 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11050 Likewise.
11051 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
11052 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
11053 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11054 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11055 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11056 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11057 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11058 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11059
d130a341
UD
11060 * allocatestack.c (allocate_stack): If mprotect() fails free the
11061 TLS memory.
11062
bc6389ad
UD
110632003-03-07 Ulrich Drepper <drepper@redhat.com>
11064
41d4d223
UD
11065 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
11066
11067 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
11068 lll_wake_tid. This was used only to work around kernel limits in
11069 the early days.
11070 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
11071 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
11072 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
11073 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
11074
bc6389ad
UD
11075 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
11076 (__pthread_initialize_minimal_internal): Change initialization of
11077 __static_tls_align_m1 appropriately.
11078 * pthreadP.h (__static_tls_align_m1): Renamed from
11079 __static_tls_align.
11080 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
11081 instead of __static_tls_align-1.
11082
cc775edf
UD
110832003-03-04 Ulrich Drepper <drepper@redhat.com>
11084
0de28d5c 11085 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 11086
518b5308
UD
11087 * pthread_create.c: Define __pthread_keys using nocommon
11088 attribute, not by placing it explicitly in bss.
11089 Remove DEFINE_DEALLOC definition. Not needed anymore.
11090
11091 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
11092 Use it in mmap call to allocate stacks.
11093
11094 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
11095
cc775edf
UD
11096 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
11097 result of the thread function.
11098
4f6f0a8f
UD
110992003-03-03 Ulrich Drepper <drepper@redhat.com>
11100
f04a2721
UD
11101 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
11102 version is just fine.
11103
4f6f0a8f
UD
11104 * sysdeps/unix/sysv/linux/libc_pthread_init.c
11105 (__pthread_child_handler): Renamed from pthread_child_handler,
11106 exported, and marked hidden. Change all users.
11107 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
11108 free __pthread_child_handler from child list.
11109
7ce5c164
UD
111102003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
11111
11112 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
11113
11114 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
11115 Fix handling of cancellation and failing pthread_mutex_unlock call.
11116 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
11117 (__pthread_cond_wait): Likewise.
11118
11119 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
11120 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
11121 lll_futex_timed_wait call.
11122 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
11123 (pthread_rwlock_timedwrlock): Likewise.
11124
11125 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
11126 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
11127 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
11128
11129 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
11130 check of lll_futex_wake return value.
11131
ea6a015b
RM
111322003-03-03 Roland McGrath <roland@redhat.com>
11133
11134 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
11135
11136 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11137 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
11138 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
11139
4adacf57
UD
111402003-03-02 Ulrich Drepper <drepper@redhat.com>
11141
1be3d664
UD
11142 * sysdeps/pthread/timer_create.c (timer_create): Return correct
11143 error for CPU clocks.
11144
885bafa1
UD
11145 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
11146 _POSIX_MONOTONIC_CLOCK.
11147 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
11148
4adacf57
UD
11149 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
11150 recent kernels.
11151
86bfff4d
UD
111522003-03-01 Ulrich Drepper <drepper@redhat.com>
11153
11154 * descr.h (struct pthread): Move cleanup field to the front.
11155
d1149385
RM
111562003-03-01 Roland McGrath <roland@redhat.com>
11157
11158 * sem_open.c (sem_open): Braino fix.
11159
bd8bb78b
UD
111602003-03-01 Ulrich Drepper <drepper@redhat.com>
11161
748bec08
UD
11162 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
11163 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
11164 __pthread_cleanup_pop functionality.
11165 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11166
bd8bb78b
UD
11167 * descr.h (struct pthread): Move tid field to the front now that
11168 it is often used.
11169
11170 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
11171 (__lll_mutex_timedlock_wait): Remove.
11172 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11173 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
11174 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11175 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11176 (lll_unlock_wake_cb): Don't save and restore %esi.
11177 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
11178 %esi.
11179 (__lll_timedwait_tid): Add alignment.
11180 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11181 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
11182 %esi.
11183 (__lll_timedwait_tid): Removed.
11184 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
11185 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
11186 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
11187 (pthread_barrier_wait): Don't save, load, and restore %esi for
11188 last thread.
11189 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
11190 (__pthread_cond_signal): Don't save, load, and restore %esi.
11191 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
11192 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
11193 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
11194 Don't save, load, and restore %esi.
11195
d2637c70
UD
111962003-02-27 Ulrich Drepper <drepper@redhat.com>
11197
567fb22a
UD
11198 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11199 Release lock before waking up the waiters.
11200
427f5fa1
UD
11201 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11202
a2d83cfb
UD
11203 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11204 (reader_thread): Likewise.
11205
d2637c70
UD
11206 * sysdeps/pthread/pthread_rwlock_unlock.c
11207 (__pthread_rwlock_unlock): Release internal lock early. Don't try
11208 to wake up readers if there are none.
11209
11210 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11211 Release internal lock before wake threads.
11212
b1531183
UD
112132003-02-26 Ulrich Drepper <drepper@redhat.com>
11214
dbf6131c
UD
11215 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11216 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
11217 predefined.
11218 * tst-rwlock9.c: Likewise.
11219 * tst-rwlock10.c: New file.
11220 * tst-rwlock11.c: New file.
11221
695799fe
UD
11222 * Makefile (tests): Add tst-dlsym1.
11223 * tst-dlsym1.c: New file.
11224
b1531183
UD
11225 * init.c (__pthread_initialize_minimal_internal): Set
11226 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11227 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11228
3724f268
UD
112292003-02-24 Ulrich Drepper <drepper@redhat.com>
11230
3857ca78
UD
11231 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11232
80d80779
UD
11233 * tst-cond2.c: Fix sychronization with child.
11234
86371308
UD
11235 * tst-rwlock8.c (reader_thread): Remove unused variable.
11236
ffeb4481
UD
11237 * Makefile: Add rules to build and run tst-tls3.
11238 * tst-tls3.c: New file.
11239 * tst-tls3mod.c: New file.
11240
3724f268
UD
11241 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11242 * tst-rwlock8.c: New file.
11243 * tst-rwlock9.c: New file.
11244 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11245 complete broken rwlock implementation.
11246 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11247 Likewise.
11248 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11249 Likewise.
11250 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11251 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
11252 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11253 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11254 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11255 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11256 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 11257
8915cc40
RM
112582003-02-23 Roland McGrath <roland@redhat.com>
11259
11260 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11261
fd1a0d0c
UD
112622003-02-23 Ulrich Drepper <drepper@redhat.com>
11263
ecf28959
UD
11264 * Makefile (tests): Add tst-context1.
11265 * tst-context1.c: New file.
11266
5e47b76b
UD
11267 * Makefile (tests): Add tst-tls1 and tst-tls2.
11268 * tst-tls1.c: New file.
11269 * tst-tls2.c: New file.
11270
5a6bbb41
UD
11271 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11272 for failed cmpxchg.
11273
fd1a0d0c
UD
11274 * pthread_create.c (start_thread): Set EXITING_BIT early.
11275
11276 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11277 (THREAD_GETMEM_NC): Likewise.
11278
757f9fcb
UD
112792003-02-22 Ulrich Drepper <drepper@redhat.com>
11280
b1b8e747
UD
11281 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11282 off 3 more bytes by using offset-less instructions when possible.
11283
c780aa21 11284 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
11285
11286 * eintr.c (eintr_source): Add unnecessary return but the compiler
11287 insists.
11288
11289 * tst-kill3.c: Include <unistd.h>.
11290
5148559c
RM
112912003-02-21 Roland McGrath <roland@redhat.com>
11292
11293 * pthread_create.c (start_thread): Call __libc_thread_freeres.
11294
ab2d98e3
UD
112952003-02-21 Ulrich Drepper <drepper@redhat.com>
11296
71028edd
UD
11297 * Makefile (tests): Add tst-eintr1.
11298 (distribute): Add eintr.c.
11299 * tst-eintr1.c: New file.
11300 * eintr.c: New file.
11301
e814f748
UD
11302 * pthread_cancel.c (pthread_cancel): Use tkill directly.
11303
11304 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11305 Disallow sending SIGCANCEL.
11306
ab2d98e3 11307 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 11308 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
11309 * tst-kill1.c: New file.
11310 * tst-kill2.c: New file.
11311 * tst-kill3.c: New file.
11312 * tst-kill5.c: New file.
9c03686d 11313 * tst-kill6.c: New file.
e814f748
UD
11314 * tst-basic7.c: Renamed to...
11315 * tst-kill4.c: ...this.
ab2d98e3 11316
59fed0e2
RM
113172003-02-21 Roland McGrath <roland@redhat.com>
11318
11319 * Makefile (install-lib-ldscripts): New variable.
11320
49dc759f
UD
113212003-02-21 Ulrich Drepper <drepper@redhat.com>
11322
8c2e9a29
UD
11323 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11324 * pthread_cancel.c: Use INVALID_TD_P.
11325 * pthread_detach.c: Likewise.
11326 * pthread_getschedparam.c: Likewise.
11327 * pthread_setschedparam.c: Likewise.
11328 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11329 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11330 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11331 * pthread_timedjoin.c: Likewise.
11332
11333 * tst-basic7.c: Include <signal.h>.
11334
49dc759f
UD
11335 * pthread_join.c (pthread_join): Limited checking for invalid
11336 descriptors.
11337 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11338
df5803bf
UD
113392003-02-20 Ulrich Drepper <drepper@redhat.com>
11340
c5acd3d7
UD
11341 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11342 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
11343 * Makefile (tests): Add tst-key4.
11344 * tst-key4.c: New file.
11345
729924a0
UD
113462003-02-18 Ulrich Drepper <drepper@redhat.com>
11347
2f7dc594
UD
11348 * Makefile (tests): Add tst-basic7.
11349 * tst-basic7.c: New file.
11350
ba25bb0f
UD
11351 * pthread_create.c (deallocate_tsd): Mark as internal_function.
11352 Add some more __builtin_expect.
11353
12fd3c5f 11354 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 11355
5430d926
UD
113562003-02-17 Ulrich Drepper <drepper@redhat.com>
11357
b0db7fbe
UD
11358 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11359 _POSIX_THREAD_PRIORITY_SCHEDULING.
11360 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11361 _XOPEN_REALTIME_THREADS.
11362 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11363
11364 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11365 kernel returns EINVAL for PID <= 0, work around it.
11366
ecfda9bd
UD
11367 * Makefile (tests): Add tst-signal5.
11368 * tst-signal5.c: New file.
11369
7d78ab99
UD
11370 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11371 and LOGIN_NAME_MAX.
11372
371a2972
UD
11373 * tst-cancel1.c (tf): Block all signals.
11374
5430d926
UD
11375 * Makefile (tests): Add tst-basic6.
11376 * tst-basic6.c: New file.
11377
11378 * tst-basic1.c: Add test for process ID.
11379
11380 * Makefile (tests): Add tst-cancel10.
11381 * tst-cancel10.c: New file.
11382
11383 * Makefile (tests): Add tst-signal4.
11384 * tst-signal4.c: New file.
11385
11386 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11387 __sigismember instead of sigismember. Add __builtin_expect.
11388
1564916a
UD
113892003-02-16 Ulrich Drepper <drepper@redhat.com>
11390
179ff175
UD
11391 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11392 pthread_setcancelstate, and pthread_rwlock_setpshared.
11393
e4335f9a
UD
11394 * tst-cancel7.c (do_test): Make sure the pid file exists before
11395 canceling the thread.
11396
0a37669a
UD
11397 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11398 pthread_rwlock_timedrdlock tests.
11399 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11400 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11401 Check for invalid tv_nsec field.
11402 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11403 Likewise.
11404
11405 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11406 recursive mutex of overflow.
11407
11408 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11409
e4335f9a 11410 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
11411 going into an endless loop.
11412 * Makefile (tests): Add tst-cancel9.
11413 * tst-cancel9.c: New file.
11414
11415 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11416
b270b548
UD
114172003-02-15 Ulrich Drepper <drepper@redhat.com>
11418
1c82b97f
UD
11419 * tst-mutex5.c (do_test): Add more timedlock tests.
11420
b2f05465 11421 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
11422 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11423
e798b60f
UD
11424 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11425 use INLINE_SYSCALL. Error number is returned, not -1.
11426
90491dc4
UD
11427 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11428 and __deallocate_stack with internal_function.
11429 * pthread_create.c: Adjust definitions appropriately.
11430 * allocatestack.c: Likewise.
11431
11432 * pthread_join.c: Add one more __builtin_expect.
11433 * pthread_timedjoin.c: Likewise.
11434
11435 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11436 not data of sequence number does not match.
11437 Add one __builtin_expect.
11438
c6247c9d
UD
11439 * Makefile (tests): Add tst-clock1.
11440 * tst-clock1.c: New file.
11441
b270b548
UD
11442 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11443 negative arguments.
11444 * Makefile (tests): Add tst-basic5.
11445 * tst-basic5.c: New file.
11446
700bf7af
UD
114472003-02-14 Ulrich Drepper <drepper@redhat.com>
11448
757de559
UD
11449 * Makefile (tests): Add tst-basic4.
11450 * tst-basic4.c: New file.
11451
47202270
UD
11452 * pthreadP.h: Add declaraction for __nptl_nthreads.
11453 * pthread_create.c: Define __nptl_nthreads
11454 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 11455 after thread is done. If then zero, call exit(0).
47202270
UD
11456 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11457 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
11458 * init.c (pthread_functions): Initialize ptr_nthreads.
11459 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11460 (__reclaim_stacks): Decrement __nptl_nthreads.
11461 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11462 Define.
11463 * Makefile (tests): Add tst-basic3.
11464 * tst-basic3.c: New file.
11465
e320ef46
UD
11466 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
11467 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
11468 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11469 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
11470 if asynchronous canceling is enabled.
11471 * pthread_join.c (pthread_join): When recognizing circular joins,
11472 take into account the other thread might be already canceled.
11473 * Makefile (tests): Add tst-join5.
11474 * tst-join5.c: New file.
11475
700bf7af
UD
11476 * Makefile (tests): Add tst-join4.
11477 * tst-join4.c: New file.
11478
114792003-02-13 Ulrich Drepper <drepper@redhat.com>
11480
11481 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11482
dac0f772
UD
114832003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
11484
11485 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11486 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11487 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11488 warning.
11489 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11490 to avoid warning.
11491 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11492 error if lll_futex_wake failed.
11493
e8cda341
UD
114942003-02-13 Ulrich Drepper <drepper@redhat.com>
11495
a7720b5e
UD
11496 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11497 handling of cancellation and failung pthread_mutex_unlock call.
11498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11499 * Makefile (tests): Add tst-cond8 and tst-cond9.
11500 * tst-cond8.c: New file.
11501 * tst-cond9.c: New file.
11502
a1ea4c06
UD
11503 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11504
11505 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
11506 non-standard initializers with __USE_GNU.
11507
e8cda341
UD
11508 * Makefile (tests): Add tst-cleanup3.
11509 * tst-cleanup3.c: New file.
11510
2067577c
UD
115112003-02-12 Ulrich Drepper <drepper@redhat.com>
11512
89e78a95
UD
11513 * Makefile (tests): Add tst-attr1 and tst-attr2.
11514 * tst-attr1.c: New file.
11515 * tst-attr2.c: New file.
11516
dfdd294a
UD
11517 * Makefile: Add rules to build and run tst-atfork2 test.
11518 * tst-atfork2.c: New file.
11519 * tst-atfork2mod.c: New file.
11520
11521 * sysdeps/unix/sysv/linux/unregister-atfork.c
11522 (__unregister_atfork): Free the memory allocated for the handlers
11523 after removing them from the lists.
11524
11525 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11526 cleanup function.
11527
11528 * tst-atfork1.c (do_test): Wait for the child we forked.
11529 Report error in child.
11530
11531 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11532
2067577c
UD
11533 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11534
2a8a8a84
UD
115352003-02-10 Ulrich Drepper <drepper@redhat.com>
11536
d9dd121e
UD
11537 * Makefile (tests): Add tst-cancel8.
11538 * tst-cancel8.c: New file.
11539
2a8a8a84
UD
11540 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11541 clearing of control variable.
defd1870 11542 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 11543 * tst-once3.c: New file.
defd1870 11544 * tst-once4.c: New file.
2a8a8a84 11545
a54e8d33
UD
115462003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
11547
11548 * sysdeps/sh/Makefile: New file.
11549 * sysdeps/sh/bits/atomic.h: New file.
11550 * sysdeps/sh/pthread_spin_init.c: New file.
11551 * sysdeps/sh/pthread_spin_lock.c: New file.
11552 * sysdeps/sh/pthread_spin_trylock.S: New file.
11553 * sysdeps/sh/pthread_spin_unlock.S: New file.
11554 * sysdeps/sh/pthreaddef.h: New file.
11555 * sysdeps/sh/tcb-offsets.sym: New file.
11556 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11557 * sysdeps/sh/tls.h: New file.
11558 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11559 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11560 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11561 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11562 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11563 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11564 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11565 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11566 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11567 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11568 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11569 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11570 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11571 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11572 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11573 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11574 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11575 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11576 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11577 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11578 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11579 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11580 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11581 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11582 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11583 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11584 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11585 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11586 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11587 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11588
696e556e
UD
115892003-02-08 Ulrich Drepper <drepper@redhat.com>
11590
11591 * tst-cond2.c: Rearrange code to not rely on behavior undefined
11592 according to POSIX.
11593
11594 * tst-basic2.c (do_test): Lock mutex before creating the thread.
11595
fef710d6
UD
115962003-02-07 Ulrich Drepper <drepper@redhat.com>
11597
c6180643
UD
11598 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11599 (TLS_GET_FS): New #define.
11600 (TLS_SET_FS): New #define.
11601 Correct value of __NR_set_thread_area.
11602
fef710d6
UD
11603 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11604
11090a99
UD
116052003-02-06 Ulrich Drepper <drepper@redhat.com>
11606
65c68990
UD
11607 * Makefile (tests): Add tst-popen1.
11608 * tst-popen1.c: New file.
11609
11090a99
UD
11610 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11611 but inactive generalization.
11612 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11613 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11614 Minor optimization, remove one instruction.
11615 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11616
a88c9263
UD
116172003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
11618
11619 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11620
116212003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
11622
11623 * init.c (__NR_set_tid_address): Add #ifdef for s390.
11624 * sysdeps/pthread/pthread_barrier_wait.c: New file.
11625 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11626 * sysdeps/pthread/pthread_cond_signal.c: New file.
11627 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11628 * sysdeps/pthread/pthread_cond_wait.c: New file.
11629 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11630 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11631 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11632 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11633 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11634 * sysdeps/s390/Makefile: New file.
11635 * sysdeps/s390/bits/atomic.h: New file.
11636 * sysdeps/s390/pthread_spin_init.c: New file.
11637 * sysdeps/s390/pthread_spin_lock.c: New file.
11638 * sysdeps/s390/pthread_spin_trylock.c: New file.
11639 * sysdeps/s390/pthread_spin_unlock.c: New file.
11640 * sysdeps/s390/pthreaddef.h: New file.
11641 * sysdeps/s390/tcb-offsets.sym: New file.
11642 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11643 * sysdeps/s390/tls.h: New file.
11644 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11645 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11646 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11647 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11648 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11649 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11650 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11651 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11652 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11653 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11654 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11655 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11656 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11657 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11658 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11659 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11660 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11661 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11662 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11663 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11664 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11665 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11666 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11667
6f1cff95
UD
116682003-02-04 Ulrich Drepper <drepper@redhat.com>
11669
ec609a8e
UD
11670 * atomic.h: Add a couple more default implementations.
11671 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
11672 __arch_compare_and_exchange_32_acq in return value definition. It
11673 always exists.
11674 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 11675 Add missing atomic_ prefixes.
e3ec8904 11676
6f1cff95
UD
11677 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11678 thread library is available, use correct value to mark initialized
11679 once variable.
11680
4f088329
UD
116812003-02-03 Ulrich Drepper <drepper@redhat.com>
11682
6f1cff95
UD
11683 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11684 __sysconf to determine pagesize.
11685
3e4fc359 11686 * pthread_create.c: Include <atomic.h>.
4f088329
UD
11687 * allocatestack.c (allocate_stack): Implement coloring of the
11688 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11689 size minus one. Adjust users.
3e4fc359 11690 * sysdeps/i386/i686/Makefile: New file.
4f088329 11691
2f42e8be
UD
116922003-02-02 Ulrich Drepper <drepper@redhat.com>
11693
4301f7e2
UD
11694 * allocatestack.c: Improve comment throughout the file.
11695
2f42e8be 11696 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 11697 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
11698 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11699 (__lll_lock_wait): Likewise.
11700 (lll_unlock_wake_cb): Removed.
11701
4a7d6545
UD
117022003-01-31 Ulrich Drepper <drepper@redhat.com>
11703
11704 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11705 _POSIX_THREAD_PRIORITY_SCHEDULING.
11706
886d5973
UD
117072003-01-30 Jakub Jelinek <jakub@redhat.com>
11708
11709 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11710 Fix return type of ptr___pthread_getspecific.
11711
e474ca78
UD
117122003-01-29 Ulrich Drepper <drepper@redhat.com>
11713
11714 * Makefile (tests): Add tst-umask1.
11715 (tst-umask1-ARGS): Define.
11716 * tst-umask1.c: New file.
11717
e6ebd2e4
UD
117182003-01-28 Ulrich Drepper <drepper@redhat.com>
11719
6cf26f41
UD
11720 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11721 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11722 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11723 pthread_rwlock_unlock.
11724 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11725 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11726 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11727 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11728 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11729 New file.
11730 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11731 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11732 New file.
11733 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11734 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11735 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11736 New file.
11737 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11738 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11739 New file.
11740 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11741 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11742 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11743 New file.
11744 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11745 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11746 New file.
11747 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11748
1d087a7e
UD
11749 * Makefile (libpthread-routines): Remove lowlevelcond and
11750 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11751 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11752 and pthread_cond_broadcast.
4a99d160
UD
11753 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11754 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11755 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11756 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11757 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11758 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11759 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11760 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11761 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11762 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11763 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11764 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11765 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11766 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11767 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11768 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11769 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11770 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11771 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11772 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11773 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11774 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11775 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11776 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11777 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11778 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11779 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11780 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11781 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11782 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11783 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 11784
e6ebd2e4
UD
11785 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11786 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11787 of the code is moved to ...
11788 * sysdeps/pthread/createthread.c: ...here. New file.
11789
a15698cb
UD
117902003-01-27 Ulrich Drepper <drepper@redhat.com>
11791
0566b130
UD
11792 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11793 (__new_sem_post): Clear %eax before returning.
11794 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11795
e6fb8846
UD
11796 * Makefile (tests): Add tst-cleanup2.
11797 * tst-cleanup2.c: New file.
11798
a15698cb
UD
11799 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11800 Interpret first parameter correctly.
11801
8824b0a1
UD
118022003-01-17 Ulrich Drepper <drepper@redhat.com>
11803
11804 * Makefile (headers): Add bits/semaphore.h.
11805
850dcfca
UD
118062003-01-16 Jakub Jelinek <jakub@redhat.com>
11807
11808 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11809 if not SHARED.
11810
574b892e
UD
118112003-01-14 Ulrich Drepper <drepper@redhat.com>
11812
a8d87c92
UD
11813 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11814 must be used and mapping failed.
11815 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11816
574b892e
UD
11817 * Makefile (CFLAGS-pthread_self.os): Define this, not
11818 CFLAGS-pthread_self.c.
11819
fb48047a
UD
118202003-01-13 Ulrich Drepper <drepper@redhat.com>
11821
47805511
UD
11822 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11823 lll_unlock_wake_cb.
11824
fb48047a
UD
11825 * Makefile (libpthread-routines): Add version. Add rules to build
11826 version.os and banner.h.
11827 * version.c: New file.
11828
115bb61d
UD
118292003-01-13 Jakub Jelinek <jakub@redhat.com>
11830
11831 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11832 the alias unconditional.
11833 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11834
118352003-01-13 Ulrich Drepper <drepper@redhat.com>
11836
11837 * Makefile (CFLAGS-pthread_self.c): New definition.
11838
6aca81bb
UD
118392003-01-06 Jakub Jelinek <jakub@redhat.com>
11840
11841 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11842 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11843 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11844 * init.c (__pthread_initialize_minimal_internal): Likewise.
11845
e9c7764e
UD
118462003-01-07 Jakub Jelinek <jakub@redhat.com>
11847
b5facfda
UD
11848 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11849
e9c7764e
UD
11850 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11851 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11852 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11853 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11854 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11855 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11856
bef1e42f
UD
118572003-01-06 Jakub Jelinek <jakub@redhat.com>
11858
11859 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11860 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11861 * tst-cancel-wrappers.sh: Remove all exceptions.
11862
bbd17455
UD
118632003-01-05 Ulrich Drepper <drepper@redhat.com>
11864
a73ab6df
UD
11865 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11866 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11867
bbd17455
UD
11868 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11869 Use __libc_pthread_functions array if SHARED.
11870
11871 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11872 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11873
11874 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11875 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11876 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11877 __libc_ptf_call instead of __libc_maybe_call.
11878 (PTF): New #define.
11879 (__libc_cleanup_region_start): Wrap function name with PTF call.
11880 (__libc_cleanup_region_end): Likewise.
11881 (__libc_cleanup_end): Likewise.
11882
11883 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11884 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11885 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11886 * pthreadP.h: Add prototypes.
11887
11888 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11889 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11890 __pthread_rwlock_unlock aliases.
11891 * pthreadP.h: Add prototypes for new aliases.
11892
11893 * pthreadP.h (struct pthead_functions): Moved to...
11894 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11895 * init.c (pthread_functions): Add initializers for new elements.
11896
11897 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11898 __pthread_cleanup_pop_restore aliases.
11899 * pthreadP.h: Add prototypes.
11900
11901 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11902 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11903 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11904 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11905 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11906 * pthreadP.h: Adjust prototypes and callers.
11907
d27a78be
UD
119082003-01-04 Ulrich Drepper <drepper@redhat.com>
11909
b74121ae
UD
11910 * Makefile (tests): Add tst-cancel7.
11911 (tst-cancel7-ARGS): New variable.
bbd17455 11912 * tst-cancel7.c: New file.
b74121ae 11913
29bc410c
UD
11914 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11915 around gcc defficiencies.
11916 * old_pthread_cond_signal.c: Likewise.
11917 * old_pthread_cond_timedwait.c: Likewise.
11918 * old_pthread_cond_wait.c: Likewise.
11919
d27a78be
UD
11920 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11921
733f25e6
UD
119222003-01-03 Ulrich Drepper <drepper@redhat.com>
11923
7edb2ae3
UD
11924 * Makefile (tests): Add tst-cond7.
11925 * tst-cond7.c: New file.
11926
b1151300
UD
11927 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11928 (condvar_cleanup): Get condvar address from the right place.
11929
733f25e6
UD
11930 * atomic.h: Correct definitions of atomic_full_barrier,
11931 atomic_read_barrier, atomic_write_barrier.
11932
11933 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11934 race-free.
11935 * old_pthread_cond_signal.c: Likewise.
11936 * old_pthread_cond_timedwait.c: Likewise.
11937 * old_pthread_cond_wait.c: Likewise.
11938
686b7223
UD
119392003-01-03 Jakub Jelinek <jakub@redhat.com>
11940
11941 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11942
0e07706e
UD
119432003-01-03 Ulrich Drepper <drepper@redhat.com>
11944
997256dd
UD
11945 * pthreadP.h (pthread_cond_2_0_t): New type.
11946 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11947 Use new type for the 2.0 condvar function prototypes.
11948 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11949 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11950 parameter.
11951 * old_pthread_cond_destroy.c: Likewise.
11952 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11953 * old_pthread_cond_signal.c: Likewise.
11954 * old_pthread_cond_timedwait.c: Likewise.
11955 * old_pthread_cond_wait.c: Likewise.
11956
842d2817
UD
11957 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11958 (__pthread_cond_wait): Don't save cancellation mode and seq value
11959 in same location.
11960
0e07706e
UD
11961 * herrno.c (__h_errno_location): Don't define as weak.
11962
bf293afe
UD
119632003-01-02 Jakub Jelinek <jakub@redhat.com>
11964
11965 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11966 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11967 and pthread_cond_wait.
11968 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11969 Renamed to...
11970 (__pthread_cond_broadcast_2_0): ... this.
11971 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11972 Renamed to...
11973 (__pthread_cond_destroy_2_0): ... this.
11974 * old_pthread_cond_init.c (__old_pthread_cond_init):
11975 Renamed to...
11976 (__pthread_cond_init_2_0): ... this.
11977 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11978 Renamed to...
11979 (__pthread_cond_signal_2_0): ... this.
11980 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11981 Renamed to...
11982 (__pthread_cond_wait_2_0): ... this.
11983 * pthread_cond_destroy.c: Include shlib-compat.h.
11984 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11985 * pthread_cond_init.c: Include shlib-compat.h.
11986 (pthread_cond_init): Change strong_alias into versioned_symbol.
11987 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11988 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11989 fields.
11990 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11991 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11992 __pthread_cond_wait_2_0): New prototypes.
11993 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11994 __old_pthread_cond_init, __old_pthread_cond_signal,
11995 __old_pthread_cond_wait): Removed.
11996 * init.c: Include shlib-compat.h.
11997 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11998 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11999 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
12000 ptr___pthread_cond_*_2_0 fields.
12001 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
12002 pthread_cond_*@GLIBC_2.0 compatibility symbols.
12003
12004 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
12005 LIBC_SIGACTION was not yet defined.
12006 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
12007 [!defined LIBC_SIGACTION] (__sigaction): New function and
12008 libc_hidden_weak.
12009 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
12010 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
12011
120122003-01-02 Jakub Jelinek <jakub@redhat.com>
12013
12014 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
12015
05df18c3
UD
120162003-01-02 Ulrich Drepper <drepper@redhat.com>
12017
12018 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
12019 New, larger type definition.
12020 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
12021 implementation.
12022 * Versions [libpthread]: Add definitions for new pthread_cond_*
12023 interfaces for version GLIBC_2.3.2.
12024 * pthread_cond_init.c: Update initialization for new type definition.
12025 * Makefile (libpthread-routines): Remove pthread_cond_wait,
12026 pthread_cond_timedwait, pthread_cond_signal, and
12027 pthread_cond_broadcast. Add old_pthread_cond_init,
12028 old_pthread_cond_destroy, old_pthread_cond_wait,
12029 old_pthread_cond_timedwait, old_pthread_cond_signal, and
12030 old_pthread_cond_broadcast.
12031 * old_pthread_cond_broadcast.c: New file.
12032 * old_pthread_cond_destroy.c: New file.
12033 * old_pthread_cond_init.c: New file.
12034 * old_pthread_cond_signal.c: New file.
12035 * old_pthread_cond_timedwait.c: New file.
12036 * old_pthread_cond_wait.c: New file.
12037 * pthreadP.h: Add prototypes for the compatibility interfaces.
12038
12039 * pthread_cond_destroy.c: Don't include <errno.h>.
12040
fd8979e4
UD
120412003-01-01 Ulrich Drepper <drepper@redhat.com>
12042
12043 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
12044 unnecessary zero offset when addressing MUTEX.
12045
6d6ee629
UD
120462002-12-31 Ulrich Drepper <drepper@redhat.com>
12047
12048 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
12049 __register_atfork.
12050 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
12051 for __register_atfork.
12052
a4baf360
UD
120532002-12-31 Jakub Jelinek <jakub@redhat.com>
12054
12055 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
12056 instead of ASSEMBLER test macro.
12057
12058 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
12059 __libc_current_sigrtmax): Add libc_hidden_def.
12060
12061 * sysdeps/pthread/list.h: Remove assert.h include.
12062
e9395a94
UD
120632002-12-31 Ulrich Drepper <drepper@redhat.com>
12064
12065 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
12066 __pthread_initialize_minimal_internal not
12067 __pthread_initialize_minimal.
12068
89d6e444
UD
120692002-12-30 Ulrich Drepper <drepper@redhat.com>
12070
416d2de6
UD
12071 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
12072 __pthread_initialize_minimal as hidden.
12073
89d6e444
UD
12074 * init.c (__pthread_initialize_minimal_internal): Don't mark as
12075 constructor.
12076
120772002-12-31 Jakub Jelinek <jakub@redhat.com>
12078
12079 * Makefile ($(inst_libdir)/libpthread.so): Depend on
12080 $(common-objpfx)format.lds, include that into the output script.
12081 Fix comment.
12082 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
12083
8cac677c
UD
120842002-12-28 Andreas Jaeger <aj@suse.de>
12085
12086 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
12087 nsec resolution changes.
12088 (xstat64_conv): Likewise.
12089 (xstat32_conv): Likewise.
12090 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
12091 struct kernel_stat.
12092 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
12093 structs stat and stat64.
12094 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 12095 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 12096
49e9f864
UD
120972002-12-30 Jakub Jelinek <jakub@redhat.com>
12098
12099 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
12100 argument.
12101 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
12102 (pthread_exit): Use strong_alias to avoid warnings.
12103 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
12104 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
12105 ptr___pthread_attr_init_2_*.
12106 * init.c (pthread_functions): Adjust.
12107
bab09b26
UD
121082002-12-29 Ulrich Drepper <drepper@redhat.com>
12109
598d7a42
UD
12110 * forward.c: Make all functions available by default again. It
12111 caused too much trouble.
12112
bab09b26
UD
12113 * pt-siglongjmp.c: Removed.
12114
3b7ed871
UD
121152002-12-28 Jakub Jelinek <jakub@redhat.com>
12116
12117 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
12118 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
12119 * sysdeps/i386/Makefile: New file.
12120 * sysdeps/i386/tcb-offsets.sym: New file.
12121 * sysdeps/pthread/tcb-offsets.h: New file.
12122 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12123 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
12124
12125 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
12126 __register_atfork...
12127 (GLIBC_2.3.2): ...here.
12128
121292002-12-28 Ulrich Drepper <drepper@redhat.com>
12130
12131 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
12132 pthread_attr_setstackaddr with __attribute_deprecated__.
12133
270d9d47
UD
121342002-12-27 Jakub Jelinek <jakub@redhat.com>
12135
12136 * pt-system.c (system): Remove cancellation handling.
12137 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
12138 cancellation routines.
12139
131fd126
UD
121402002-12-28 Ulrich Drepper <drepper@redhat.com>
12141
afb2e954
UD
12142 * descr.h: Include <dl-sysdep.h>.
12143 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
12144 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
12145 (MULTIPLE_THREADS_OFFSET): Adjust offset.
12146 (SYSINFO_OFFSEET): Likewise.
12147
121482002-12-27 Jakub Jelinek <jakub@redhat.com>
12149
12150 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
12151 Define.
12152 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
12153 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
12154 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
12155 (USE_DL_SYSINFO): Undef.
12156
121572002-12-22 Jakub Jelinek <jakub@redhat.com>
12158
12159 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
12160 $(common-objpfx)libc.so.
12161 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
12162 it is bigger than pipe buffer size even on arches with bigger
12163 page size.
12164 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
12165
a218c9cf
UD
121662002-12-25 Ulrich Drepper <drepper@redhat.com>
12167
12168 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
12169 correct errno access for case that USE___THREAD is not defined.
12170
015a2dc9
UD
121712002-12-24 Ulrich Drepper <drepper@redhat.com>
12172
12173 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
12174 Patch by Marijn Ros <marijn@mad.scientist.com>.
12175
5220f9ac
RM
121762002-12-22 Roland McGrath <roland@redhat.com>
12177
12178 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
12179
1561bf63
UD
121802002-12-20 Ulrich Drepper <drepper@redhat.com>
12181
12182 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
12183
3325198e
UD
121842002-12-19 Ulrich Drepper <drepper@redhat.com>
12185
057c823f
UD
12186 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
12187 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
12188 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
12189
097eca29
UD
12190 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
12191 of int $0x80.
12192 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12193 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
12194 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
12195 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12196 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12197 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12198 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12199 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12200
12201 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12202 sysenter.
12203 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12204
12205 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12206
5f5843e3
UD
12207 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12208 in new TCB.
12209 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12210 that sysinfo is properly initialized.
12211 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12212 to 1 only for ld.so.
12213
3325198e
UD
12214 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12215 RTLD_CORRECT_DYNAMIC_WEAK.
12216
74e8f2dc
UD
122172002-12-19 Jakub Jelinek <jakub@redhat.com>
12218
12219 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12220 Use return 0 as 6th argument to FORWARD4.
12221 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12222
df45b31e
UD
122232002-12-18 Ulrich Drepper <drepper@redhat.com>
12224
12225 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12226 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12227 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12228 (INIT_SYSINFO): New #define.
12229 (TLS_TP_INIT): Use INIT_SYSINFO.
12230 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12231 At test to make sure SYSINFO_OFFSET value is correct.
12232 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12233
3d539579
UD
122342002-12-18 Jakub Jelinek <jakub@redhat.com>
12235
12236 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12237 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12238 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12239 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12240 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12241 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12242 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12243
d7913e0e
UD
122442002-12-18 Ulrich Drepper <drepper@redhat.com>
12245
f051627f
UD
12246 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12247 macro instead of using int $0x80 directly.
12248
d7913e0e
UD
12249 * sysdeps/pthread/bits/stdio-lock.h: New file.
12250 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12251 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12252 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12253 * Makefile (routines): Add libc-lowlevelmutex.
12254
12255 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12256 __i686.get_pc_thunk.dx.
12257
f077a4a9
UD
122582002-12-17 Jakub Jelinek <jakub@redhat.com>
12259
12260 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12261 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12262 ($(objpfx)tst-cancel-wrappers.out): New rule.
12263 * tst-cancel-wrappers.sh: New test.
12264 * tst-locale1.c: Include signal.h.
12265 (uselocale): Test static linking of __libc_current_sigrt*.
12266
122672002-12-17 Ulrich Drepper <drepper@redhat.com>
12268
12269 * Makefile (tests): Add tst-cancel6.
12270 * tst-cancel6.c: New file
12271
bd499a3b
UD
122722002-12-17 Jakub Jelinek <jakub@redhat.com>
12273
12274 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12275 Define meaningfully for assembler as well.
12276 * pthreadP.h (struct pthread_functions): Remove
12277 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
12278 and ptr_pthread_attr_init_2_1 fields.
12279 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12280 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12281 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12282 (FORWARD3): Define using FORWARD4.
12283 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12284 versions.
12285 * pt-system.c: Remove duplicate stdlib.h include.
12286
0a1063f4
UD
122872002-12-16 Ulrich Drepper <drepper@redhat.com>
12288
87d60668
UD
12289 * sem_init.c: Define sem_init@GLIBC_2.0.
12290 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12291 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12292
0a1063f4
UD
12293 * flockfile.c: Moved to...
12294 * sysdeps/pthread/flockfile.c: ...here. New file.
12295 * funlockfile.c: Moved to...
12296 * sysdeps/pthread/funlockfile.c: ...here. New file.
12297 * ftrylockfile.c: Moved to...
12298 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
12299
9634cf9d
UD
123002002-12-16 Jakub Jelinek <jakub@redhat.com>
12301
12302 * libc-cancellation.c: Guard both function with
12303 #if !defined NOT_IN_libc.
12304 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12305 automatically provided pthread wrappers.
12306 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12307 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12308 nor in libpthread.
12309 * pt-open.c: Removed.
12310 * pt-fcntl.c: Removed.
12311 * pt-fsync.c: Removed.
12312 * pt-lseek.c: Removed.
12313 * pt-msgrcv.c: Removed.
12314 * pt-msgsnd.c: Removed.
12315 * pt-msync.c: Removed.
12316 * pt-nanosleep.c: Removed.
12317 * pt-open64.c: Removed.
12318 * pt-pause.c: Removed.
12319 * pt-pread.c: Removed.
12320 * pt-pread64.c: Removed.
12321 * pt-pwrite.c: Removed.
12322 * pt-pwrite64.c: Removed.
12323 * pt-read.c: Removed.
12324 * pt-recv.c: Removed.
12325 * pt-recvfrom.c: Removed.
12326 * pt-recvmsg.c: Removed.
12327 * pt-send.c: Removed.
12328 * pt-sendto.c: Removed.
12329 * pt-sigtimedwait.c: Removed.
12330 * pt-sigwait.c: Removed.
12331 * pt-wait.c: Removed.
12332 * pt-waitpid.c: Removed.
12333 * pt-write.c: Removed.
12334 * pt-accept.c: Removed.
12335 * pt-close.c: Removed.
12336 * pt-connect.c: Removed.
12337 * pt-lseek64.c: Removed.
12338 * pt-sendmsg.c: Removed.
12339 * pt-tcdrain.c: Removed.
12340
6ee8d334
UD
123412002-12-15 Ulrich Drepper <drepper@redhat.com>
12342
81fa9371
UD
12343 * init.c (__pthread_initialize_minimal_internal): Renamed from
12344 __pthread_initialize_minimal. Make old name an alias. This
12345 converts a normal relocation into a relative relocation.
12346
f3015aa5
UD
12347 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12348
4cbc1950
UD
12349 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12350 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12351 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12352 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12353 pt-sigwaitinfo, pt-waitid, and pt-writev.
12354 * pt-creat.c: Removed.
12355 * pt-poll.c: Removed.
12356 * pt-pselect.c: Removed.
12357 * pt-readv.c: Removed.
12358 * pt-select.c: Removed.
12359 * pt-sigpause.c: Removed.
12360 * pt-sigsuspend.c: Removed.
12361 * pt-sigwaitinfo.c: Removed.
12362 * pt-waitid.c: Removed.
12363 * pt-writev.c: Removed.
12364
8454830b
UD
12365 * init.c (pthread_functions): New variable.
12366 (__pthread_initialize_minimal): Pass pointer to pthread_functions
12367 (or NULL) to __libc_pthread_init.
12368 * forward.c: Rewrite to use __libc:pthread_functions array to get
12369 function addresses.
12370 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12371 prototype.
12372 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12373 Take new parameter. Copy content of variable pointed to by it
12374 to __libc_pthread_init.
12375
12376 * pthreadP.h (struct pthread_functions): New type.
12377 (__libc_pthread_init): Declare.
12378
12379 * pthread_attr_destroy.c: Add namespace protected alias.
12380 * pthread_attr_getdetachstate.c: Likewise.
12381 * pthread_attr_getinheritsched.c: Likewise.
12382 * pthread_attr_getschedparam.c: Likewise.
12383 * pthread_attr_getschedpolicy.c: Likewise.
12384 * pthread_attr_getscope.c: Likewise.
12385 * pthread_attr_setdetachstate.c: Likewise.
12386 * pthread_attr_setinheritsched.c: Likewise.
12387 * pthread_attr_setschedparam.c: Likewise.
12388 * pthread_attr_setschedpolicy.c: Likewise.
12389 * pthread_attr_setscope.c: Likewise.
12390 * pthread_cond_broadcast.c: Likewise.
12391 * pthread_cond_destroy.c: Likewise.
12392 * pthread_cond_init.c: Likewise.
12393 * pthread_cond_signal.c: Likewise.
12394 * pthread_cond_wait.c: Likewise.
12395 * pthread_condattr_destroy.c: Likewise.
12396 * pthread_condattr_init.c: Likewise.
12397 * pthread_equal.c: Likewise.
12398 * pthread_exit.c: Likewise.
12399 * pthread_getschedparam.c: Likewise.
12400 * pthread_self.c: Likewise.
12401 * pthread_setcancelstate.c: Likewise.
12402 * pthread_setschedparam.c: Likewise.
12403 * pthread_mutex_destroy.c: Likewise.
12404 * pthread_mutex_init.c: Likewise.
12405 * pthreadP.h: Add prototypes for the aliases.
12406
0d5f4929
UD
12407 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12408 multiple_threads member in correct TCB to 1.
12409
6ee8d334
UD
12410 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12411 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
12412 member of thread decriptor, otherwise return unconditionally 1.
12413
2fb6444d
UD
124142002-12-14 Ulrich Drepper <drepper@redhat.com>
12415
12416 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12417 regular Linux version. Remove file.
12418 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
12419 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
12420 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
12421 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
12422 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
12423 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
12424 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
12425 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
12426 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
12427 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
12428 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
12429 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
12430 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
12431 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
12432 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
12433 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
12434 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
12435 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
12436 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
12437 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
12438 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
12439 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
12440 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
12441 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
12442 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
12443 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
12444 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
12445 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
12446 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
12447 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
12448
86b2dc40
UD
124492002-12-14 Jakub Jelinek <jakub@redhat.com>
12450
12451 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12452 * sysdeps/unix/sysv/linux/open.c: Removed.
12453 * sysdeps/unix/sysv/linux/fsync.c: Removed.
12454 * sysdeps/unix/sysv/linux/lseek.c: Removed.
12455 * sysdeps/unix/sysv/linux/msync.c: Removed.
12456 * sysdeps/unix/sysv/linux/read.c: Removed.
12457 * sysdeps/unix/sysv/linux/close.c: Removed.
12458 * sysdeps/unix/sysv/linux/creat.c: Removed.
12459 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12460 * sysdeps/unix/sysv/linux/pause.c: Removed.
12461 * sysdeps/unix/sysv/linux/select.c: Removed.
12462 * sysdeps/unix/sysv/linux/write.c: Removed.
12463
9d263d72
UD
124642002-12-14 Ulrich Drepper <drepper@redhat.com>
12465
12466 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12467 element in TCB to see whether locking is needed.
12468
12469 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12470 MULTIPLE_THREADS_OFFSET value is correct.
12471
12472 * sysdeps/unix/sysv/linux/close.c: New file.
12473 * sysdeps/unix/sysv/linux/connect.S: New file.
12474 * sysdeps/unix/sysv/linux/creat.c: New file.
12475 * sysdeps/unix/sysv/linux/fsync.c: New file.
12476 * sysdeps/unix/sysv/linux/llseek.c: New file.
12477 * sysdeps/unix/sysv/linux/lseek.c: New file.
12478 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12479 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12480 * sysdeps/unix/sysv/linux/msync.c: New file.
12481 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12482 * sysdeps/unix/sysv/linux/open.c: New file.
12483 * sysdeps/unix/sysv/linux/open64.c: New file.
12484 * sysdeps/unix/sysv/linux/pause.c: New file.
12485 * sysdeps/unix/sysv/linux/poll.c: New file.
12486 * sysdeps/unix/sysv/linux/pread.c: New file.
12487 * sysdeps/unix/sysv/linux/pread64.c: New file.
12488 * sysdeps/unix/sysv/linux/pselect.c: New file.
12489 * sysdeps/unix/sysv/linux/pwrite.c: New file.
12490 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12491 * sysdeps/unix/sysv/linux/readv.c: New file.
12492 * sysdeps/unix/sysv/linux/recv.S: New file.
12493 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12494 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12495 * sysdeps/unix/sysv/linux/select.c: New file.
12496 * sysdeps/unix/sysv/linux/send.S: New file.
12497 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12498 * sysdeps/unix/sysv/linux/sendto.S: New file.
12499 * sysdeps/unix/sysv/linux/sigpause.c: New file.
12500 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12501 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12502 * sysdeps/unix/sysv/linux/sigwait.c: New file.
12503 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12504 * sysdeps/unix/sysv/linux/system.c: New file.
12505 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12506 * sysdeps/unix/sysv/linux/wait.c: New file.
12507 * sysdeps/unix/sysv/linux/waitid.c: New file.
12508 * sysdeps/unix/sysv/linux/waitpid.c: New file.
12509 * sysdeps/unix/sysv/linux/writev.c: New file.
12510 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12511
12512 * pt-readv.c: Fix comment.
12513
125142002-12-14 Jakub Jelinek <jakub@redhat.com>
12515
12516 * tst-cleanup1.c: Include stdlib.h.
12517
12518 * tst-cancel5.c: New test.
12519 * Makefile (tests): Add tst-cancel5.
12520 (tst-cancel5): Link against libc.so libpthread.so in that order.
12521
9ae0909b
UD
125222002-12-13 Ulrich Drepper <drepper@redhat.com>
12523
b7bdd9c4
UD
12524 * forward.c (test_loaded): Prevent recursive calls.
12525
9ae0909b
UD
12526 * Makefile (routines): Add libc-cancellation.
12527 * libc-cancellation.c: New file.
12528 * descr.h (struct pthread): Add multiple_threads field.
12529 * allocatestack.c (allocate_stack): Initialize multiple_header field of
12530 new thread descriptor to 1.
12531 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12532 Initialize multiple_thread field after successful thread creation.
12533 * cancellation.c (__do_cancel): Move to pthreadP.h.
12534 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12535 (__pthread_disable_asynccancel): Add internal_function attribute.
12536 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12537 * pthread_setcancelstate.c: Likewise.
12538 * pthread_setcanceltype.c: Likewise.
12539 * pthread_exit.c: Likewise.
12540 * pthreadP.h (CANCELLATION_P): Likewise.
12541 (__do_cancel): Define as static inline.
12542 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12543 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12544 declarations.
12545 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12546 fields. Define MULTIPLE_THREADS_OFFSET.
12547 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12548 declaration.
12549 * sysdeps/unix/sysv/linux/accept.S: New file.
12550 * sysdeps/unix/sysv/linux/read.c: New file.
12551 * sysdeps/unix/sysv/linux/write.c: New file.
12552 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12553 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12554 initialization of __libc_locking_needed.
12555 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12556 __libc_locking_needed, use multiple_threads field in TCB.
12557 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12558
22f20674
UD
125592002-12-12 Ulrich Drepper <drepper@redhat.com>
12560
2ad2e1e7
UD
12561 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12562 version.
12563 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12564
22f20674
UD
12565 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12566 access to __libc_locking_needed for PIC.
12567
aa80bf86
UD
125682002-12-12 Jakub Jelinek <jakub@redhat.com>
12569
12570 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12571 declare for libc.so.
12572 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12573 expression.
12574 (__libc_lock_lock): Put into statement expression.
12575 (__libc_lock_unlock): Remove trailing semicolon.
12576 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12577
24021373
RM
125782002-12-12 Roland McGrath <roland@redhat.com>
12579
12580 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12581 "m" constraint to refer to __libc_locking_needed. Declare it here.
12582
14e7aece
UD
125832002-12-12 Ulrich Drepper <drepper@redhat.com>
12584
12585 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12586 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12587 Initialize __libc_locking_needed.
12588 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12589 instead of __register_pthread_fork_handler.
12590 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12591 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12592 fork-gen with libc_pthread_init.
12593 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12594 of __register_pthread_fork_handler.
12595 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12596 of __register_pthread_fork_handler.
12597 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12598 __libc_locking_needed to determine whether lock prefix can be avoided.
12599 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12600
85631c8e
UD
126012002-12-11 Ulrich Drepper <drepper@redhat.com>
12602
da63009e
UD
12603 * Makefile (tests): Add tst-cleanup1.
12604 * tst-cleanup1.c: New file.
12605 * cancellation.c (__cleanup_thread): Removed.
12606 (__do_cancel): Remove call to __cleanup_thread.
12607 * pthreadP.h: Remove __cleanup_thread prorotype.
12608
000160a2
UD
12609 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12610 Remember function and argument even if cancellation handler
12611 function is not available.
12612 (__libc_cleanup_region_end): Execute registered function directly if
12613 pthread functions are not available.
12614 (__libc_cleanup_end): Likewise.
12615
85631c8e
UD
12616 * init.c (__pthread_initialize_minimal): Fix initialization in
12617 static lib by preventing gcc from being too clever.
12618
dce8f2b6
UD
126192002-12-10 Ulrich Drepper <drepper@redhat.com>
12620
34a075be
UD
12621 * init.c (__pthread_initialize_minimal): Remove unneccesary
12622 sigaddset call.
12623
dce8f2b6
UD
12624 * Makefile (tests): We can run tst-locale2 now.
12625
e5e45b53
UD
126262002-12-09 Ulrich Drepper <drepper@redhat.com>
12627
12628 * Versions: Remove duplicated sigwait entry.
12629
bdb04f92
UD
126302002-12-08 Ulrich Drepper <drepper@redhat.com>
12631
1e506629
UD
12632 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12633 inside libpthread.
12634
a3957dd5
UD
12635 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12636
bdb04f92
UD
12637 * pthreadP.h: Declare __pthread_enable_asynccancel and
12638 __pthread_disable_asynccancel.
12639 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12640 (CANCEL_RESET): Use __pthread_disable_asynccancel.
12641 * cancellation.c (__pthread_enable_asynccancel): New function.
12642 (__pthread_disable_asynccancel): New function.
12643 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12644 * pt-close.c: Likewise.
12645 * pt-connect.c: Likewise.
12646 * pt-creat.c: Likewise.
12647 * pt-fcntl.c: Likewise.
12648 * pt-fsync.c: Likewise.
12649 * pt-lseek.c: Likewise.
12650 * pt-lseek64.c: Likewise.
12651 * pt-msgrcv.c: Likewise.
12652 * pt-msgsnd.c: Likewise.
12653 * pt-msync.c: Likewise.
12654 * pt-nanosleep.c: Likewise.
12655 * pt-open.c: Likewise.
12656 * pt-open64.c: Likewise.
12657 * pt-pause.c: Likewise.
12658 * pt-poll.c: Likewise.
12659 * pt-pread.c: Likewise.
12660 * pt-pread64.c: Likewise.
12661 * pt-pselect.c: Likewise.
12662 * pt-pwrite.c: Likewise.
12663 * pt-pwrite64.c: Likewise.
12664 * pt-read.c: Likewise.
12665 * pt-readv.c: Likewise.
12666 * pt-recv.c: Likewise.
12667 * pt-recvfrom.c: Likewise.
12668 * pt-recvmsg.c: Likewise.
12669 * pt-select.c: Likewise.
12670 * pt-send.c: Likewise.
12671 * pt-sendmsg.c: Likewise.
12672 * pt-sendto.c: Likewise.
12673 * pt-sigpause.c: Likewise.
12674 * pt-sigsuspend.c: Likewise.
12675 * pt-sigtimedwait.c: Likewise.
12676 * pt-sigwait.c: Likewise.
12677 * pt-sigwaitinfo.c: Likewise.
12678 * pt-system.c: Likewise.
12679 * pt-tcdrain.c: Likewise.
12680 * pt-wait.c: Likewise.
12681 * pt-waitid.c: Likewise.
12682 * pt-waitpid.c: Likewise.
12683 * pt-write.c: Likewise.
12684 * pt-writev.c: Likewise.
a3957dd5
UD
12685 * pthread_join.c: Likewise.
12686 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
12687
12688 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12689 (__xpg_sigpause): New function.
12690 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12691
6ccb3834
UD
126922002-12-07 Ulrich Drepper <drepper@redhat.com>
12693
09efc3ba
UD
12694 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12695
12696 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12697 _GI_pthread_cleanup_pop to pthreadP.h.
12698
12699 * ftrylockfile.c: Use _IO_lock_trylock instead of
12700 pthread_mutex_trylock.
12701
12702 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12703 (CANCEL_RESET): Likewise.
12704 (__pthread_setcanceltype_): Declare.
12705 (__pthread_mutex_lock_internal): Declare.
12706 (__pthread_mutex_unlock_internal): Declare.
12707 (__pthread_once_internal): Declare.
12708 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12709 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12710
12711 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12712 and pthread_mutex_unlock.
12713 * pthread_cond_wait.c: Likewise.
12714 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12715 * pthread_mutex_unlock.c: Likewise.
12716
12717 * pthread_setcanceltype.c: Add additional alias
12718 __pthread_setcanceltype.
12719
12720 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12721 * sem_open.c (sem_open): Likewise.
12722 Use __libc_open, __libc_write, and __libc_close instead of
12723 open, write, and close respectively.
12724
12725 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12726 Rewrite as statement expression since it must return a value.
12727
12728 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12729 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12730 __pthread_kill.
12731
12732 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12733 alias __pthread_once_internal.
12734
6ccb3834
UD
12735 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12736
d3c9f895
UD
127372002-12-06 Ulrich Drepper <drepper@redhat.com>
12738
4614167a
UD
12739 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12740 * tst-stdio1.c: New file.
12741 * tst-stdio2.c: New file.
12742
a4548cea
UD
12743 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12744
d3c9f895
UD
12745 * Makefile (tests): Comment out tst-locale2 for now.
12746 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12747
12748 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12749 -D_IO_MTSAFE_IO.
12750 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12751 Use _IO_lock_init instead of explicit assignment.
12752
12753 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12754 Define __libc_lock_* and __libc_lock_recursive macros with
12755 lowlevellock macros, not pthread mutexes.
12756
12757 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12758 of pthread_mutex_lock.
12759 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12760 instead of pthread_mutex_unlock.
12761
fde89ad0
RM
127622002-12-06 Roland McGrath <roland@redhat.com>
12763
12764 * allocatestack.c (__stack_user): Use uninitialized defn.
12765 * init.c (__pthread_initialize_minimal): Initialize it here.
12766
11767d47
RM
127672002-12-05 Roland McGrath <roland@redhat.com>
12768
fde89ad0
RM
12769 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12770 string.
12771 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12772
11767d47
RM
12773 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12774 missing & here too.
12775
440d8bc2
UD
127762002-12-05 Ulrich Drepper <drepper@redhat.com>
12777
12778 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12779 lowlevellock.
12780 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12781 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12782 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12783 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12784 for __libc_lock_* macros.
12785 * Makefile (routines): Add libc-lowlevellock.
12786
127872002-10-09 Roland McGrath <roland@redhat.com>
12788
12789 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12790 Under [__PIC__], call the function via the pointer fetched for
12791 comparison rather than a call by name that uses the PLT.
12792 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12793 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12794 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12795 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12796 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12797
d5ed0118
RM
127982002-12-04 Roland McGrath <roland@redhat.com>
12799
12800 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12801
12802 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12803 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12804
12805 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12806
eaa4099f
UD
128072002-12-04 Ulrich Drepper <drepper@redhat.com>
12808
12809 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12810 a completely opaque, non-integer type.
12811 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12812
33b5d0cc
UD
128132002-12-05 Jakub Jelinek <jakub@redhat.com>
12814
12815 * sysdeps/i386/tls.h: Include stdlib.h.
12816 * sysdeps/x86_64/tls.h: Likewise.
12817
7a5cdb30
UD
128182002-12-04 Ulrich Drepper <drepper@redhat.com>
12819
c4a6d859
UD
12820 * Makefile (tests): Add tst-locale2.
12821 (tests-static): Likewise.
12822 * tst-locale2.c: New file.
12823
7a5cdb30
UD
12824 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12825 volatile and add memory clobbers to lock operations.
12826
d82d5d12
UD
128272002-12-03 Ulrich Drepper <drepper@redhat.com>
12828
69cae3cf
UD
12829 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12830 * sysdeps/i386/i486/bits/atomic.h: New file.
12831 * sysdeps/i386/i586/bits/atomic.h: New file.
12832 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12833 include i486 version.
12834 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12835 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 12836 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 12837
e4044c01
UD
12838 * allocatestack.c (get_cached_stack): Don't crash if we first
12839 found a stack with a larger size then needed.
12840 Reported by Hui Huang <hui.huang@sun.com>.
12841
d82d5d12
UD
12842 * Makefile (tests): Add tst-sysconf.
12843 * tst-sysconf.c: New file.
12844
12845 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12846 PTHREAD_THREADS_MAX.
12847
fa9a4ff0
RM
128482002-12-02 Roland McGrath <roland@redhat.com>
12849
12850 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12851 Declare using hidden_proto instead of attribute_hidden, so there are
12852 non-.hidden static symbols for gdb to find.
12853 (__pthread_keys): Likewise.
12854 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12855 * allocatestack.c (__stack_user): Likewise.
12856 * pthread_create.c (__pthread_keys): Likewise.
12857 (__nptl_threads_events, __nptl_last_event): Make these static instead
12858 of hidden.
12859 * pthread_key_create.c (__pthread_pthread_keys_max,
12860 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12861
91949a33
UD
128622002-12-02 Ulrich Drepper <drepper@redhat.com>
12863
c22b52fa
UD
12864 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12865 statically.
12866 * tst-locale1.c: New file.
12867
beb6aa41
UD
12868 * pthread_cond_timedwait.c: Include <stdlib.h>.
12869
91949a33
UD
12870 * Makefile (tests): Add tst-fork2 and tst-fork3.
12871 * tst-fork2.c: New file.
12872 * tst-fork3.c: New file.
12873
654dff90
UD
128742002-11-28 Ulrich Drepper <drepper@redhat.com>
12875
cb0e76b4
UD
12876 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12877
12878 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12879 require it to 200112L.
12880
12881 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12882 instruction only if HAVE_CMOV is defined.
12883 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12884
975aa229
UD
12885 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12886
654dff90
UD
12887 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12888
12889 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12890
12891 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12892
a3931336
UD
128932002-11-27 Ulrich Drepper <drepper@redhat.com>
12894
c10c099c
UD
12895 * sysdeps/x86_64/bits/atomic.h: New file.
12896
12897 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12898 16-bit operations.
12899
dca99d27
UD
12900 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12901 possible since gettid cannot fail.
12902
f78deea6
UD
12903 * sysdeps/x86_64/pthreaddef.h: New file.
12904
12905 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12906
12907 * sysdeps/x86_64/pthread_spin_init.c: New file.
12908 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12909 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12910 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12911
12912 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12913 Add missing lock prefix. Minute optimization.
12914
12915 * tst-spin2.c (main): Also check successful trylock call.
12916
12917 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12918 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12919
12920 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12921 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12922
12923 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12924 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12925 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
12926
12927 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12928 value in case of an error.
12929
a3931336
UD
12930 * sysdeps/x86_64/tls.h: New file.
12931
76a50749
UD
129322002-11-26 Ulrich Drepper <drepper@redhat.com>
12933
117c452c
UD
12934 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12935 takes the array member name and the index as parameters.
12936 (THREAD_SETMEM_NC): Likewise.
12937 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12938 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12939 interfaces.
12940
12941 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12942 to decide which code to use.
12943 (THREAD_SETMEM_NC): Likewise.
12944
76a50749
UD
12945 * allocatestack.c (queue_stack): Don't remove stack from list here.
12946 Do it in the caller. Correct condition to prematurely terminate
12947 loop to free stacks.
12948 (__deallocate_stack): Remove stack from list here.
12949
129502002-11-26 Ulrich Drepper <drepper@redhat.com>
12951
12952 * Makefile (tests): Add tst-stack1.
12953 * tst-stack1.c: New file.
12954
12955 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12956 provided stack.
12957
12958 * pthread_attr_getstack.c: Return bottom of the thread area.
12959
129602002-11-25 Ulrich Drepper <drepper@redhat.com>
12961
12962 * Makefile (libpthread-routines): Add pt-allocrtsig and
12963 pthread_kill_other_threads.
12964 * pt-allocrtsig.c: New file.
12965 * pthread_kill_other_threads.c: New file.
12966 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12967 all three functions.
12968 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12969 allocrtsig.
12970 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12971 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12972 and __libc_allocate_rtsig_private.
12973 * Versions (libpthread): Export pthread_kill_other_threads_np,
12974 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12975
129762002-11-24 Ulrich Drepper <drepper@redhat.com>
12977
12978 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12979 the end of the stack. Adjust computations.
12980 When mprotect call fails dequeue stack and free it.
12981 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12982 attribute.
12983 * pthread_getattr_np.c: Likewise.
12984
12985 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12986 surprises.
12987
129882002-11-23 Ulrich Drepper <drepper@redhat.com>
12989
12990 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12991 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12992
129932002-11-22 Ulrich Drepper <drepper@redhat.com>
12994
12995 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12996 * pthread_setspecific.c: Likewise.
12997
129982002-11-21 Ulrich Drepper <drepper@redhat.com>
12999
13000 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
13001 definitions. Get them from the official place.
13002 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
13003
13004 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
13005 Use new CLONE_ flags in clone() calls.
13006
13007 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
13008 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
13009
13010 * Versions: Add pthread_* functions for libc.
13011 * forward.c: New file.
13012
13013 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
13014 errno-loc.
13015 * herrno.c: New file.
13016 * res.c: New file.
13017
13018 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
13019 sem_trywait, and sem_timedwait. Add herrno and res.
13020 * sem_init.c: Don't initialize lock and waiters members.
13021 * sem_open.c: Likewise.
13022 * sem_post.c: Removed.
13023 * sem_wait.c: Removed.
13024 * sem_trywait.c: Removed.
13025 * sem_timedwait.c: Removed.
13026 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
13027 Includes full implementations of sem_post, sem_wait, sem_trywait,
13028 and sem_timedwait.
13029 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
13030 for new implementation.
13031 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
13032 and waiters fields.
13033
13034 * tst-sem3.c: Improve error message.
13035 * tst-signal3.c: Likewise.
13036
13037 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
13038 to tell the kernel about the termination futex and to initialize tid
13039 member. Don't initialize main_thread.
13040 * descr.h (struct pthread): Remove main_thread member.
13041 * cancelllation.c (__do_cancel): Remove code handling main thread.
13042 The main thread is not special anymore.
13043
13044 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
13045 size of the stacks to stack_cache_actsize.
13046
13047 * pt-readv.c: Add missing "defined".
13048 * pt-sigwait.c: Likewise.
13049 * pt-writev.c: Likewise.
13050
130512002-11-09 Ulrich Drepper <drepper@redhat.com>
13052
13053 * Versions: Export __connect from libpthread.
13054 Patch by Luca Barbieri <ldb@ldb.ods.org>.
13055
13056 * Makefile (libpthread-routines): Add pt-raise.
13057 * sysdeps/unix/sysv/linux/raise.c: New file.
13058 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
13059 * sysdeps/generic/pt-raise.c: New file.
13060
13061 * pthread_cond_init.c: Initialize all data elements of the condvar
13062 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
13063
13064 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
13065 * pthread_create.c: Likewise.
13066
13067 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
13068 * tst-key1.c: New file.
13069 * tst-key2.c: New file.
13070 * tst-key3.c: New file.
13071
13072 * Versions: Export pthread_detach for version GLIBC_2.0.
13073 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
13074
130752002-11-08 Ulrich Drepper <drepper@redhat.com>
13076
13077 * pthread_key_create.c: Terminate search after an unused key was found.
13078 Patch by Luca Barbieri <ldb@ldb.ods.org>.
13079
13080 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
13081 Patch by Luca Barbieri <ldb@ldb.ods.org>.
13082
130832002-10-10 Ulrich Drepper <drepper@redhat.com>
13084
13085 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
13086 dynamic lookup for errno in PIC.
13087
13088 * allocatestack.c (get_cached_stack): Rearrange code slightly to
13089 release the stack lock as soon as possible.
13090 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
13091 the static TLS block.
13092 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
13093
13094 * cancellation.c: Renamed from cancelation.c.
13095 * Makefile: Adjust accordingly.
13096 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
13097 * cleanup_defer.c: Use CANCELLATION_P.
13098 * pthread_testcancel.c: Likewise.
13099 * descr.h: Fix spelling in comments.
13100 * init.c: Likewise.
13101 * pthread_getattr_np.c: Likewise.
13102 * pthread_getschedparam.c: Likewise.
13103 * pthread_setschedparam.c: Likewise.
13104 * Versions: Likewise.
13105
13106 * pt-pselect.c: New file.
13107 * Makefile (libpthread-routines): Add pt-pselect.
13108 * Versions: Add pselect.
13109
13110 * tst-cancel4.c: New file.
13111 * Makefile (tests): Add tst-cancel4.
13112
131132002-10-09 Ulrich Drepper <drepper@redhat.com>
13114
13115 * pthread_mutex_lock.c: Always record lock ownership.
13116 * pthread_mutex_timedlock.c: Likewise.
13117 * pthread_mutex_trylock.c: Likewise.
13118
13119 * pt-readv.c: New file.
13120 * pt-writev.c: New file.
13121 * pt-creat.c: New file.
13122 * pt-msgrcv.c: New file.
13123 * pt-msgsnd.c: New file.
13124 * pt-poll.c: New file.
13125 * pt-select.c: New file.
13126 * pt-sigpause.c: New file.
13127 * pt-sigsuspend.c: New file.
13128 * pt-sigwait.c: New file.
13129 * pt-sigwaitinfo.c: New file.
13130 * pt-waitid.c: New file.
13131 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
13132 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
13133 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
13134 * Versions: Add all the new functions.
13135
13136 * tst-exit1.c: New file.
13137 * Makefile (tests): Add tst-exit1.
13138
13139 * sem_timedwait.c: Minor optimization for more optimal fastpath.
13140
131412002-10-08 Ulrich Drepper <drepper@redhat.com>
13142
13143 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
13144
13145 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
13146 call. pthread_join is an official cancellation point.
13147 * pthread_timedjoin.c: Likewise.
13148
13149 * pthread_cond_wait.c: Revert order in which internal lock are dropped
13150 and the condvar's mutex are retrieved.
13151 * pthread_cond_timedwait.c: Likewise.
13152 Reported by dice@saros.East.Sun.COM.
13153
131542002-10-07 Ulrich Drepper <drepper@redhat.com>
13155
13156 * pthreadP.h: Cut out all type definitions and move them...
13157 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
13158 * pthreadP.h: Include <internaltypes.h>.
13159
13160 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
13161 performance tweaks.
13162
13163 * sem_trywait.c: Shuffle #includes around to get right order.
13164 * sem_timedwait.c: Likewise.
13165 * sem_post.c: Likewise.
13166 * sem_wait.c: Likewise.
13167
13168 * nptl 0.3 released.
13169
13170 * Makefile (tests): Add tst-signal3.
13171 * tst-signal3.c: New file.
13172
131732002-10-05 Ulrich Drepper <drepper@redhat.com>
13174
13175 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
13176 the asms modify the sem object.
13177 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
13178
13179 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
13180 the actual members.
13181 * pthreadP.h (struct sem): New type. Actual semaphore type.
13182 * semaphoreP.h: Include pthreadP.h.
13183 * sem_getvalue.c: Adjust to sem_t change.
13184 * sem_init.c: Likewise.
13185 * sem_open.c: Likewise.
13186 * sem_post.c: Likewise.
13187 * sem_timedwait.c: Likewise.
13188 * sem_trywait.c: Likewise.
13189 * sem_wait.c: Likewise.
13190
131912002-10-04 Ulrich Drepper <drepper@redhat.com>
13192
13193 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
13194 * tst-basic2.c: New file.
13195 * tst-exec1.c: New file.
13196 * tst-exec2.c: New file.
13197 * tst-exec3.c: New file.
13198
13199 * tst-fork1.c: Remove extra */.
13200
13201 * nptl 0.2 released. The API for IA-32 is complete.