]> sourceware.org Git - glibc.git/blob - nptl/ChangeLog
nscd: Improved support for tracking startup failure in nscd service (BZ #16639)
[glibc.git] / nptl / ChangeLog
1 2014-02-28 Roland McGrath <roland@hack.frob.com>
2
3 * Makefile (generated-dirs): Use += rather than =.
4
5 2014-02-26 Joseph Myers <joseph@codesourcery.com>
6
7 * Makefile: Include Makeconfig immediately after defining subdir.
8
9 2014-02-21 Joseph Myers <joseph@codesourcery.com>
10
11 * Makefile ($(objpfx)tst-stack3-mem): Use $(evaluate-test).
12 ($(objpfx)tst-tls6.out): Likewise.
13 ($(objpfx)tst-cleanup0.out): Likewise.
14 ($(objpfx)tst-cleanup0-cmp.out): Likewise.
15 ($(objpfx)tst-cancel-wrappers.out): Likewise.
16 ($(objpfx)tst-oddstacklimit.out): Likewise.
17
18 2014-02-14 Joseph Myers <joseph@codesourcery.com>
19
20 * Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
21 [$(run-built-tests) = yes] (tests): Depend on
22 $(objpfx)tst-cleanup0-cmp.out.
23 ($(objpfx)tst-cleanup0-cmp.out): New rule.
24
25 2014-02-10 Ondřej Bílka <neleai@seznam.cz>
26
27 * allocatestack.c (queue_stack, allocate_stack,
28 __deallocate_stack, __reclaim_stacks): Use glibc_likely instead
29 __builtin_expect.
30 * cancellation.c (__pthread_enable_asynccancel,
31 __pthread_disable_asynccancel): Likewise.
32 * cleanup_defer.c (__pthread_register_cancel_defer,
33 __pthread_unregister_cancel_restore): Likewise.
34 * cleanup_defer_compat.c (_pthread_cleanup_push_defer,
35 _pthread_cleanup_pop_restore): Likewise.
36 * cond-perf.c (main): Likewise.
37 * nptl-init.c (sigcancel_handler, sighandler_setxid): Likewise.
38 * perf.c (get_clockfreq): Likewise.
39 * pthread_barrier_destroy.c (pthread_barrier_destroy): Likewise.
40 * pthread_barrier_init.c (pthread_barrier_init): Likewise.
41 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
42 * pthread_cond_wait.c (__pthread_cond_wait): Likewise.
43 * pthread_create.c (__free_tcb, start_thread, __pthread_create_2_1):
44 Likewise.
45 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
46 * pthread_getspecific.c (__pthread_getspecific): Likewise.
47 * pthread_join.c (pthread_join): Likewise.
48 * pthread_key_delete.c (pthread_key_delete): Likewise.
49 * pthread_mutex_init.c (__pthread_mutex_init): Likewise.
50 * pthread_mutex_lock.c (__pthread_mutex_lock,
51 __pthread_mutex_lock_full): Likewise.
52 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
53 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
54 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
55 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
56 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
57 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
58 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
59 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
60 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
61 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
62 * pthread_setspecific.c (__pthread_setspecific): Likewise.
63 * sem_init.c (__new_sem_init): Likewise.
64 * sem_open.c (__where_is_shmfs): Likewise.
65 * sigaction.c: Likewise.
66 * sockperf.c (get_clockfreq): Likewise.
67 * sysdeps/pthread/createthread.c (do_clone, create_thread): Likewise.
68 * sysdeps/pthread/setxid.h: Likewise.
69 * sysdeps/pthread/timer_create.c (timer_create): Likewise.
70 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init,
71 __unwind_freeres, _Unwind_Resume, __gcc_personality_v0,
72 _Unwind_ForcedUnwind): Likewise.
73 * sysdeps/unix/sysv/linux/getpid.c (__getpid): Likewise.
74 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
75 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
76 * sysdeps/unix/sysv/linux/mq_notify.c (mq_notify): Likewise.
77 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
78 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Likewise.
79 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
80 (__pthread_setaffinity_new): Likewise.
81 * sysdeps/unix/sysv/linux/pthread_sigqueue.c (pthread_sigqueue):
82 Likewise.
83 * sysdeps/unix/sysv/linux/pt-raise.c (raise): Likewise.
84 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
85 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_robust_trylock,
86 __lll_robust_lock, __lll_cond_lock, __lll_robust_timedlock): Likewise.
87 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (__lll_lock,
88 __lll_cond_lock, __lll_timedlock, __lll_robust_timedlock): Likewise.
89 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c
90 (pthread_barrier_destroy): Likewise.
91 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c
92 (pthread_barrier_init): Likewise.
93 * sysdeps/unix/sysv/linux/sparc/sem_init.c (__new_sem_init): Likewise.
94 * sysdeps/unix/sysv/linux/x86_64/timer_create.c (__timer_create_old):
95 Likewise.
96 * unwind.c (unwind_stop): Likewise.
97
98 2014-02-08 Mike Frysinger <vapier@gentoo.org>
99
100 * sem_open.c (__where_is_shmfs): Compare f.f_type to RAMFS_MAGIC too.
101
102 2014-02-05 Carlos O'Donell <carlos@redhat.com>
103
104 * sysdeps/unix/sysv/linux/tst-setgetname.c (do_test): Skip the
105 test if !__ASSUME_PROC_PID_TASK_COMM and get_self_comm returns
106 ENOENT.
107
108 2014-01-23 Stefan Liebler <stli@linux.vnet.ibm.com>
109
110 * tst-tls7.c: Adjust testcase timeout
111
112 2014-01-18 H.J. Lu <hongjiu.lu@intel.com>
113
114 [BZ #14782]
115 * tst-cancel-wrappers.sh: Remove system.
116
117 2014-01-11 Paul Pluzhnikov <ppluzhnikov@google.com>
118
119 * tst-tls7.c (action): New function.
120 (do_test): Call it.
121 * tst-tls7mod.c (action): Move sem_post to caller.
122
123 2011-12-12 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
124
125 * sysdeps/powerpc/tls.h (struct tcbhead_t): Add DSO and TAR fields.
126 * nptl/sysdeps/powerpc/tcb-offsets.sym: Likewise.
127
128 2013-12-09 Carlos O'Donell <carlos@redhat.com>
129
130 * sysdeps/unix/sysv/linux/tst-setgetname.c: New file.
131 * sysdeps/unix/sysv/linux/Makefile (tests): Add tst-setgetname.
132
133 2013-12-09 Andreas Schwab <schwab@suse.de>
134
135 [BZ #15843]
136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
137 (__pthread_cond_timedwait): Remove wrong cfi_adjust_cfa_offset
138 before __condvar_tw_cleanup2 label.
139
140 2013-12-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
141
142 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
143 (CANCEL_FRAMESIZE, CANCEL_PARM_SAVE): New macros to save parameters
144 into our own stack frame instead of the caller's.
145 (PSEUDO): Use them. Use symbolic stack frame offsets.
146 (DOCARGS_1, UNDOCARGS_1): Use CANCEL_PARM_SAVE.
147 (DOCARGS_2, UNDOCARGS_2): Likewise.
148 (DOCARGS_3, UNDOCARGS_3): Likewise.
149 (DOCARGS_4, UNDOCARGS_4): Likewise.
150 (DOCARGS_5, UNDOCARGS_5): Likewise.
151 (DOCARGS_6, UNDOCARGS_6): Likewise.
152
153 2013-11-26 Ondřej Bílka <neleai@seznam.cz>
154
155 * sysdeps/i386/tls.h: Use __glibc_reserved instead __unused.
156 * sysdeps/x86_64/tls.h: Likewise.
157
158 2013-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
159
160 [BZ #11214]
161 * Makefile (tst-getpid2-ENV): New variable.
162
163 2013-11-20 Paul Pluzhnikov <ppluzhnikov@google.com>
164
165 * Makefile (tst-cleanup2, tst-cleanupx2): Add -fno-builtin
166
167 2013-10-30 Mike Frysinger <vapier@gentoo.org>
168
169 * sysdeps/pthread/configure.in: Moved to ...
170 * sysdeps/pthread/configure.ac: ... here.
171 * sysdeps/x86_64/configure.in: Moved to ...
172 * sysdeps/x86_64/configure.ac: ... here.
173 * sysdeps/pthread/configure: Regenerated.
174 * sysdeps/x86_64/configure: Likewise.
175
176 2013-10-04 Maciej W. Rozycki <macro@codesourcery.com>
177
178 * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure
179 from pthread_mutex_init.
180
181 2013-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
182
183 [BZ #15988]
184 * pthread_cond_broadcast.c (__pthread_cond_broadcast)
185 [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use
186 USE_REQUEUE_PI.
187 * pthread_cond_signal.c (__pthread_cond_signal)
188 [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise.
189
190 2013-09-27 Siddhesh Poyarekar <siddhesh@redhat.com>
191
192 * sysdeps/pthread/bits/libc-lock.h [_LIBC && (!NOT_IN_libc ||
193 IS_IN_libpthread)] (__libc_lock_fini_recursive): Use the mutex
194 member of the argument.
195 (__libc_lock_trylock_recursive): Likewise.
196 (__libc_lock_unlock_recursive): Likewise.
197
198 2013-09-04 Joseph Myers <joseph@codesourcery.com>
199
200 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
201 [SHARED && DO_VERSIONING && !NO_HIDDEN]: Change conditional to
202 [SHARED && !NO_HIDDEN].
203
204 2013-09-03 Siddhesh Poyarekar <siddhesh@redhat.com>
205
206 [BZ #15921]
207 * tst-cleanup2.c (do_test): New volatile variable RET to
208 return success.
209
210 2013-08-30 Ondřej Bílka <neleai@seznam.cz>
211
212 * sysdeps/pthread/pthread.h: Fix typos.
213 * sysdeps/unix/sysv/linux/internaltypes.h: Likewise.
214 * tst-cancel4.c: Likewise.
215
216 2013-08-21 Ondřej Bílka <neleai@seznam.cz>
217
218 * pthread_getschedparam.c: Fix typos.
219 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
220
221 2013-07-23 David S. Miller <davem@davemloft.net>
222
223 * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
224
225 2013-07-22 David S. Miller <davem@davemloft.net>
226
227 * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
228
229 2013-07-19 Dominik Vogt <vogt@de.ibm.com>
230
231 * pthread_mutex_lock.c: Fix whitespace.
232 * pthread_mutex_trylock.c: Likewise.
233 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
234 * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
235 * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
236 * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
237 * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
238 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
239 * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
240 * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
241 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
242 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
243 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
244 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
245
246 * sysdeps/unix/sysv/linux/x86/elision-conf.c:
247 Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
248 (elision_init): Don't set __rwlock_rtm_enabled.
249 * sysdeps/unix/sysv/linux/x86/elision-conf.h:
250 Remove __rwlock_rtm_enabled.
251
252 2013-07-03 H.J. Lu <hongjiu.lu@intel.com>
253
254 * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
255 * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
256
257 2013-07-02 Andi Kleen <ak@linux.intel.com>
258
259 * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
260 Check ENABLE_LOCK_ELISION.
261
262 2013-07-02 Andi Kleen <ak@linux.intel.com>
263
264 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
265 Disable elision for PTHREAD_MUTEX_DEFAULT.
266
267 2013-07-02 Andi Kleen <ak@linux.intel.com>
268 Hongjiu Lu <hongjiu.lu@intel.com>
269
270 * pthread_mutex_lock.c
271 (__pthread_mutex_lock): Add lock elision support.
272 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
273 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
274 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
275 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
276 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
277 * sysdeps/unix/sysv/linux/x86/Makefile: New file.
278 * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
279 * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
280 * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
281 * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
282 * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
283 * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
284
285 2013-07-02 Andi Kleen <ak@linux.intel.com>
286
287 * tst-mutex5.c: Include config.h.
288 (do_test): Add checks for ENABLE_LOCK_ELISION.
289 * tst-mutex8.c: Include config.h
290 (tf): Add checks for ENABLE_LOCK_ELISION.
291 (check_type): Likewise.
292
293 2013-07-02 Andi Kleen <ak@linux.intel.com>
294
295 * pthreadP.h: Add elision types.
296 (PTHREAD_MUTEX_TYPE_ELISION): Add.
297 * sysdeps/pthread/pthread.h: Add elision initializers.
298 (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
299 PTHREAD_MUTEX_PSHARED_NP): Add new flags.
300 (__PTHREAD_SPINS): Add.
301
302 2013-07-02 Andi Kleen <ak@linux.intel.com>
303 Hongjiu Lu <hongjiu.lu@intel.com>
304
305 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
306 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
307 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
308 lll_trylock_elision): Add.
309 * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
310 * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
311 * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
312 * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
313 * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
314 * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
315 * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
316 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
317 lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
318 __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
319 lll_trylock_elision): Add.
320 * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
321 * elision-conf.h: New file.
322
323 2013-06-24 Vladimir Nikulichev <v.nikulichev@gmail.com>
324
325 [BZ #12310]
326 * pthread_exit.c: Add reference to pthread_create.
327
328 2013-06-22 Joseph Myers <joseph@codesourcery.com>
329
330 * pthread_getattr_default_np.c: Include <string.h>.
331
332 2013-06-15 Siddhesh Poyarekar <siddhesh@redhat.com>
333
334 * Versions (libpthread): Add GLIBC_2.18.
335 (GLIBC_2.18): Add pthread_setattr_default_np and
336 pthread_getattr_default_np.
337 * allocatestack.c (allocate_stack): Synchronize read from
338 __default_pthread_attr.
339 (__reclaim_stacks): Initialize __default_pthread_attr_lock.
340 * nptl-init.c (__pthread_initialize_minimal_internal):
341 Synchronize write to __default_pthread_attr.
342 * pthreadP.h (__default_pthread_attr_lock): Declare.
343 * pthread_attr_getstacksize (__pthread_attr_getstacksize):
344 Synchronize read from __default_pthread_attr.
345 * pthread_create.c (__pthread_create_2_1): Make a local copy of
346 __default_pthread_attr. Check value of flags in IATTR even if
347 input ATTR is NULL.
348 * pthread_getattr_default_np.c: New file.
349 * pthread_setattr_default_np.c: New file.
350 * sysdeps/pthread/pthread.h [__USE_GNU]
351 (pthread_getattr_default_np, pthread_setattr_default_np):
352 Declare.
353 * tst-default-attr.c: New test case.
354 * Makefile (libpthread-routines): Add
355 pthread_setattr_default_np and pthread_getattr_default_np.
356 (tests): Add tst-default-attr.
357 * vars.c (__default_pthread_attr_lock): Declare and initialize.
358
359 2013-06-13 Siddhesh Poyarekar <siddhesh@redhat.com>
360 Carlos O'Donell <carlos@redhat.com>
361
362 [BZ #15618]
363 * tst-pthread-attr-affinity: New test case.
364 * Makefile (tests): Add it.
365 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
366 (__pthread_attr_getaffinity_new): Copy minimum of source and
367 destination sizes to avoid a buffer overrun.
368
369 2013-06-10 Carlos O'Donell <carlos@redhat.com>
370
371 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
372 (lll_futex_wake): Return syscall error.
373 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
374 (lll_futex_wake): Return syscall error.
375
376 2013-08-06 Ondřej Bílka <neleai@seznam.cz>
377
378 * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
379
380 2013-06-06 Ondřej Bílka <neleai@seznam.cz>
381
382 * tst-cond22.c: Fix leading whitespaces.
383 * tst-umask1.c: Likewise.
384
385 2013-06-06 Joseph Myers <joseph@codesourcery.com>
386
387 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
388 trailing whitespace.
389 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
390 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
391 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
392 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
393 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
394 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
395 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
396 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
397 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
398 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
399 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
400 * tst-mutexpp10.c: Likewise.
401 * tst-stackguard1.c: Likewise.
402
403 2013-05-31 Joseph Myers <joseph@codesourcery.com>
404
405 * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
406 and ld.so.
407
408 2013-05-16 Ryan S. Arnold <rsa@linux.vnet.ibm.com>
409
410 * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
411 uint32_t usage.
412 * sysdeps/pthread/createthread.c: Likewise.
413
414 2013-05-14 Andreas Jaeger <aj@suse.de>
415
416 [BZ #10686]
417 * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
418 * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
419
420 2013-05-09 Andi Kleen <ak@linux.intel.com>
421
422 * tst-mutex8.c (do_test): Check for ENABLE_PI.
423
424 2013-04-22 Siddhesh Poyarekar <siddhesh@redhat.com>
425
426 * pthreadP.h (check_sched_policy_attr): New inline function.
427 (check_sched_priority_attr): Likewise.
428 (check_stacksize_attr): Likewise.
429 (__kernel_cpumask_size, __determine_cpumask_size): Declare
430 extern.
431 (check_cpuset_attr): New inline function.
432 * pthread_attr_setschedparam (__pthread_attr_setschedparam):
433 Use check_sched_priority_attr.
434 * pthread_attr_setschedpolicy.c
435 (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
436 * pthread_attr_setstack.c (__pthread_attr_setstack): Use
437 check_stacksize_attr.
438 * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
439 Likewise.
440 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
441 (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
442
443 2013-04-11 Andreas Schwab <schwab@suse.de>
444
445 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
446 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
447 directly use absolute timeout.
448
449 2013-04-07 Carlos O'Donell <carlos@redhat.com>
450
451 * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
452
453 2013-04-04 Siddhesh Poyarekar <siddhesh@redhat.com>
454
455 [BZ #15337]
456 * sysdeps/unix/sysv/linux/x86_64/cancellation.S
457 [IS_IN_libpthread]
458 [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
459 __pthread_unwind hidden.
460
461 2013-03-28 Roland McGrath <roland@hack.frob.com>
462
463 * pthread_create.c (start_thread) [!SHARED]:
464 Call __call_tls_dtors only if it's not NULL.
465
466 2013-03-19 Siddhesh Poyarekar <siddhesh@redhat.com>
467
468 * allocatestack.c (allocate_stack): Use __default_pthread_attr
469 instead of __default_stacksize.
470 * nptl-init.c (__pthread_initialize_minimal_internal):
471 Likewise. Initialize guardsize.
472 * pthreadP.h (__default_pthread_attr): Declare.
473 * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
474 Use __default_pthread_attr instead of __default_stacksize.
475 * pthread_create.c (default_attr): Remove.
476 (__pthread_create_2_1): Use __default_pthread_attr instead of
477 default_attr.
478 * vars.c (__default_stacksize): Remove.
479 (__default_pthread_attr): New static variable to store
480 default thread attributes.
481
482 2013-03-18 Siddhesh Poyarekar <siddhesh@redhat.com>
483
484 * pthread_barrier_init.c (default_attr): Rename to
485 default_barrierattr.
486 (pthread_barrier_init): Adjust for the rename.
487 * pthread_mutex_init.c (default_attr): Rename to
488 default_mutexattr.
489 (__pthread_mutex_init): Adjust for the rename.
490 * pthread_rwlock_init.c (default_attr): Rebane to
491 default_rwlockattr.
492 (__pthread_rwlock_init): Adjust for the rename.
493
494 2013-03-12 Carlos O'Donell <carlos@redhat.com>
495
496 * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
497
498 2013-03-04 Roland McGrath <roland@hack.frob.com>
499
500 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
501 Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
502 Use #include_next.
503 (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
504 (RTLD_PRIVATE_ERRNO): Likewise.
505 (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
506 Move macros and associated declaration to ...
507 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
508 Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
509 Use #include_next.
510
511 2013-03-01 Carlos O'Donell <carlos@redhat.com>
512
513 * Makefile (tests): Revert last change.
514 (tst-pthread-stack-env-ENV): Likewise.
515 * nptl-init.c (set_default_stacksize): Likewise.
516 (__pthread_initialize_minimal_internal): Likewise.
517 * tst-pthread-stack-env.c: Likewise.
518
519 2013-03-01 Siddhesh Poyarekar <siddhesh@redhat.com>
520
521 * tst-oddstacklimit.c: Include stdlib.h.
522
523 * Makefile (tests): Add tst-pthread-stack-env.
524 (tst-pthread-stack-env-ENV): Set environment for test.
525 * nptl-init.c (set_default_stacksize): New function.
526 (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
527 ENVP. Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
528 * tst-pthread-stack-env.c: New test case.
529
530 2013-02-21 David S. Miller <davem@davemloft.net>
531
532 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
533 (FUTEX_WAIT_REQUEUE_PI): Define.
534 (FUTEX_CMP_REQUEUE_PI): Likewise.
535 (lll_futex_wait_requeue_pi): Likewise.
536 (lll_futex_timed_wait_requeue_pi): Likewise.
537 (lll_futex_cmp_requeue_pi): Likewise.
538
539 2013-02-21 Carlos O'Donell <carlos@redhat.com>
540
541 * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
542
543 2013-02-18 Siddhesh Poyarekar <siddhesh@redhat.com>
544
545 * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
546 of exit.
547 * tst-barrier4.c: Likewise.
548 * tst-robust7.c: Likewise.
549
550 [BZ #14920]
551 * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
552 PI-aware.
553 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
554 PI-aware futex operations if available and mutex is PI-aware.
555 * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
556 * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
557 Likewise.
558 * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
559 cancellation occurred just after futex returned successfully
560 from a PI operation with the mutex held.
561 (__pthread_cond_wait): Use PI-aware futex operations if
562 available and mutex is PI-aware.
563 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
564 (FUTEX_WAIT_REQUEUE_PI): Define.
565 (FUTEX_CMP_REQUEUE_PI): Likewise.
566 (lll_futex_wait_requeue_pi): Likewise.
567 (lll_futex_timed_wait_requeue_pi): Likewise.
568 (lll_futex_cmp_requeue_pi): Likewise.
569 * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
570 (FUTEX_WAIT_REQUEUE_PI): Define.
571 (FUTEX_CMP_REQUEUE_PI): Likewise.
572 (lll_futex_wait_requeue_pi): Likewise.
573 (lll_futex_timed_wait_requeue_pi): Likewise.
574 (lll_futex_cmp_requeue_pi): Likewise.
575 * sysdeps/unix/sysv/linux/kernel-features.h: Define
576 __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
577
578 2013-02-04 Andreas Schwab <schwab@suse.de>
579
580 [BZ #14142]
581 * tst-cancel14.c: Include <sys/time.h>.
582 * tst-cancel15.c: Likewise.
583 * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
584 * tst-stackguard1.c: Include <tls.h>
585
586 2013-01-16 Andreas Schwab <schwab@suse.de>
587
588 [BZ #14327]
589 * sem_open.c (sem_open): Use __mktemp instead of mktemp.
590
591 2013-01-11 Carlos O'Donell <codonell@redhat.com>
592
593 * allocatestack.c (allocate_stack): Add comment. Remove assert
594 on attr.
595
596 2013-01-11 H.J. Lu <hongjiu.lu@intel.com>
597
598 * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
599 with $(host-test-program-cmd).
600 (tst-exec4-ARGS): Likewise.
601 (tst-stackguard1-ARGS): Likewise.
602 ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
603 Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
604 * tst-tls6.sh (elf_objpfx): Removed.
605 (rtld_installed_name): Renamed to ...
606 (test_via_rtld_prefix): This.
607 (tst_tls5): Prepend ${test_via_rtld_prefix}.
608
609 2013-01-02 Joseph Myers <joseph@codesourcery.com>
610
611 * All files with FSF copyright notices: Update copyright dates
612 using scripts/update-copyrights.
613
614 2013-01-01 Joseph Myers <joseph@codesourcery.com>
615
616 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
617 copyright notice.
618
619 2012-12-28 Andi Kleen <ak@linux.intel.com>
620
621 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
622 to prototype.
623 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
624 Likewise.
625
626 2012-12-27 David S. Miller <davem@davemloft.net>
627
628 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
629 (lll_futex_timed_wait_bitset): New macro.
630
631 2012-12-27 Siddhesh Poyarekar <siddhesh@redhat.com>
632
633 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
634 Remove definition.
635 (lll_futex_timed_wait): Replace assembly code with
636 INTERNAL_SYSCALL.
637 (lll_futex_timed_wait_bitset): Likewise.
638 (lll_futex_wake): Likewise.
639 (lll_futex_requeue): Likewise.
640 (lll_futex_wake_unlock): Likewise.
641
642 2012-12-08 Siddhesh Poyarekar <siddhesh@redhat.com>
643
644 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
645 Declare LOCAL_VAR as char.
646
647 2012-12-04 Joseph Myers <joseph@codesourcery.com>
648
649 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
650 Cast result of atomic_increment_val to (void) instead of storing
651 in otherwise-unused variable.
652
653 2012-12-03 Allan McRae <allan@archlinux.org>
654
655 * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
656
657 2012-11-26 H.J. Lu <hongjiu.lu@intel.com>
658
659 * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
660 to THREAD_SETMEM.
661 * sysdeps/i386/tls.h: Include <libc-internal.h>.
662 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
663 (THREAD_SETMEM_NC): Likewise.
664 * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
665 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
666 (THREAD_SETMEM_NC): Likewise.
667
668 2012-11-21 Joseph Myers <joseph@codesourcery.com>
669
670 * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
671 of atomic_increment_val to (void) instead of storing in
672 otherwise-unused variable.
673
674 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
675 [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
676 instead of storing in otherwise-unused variable.
677
678 2012-11-14 Marcus Shawcroft <marcus.shawcroft@linaro.org>
679
680 * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
681 (CFLAGS-recv.c, CFLAGS-send.c): Define.
682
683 2012-11-06 Chris Metcalf <cmetcalf@tilera.com>
684
685 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
686 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
687
688 2012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
689
690 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
691 if absolute timeout is negative.
692 [__ASSUME_FUTEX_CLOCK_REALTIME &&
693 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
694 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
695 Likewise.
696 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
697 Likewise.
698 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
699 (__lll_robust_timedlock_wait): Likewise.
700 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
701 (lll_futex_timed_wait_bitset): New macro.
702 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
703 (lll_futex_timed_wait_bitset): Likewise.
704
705 2012-11-03 David S. Miller <davem@davemloft.net>
706
707 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
708 Add missing spaces.
709 (__cpu_relax): Likewise.
710
711 2012-11-02 H.J. Lu <hongjiu.lu@intel.com>
712
713 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
714 (__128bits): New struct typedef.
715 (tcbhead_t): Replace __m128 with __128bits.
716
717 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
718 Joseph Myers <joseph@codesourcery.com>
719
720 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
721
722 2012-10-28 David S. Miller <davem@davemloft.net>
723
724 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
725 Define when we have v9 instructions available.
726 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
727 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
728 file.
729 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
730 file.
731 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
732 to libpthread-routines.
733
734 2012-10-25 Roland McGrath <roland@hack.frob.com>
735
736 * tst-cond-except.c (TEST_FUNCTION): New macro.
737
738 2012-10-25 Joseph Myers <joseph@codesourcery.com>
739
740 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
741 run tst-tls6.sh.
742 * tst-tls6.sh: Use /bin/bash not /bin/sh.
743
744 2012-10-25 Roland McGrath <roland@hack.frob.com>
745
746 * tst-basic2.c (do_test): Return RESULT, not always zero.
747
748 * tst-cond25.c: Include <stdint.h>
749 (waiter): Add casts to uintptr_t between casting integer<->pointer.
750 (timed_waiter): Likewise.
751 (do_test_wait): Likewise.
752 * tst-cond-except.c (thr): Likewise.
753 (do_test): Use prototype definition.
754
755 2012-10-24 Joseph Myers <joseph@codesourcery.com>
756 Jim Blandy <jimb@codesourcery.com>
757
758 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
759 tst-tls6.sh.
760 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
761 programs with LD_PRELOAD set.
762
763 2012-10-24 Roland McGrath <roland@hack.frob.com>
764
765 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
766 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
767 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
768 ($(objpfx)tst-rwlock14): Likewise.
769
770 2012-10-24 Joseph Myers <joseph@codesourcery.com>
771
772 * Makefile (tests): Remove tst-oddstacklimit.
773 (test-srcs): New variable.
774 (tst-oddstacklimit-ENV): Remove.
775 [$(run-built-tests) = yes] (tests): Depend on
776 $(objpfx)tst-oddstacklimit.out.
777 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
778 target.
779 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
780 setrlimit before executing tst-basic1 test passed to --command.
781
782 2012-10-23 Joseph Myers <joseph@codesourcery.com>
783
784 * Makefile [$(cross-compiling) = no]: Change condition to
785 [$(run-built-tests) = yes].
786
787 2012-10-23 Jim Blandy <jimb@codesourcery.com>
788 Joseph Myers <joseph@codesourcery.com>
789
790 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
791 (tst-exec4-ARGS): Likewise.
792 (tst-stackguard1-ARGS): Likewise.
793
794 2012-10-21 Jim Blandy <jimb@codesourcery.com>
795 Joseph Myers <joseph@codesourcery.com>
796
797 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
798 tst-cancel-wrappers.sh.
799 * tst-cancel-wrappers.sh: Use nm program given as first argument,
800 not hardcoded "nm".
801
802 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
803
804 * tst-cond25.c (do_test_wait): Don't check for return value from
805 pthread_cancel.
806
807 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
808
809 [BZ #14652]
810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
811 (__condvar_tw_cleanup): Adjust the mutex data structure if it
812 was locked by FUTEX_WAIT_REQUEUE_PI.
813 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
814 (__condvar_w_cleanup): Likewise.
815 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
816 (__condvar_cleanup2): Likewise.
817 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
818 (__condvar_cleanup1): Likewise.
819
820 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
821
822 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
823 defined __EXCEPTIONS) && defined __USE_GNU]
824 (pthread_cleanup_push_defer_np): Fix formatting.
825
826 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
827
828 [BZ #14652]
829 * Makefile (tests): New test case tst-cond25.
830 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
831 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
832 (__condvar_tw_cleanup): Lock mutex only if we don't already
833 own it.
834 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
835 (__condvar_w_cleanup): Likewise.
836 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
837 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
838 (__condvar_cleanup2): Lock mutex only if we don't already
839 own it.
840 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
841 (__condvar_cleanup1): Likewise.
842 * tst-cond25.c: New test case.
843
844 2012-10-09 Roland McGrath <roland@hack.frob.com>
845
846 * sysdeps/pthread/configure: Regenerated.
847 * sysdeps/x86_64/configure: Regenerated.
848
849 2012-10-05 David S. Miller <davem@davemloft.net>
850
851 [BZ #14568]
852 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
853 (DB_THREAD_SELF): Use constants for the register offsets. Correct
854 the case of a 64-bit debugger with a 32-bit inferior.
855
856 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
857
858 [BZ #14557]
859 * Makefile (tests-static): Add tst-cancel24-static,
860 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
861 tst-sem11-static and tst-sem12-static.
862 (tests): Likewise.
863 (LDLIBS-tst-cancel24-static): New macro.
864 * tst-cancel24-static.cc: New file.
865 * tst-cond8-static.c: Likewise.
866 * tst-mutex8-static.c: Likewise.
867 * tst-mutexpi8-static.c: Likewise.
868 * tst-sem11-static.c: Likewise.
869 * tst-sem12-static.c: Likewise.
870
871 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
872
873 [BZ #14417]
874 * Makefile (tests): New test case tst-cond24.
875 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
876 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
877 (__pthread_cond_timedwait): Unlock mutex before going back to
878 wait in PI case.
879 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
880 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
881 return from futex_wait.
882 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
883 (__pthread_cond_timedwait): Unlock mutex before going back to
884 wait in PI case. Set requeue_pi flag only if wait returned 0.
885 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
886 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
887 return from futex_wait.
888 * tst-cond24.c: New test case.
889
890 2012-10-04 Roland McGrath <roland@hack.frob.com>
891
892 * pthread_create.c (start_thread): Use __madvise, not madvise.
893
894 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
895
896 * sysdeps/i386/tls.h: Update copyright years.
897
898 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
899
900 * pthread_create.c (start_thread): Fix clone flag name in
901 comment to CLONE_CHILD_CLEARTID.
902 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
903 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
904 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
905 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
906 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
907 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
908
909 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
910
911 [BZ #14477]
912 * Makefile (tests): Add tst-cond-except.
913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
914 (__pthread_cond_timedwait): Mark instructions where %ebx is
915 incremented in PI case.
916 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
917 for the marked PI case instructions.
918 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
919 (__pthread_cond_wait): Mark instructions where %ebx is
920 incremented in PI case.
921 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
922 for the marked PI case instructions.
923 * tst-cond-except.c: New test case.
924
925 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
926
927 * tst-tls6.sh: Add "set -e".
928 * Makefile: Do not specify -e option when running testsuite
929 shell scripts.
930
931 * tst-tls6.sh: Add copyright header.
932
933 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
934
935 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
936 to uint64_t for 64-bit store.
937 (THREAD_SETMEM_NC): Likewise.
938
939 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
940
941 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
942 64-bit store.
943 (THREAD_SETMEM_NC): Likewise.
944
945 2012-09-14 Jeff Law <law@redhat.com>
946
947 [BZ #14583]
948 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
949
950 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
951
952 [BZ #14576]
953 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
954 Removed.
955
956 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
957
958 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
959 (LDLIBS-tst-cancel24): This.
960
961 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
962
963 [BZ #14545]
964 * Makefile (tests-static): Add tst-cancel21-static.
965 (tests): Likewise.
966 * tst-cancel21-static.c: New file.
967
968 2012-09-01 Joseph Myers <joseph@codesourcery.com>
969
970 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
971 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
972 [__NR_clock_getres]: Make code unconditional.
973 (pthread_getcpuclockid): Remove code left unreachable by removal
974 of conditionals.
975
976 2012-08-31 Joseph Myers <joseph@codesourcery.com>
977
978 [BZ #14532]
979 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
980 atomic_compare_and_exchange_bool_rel.
981 * tst-sem14.c: New file.
982 * Makefile (tests): Add tst-sem14.
983
984 2012-08-15 Roland McGrath <roland@hack.frob.com>
985
986 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
987 of -D_IO_MTSAFE_IO.
988 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
989 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
990
991 2012-08-16 Joseph Myers <joseph@codesourcery.com>
992
993 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
994 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
995 * pthread_condattr_setclock.c (pthread_condattr_setclock)
996 [!__ASSUME_POSIX_TIMERS]: Likewise.
997 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
998 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
999 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
1000 [!__ASSUME_POSIX_TIMERS]: Likewise.
1001 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1002 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
1003 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
1004 code unconditional.
1005 [!__NR-timer_create]: Remove conditional code.
1006 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
1007 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
1008 code unconditional.
1009 [!__NR_timer_delete]: Remove conditional code.
1010 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
1011 * sysdeps/unix/sysv/linux/timer_getoverr.c
1012 [__NR_timer_getoverrun]: Make code unconditional.
1013 [!__NR_timer_getoverrun]: Remove conditional code.
1014 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
1015 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
1016 Make code unconditional.
1017 [!__NR_timer_gettime]: Remove conditional code.
1018 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
1019 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
1020 Make code unconditional.
1021 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
1022 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
1023 Make code unconditional.
1024 [!__NR_timer_settime]: Remove conditional code.
1025 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
1026 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1027 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
1028 conditional code.
1029
1030 2012-08-15 Tom de Vries <vries@codesourcery.com>
1031 Maxim Kuvyrkov <maxim@codesourcery.com>
1032
1033 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
1034 (__libc_lock_trylock): Allow pre-existing definitions.
1035
1036 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
1037
1038 * pthread_spin_lock.c: New file.
1039 * pthread_spin_trylock.c: New file.
1040
1041 2012-08-08 Joseph Myers <joseph@codesourcery.com>
1042
1043 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
1044 code unconditional.
1045 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
1046 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
1047 unconditional.
1048 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
1049 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
1050 Make code unconditional.
1051 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
1052 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
1053 __NR_tgkill]: Make code unconditional.
1054 (raise) [__ASSUME_TGKILL]: Likewise.
1055 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
1056 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
1057 [__ASSUME_TGKILL]: Make code unconditional.
1058 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
1059 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
1060 __NR_tgkill]: Make code unconditional.
1061 (raise) [__ASSUME_TGKILL]: Likewise.
1062 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
1063
1064 2012-08-07 Joseph Myers <joseph@codesourcery.com>
1065
1066 * sysdeps/pthread/createthread.c (create_thread)
1067 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
1068
1069 2012-08-03 Joseph Myers <joseph@codesourcery.com>
1070
1071 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
1072 code unconditional.
1073 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
1074
1075 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
1076
1077 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
1078 (pagesize): New static variable.
1079 (allocate_and_test): Return MEM. Rename parameter to TARGET.
1080 (check_stack_top): New local variables MEM and PAGEMASK. Cap
1081 stack size to MAX_STACK_SIZE. Call allocate_and_test for
1082 halfway up the stack top page. Verify that the top page was
1083 written into.
1084 (do_test): Get pagesize using sysconf.
1085
1086 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
1087
1088 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
1089 label.
1090 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
1091 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
1092 Likewise.
1093
1094 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
1095
1096 * tst-pthread-getattr.c: Revert last change.
1097
1098 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
1099
1100 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
1101 size.
1102 (_MIN): New macro.
1103 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
1104 of MEM to test.
1105 (check_stack_top): Read valued written into STACKADDR in
1106 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
1107
1108 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
1109
1110 * nptl-init.c (sighandler_setxid): Fix the comment that
1111 describes it.
1112
1113 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
1114
1115 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1116 (__lll_robust_timedlock_wait): Simplify CFI directives.
1117
1118 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
1119
1120 [BZ #12416]
1121 * Makefile (tests): Add test case.
1122 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
1123 the __libc_stack_end page from stacksize. Truncate stacksize to
1124 make it page aligned when it is computed from RLIMIT_STACK.
1125 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
1126 accessible.
1127
1128 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
1129
1130 [BZ #14205]
1131 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
1132 branches.
1133
1134 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
1135 Jakub Jelinek <jakub@redhat.com>
1136
1137 [BZ #14188]
1138 * sysdeps/pthread/pthread.h
1139 [!(defined __GNUC__ && defined __EXCEPTIONS)]
1140 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
1141 __libc_unlikely instead of __builtin_expect.
1142
1143 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
1144
1145 [BZ #14117]
1146 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
1147 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1148 * sysdeps/unix/sysv/linux/i386/Implies: New file.
1149 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
1150 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
1151 to ...
1152 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
1153 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
1154 to ...
1155 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
1156
1157 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
1158
1159 [BZ #14132]
1160 * nptl-init.c (pthread_functions): Remove use of INTUSE and
1161 _internal aliases.
1162 (__pthread_initialize_minimal_internal): Likewise.
1163 * sem_open.c: Likewise.
1164 * sem_unlink.c: Likewise.
1165 * pthreadP.h: Replace _internal aliases by hidden_proto
1166 declarations.
1167 * pthread_getspecific.c: Replace _internal alias by hidden_def.
1168 * pthread_key_create.c: Likewise.
1169 * pthread_mutex_destroy.c: Likewise.
1170 * pthread_mutex_init.c: Likewise.
1171 * pthread_mutex_lock.c: Likewise.
1172 * pthread_mutex_unlock.c: Likewise.
1173 * pthread_once.c: Likewise.
1174 * pthread_rwlock_rdlock.c: Likewise.
1175 * pthread_rwlock_unlock.c: Likewise.
1176 * pthread_rwlock_wrlock.c: Likewise.
1177 * pthread_setspecific.c: Likewise.
1178 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1179 Likewise.
1180 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1181 Likewise.
1182 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1183 Likewise.
1184 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1185 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1186 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
1187 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
1188 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1189 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1190 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1191 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1192 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1193 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1194 Likewise.
1195 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1196 Likewise.
1197 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1198 Likewise.
1199
1200 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
1201
1202 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
1203 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
1204
1205 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
1206 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
1207 directives.
1208 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1209 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
1210 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1211 (pthread_barrier_wait): Likewise.
1212 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1213 (__pthread_cond_broadcast): Likewise.
1214 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1215 (__pthread_cond_signal): Likewise.
1216 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1217 (__pthread_cond_timedwait): Likewise.
1218 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1219 Likewise.
1220 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1221 (__pthread_rwlock_rdlock): Likewise.
1222 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1223 (pthread_rwlock_timedrdlock): Likewise.
1224 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1225 (pthread_rwlock_timedwrlock): Likewise.
1226 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1227 (__pthread_rwlock_unlock): Likewise.
1228 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1229 (__pthread_rwlock_wrlock): Likewise.
1230 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1231 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1232 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1233 Likewise.
1234 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1235
1236 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1237
1238 [BZ #12416]
1239 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1240 __libc_stack_end rounded to the end of containing page as the
1241 real stack end.
1242
1243 2012-05-25 Rayson Ho <rho@redhat.com>
1244
1245 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1246 probes for i386.
1247 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1248 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1251 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1252 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1253 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1254 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1255
1256 2012-05-25 Rayson Ho <rho@redhat.com>
1257 Roland McGrath <roland@hack.frob.com>
1258
1259 * DESIGN-systemtap-probes.txt: New file.
1260 * pthread_cond_broadcast.c: SystemTap probes.
1261 * pthread_cond_init.c: Likewise.
1262 * pthread_cond_signal.c: Likewise.
1263 * pthread_cond_wait.c: Likewise.
1264 * pthread_cond_destroy.c: Likewise.
1265 * pthread_create.c: Likewise.
1266 * pthread_join.c: Likewise.
1267 * pthread_mutex_destroy.c: Likewise.
1268 * pthread_mutex_init.c: Likewise.
1269 * pthread_mutex_lock.c: Likewise.
1270 * pthread_mutex_timedlock.c: Likewise.
1271 * pthread_mutex_unlock.c: Likewise.
1272 * pthread_rwlock_destroy.c: Likewise.
1273 * pthread_rwlock_rdlock.c: Likewise.
1274 * pthread_rwlock_unlock.c: Likewise.
1275 * pthread_rwlock_wrlock.c: Likewise.
1276 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1277 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1278 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1279 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1280 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1281 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1282 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1283 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1284
1285 2012-05-24 Roland McGrath <roland@hack.frob.com>
1286
1287 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1288
1289 2012-05-17 Andreas Jaeger <aj@suse.de>
1290
1291 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1292 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1293 only for older kernels.
1294
1295 2012-05-15 Joseph Myers <joseph@codesourcery.com>
1296
1297 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1298 not define.
1299
1300 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1301
1302 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1303 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
1304 (lll_robust_lock): Likewise.
1305 (lll_cond_lock): Likewise.
1306 (lll_robust_cond_lock): Likewise.
1307 (lll_timedlock): Likewise.
1308 (lll_robust_timedlock): Likewise.
1309 (lll_unlock): Likewise.
1310 (lll_robust_unlock): Likewise.
1311
1312 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1313
1314 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1315 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1316
1317 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1318
1319 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1320 on NWAITERS.
1321 (__gcc_personality_v0): Replace 8-byte data alignment with
1322 LP_SIZE alignment and .quad with ASM_ADDR.
1323
1324 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1325
1326 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1327 on NWAITERS.
1328 (__gcc_personality_v0): Replace 8-byte data alignment with
1329 LP_SIZE alignment and .quad with ASM_ADDR.
1330
1331 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1332
1333 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1334 NWAITERS, which is unsigned long int.
1335
1336 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1337
1338 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1339 (__gcc_personality_v0): Replace 8-byte data alignment with
1340 LP_SIZE alignment and .quad with ASM_ADDR.
1341
1342 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1343
1344 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1345 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1346 __vdso_clock_gettime pointer into RAX_LP.
1347 (__gcc_personality_v0): Replace 8-byte data alignment with
1348 LP_SIZE alignment and .quad with ASM_ADDR.
1349
1350 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1351
1352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1353 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
1354 __vdso_clock_gettime pointer into RAX_LP.
1355 (__gcc_personality_v0): Replace 8-byte data alignment with
1356 LP_SIZE alignment and .quad with ASM_ADDR.
1357
1358 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1359
1360 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1361 LP_OP(cmp) and R8_LP on dep_mutex pointer.
1362
1363 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1364
1365 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1366 to update pointer in memory. Load pointer into RDI_LP.
1367
1368 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
1369
1370 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1371 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1372 of 8.
1373 (LLL_STUB_UNWIND_INFO_END): Likewise.
1374 (lll_timedlock): Load timeout pointer into RDX_LP.
1375 (lll_robust_timedlock): Likewise.
1376
1377 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
1378 Jakub Jelinek <jakub@redhat.com>
1379
1380 [BZ #13613]
1381 * Makefile (tests): Add test cases.
1382 * descr.h (struct pthread): Add a comment describing multiple_threads.
1383 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1384 single-process case.
1385 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1386 before setting cancelstate of the thread.
1387 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1388 (__libc_multiple_threads): Add explanatory comment.
1389 * tst-cancel-self-cancelstate.c: New test case.
1390 * tst-cancel-self-canceltype.c: Likewise.
1391 * tst-cancel-self-cleanup.c: Supporting file for test cases.
1392 * tst-cancel-self-testcancel.c: New test case.
1393 * tst-cancel-self.c: Likewise.
1394 * vars.c: Expand comment to include single-process case.
1395
1396 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1397
1398 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1399 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
1400 to 32 bytes.
1401
1402 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1403
1404 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1405 New.
1406 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1407 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1408
1409 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1410
1411 * shlib-versions: Move x86_64-.*-linux.* entry to ...
1412 * sysdeps/x86_64/64/shlib-versions: Here. New file.
1413 * sysdeps/x86_64/x32/shlib-versions: New file.
1414
1415 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
1416
1417 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1418 __SIZEOF_PTHREAD_XXX_T.
1419 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1420 (pthread_mutex_t): Likewise.
1421 (pthread_rwlock_t): Likewise.
1422 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
1423 is defined.
1424
1425 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1426
1427 * sysdeps/x86_64/x32/tls.h: New file.
1428
1429 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1430
1431 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1432 integer.
1433 (THREAD_SETMEM_NC): Likewise.
1434
1435 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1436
1437 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1438 mov/%0.
1439
1440 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1441
1442 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1443 (__cleanup_fct_attribute): Check __x86_64__ instead of
1444 __WORDSIZE.
1445
1446 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1447
1448 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1449 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1450 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1451 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1452 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1453
1454 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
1455
1456 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1457 instead of __WORDSIZE.
1458
1459 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
1460
1461 [BZ #3748]
1462 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1463
1464 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
1465
1466 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1467 (__pthread_cond_timedwait): Use CFI directives.
1468 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1469 (__pthread_cond_wait): Likewise.
1470 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1471 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1472
1473 2012-05-03 David S. Miller <davem@davemloft.net>
1474
1475 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1476 always have to return 0, especially for the pthread_spin_init
1477 alias.
1478 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1479 newline.
1480 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1481 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1482
1483 2012-05-02 David S. Miller <davem@davemloft.net>
1484
1485 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1486 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1487 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1488 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1489 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1490 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1491 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1492 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1493 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1494 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1495 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1496 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1497 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1498 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1499 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1500 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1501 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1502 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1503
1504 2012-05-02 Allan McRae <allan@archlinux.org>
1505
1506 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1507 (LDFLAGS-tst-cancel24): Likewise.
1508
1509 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1510
1511 * sysdeps/i386/pthread_spin_lock.S: New.
1512 * sysdeps/i386/pthread_spin_lock.c: Delete.
1513 * sysdeps/x86_64/pthread_spin_lock.S: New.
1514 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1515
1516 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
1517
1518 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1519 run when cross-compiling.
1520
1521 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
1522
1523 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1524 instead of libgcc_s.h.
1525
1526 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
1527
1528 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1529
1530 2012-03-27 David S. Miller <davem@davemloft.net>
1531
1532 * tst-cond16.c (do_test): Use a thread stack size which is either
1533 PTHREAD_STACK_MIN or the page size, whichever is larger.
1534 * tst-cond18.c (do_test): Likewise.
1535
1536 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1537
1538 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1539 register char * __asm__("rsp") to get stack frame.
1540
1541 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1542
1543 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1544 __NR_futex directly.
1545
1546 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
1547
1548 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1549 _Unwind_Ptr first.
1550
1551 2012-03-16 David S. Miller <davem@davemloft.net>
1552
1553 [BZ #13844]
1554 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1555 instead of "...".
1556 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1557 Delete, not needed.
1558
1559 2012-03-15 David S. Miller <davem@davemloft.net>
1560
1561 [BZ #13844]
1562 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1563
1564 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
1565
1566 [BZ #13673]
1567 * pt-crti.S: Replace FSF snail mail address with URL.
1568
1569 2012-03-09 Joseph Myers <joseph@codesourcery.com>
1570
1571 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1572 Do not define before including <time.h>.
1573
1574 2012-03-08 David S. Miller <davem@davemloft.net>
1575
1576 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1577
1578 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
1579
1580 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1581 Check for timestamp before the Epoch.
1582
1583 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1584 updating nwaiters.
1585
1586 * tst-sem13.c (do_test): Add another test case.
1587 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1588 Fix updating nwaiters.
1589
1590 2012-03-07 Joseph Myers <joseph@codesourcery.com>
1591
1592 [BZ #10545]
1593 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1594 link test to a compile test.
1595 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
1596 <stdio.h>.
1597 * sysdeps/pthread/configure: Regenerated.
1598
1599 2012-03-07 Ulrich Drepper <drepper@gmail.com>
1600
1601 * Makefile (distribute): Remove variable.
1602
1603 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
1604
1605 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1606 superfluous assignment.
1607 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1608 Likewise.
1609 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1610 (sem_timedwait): Likewise.
1611
1612 2012-03-06 Ulrich Drepper <drepper@gmail.com>
1613
1614 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1615 installed headers to...
1616 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
1617
1618 2012-03-06 David S. Miller <davem@davemloft.net>
1619
1620 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1621 atomic_increment and remove unused local variable.
1622 (__old_sem_post): Likewise.
1623
1624 2012-02-27 David S. Miller <davem@davemloft.net>
1625
1626 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1627 non-existing __pthread_attr.
1628 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1629 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1630 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1631 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1632 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1633
1634 2012-02-26 Ulrich Drepper <drepper@gmail.com>
1635
1636 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1637
1638 * sysdeps/pthread/pthread.h: Define __need_timespec before including
1639 <time.h>.
1640 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1641 union.
1642 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1643 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1644 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1645 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1646 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1647
1648 2012-02-21 Joseph Myers <joseph@codesourcery.com>
1649
1650 [BZ #13695]
1651 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1652 pt-initfini.s.
1653 [crti.S not in sysdirs] (omit-deps): Do not append.
1654 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1655 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1656 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1657 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1658 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1659 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1660 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1661 [crti.S in sysdirs] (extra-objs): Append unconditionally.
1662 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1663 unconditionally.
1664 * sysdeps/pthread/pt-initfini.c: Remove file.
1665
1666 2012-02-16 Richard Henderson <rth@twiddle.net>
1667
1668 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1669 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1670
1671 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1672
1673 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1674
1675 2012-02-16 David S. Miller <davem@davemloft.net>
1676
1677 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1678
1679 2012-02-15 Marek Polacek <polacek@redhat.com>
1680
1681 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1682
1683 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1684
1685 Replace FSF snail mail address with URLs, as per GNU coding standards.
1686
1687 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1688
1689 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1690
1691 2012-02-08 Joseph Myers <joseph@codesourcery.com>
1692
1693 Support crti.S and crtn.S provided directly by architectures.
1694 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1695 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1696 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1697 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1698 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1699 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1700 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1701 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1702 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1703 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1704 * pt-crti.S: New file.
1705 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1706
1707 2012-02-03 Joseph Myers <joseph@codesourcery.com>
1708
1709 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1710 macros for PIC register setup.
1711 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1712 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1713 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1714 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1715 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1716
1717 2012-01-11 Marek Polacek <polacek@redhat.com>
1718
1719 * forward.c (FORWARD_NORETURN): Define macro.
1720 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1721 (__pthread_exit): Likewise.
1722
1723 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1724
1725 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1726
1727 * pthreadP.h: Add noreturn to __pthread_exit.
1728 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1729
1730 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1731
1732 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1733 Call pthread_attr_setstacksize() with result of
1734 __pthread_get_minstack() to account for application TLS usage.
1735
1736 2012-01-08 Marek Polacek <polacek@redhat.com>
1737
1738 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1739
1740 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1741
1742 [BZ #13553]
1743 * pthreadP.h: Use const instead of __const.
1744 * semaphore.h: Likewise.
1745 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1746 * sysdeps/pthread/bits/sigthread.h: Likewise.
1747 * sysdeps/pthread/pthread.h: Likewise.
1748
1749 * Makefile: Remove elf=yes test, only ELF is supported.
1750
1751 * shlib-versions: Remove entries for ports architectures.
1752
1753 In case anyone cares, the IA-64 architecture could move to ports.
1754 * sysdeps/ia64/*: Removed.
1755 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1756
1757 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1758
1759 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1760 __pthread_get_minstack.
1761 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1762
1763 [BZ #13088]
1764 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1765 through __pthread_get_minstack.
1766 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1767 directly from _rtld_global_ro.
1768 (__pthread_get_minstack): New function.
1769 * pthreadP.h: Declare __pthread_get_minstack.
1770 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1771
1772 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1773
1774 [BZ #13515]
1775 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1776 Correct reading name from file.
1777
1778 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1779
1780 * allocatestack.c (allocate_stack): Return errno on failure.
1781
1782 2011-12-14 Jeff Law <law@redhat.com>
1783
1784 [BZ #5245]
1785 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1786
1787 2011-11-28 Andreas Schwab <schwab@redhat.com>
1788
1789 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1790 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1791 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1792
1793 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1794
1795 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1796 /proc/self/maps.
1797
1798 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1799
1800 [BZ #13358]
1801 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1802 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1803 path for kernels with FUTEX_CLOCK_REALTIME.
1804 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1805
1806 2011-10-27 Andreas Schwab <schwab@redhat.com>
1807
1808 [BZ #13344]
1809 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1810 for memory synchronization functions.
1811 * semaphore.h: Likewise.
1812
1813 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1814
1815 * tst-cancel7.c: Avoid warning.
1816 * tst-mutex6.c: Likewise.
1817 * tst-mutex9.c: Likewise.
1818 * tst-mutexpi6.c: Likewise.
1819
1820 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1821
1822 * sysdeps/i386/tls.h: Remove #include <list.h>.
1823
1824 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1825
1826 * pthread_create.c (start_thread): Call __ctype_init.
1827
1828 2011-09-15 Andreas Schwab <schwab@redhat.com>
1829
1830 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1831 defined.
1832 (list_add): Add atomic_write_barrier.
1833 * descr.h: Define __need_list_t before including <list.h>.
1834 * nptl-init.c: Include <list.h>
1835 * allocatestack.c: Likewise.
1836
1837 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1838
1839 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1840 * sysdeps/ia64/tls.h: Likewise.
1841 * sysdeps/powerpc/tls.h: Likewise.
1842 * sysdeps/s390/tls.h: Likewise.
1843 * sysdeps/sh/tls.h: Likewise.
1844 * sysdeps/sparc/tls.h: Likewise.
1845 * sysdeps/x86_64/tls.h: Likewise.
1846
1847 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1848
1849 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1850
1851 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1852 !USE___THREAD.
1853 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1854 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1855 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1856 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1857 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1858 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1859 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1860 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1861 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1862 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1863 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1864 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1865
1866 * tst-tls1.c: Support for __thread is now mandatory.
1867 * tst-tls2.c: Likewise.
1868 * tst-tls3.c: Likewise.
1869 * tst-tls3mod.c: Likewise.
1870 * tst-tls4.c: Likewise.
1871 * tst-tls4moda.c: Likewise.
1872 * tst-tls4modb.c: Likewise.
1873 * tst-tls5.h: Likewise.
1874
1875 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1876
1877 [BZ #12403]
1878 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1879 (pthread_rwlock_timedwrlock): Use correct macro in test.
1880 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1881
1882 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1883
1884 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1885 use gettimeofday vsyscall, just call gettimeofday.
1886 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1887 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1888 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1889 Likewise.
1890 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1891 Likewise.
1892 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1893 Simplify __vdso_clock_gettime use.
1894
1895 2011-09-05 David S. Miller <davem@davemloft.net>
1896
1897 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1898 New function.
1899 (sem_timedwait): Call it to force an exception region around
1900 the async cancel enable and the futex operation.
1901 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1902 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1903 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1904 (__new_sem_wait): Call it to force an exception region around
1905 the async cancel enable and the futex operation.
1906 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1907 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1908
1909 2011-08-31 Andreas Schwab <schwab@redhat.com>
1910
1911 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1912 thread is woken up.
1913
1914 2011-08-20 David S. Miller <davem@davemloft.net>
1915
1916 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1917
1918 2011-08-14 Roland McGrath <roland@hack.frob.com>
1919
1920 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1921 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1922
1923 2011-08-08 Andreas Schwab <schwab@redhat.com>
1924
1925 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1926 stack.
1927 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1928 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1929
1930 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1931
1932 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1933 barrier.
1934 (__gcc_personality_v0): Likewise.
1935 (_Unwind_ForcedUnwind): Likewise.
1936 (_Unwind_GetCFA): Likewise.
1937
1938 2011-07-14 Roland McGrath <roland@hack.frob.com>
1939
1940 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1941 UINTMAX_C.
1942
1943 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1944
1945 * nptl-init.c (__nptl_set_robust): New function.
1946 (pthread_functions): Add reference.
1947 * npthreadP.h: Declare __nptl_set_robust.
1948 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1949 ptr_set_robust member.
1950 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1951 child if threads are used.
1952
1953 2011-06-14 Andreas Jaeger <aj@suse.de>
1954
1955 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1956
1957 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1958
1959 [BZ #386]
1960 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1961
1962 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1963
1964 [BZ #12650]
1965 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1966 clearing memory.
1967 Patch partly by Robert Rex <robert.rex@exasol.com>.
1968
1969 2011-01-19 Roland McGrath <roland@redhat.com>
1970
1971 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1972 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1973 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1974 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1975 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1976 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1977
1978 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1979
1980 * Makefile (test-extras): Add tst-cleanup4aux.
1981
1982 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1983
1984 [BZ #10563]
1985 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1986 (__SETXID_2): Likewise.
1987 (__SETXID_3): Likewise.
1988
1989 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1990
1991 [BZ #10484]
1992 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1993 * alloca_cutoff.c: Add libc_hidden_def.
1994
1995 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1996
1997 [BZ #12113]
1998 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1999 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
2000 of "struct pthread".
2001
2002 2010-09-21 Andreas Schwab <schwab@redhat.com>
2003
2004 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
2005 [!__EXCEPTIONS]: Mangle local variable not_first_call.
2006 (pthread_cleanup_push_defer_np): Likewise.
2007
2008 2010-09-03 Ulrich Drepper <drepper@redhat.com>
2009
2010 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
2011 small.
2012
2013 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
2014 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2015
2016 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
2017 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
2018
2019 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
2020
2021 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
2022
2023 2010-05-01 Alan Modra <amodra@gmail.com>
2024
2025 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2026 (PSEUDO): Use correct cr save. Don't use wrong parm save area
2027 to save temps. Correct cfi for possible later frame manipulation.
2028 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
2029 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
2030 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
2031 (DOCARGS_6, UNDOCARGS_6): Likewise.
2032 (CENABLE, CDISABLE): Add nops for non-shared calls.
2033
2034 2010-07-06 Andreas Schwab <schwab@redhat.com>
2035
2036 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
2037 Fix type mismatch.
2038
2039 2010-07-03 Ulrich Drepper <drepper@redhat.com>
2040
2041 * tst-abstime.c (do_test): Some more cleanups
2042
2043 2010-07-02 Ulrich Drepper <drepper@redhat.com>
2044
2045 * tst-abstime.c: Correct testing and add test for sem_timedwait.
2046
2047 2010-07-01 Andreas Schwab <schwab@redhat.com>
2048 Ulrich Drepper <drepper@redhat.com>
2049
2050 * Makefile (tests): Add tst-abstime.
2051 * tst-abstime.c: New file.
2052 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2053 (__lll_timedlock_wait): Check for timestamp before the Epoch.
2054 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2055 (__lll_timedlock_wait): Likewise.
2056 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2057 (__lll_robust_timedlock_wait): Likewise.
2058 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2059 (__pthread_cond_timedwait): Likewise.
2060 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2061 (pthread_rwlock_timedrdlock): Likewise.
2062 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2063 (pthread_rwlock_timedwrlock): Likewise.
2064 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2065 Likewise.
2066
2067 2010-07-01 Ulrich Drepper <drepper@redhat.com>
2068
2069 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
2070
2071 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
2072
2073 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
2074 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
2075
2076 2010-04-09 Ulrich Drepper <drepper@redhat.com>
2077
2078 [BZ #11390]
2079 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
2080 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
2081 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
2082 pthread_setname.
2083 * Makefile (libpthread-routines): Add pthread_getname and
2084 pthread_setname.
2085 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
2086
2087 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
2088
2089 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
2090 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
2091 * sysdeps/pthread/Makefile: Remove csu section and rt section's
2092 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
2093
2094 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
2095
2096 * pthread_cond_timedwait.c: Add check for
2097 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
2098 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
2099 INTERNAL_SYSCALL.
2100
2101 2010-03-09 Ulrich Drepper <drepper@redhat.com>
2102
2103 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
2104 and the call fails wake eventually waiting setxid threads. Don't free
2105 stack here if we try starting a thread.
2106 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
2107 if the clone call failed.
2108
2109 2010-03-08 Andreas Schwab <schwab@redhat.com>
2110
2111 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
2112 * allocatestack.c (get_cached_stack): Set setxid_futex.
2113 (allocate_stack): Likewise.
2114
2115 2010-03-05 Andreas Schwab <schwab@redhat.com>
2116 Ulrich Drepper <drepper@redhat.com>
2117
2118 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
2119 it is creating a thread or it is just being created.
2120 * pthread_create.c (start_thread): Wake setxid thread if it is
2121 waiting.
2122 (__pthread_create_2_1): Initialize setxid_futex.
2123 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
2124 is waiting.
2125
2126 2010-01-15 Ulrich Drepper <drepper@redhat.com>
2127
2128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2129 Fix unwind info.
2130 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2131
2132 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
2133
2134 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2135 Fix pthread_cond_timedwait with requeue-PI.
2136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2137 Fix pthread_cond_wait with requeue-PI.
2138
2139 2010-01-14 Ulrich Drepper <drepper@redhat.com>
2140
2141 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
2142 and pthread_mutexattr_setrobust for GLIBC_2.12.
2143 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
2144 * pthread_mutexattr_getrobust.c: Define alias
2145 pthread_mutexattr_getrobust.
2146 * pthread_mutexattr_setrobust.c: Define alias
2147 pthread_mutexattr_setrobust.
2148
2149 2010-01-12 Ulrich Drepper <drepper@redhat.com>
2150
2151 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
2152
2153 2010-01-08 Ulrich Drepper <drepper@redhat.com>
2154
2155 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
2156
2157 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
2158
2159 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
2160 call __gmon_start__.
2161 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
2162
2163 2009-12-17 Ulrich Drepper <drepper@redhat.com>
2164
2165 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
2166 using memset.
2167
2168 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
2169
2170 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
2171 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2172 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
2173 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2174 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2175 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
2176 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2177 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2178
2179 2009-12-12 Ulrich Drepper <drepper@redhat.com>
2180
2181 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2182 Don't update nwaiters after invalid timeout is recognized.
2183
2184 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
2185
2186 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
2187 __gmon_start__.
2188
2189 2009-11-27 Andreas Schwab <schwab@redhat.com>
2190
2191 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
2192 THREAD_SELF->cancelhandling after returning from futex call.
2193
2194 2009-11-24 Ulrich Drepper <drepper@redhat.com>
2195
2196 * tst-sem13.c: New file.
2197 * Makefile (tests): Add tst-sem13.
2198
2199 2009-11-22 Roland McGrath <roland@redhat.com>
2200
2201 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
2202 instead of recapitulating its contents.
2203
2204 2009-11-18 Ulrich Drepper <drepper@redhat.com>
2205
2206 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
2207 optimizations and cleanups.
2208
2209 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
2210
2211 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2212 Remove redundant code. Fix cfi offsets.
2213 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2214 Fix cfi offsets.
2215
2216 2009-11-17 Ulrich Drepper <drepper@redhat.com>
2217
2218 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
2219 reduce size of unwind info.
2220
2221 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2222 cfi directives.
2223 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2224 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2225
2226 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
2227
2228 [BZ #4457]
2229 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2230 LIBGCC_S_SO.
2231 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2232
2233 2009-10-30 Ulrich Drepper <drepper@redhat.com>
2234
2235 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2236
2237 [BZ #3270]
2238 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2239 steps to avoid races with creation and terminations.
2240 * nptl-init.c (sighandler_setxid): Adjust.
2241 Patch by Daniel Jacobowitz.
2242
2243 2009-09-07 Andreas Schwab <schwab@redhat.com>
2244
2245 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2246
2247 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
2248 Joseph Myers <joseph@codesourcery.com>
2249
2250 [BZ #7094]
2251 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2252 Initialize the sigev_notify field for newly created timer to make sure
2253 the timer gets deleted from the active timer's list upon timer_delete.
2254
2255 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
2256
2257 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2258 Correct a logic error.
2259
2260 2009-08-25 Ulrich Drepper <drepper@redhat.com>
2261
2262 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2263 of the field in local variables.
2264 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2265 variable and don't unconditionally clear it.
2266
2267 2009-08-24 Ulrich Drepper <drepper@redhat.com>
2268
2269 * pthread_create.c (start_thread): Hint to the kernel that memory for
2270 the stack can be reused. We do not mark all the memory. The part
2271 still in use and some reserve are kept.
2272
2273 2009-08-23 Ulrich Drepper <drepper@redhat.com>
2274
2275 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2276
2277 2009-08-11 Ulrich Drepper <drepper@redhat.com>
2278
2279 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2280 directives.
2281
2282 2009-08-10 Ulrich Drepper <drepper@redhat.com>
2283
2284 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2285 directives.
2286 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2287
2288 2009-08-10 Andreas Schwab <schwab@redhat.com>
2289
2290 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2291 (__pthread_cond_signal): Don't clobber register used for syscall
2292 number.
2293
2294 2009-08-08 Ulrich Drepper <drepper@redhat.com>
2295
2296 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2297 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2298
2299 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2300 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2301 register.
2302
2303 2009-08-07 Ulrich Drepper <drepper@redhat.com>
2304
2305 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2306 enabled by the special *_asynccancel functions.
2307 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2308 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2309
2310 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2311
2312 2009-08-04 Ulrich Drepper <drepper@redhat.com>
2313
2314 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2315 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2316 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2317 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2318 since we can assume the special __*_{en,dis}able_asynccancel
2319 functions.
2320 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2321 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2322 and PTHREAD_CANCELED.
2323
2324 2009-07-31 Ulrich Drepper <drepper@redhat.com>
2325
2326 * descr.h: Better definition of *_BITMASK macros for cancellation.
2327
2328 2009-07-29 Ulrich Drepper <drepper@redhat.com>
2329
2330 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2331
2332 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2333 dynamic linker might have to save.
2334 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2335 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
2336 printing.
2337
2338 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2339
2340 2009-07-28 Ulrich Drepper <drepper@redhat.com>
2341
2342 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2343 New function.
2344 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2345 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2346 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2347 requeue_pi for robust mutexes.
2348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2349 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2350 Don't only skip __pthread_mutex_cond_lock. Call instead
2351 __pthread_mutex_cond_lock_adjust.
2352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2353
2354 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2355 optimization of PI mutex handling.
2356
2357 2009-07-27 Ulrich Drepper <drepper@redhat.com>
2358
2359 [BZ #10418]
2360 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2361 instead of of _acq variants of cmpxchg.
2362
2363 2009-07-23 Ulrich Drepper <drepper@redhat.com>
2364
2365 * sysdeps/x86_64/configure.in: New file.
2366
2367 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2368 path when not using absolute timeout futex.
2369
2370 2009-07-20 Ulrich Drepper <drepper@redhat.com>
2371
2372 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2373 optimizations of last changes.
2374 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2375
2376 2009-07-19 Ulrich Drepper <drepper@redhat.com>
2377
2378 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2379 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2380 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2381 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2382 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2383 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2384 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2385 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2386
2387 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2388 (__pthread_cond_timedwait): Make more robust.
2389
2390 2009-07-18 Ulrich Drepper <drepper@redhat.com>
2391
2392 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2393 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2394 directly use absolute timeout.
2395
2396 * tst-sem5.c (do_test): Add test for premature timeout.
2397 * Makefile: Linu tst-sem5 with librt.
2398
2399 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2400 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2401 directly use absolute timeout.
2402 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2403 (pthread_rwlock_timedrdlock): Likewise.
2404
2405 * tst-cond11.c (run_test): Add test to check that the timeout is
2406 long enough.
2407
2408 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2409 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2410 directly use absolute timeout.
2411
2412 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2413 (__pthread_cond_wait): Convert to using exception handler instead of
2414 registered unwind buffer.
2415 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2416 (__pthread_cond_timedwait): Likewise.
2417
2418 2009-07-17 Ulrich Drepper <drepper@redhat.com>
2419
2420 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2421 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2422 use absolute timeout.
2423
2424 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2425 handling of uncontested semaphore.
2426
2427 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2428 (__condvar_cleanup): Rewrite to use cfi directives instead of
2429 hand-coded unwind tables.
2430 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2431 Likewise.
2432 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2433 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2434 Likewise.
2435
2436 2009-06-12 Ulrich Drepper <drepper@redhat.com>
2437
2438 * Makefile (libpthread-routines): Add pthread_sigqueue.
2439 * Versions: Add pthread_sigqueue for GLIBC_2.11.
2440 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2441 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2442
2443 2009-06-11 Ulrich Drepper <drepper@redhat.com>
2444
2445 [BZ #10262]
2446 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2447 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2448 cannot be assumed.
2449 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2450
2451 2009-05-16 Ulrich Drepper <drepper@redhat.com>
2452
2453 * libc-cancellation.c: Move __libc_cleanup_routine to...
2454 * libc-cleanup.c: ...here. New file.
2455 * Makefile (routines): Add libc-cleanup.
2456
2457 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2458 test.
2459 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2460 * sysdeps/pthread/librt-cancellation.c: Likewise.
2461
2462 [BZ #9924]
2463 * nptl-init.c: Renamed from init.c.
2464 * Makefile: Change all occurences of init.c to nptl-init.c.
2465
2466 2009-05-15 Ulrich Drepper <drepper@redhat.com>
2467
2468 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2469 to test when deciding on the delay.
2470 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2471 * pthread_cancel.c: Close race between deciding on sending a signal
2472 and setting the CANCELING_BIT bit.
2473
2474 * cancellation.c (__pthread_disable_asynccancel): Don't return if
2475 thread is canceled.
2476 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2477
2478 2009-04-27 Ulrich Drepper <drepper@redhat.com>
2479
2480 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2481 is available.
2482 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2483 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2484 * sysdeps/i386/tls.h: Likewise.
2485 (tcbhead_t): Add __private_tm member.
2486
2487 2009-04-26 Ulrich Drepper <drepper@redhat.com>
2488
2489 * sem_open.c (sem_open): Rewrite initialization of initsem to
2490 avoid warnings.
2491
2492 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2493 Avoid warning by using may_alias attribute on ptrhack.
2494
2495 2009-04-22 Ulrich Drepper <drepper@redhat.com>
2496
2497 [BZ #10090]
2498 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2499 Check policy and priority for validity.
2500 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2501
2502 2009-03-15 Ulrich Drepper <drepper@redhat.com>
2503
2504 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2505 (__pthread_cond_timedwait): Change to use cfi directives instead of
2506 hand-coded unwind sections.
2507
2508 2009-03-10 Ulrich Drepper <drepper@redhat.com>
2509
2510 * init.c (nptl_freeres): Compile only for SHARED.
2511
2512 2009-03-09 Jakub Jelinek <jakub@redhat.com>
2513
2514 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2515 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2516 FUTEX_BITSET_MATCH_ANY.
2517
2518 2009-02-27 Roland McGrath <roland@redhat.com>
2519
2520 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2521 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2522
2523 2009-02-26 Ulrich Drepper <drepper@redhat.com>
2524
2525 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2526 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2527 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
2528 200112L to 200809L.
2529
2530 2009-02-25 Ulrich Drepper <drepper@redhat.com>
2531
2532 * sysdeps/pthread/pthread.h: The robust mutex functions are in
2533 POSIX 2008.
2534
2535 2009-02-24 Ulrich Drepper <drepper@redhat.com>
2536
2537 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2538 Unify name of include protector macro.
2539
2540 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
2541
2542 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2543 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2544
2545 2009-01-29 Ulrich Drepper <drepper@redhat.com>
2546
2547 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2548 pointer variables.
2549
2550 * allocatestack.c (__free_stacks): Renamed from free_stacks.
2551 (__free_stack_cache): Removed. Change callers to call __free_stacks.
2552 * init.c (nptl_freeres): New function.
2553 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2554 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
2555 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2556 variable.
2557 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2558 load DSO. Assign last.
2559 (__unwind_freeres): New function.
2560
2561 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2562 for better debugging. No need to use stack_list_add here.
2563
2564 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2565
2566 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2567 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2568 instead of computing relative timeout.
2569 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2570 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2571
2572 2009-01-25 Ulrich Drepper <drepper@redhat.com>
2573
2574 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2575
2576 2009-01-08 Ulrich Drepper <drepper@redhat.com>
2577
2578 * sysdeps/pthread/list.h (list_add): Initialize new element first.
2579 (list_add_tail): Removed.
2580
2581 2009-01-07 Ulrich Drepper <drepper@redhat.com>
2582
2583 * (in_flight_stack): New variable.
2584 (stack_list_del): New function. Use instead of list_del.
2585 (stack_list_add): New function. Use instead of list_add when adding to
2586 stack_cache and stack_used lists.
2587 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2588 when the fork call interrupted another thread.
2589
2590 2009-01-04 Ulrich Drepper <drepper@redhat.com>
2591
2592 * init.c (__pthread_initialize_minimal_internal): Optimize test
2593 FUTEX_CLOCK_REALTIME a bit.
2594
2595 2009-01-03 Ulrich Drepper <drepper@redhat.com>
2596
2597 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2598 only passing five parameters to FUTEX_WAIT_BITSET call.
2599
2600 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2601 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2602 instead of computing relative timeout.
2603
2604 2009-01-02 Ulrich Drepper <drepper@redhat.com>
2605
2606 * init.c (__pthread_initialize_minimal_internal): Check for
2607 FUTEX_CLOCK_REALTIME flag.
2608 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2609 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2610 relative timeout.
2611
2612 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2613 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2614 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2615 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2616 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2617 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2618
2619 2008-12-09 Ulrich Drepper <drepper@redhat.com>
2620
2621 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2622 loop body instead of ; to avoid gcc warnings.
2623 (pthread_cleanup_pop_restore_np): Likewise.
2624 Patch by Caolán McNamara <caolanm@redhat.com>.
2625
2626 2008-12-09 Jakub Jelinek <jakub@redhat.com>
2627
2628 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2629 fast path here, for robust/PI/PP mutexes call
2630 __pthread_mutex_lock_full. Don't use switch, instead use a series
2631 of ifs according to their probability.
2632 (__pthread_mutex_lock_full): New function.
2633 * pthread_mutex_unlock.c: Include assert.h.
2634 (__pthread_mutex_unlock_usercnt): Handle only the
2635 fast path here, for robust/PI/PP mutexes call
2636 __pthread_mutex_unlock_full. Don't use switch, instead use a series
2637 of ifs according to their probability.
2638 (__pthread_mutex_unlock_full): New function.
2639 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2640 (__pthread_mutex_lock_full): Define.
2641
2642 2008-12-08 Ulrich Drepper <drepper@redhat.com>
2643
2644 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2645 implementation. Add necessary padding and.
2646 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2647 words.
2648
2649 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2650
2651 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2652 and FUTEX_WAKE_BITSET.
2653
2654 2008-12-02 Ulrich Drepper <drepper@redhat.com>
2655
2656 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2657 and FUTEX_WAKE_BITSET.
2658 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2659 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2660 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2661 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2662
2663 2008-11-25 Roland McGrath <roland@redhat.com>
2664
2665 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2666 Subdirectories moved to ports repository as
2667 sysdeps/.../nptl subdirectories.
2668
2669 2008-11-12 Jakub Jelinek <jakub@redhat.com>
2670
2671 [BZ #7008]
2672 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2673 of old value.
2674 * pthread_cond_init.c (__pthread_cond_init): Fix
2675 cond->__data.__nwaiters initialization.
2676 * Makefile (tests): Add tst-cond23.
2677 * tst-cond23.c: New test.
2678
2679 2008-11-07 Jakub Jelinek <jakub@redhat.com>
2680
2681 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2682 arguments.
2683 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2684 arguments.
2685
2686 2008-11-01 Ulrich Drepper <drepper@redhat.com>
2687
2688 [BZ #6955]
2689 * pthread_mutex_lock.c: Add support for private PI mutexes.
2690 * pthread_mutex_timedlock.c: Likewise.
2691 * pthread_mutex_trylock.c: Likewise.
2692 * pthread_mutex_unlock.c: Likewise.
2693 Patch mostly by Ben Jackson <ben@ben.com>.
2694
2695 2008-10-31 Ulrich Drepper <drepper@redhat.com>
2696
2697 [BZ #6843]
2698 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2699 Increase stack size for helper thread.
2700
2701 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2702
2703 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2704 assembly with a clobber list for access registers a0 and a1.
2705
2706 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2707
2708 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2709 to force runp->refcntr to be read from memory.
2710
2711 2008-09-08 Richard Guenther <rguenther@suse.de>
2712
2713 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2714 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2715 lll_timedlock, lll_robust_timedlock, lll_unlock,
2716 lll_robust_unlock): Promote private to int.
2717
2718 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2719
2720 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2721 ARCH_RETRY_MMAP definitions.
2722 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2723 Define MAP_STACK when not defined.
2724 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2725 handling of ARCH_RETRY_MMAP.
2726
2727 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2728
2729 * tst-align2.c (f): Print message that f is reached.
2730
2731 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2732
2733 [BZ #6740]
2734 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2735 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2736
2737 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2738
2739 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2740 SOCK_CLOEXEC if possible.
2741
2742 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2743
2744 * Makefile (tests): Add tst-rwlock2a.
2745 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2746 * tst-rwlock2a.c: New file.
2747
2748 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2749
2750 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2751
2752 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2753
2754 * sysdeps/pthread/pthread.h: Fix typo in comment.
2755
2756 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2757
2758 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2759 of CPU set to the kernel.
2760
2761 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2762
2763 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2764 cfi directives.
2765 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2766 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2767 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2768 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2769 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2770 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2771
2772 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2773
2774 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2775 cfi directives.
2776 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2777 Likewise.
2778 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2779 Likewise.
2780 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2781 Likewise.
2782
2783 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2784
2785 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2786
2787 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2788
2789 David S. Miller <davem@davemloft.net>
2790
2791 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2792
2793 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2794
2795 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2796 __pshared correctly.
2797 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2798 Likewise.
2799 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2800 Likewise.
2801 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2802 Likewise.
2803 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2804 Likewise.
2805 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2806
2807 2008-04-14 David S. Miller <davem@davemloft.net>
2808
2809 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2810 (__old_sem_wait): Fix argument to lll_futex_wait().
2811
2812 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2813
2814 * pthread_create.c: Require pthread_mutex_trylock and
2815 pthread_key_delete for libgcc.
2816
2817 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2818
2819 [BZ #6020]
2820 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2821 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2822 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2823
2824 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2825
2826 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2827 <linux/limits.h> has defined it.
2828 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2829 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2830 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2831 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2832
2833 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2834
2835 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2836 of ASSEMBLER.
2837 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2838 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2839
2840 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2841
2842 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2843 HAVE_DL_DISCOVER_OSVERSION.
2844 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2845 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2846
2847 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2848
2849 [BZ #5778]
2850 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2851 _POSIX_CHOWN_RESTRICTED value to zero.
2852
2853 2008-01-31 Roland McGrath <roland@redhat.com>
2854
2855 * Makefile (omit-deps): Variable removed.
2856
2857 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2858
2859 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2860 unnecessary addr32 prefix.
2861
2862 2008-01-29 Roland McGrath <roland@redhat.com>
2863
2864 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2865
2866 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2867
2868 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2869
2870 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2871
2872 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2873 a scratch register.
2874 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2875 (__lll_lock_wait_private): Fix typo.
2876 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2877 (pthread_barrier_wait): Likewise. Adjust XADD use.
2878 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2879 Adjust XADD use.
2880 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2881 (pthread_rwlock_timedrdlock): Return correct return value.
2882 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2883 (pthread_rwlock_timedwrlock): Likewise.
2884
2885 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2886
2887 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2888 thread returns the program exits with an error code.
2889
2890 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2891
2892 * pthread-errnos.sym: Add EOVERFLOW.
2893 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2894 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2895 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2896 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2897
2898 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2899
2900 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2901 parameter. Passed it as permission to mmap.
2902 * allocatestack.c (allocate_stack): Pass prot as second parameter
2903 to ARCH_RETRY_MMAP.
2904
2905 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2906
2907 * tst-basic7.c: Allocate memory for the stack.
2908
2909 [BZ #5465]
2910 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2911 (__pthread_cond_timedwait): Don't use VDSO.
2912 Patch by Michal Januszewski.
2913
2914 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2915
2916 [BZ #5455]
2917 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2918 Allow label before pthread_cleanup_pop.
2919 (pthread_cleanup_pop_restore_np): Likewise.
2920
2921 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2922
2923 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2924 Store 2 before returning ETIMEDOUT.
2925
2926 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2927
2928 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2929 Store 2 before returning ETIMEDOUT.
2930 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2931 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2932 (__lll_lock_wait_private): Optimize.
2933 (__lll_lock_wait): Likewise.
2934
2935 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2936
2937 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2938 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2939 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2940
2941 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2942
2943 [BZ #5240]
2944 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2945 If we time out, try one last time to lock the futex to avoid
2946 losing a wakeup signal.
2947 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2948 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2949
2950 [BZ #5245]
2951 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2952 if necessary.
2953
2954 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2955
2956 [BZ #5245]
2957 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2958 mmap failed to EAGAIN.
2959 * Makefile (tests): Add tst-basic7.
2960 * tst-basic7.c: New file.
2961
2962 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2963
2964 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2965 Use __linkin_atfork.
2966
2967 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2968
2969 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2970 missing line continuations.
2971 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2972 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2973
2974 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2975
2976 [BZ #5220]
2977 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2978 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2979 (struct timer): Add next element.
2980 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2981 enqueue timer structure into __active_timer_sigev_thread list.
2982 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2983 remove timer struct from __active_timer_sigev_thread.
2984 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2985 Before using timer structure make sure it is still on the
2986 __active_timer_sigev_thread list. Keep lock until done.
2987 Define __active_timer_sigev_thread and
2988 __active_timer_sigev_thread_lock.
2989
2990 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2991
2992 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2993 Redefine thread_atfork for use of ATFORK_MEM.
2994 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2995 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2996 function.
2997 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2998 Use atomic operation when removing first element of list.
2999
3000 2007-10-17 Jakub Jelinek <jakub@redhat.com>
3001
3002 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
3003 routine instead of an alias to __new_sem_post.
3004
3005 2007-10-15 Jakub Jelinek <jakub@redhat.com>
3006
3007 * init.c (__pthread_initialize_minimal): Initialize word to appease
3008 valgrind.
3009
3010 2007-10-10 Jakub Jelinek <jakub@redhat.com>
3011
3012 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
3013 libc.so just clear NAME.
3014 (__libc_rwlock_fini): Nop inside of libc.so.
3015 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
3016 all zeros.
3017
3018 2007-09-02 Ulrich Drepper <drepper@redhat.com>
3019
3020 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3021 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
3022 unlocking failed.
3023 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
3024
3025 2007-08-21 Ulrich Drepper <drepper@redhat.com>
3026
3027 [BZ #4938]
3028 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
3029 reclaimed stack if necessary.
3030 * Makefile (tests): Add tst-tsd6.
3031 * tst-tsd6.c: New file.
3032
3033 2007-08-21 Jakub Jelinek <jakub@redhat.com>
3034
3035 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
3036 Add private argument.
3037
3038 2007-08-20 Ulrich Drepper <drepper@redhat.com>
3039
3040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3041 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
3042
3043 2007-08-16 Jakub Jelinek <jakub@redhat.com>
3044
3045 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
3046 (__lll_robust_timedlock): Pass private as last argument to
3047 __lll_robust_timedlock_wait.
3048 (__lll_unlock): Fix a pasto.
3049
3050 2007-08-15 Jakub Jelinek <jakub@redhat.com>
3051
3052 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
3053 sparc_old_sem): New structs.
3054 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
3055 (__sem_wait_cleanup): New function.
3056 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
3057 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
3058 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3059 lll_futex_wait.
3060 (__old_sem_wait): New function.
3061 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
3062 nptl/sysdeps/unix/sysv/linux/sparc version.
3063 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
3064 Likewise.
3065 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
3066 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
3067 (__new_sem_trywait): Use sparc_old_sem structure.
3068 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
3069 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
3070 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
3071 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3072 lll_futex_timed_wait.
3073 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
3074 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
3075 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3076 lll_futex_wake.
3077 (__old_sem_post): New function.
3078 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
3079 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
3080 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
3081 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
3082 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
3083 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
3084
3085 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3086
3087 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3088 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3089 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3090 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3091 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
3092 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3093 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3094 Use FUTEX_WAKE_OP.
3095 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3096 kernel-features.h and tcb-offsets.h.
3097 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3098 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3099 process private.
3100 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3101 tcb-offsets.h.
3102 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
3103 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3104 process private.
3105 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
3106 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3107 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3108 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3109 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3110 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3111 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3112
3113 2007-08-14 Jakub Jelinek <jakub@redhat.com>
3114
3115 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
3116 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3117 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
3118 lll_futex_timed_wait.
3119
3120 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
3121 __lll_robust_unlock): Rewrite as macros instead of inline functions.
3122 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
3123 __lll_robust_unlock, __lll_wait_tid): Likewise.
3124
3125 2007-08-13 Jakub Jelinek <jakub@redhat.com>
3126
3127 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3128 Fix a pasto.
3129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3130 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3131 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3132 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3133 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3134 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3135 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
3137 kernel-features.h.
3138 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3139 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3140 process private. Switch DW_CFA_advance_loc1 and some
3141 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3142 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3143 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
3144 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3145 process private. Switch DW_CFA_advance_loc{1,2} and some
3146 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3147 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
3148 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3149 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3150 Likewise.
3151 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3152 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3153 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3154 Likewise.
3155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3156 (__pthread_cond_broadcast): Compare %r8 instead of
3157 dep_mutex-cond_*(%rdi) with $-1.
3158 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3159 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
3160 of oring.
3161
3162 2007-08-13 Ulrich Drepper <drepper@redhat.com>
3163
3164 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
3165
3166 2007-08-13 Jakub Jelinek <jakub@redhat.com>
3167
3168 * allocatestack.c: Include kernel-features.h.
3169 * pthread_create.c: Likewise.
3170 * pthread_mutex_init.c: Likewise.
3171 * init.c: Likewise.
3172 * pthread_cond_timedwait.c: Likewise.
3173 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3174 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3175 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3176 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3177 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3178 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3179 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3180 Likewise.
3181 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3182 Likewise.
3183 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3184 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3185 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3186 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3187
3188 2007-08-12 Jakub Jelinek <jakub@redhat.com>
3189
3190 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3191 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3192 byte elements. One of them is the new __shared element.
3193 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3194 adjust names of other padding elements.
3195 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3196 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3197 byte elements. One of them is the new __shared element.
3198 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3199 adjust names of other padding elements.
3200 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
3201 Renamed __pad1 element to __shared, adjust names of other padding
3202 elements.
3203 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3204 (pthread_rwlock_t): Likewise.
3205 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
3206 typo.
3207
3208 2007-08-09 Anton Blanchard <anton@samba.org>
3209
3210 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
3211
3212 2007-08-12 Ulrich Drepper <drepper@redhat.com>
3213
3214 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
3215 <kernel-features.h>.
3216 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3217
3218 2007-08-11 Ulrich Drepper <drepper@redhat.com>
3219
3220 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3221 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3222 dealing with robust mutexes.
3223 * pthread_mutex_timedlock.c: Likewise.
3224 * pthread_mutex_trylock.c: Likewise.
3225 * pthread_mutex_unlock.c: Likewise.
3226 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3227
3228 2007-08-06 Jakub Jelinek <jakub@redhat.com>
3229
3230 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3231 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3232 (PTHREAD_MUTEX_PSHARED): Define.
3233 * pthread_mutex_init.c (__pthread_mutex_init): Set
3234 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3235 mutexes.
3236 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3237 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3238 as second argument to lll_lock.
3239 (LLL_MUTEX_TRYLOCK): Take mutex as argument
3240 instead of its __data.__lock field.
3241 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3242 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3243 to lll_robust_lock.
3244 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3245 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3246 instead of mutex->__data.__kind directly, pass
3247 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3248 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3249 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3250 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3251 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3252 to lll_timedlock, lll_robust_timedlock, lll_unlock and
3253 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
3254 of mutex->__data.__kind directly.
3255 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3256 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3257 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
3258 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3259 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3260 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3261 and lll_futex_wake.
3262 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3263 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3264 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3265 directly.
3266 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3267 Take mutex as argument instead of its __data.__lock field, pass
3268 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3269 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3270 __data.__lock field.
3271 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3272 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3273 to lll_robust_cond_lock.
3274 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3275 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3276 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
3277 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3278 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3279 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3280 lll_futex_wait.
3281 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3282 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3283 lll_futex_wake.
3284 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3285 pshared variable, pass it to lll_lock, lll_unlock,
3286 lll_futex_timedwait and lll_futex_wake.
3287 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3288 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3289 and lll_futex_wake.
3290 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3291 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3292 macro.
3293 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3294 lll_futex_wake_unlock): Likewise.
3295 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3296 Likewise.
3297 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3298 lll_futex_wake_unlock): Likewise.
3299 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3300 Likewise.
3301 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3302 lll_futex_wake_unlock): Likewise.
3303 (lll_futex_wake): Fix a typo.
3304 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3305 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3306 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3307 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3308 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3309 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3310 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3311 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3312 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3313 (__pthread_cond_timedwait): Likewise.
3314 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3315 (__condvar_cleanup, __pthread_cond_wait): Likewise.
3316
3317 2007-08-05 Jakub Jelinek <jakub@redhat.com>
3318
3319 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3320 Don't use CGOTSETUP and CGOTRESTORE macros.
3321 (CGOTSETUP, CGOTRESTORE): Remove.
3322 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3323 @local symbol.
3324
3325 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3326
3327 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3328 definitions for private futexes.
3329 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3330 kernel-features.h and lowlevellock.h. Use private futexes if
3331 they are available.
3332 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3333 (__lll_mutex_lock_wait): Rename to
3334 (__lll_lock_wait): ... this. Don't compile in for libc.so.
3335 (__lll_mutex_timedlock_wait): Rename to ...
3336 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
3337 Don't compile in for libc.so.
3338 (__lll_mutex_unlock_wake): Rename to ...
3339 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
3340 (__lll_timedwait_tid): Use __NR_gettimeofday.
3341 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3342 the header from assembler. Renamed all lll_mutex_* resp.
3343 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3344 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3345 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3346 Define.
3347 (__lll_lock_wait_private): Add prototype.
3348 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3349 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3350 __lll_unlock_wake): Likewise.
3351 (lll_lock): Add private argument. Call __lll_lock_wait_private
3352 if private is constant LLL_PRIVATE.
3353 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3354 lll_timedlock, lll_robust_timedlock): Add private argument.
3355 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
3356 if private is constant LLL_PRIVATE.
3357 (lll_robust_unlock, lll_robust_dead): Add private argument.
3358 (lll_lock_t): Remove.
3359 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3360 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3361 lll_cond_wake, lll_cond_broadcast): Remove.
3362 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3363 kernel-features.h and lowlevellock.h.
3364 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3365 (LOAD_FUTEX_WAIT): Define.
3366 (__lll_robust_mutex_lock_wait): Rename to ...
3367 (__lll_robust_lock_wait): ... this. Add private argument.
3368 Use LOAD_FUTEX_WAIT macro.
3369 (__lll_robust_mutex_timedlock_wait): Rename to ...
3370 (__lll_robust_timedlock_wait): ... this. Add private argument.
3371 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
3372 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3373 lowlevellock.h.
3374 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3375 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3376 __lll_mutex_{lock,unlock}_*.
3377 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3378 lowlevellock.h and pthread-errnos.h.
3379 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3380 FUTEX_CMP_REQUEUE, EINVAL): Remove.
3381 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3382 __lll_mutex_{lock,unlock}_*.
3383 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3384 lowlevellock.h and pthread-errnos.h.
3385 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3386 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3387 __lll_mutex_{lock,unlock}_*.
3388 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3389 lowlevellock.h.
3390 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3391 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3392 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3393 (__condvar_tw_cleanup): Likewise.
3394 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3395 lowlevellock.h.
3396 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3397 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3398 __lll_mutex_{lock,unlock}_*.
3399 ( __condvar_w_cleanup): Likewise.
3400 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3401 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3402 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3403 lowlevellock.h.
3404 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3405 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3406 __lll_mutex_{lock,unlock}_*.
3407 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3408 lowlevellock.h.
3409 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3410 FUTEX_PRIVATE_FLAG): Remove.
3411 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3412 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3413 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3414 lowlevellock.h.
3415 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3416 FUTEX_PRIVATE_FLAG): Remove.
3417 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3418 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
3419 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3420 lowlevellock.h.
3421 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3422 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3423 __lll_mutex_{lock,unlock}_*.
3424 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3425 lowlevellock.h.
3426 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3427 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3428 __lll_mutex_{lock,unlock}_*.
3429 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3430 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3431 (__new_sem_post): Use standard initial exec code sequences.
3432 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3433 lowlevellock.h.
3434 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3435 FUTEX_PRIVATE_FLAG): Remove.
3436 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
3437 exec code sequences.
3438 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3439 (__new_sem_trywait): Use standard initial exec code sequences.
3440 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3441 (__new_sem_wait): Use standard initial exec code sequences.
3442
3443 2007-07-31 Anton Blanchard <anton@samba.org>
3444
3445 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3446 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3447 atomic_full_barrier.
3448
3449 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3450
3451 * allocatestack.c (stack_cache_lock): Change type to int.
3452 (get_cached_stack, allocate_stack, __deallocate_stack,
3453 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3454 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3455 as second argument to lll_lock and lll_unlock macros on
3456 stack_cache_lock.
3457 * pthread_create.c (__find_in_stack_list): Likewise.
3458 (start_thread): Similarly with pd->lock. Use lll_robust_dead
3459 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3460 as second argument.
3461 * descr.h (struct pthread): Change lock and setxid_futex field
3462 type to int.
3463 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3464 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3465 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3466 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3467 Likewise.
3468 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3469 * pthread_cond_init.c (__pthread_cond_init): Likewise.
3470 * pthreadP.h (__attr_list_lock): Change type to int.
3471 * pthread_attr_init.c (__attr_list_lock): Likewise.
3472 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3473 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3474 lll_{,un}lock.
3475 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3476 also for lll_futex_{wake,wait}.
3477 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3478 a pointer to const.
3479 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3480 LLL_SHARED as second argument to lll_{,un}lock.
3481 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3482 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3483 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3484 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3485 Likewise.
3486 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3487 as second argument to lll_{,un}lock macros on pd->lock.
3488 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3489 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3490 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3491 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3492 Likewise.
3493 * sysdeps/pthread/createthread.c (do_clone, create_thread):
3494 Likewise.
3495 * pthread_once.c (once_lock): Change type to int.
3496 (__pthread_once): Pass LLL_PRIVATE as second argument to
3497 lll_{,un}lock macros on once_lock.
3498 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3499 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3500 rwlock->__data.__shared as second argument to them and similarly
3501 for lll_futex_w*.
3502 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3503 Likewise.
3504 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3505 Likewise.
3506 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3507 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3508 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3509 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3510 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3511 to lll_{,un}lock macros on __sem_mappings_lock.
3512 * sem_open.c (check_add_mapping): Likewise.
3513 (__sem_mappings_lock): Change type to int.
3514 * semaphoreP.h (__sem_mappings_lock): Likewise.
3515 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3516 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3517 instead of lll_*mutex_*, pass LLL_SHARED as last
3518 argument.
3519 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3520 pass LLL_SHARED as last argument.
3521 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3522 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3523 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3524 pass LLL_SHARED as last argument.
3525 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3526 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3527 LLL_SHARED as last argument.
3528 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3529 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3530 Similarly.
3531 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3532 __libc_lock_lock_recursive, __libc_lock_unlock,
3533 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3534 argument to lll_{,un}lock.
3535 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3536 _IO_lock_unlock): Likewise.
3537 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3538 compound literal.
3539 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3540 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3541 __fork_lock.
3542 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3543 free_mem): Likewise.
3544 (__fork_lock): Change type to int.
3545 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3546 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3547 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3548 lll_futex_wake.
3549 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3550 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3551 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3552 New function.
3553 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3554 pass it through to lll_futex_*wait, only compile in when
3555 IS_IN_libpthread.
3556 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3557 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3558 argument and pass it through to lll_futex_*wait.
3559 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3560 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3561 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3562 inline functions to __lll_* resp. __lll_robust_*.
3563 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3564 (lll_mutex_dead): Add private argument.
3565 (__lll_lock_wait_private): New prototype.
3566 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3567 __lll_robust_lock_timedwait): Add private argument to prototypes.
3568 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3569 call __lll_lock_wait_private, otherwise pass private to
3570 __lll_lock_wait.
3571 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3572 __lll_robust_timedlock): Add private argument, pass it to
3573 __lll_*wait functions.
3574 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3575 call __lll_unlock_wake_private, otherwise pass private to
3576 __lll_unlock_wake.
3577 (__lll_robust_unlock): Add private argument, pass it to
3578 __lll_robust_unlock_wake.
3579 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3580 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3581 argument, pass it through to __lll_* inline function.
3582 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3583 (lll_lock_t): Remove.
3584 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3585 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3586 lll_cond_wake, lll_cond_broadcast): Remove.
3587 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3588 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3589 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3590 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3591 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3592 the header from assembler. Renamed all lll_mutex_* resp.
3593 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3594 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3595 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3596 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3597 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3598 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3599 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3600 Remove prototype.
3601 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3602 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3603 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3604 (lll_trylock): Likewise, use __lll_trylock_asm, pass
3605 MULTIPLE_THREADS_OFFSET as another asm operand.
3606 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3607 MULTIPLE_THREADS_OFFSET as last asm operand, call
3608 __lll_lock_wait_private if private is constant LLL_PRIVATE,
3609 otherwise pass private as another argument to __lll_lock_wait.
3610 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3611 lll_timedlock, lll_robust_timedlock): Add private argument, pass
3612 private as another argument to __lll_*lock_wait call.
3613 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3614 MULTIPLE_THREADS_OFFSET as another asm operand, call
3615 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3616 otherwise pass private as another argument to __lll_unlock_wake.
3617 (lll_robust_unlock): Add private argument, pass private as another
3618 argument to __lll_unlock_wake.
3619 (lll_robust_dead): Add private argument, use __lll_private_flag
3620 macro.
3621 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3622 LLL_MUTEX_LOCK_INITIALIZER.
3623 (lll_lock_t): Remove.
3624 (LLL_LOCK_INITIALIZER_WAITERS): Define.
3625 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3626 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3627 lll_cond_wake, lll_cond_broadcast): Remove.
3628 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3629 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3630 2007-05-2{3,9} changes.
3631 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3632 kernel-features.h and lowlevellock.h.
3633 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3634 (LOAD_FUTEX_WAIT): Rewritten.
3635 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3636 define.
3637 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3638 (__lll_mutex_lock_wait): Rename to ...
3639 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
3640 %ecx, %ecx is now private argument. Don't compile in for libc.so.
3641 (__lll_mutex_timedlock_wait): Rename to ...
3642 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
3643 contains private argument. Don't compile in for libc.so.
3644 (__lll_mutex_unlock_wake): Rename to ...
3645 (__lll_unlock_wake): ... this. %ecx contains private argument.
3646 Don't compile in for libc.so.
3647 (__lll_timedwait_tid): Use __NR_gettimeofday.
3648 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3649 kernel-features.h and lowlevellock.h.
3650 (LOAD_FUTEX_WAIT): Define.
3651 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3652 define.
3653 (__lll_robust_mutex_lock_wait): Rename to ...
3654 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
3655 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
3656 macro.
3657 (__lll_robust_mutex_timedlock_wait): Rename to ...
3658 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
3659 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3660 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3661 lowlevellock.h.
3662 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3663 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3664 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3665 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3666 to __lll_lock_wait in %edx.
3667 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3668 Include lowlevellock.h and pthread-errnos.h.
3669 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3670 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3671 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3672 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3673 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3674 __lll_unlock_wake.
3675 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3676 Include lowlevellock.h and pthread-errnos.h.
3677 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3678 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3679 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3680 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3681 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3682 __lll_unlock_wake.
3683 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3684 Include lowlevellock.h.
3685 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3686 Don't define.
3687 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3688 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3689 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3690 __lll_unlock_wake. Use __NR_gettimeofday.
3691 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3692 Include lowlevellock.h.
3693 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3694 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3695 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3696 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3697 and __lll_unlock_wake.
3698 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3699 Include lowlevellock.h.
3700 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3701 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3702 MUTEX(%ebx) address in %edx rather than %ecx to
3703 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3704 and __lll_unlock_wake. Move return value from %ecx to %edx
3705 register.
3706 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3707 Include lowlevellock.h.
3708 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3709 Don't define.
3710 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3711 MUTEX(%ebp) address in %edx rather than %ecx to
3712 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3713 and __lll_unlock_wake. Move return value from %ecx to %edx
3714 register. Use __NR_gettimeofday.
3715 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3716 Include lowlevellock.h.
3717 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3718 Don't define.
3719 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3720 MUTEX(%ebp) address in %edx rather than %ecx to
3721 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3722 and __lll_unlock_wake. Move return value from %ecx to %edx
3723 register. Use __NR_gettimeofday.
3724 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3725 Include lowlevellock.h.
3726 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3727 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3728 MUTEX(%edi) address in %edx rather than %ecx to
3729 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3730 and __lll_unlock_wake.
3731 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3732 Include lowlevellock.h.
3733 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3734 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3735 MUTEX(%ebx) address in %edx rather than %ecx to
3736 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3737 and __lll_unlock_wake. Move return value from %ecx to %edx
3738 register.
3739 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3740 lowlevellock.h.
3741 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3742 define.
3743 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3744 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3745 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3746 lowlevellock.h.
3747 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3748 (sem_timedwait): Use __NR_gettimeofday.
3749 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3750 lowlevellock.h.
3751 (LOCK): Don't define.
3752 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3753 lowlevellock.h.
3754 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3755 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3756 are waiters.
3757 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3758 2007-05-2{3,9} changes.
3759 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3760 kernel-features.h and lowlevellock.h.
3761 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3762 (LOAD_FUTEX_WAIT): Rewritten.
3763 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3764 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3765 (__lll_mutex_lock_wait): Rename to ...
3766 (__lll_lock_wait): ... this. %esi is now private argument.
3767 Don't compile in for libc.so.
3768 (__lll_mutex_timedlock_wait): Rename to ...
3769 (__lll_timedlock_wait): ... this. %esi contains private argument.
3770 Don't compile in for libc.so.
3771 (__lll_mutex_unlock_wake): Rename to ...
3772 (__lll_unlock_wake): ... this. %esi contains private argument.
3773 Don't compile in for libc.so.
3774 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3775 kernel-features.h and lowlevellock.h.
3776 (LOAD_FUTEX_WAIT): Define.
3777 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3778 (__lll_robust_mutex_lock_wait): Rename to ...
3779 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3780 Use LOAD_FUTEX_WAIT macro.
3781 (__lll_robust_mutex_timedlock_wait): Rename to ...
3782 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3783 private, use LOAD_FUTEX_WAIT macro.
3784 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3785 lowlevellock.h.
3786 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3787 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3788 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3789 __lll_lock_wait and __lll_unlock_wake.
3790 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3791 Include lowlevellock.h and pthread-errnos.h.
3792 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3793 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3794 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3795 pass LLL_SHARED in %esi to both __lll_lock_wait and
3796 __lll_unlock_wake.
3797 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3798 Include lowlevellock.h and pthread-errnos.h.
3799 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3800 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3801 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3802 pass LLL_SHARED in %esi to both __lll_lock_wait and
3803 __lll_unlock_wake.
3804 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3805 Include lowlevellock.h.
3806 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3807 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3808 pass LLL_SHARED in %esi to both __lll_lock_wait and
3809 __lll_unlock_wake.
3810 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3811 Include lowlevellock.h.
3812 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3813 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3814 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3815 and __lll_unlock_wake.
3816 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3817 Include lowlevellock.h.
3818 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3819 Don't define.
3820 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3821 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3822 and __lll_unlock_wake.
3823 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3824 Include lowlevellock.h.
3825 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3826 Don't define.
3827 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3828 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3829 and __lll_unlock_wake.
3830 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3831 Include lowlevellock.h.
3832 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3833 Don't define.
3834 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3835 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3836 and __lll_unlock_wake.
3837 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3838 Include lowlevellock.h.
3839 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3840 Don't define.
3841 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3842 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3843 and __lll_unlock_wake.
3844 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3845 Include lowlevellock.h.
3846 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3847 Don't define.
3848 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3849 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3850 and __lll_unlock_wake.
3851 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3852 lowlevellock.h.
3853 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3854 define.
3855 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3856 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3857 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3858 lowlevellock.h.
3859 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3860 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3861 lowlevellock.h.
3862 (LOCK): Don't define.
3863 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3864 lowlevellock.h.
3865 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3866 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3867 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3868 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3869 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3870 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3871 (__lll_lock_wait_private): New function.
3872 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3873 it to lll_futex_*wait. Don't compile in for libc.so.
3874 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3875 Remove.
3876 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3877 (struct sparc_pthread_barrier): Remove.
3878 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3879 struct sparc_pthread_barrier. Pass
3880 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3881 and lll_futex_wait macros.
3882 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3883 Remove.
3884 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3885 Include sparc pthread_barrier_wait.c instead of generic one.
3886
3887 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3888
3889 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3890
3891 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3892 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3893 %ecx.
3894 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3895 (pthread_rwlock_timedwrlock): Likewise.
3896 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3897 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3898
3899 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3900
3901 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3902
3903 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3904
3905 * tst-locale2.c (useless): Add return statement.
3906
3907 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3908
3909 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3910 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3911 * pthread_create.c (start_thread): Likewise.
3912 * init.c (sighandler_setxid): Likewise.
3913 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3914 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3915 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3916 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3917 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3918 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3919 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3920 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3921 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3922 Likewise.
3923 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3924 Likewise.
3925 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3926 Likewise.
3927 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3928 __rtld_notify): Likewise.
3929 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3930 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3931 __pthread_once): Likewise.
3932 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3933 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3934 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3935 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3936 (lll_futex_wait): Add private argument, define as wrapper around
3937 lll_futex_timed_wait.
3938 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3939 use __lll_private_flag macro.
3940 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3941 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3942 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3943 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3944 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3945 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3946 (lll_futex_wait): Add private argument, define as wrapper around
3947 lll_futex_timed_wait.
3948 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3949 use __lll_private_flag macro.
3950 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3951 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3952 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3953 Define.
3954 (lll_futex_timed_wait, lll_futex_wake): Use it.
3955 (lll_private_futex_wait, lll_private_futex_timed_wait,
3956 lll_private_futex_wake): Removed.
3957 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3958 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3959 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3960 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3961 (lll_futex_wait): Add private argument, define as wrapper around
3962 lll_futex_timed_wait.
3963 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3964 use __lll_private_flag macro.
3965 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3966 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3967 to lll_futex_*.
3968 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3969 (lll_private_futex_wait, lll_private_futex_timed_wait,
3970 lll_private_futex_wake): Removed.
3971 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3972 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3973 (lll_private_futex_wait, lll_private_futex_timed_wait,
3974 lll_private_futex_wake): Removed.
3975 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3976 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3977 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3978 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3979 (lll_futex_wait): Add private argument, define as wrapper around
3980 lll_futex_timed_wait.
3981 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3982 use __lll_private_flag macro.
3983 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3984 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3985 to lll_futex_*.
3986 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3987 Define.
3988 (lll_futex_timed_wait, lll_futex_wake): Use it.
3989 (lll_private_futex_wait, lll_private_futex_timed_wait,
3990 lll_private_futex_wake): Removed.
3991
3992 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3993
3994 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3995 of the structure for sparc32.
3996
3997 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3998
3999 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
4000
4001 2007-07-23 Ulrich Drepper <drepper@redhat.com>
4002
4003 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
4004 code used when private futexes are assumed.
4005 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4006 Likewise.
4007
4008 2007-07-23 Jakub Jelinek <jakub@redhat.com>
4009
4010 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4011 (__lll_private_flag): Define.
4012 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
4013 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
4014 __lll_private_flag.
4015 (lll_private_futex_wait, lll_private_futex_timedwait,
4016 lll_private_futex_wake): Define as wrapper around non-_private
4017 macros.
4018 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4019 (__lll_private_flag): Define.
4020 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
4021 (lll_private_futex_wait, lll_private_futex_timedwait,
4022 lll_private_futex_wake): Define as wrapper around non-_private
4023 macros.
4024
4025 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
4026
4027 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
4028 parameter to lll_futex_wait call.
4029 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
4030
4031 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4032 Replace lll_futex_wait with lll_private_futex_wait.
4033 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4034 Add LLL_SHARED parameter to lll_futex_wake().
4035
4036 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
4037 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
4038 lll_private_futex_wake.
4039 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
4040 bit from private parm before syscall.
4041 (lll_futex_timed_wait): Likewise.
4042 (lll_futex_wake): Likewise.
4043 (lll_futex_wake_unlock): Likewise.
4044 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
4045 (lll_robust_mutex_unlock): Likewise.
4046 (lll_mutex_unlock_force): Likewise.
4047 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
4048
4049 2007-07-23 Ulrich Drepper <drepper@redhat.com>
4050
4051 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
4052 compilation when unconditionally using private futexes.
4053 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4054 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4055 Likewise.
4056 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4057 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4058
4059 2007-07-17 Jakub Jelinek <jakub@redhat.com>
4060
4061 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
4062 Define.
4063
4064 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4065
4066 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
4067 kernel-features.h.
4068
4069 2007-05-16 Roland McGrath <roland@redhat.com>
4070
4071 * init.c (__nptl_initial_report_events): New variable.
4072 (__pthread_initialize_minimal_internal): Initialize pd->report_events
4073 to that.
4074
4075 2007-06-22 Jakub Jelinek <jakub@redhat.com>
4076
4077 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
4078 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
4079
4080 2007-06-19 Ulrich Drepper <drepper@redhat.com>
4081
4082 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
4083 implementation.
4084
4085 2007-06-18 Ulrich Drepper <drepper@redhat.com>
4086
4087 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
4088 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
4089 * pthread_mutex_timedlock.c: Likewise.
4090 * pthread_mutex_trylock.c: Likewise.
4091 * pthread_mutex_unlock.c: Likewise.
4092
4093 2007-06-17 Andreas Schwab <schwab@suse.de>
4094
4095 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
4096 sections.
4097
4098 2007-06-17 Ulrich Drepper <drepper@redhat.com>
4099
4100 * allocatestack.c (allocate_stack): Make code compile if
4101 __ASSUME_PRIVATE_FUTEX is set.
4102
4103 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4104
4105 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
4106 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
4107 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
4108 (__pthread_rwlock_wrlock): Likewise.
4109 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4110 (pthread_rwlock_timedrdlock): Likewise.
4111 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4112 (pthread_rwlock_timedwrlock): Likewise.
4113 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
4114 (__pthread_rwlock_unlock): Likewise.
4115
4116 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4117
4118 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
4119 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
4120 Split __flags into __flags, __shared, __pad1 and __pad2.
4121 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
4122 futexes if they are available.
4123 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
4124 in libc-lowlevellock.S allow using private futexes.
4125 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
4126 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
4127 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
4128 to call lll_futex_timed_wait. Add lll_private_futex_wait,
4129 lll_private_futex_timed_wait and lll_private_futex_wake.
4130 (lll_robust_mutex_unlock): Fix typo.
4131 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
4132 field in futex command setup.
4133 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
4134 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
4135 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4136 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
4137 if they are available. Remove clear_once_control.
4138 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
4139 futexes if they are available.
4140 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4141 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4142 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4143 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4144 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
4145 Wake only when there are waiters.
4146 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
4147 support. Indicate that there are waiters. Remove unnecessary
4148 extra cancellation test.
4149 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
4150 left-over duplication of __sem_wait_cleanup.
4151
4152 2007-06-07 Ulrich Drepper <drepper@redhat.com>
4153
4154 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
4155 parameter to lll_futex_wait, lll_futex_timed_wait, and
4156 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
4157 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
4158 lll_private_futex_wake.
4159 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4160 * allocatestack.c: Adjust use of lll_futex_* macros.
4161 * init.c: Likewise.
4162 * lowlevellock.h: Likewise.
4163 * pthread_barrier_wait.c: Likewise.
4164 * pthread_cond_broadcast.c: Likewise.
4165 * pthread_cond_destroy.c: Likewise.
4166 * pthread_cond_signal.c: Likewise.
4167 * pthread_cond_timedwait.c: Likewise.
4168 * pthread_cond_wait.c: Likewise.
4169 * pthread_create.c: Likewise.
4170 * pthread_mutex_lock.c: Likewise.
4171 * pthread_mutex_setprioceiling.c: Likewise.
4172 * pthread_mutex_timedlock.c: Likewise.
4173 * pthread_mutex_unlock.c: Likewise.
4174 * pthread_rwlock_timedrdlock.c: Likewise.
4175 * pthread_rwlock_timedwrlock.c: Likewise.
4176 * pthread_rwlock_unlock.c: Likewise.
4177 * sysdeps/alpha/tls.h: Likewise.
4178 * sysdeps/i386/tls.h: Likewise.
4179 * sysdeps/ia64/tls.h: Likewise.
4180 * sysdeps/powerpc/tls.h: Likewise.
4181 * sysdeps/pthread/aio_misc.h: Likewise.
4182 * sysdeps/pthread/gai_misc.h: Likewise.
4183 * sysdeps/s390/tls.h: Likewise.
4184 * sysdeps/sh/tls.h: Likewise.
4185 * sysdeps/sparc/tls.h: Likewise.
4186 * sysdeps/unix/sysv/linux/fork.c: Likewise.
4187 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4188 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
4189 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
4190 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4191 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4192 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4193 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4194 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
4195 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
4196 Likewise.
4197 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
4198 * sysdeps/x86_64/tls.h: Likewise.
4199
4200 2007-05-29 Ulrich Drepper <drepper@redhat.com>
4201
4202 * pthread_getattr_np.c: No need to install a cancellation handler,
4203 this is no cancellation point.
4204 * pthread_getschedparam.c: Likewise.
4205 * pthread_setschedparam.c: Likewise.
4206 * pthread_setschedprio.c: Likewise.
4207 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
4208 lll_unlock_wake_cb.
4209 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4210 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4211 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4212 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4213 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4214 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4215 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4216 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4217 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4218 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
4219 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4220 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4221
4222 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4223 whether there are more than one thread makes no sense here since
4224 we only call the slow path if the locks are taken.
4225 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4226
4227 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4228 COND_NWAITERS_SHIFT.
4229 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4230 COND_CLOCK_BITS.
4231 * pthread_cond_init.c: Likewise.
4232 * pthread_cond_timedwait.c: Likewise.
4233 * pthread_cond_wait.c: Likewise.
4234 * pthread_condattr_getclock.c: Likewise.
4235 * pthread_condattr_setclock.c: Likewise.
4236 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4237 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4238 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4239 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4240 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4241
4242 2007-05-28 Jakub Jelinek <jakub@redhat.com>
4243
4244 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4245 unistd.h.
4246
4247 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4248 insn suffix.
4249 (THREAD_GSCOPE_GET_FLAG): Remove.
4250 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4251 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4252 changes.
4253 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4254 (THREAD_GSCOPE_GET_FLAG): Remove.
4255 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4256 instead of THREAD_GSCOPE_GET_FLAG.
4257 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
4258 it.
4259 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4260 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4261 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4262 THREAD_GSCOPE_WAIT): Define.
4263 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4264 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4265 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4266 THREAD_GSCOPE_WAIT): Define.
4267 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4268 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4269 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4270 THREAD_GSCOPE_WAIT): Define.
4271 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4272 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4273 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4274 THREAD_GSCOPE_WAIT): Define.
4275
4276 2007-05-24 Richard Henderson <rth@redhat.com>
4277
4278 * descr.h (struct pthread): Add header.gscope_flag.
4279 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4280 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4281 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4282 THREAD_GSCOPE_WAIT): Define.
4283
4284 2007-05-27 Ulrich Drepper <drepper@redhat.com>
4285
4286 * init.c: Make it compile with older kernel headers.
4287
4288 * tst-initializers1.c: Show through exit code which test failed.
4289
4290 * pthread_rwlock_init.c: Also initialize __shared field.
4291 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4292 element in rwlock structure into four byte elements. One of them is
4293 the new __shared element.
4294 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4295 Likewise.
4296 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4297 __shared, adjust names of other padding elements.
4298 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4299 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4300 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4301 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4302 FUTEX_PRIVATE_FLAG.
4303 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4304 futex to use private operations if possible.
4305 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4306 Likewise.
4307 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4308 Likewise.
4309 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4310 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4311 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4312 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4313 Likewise.
4314 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4315 Likewise.
4316 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4317 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4318
4319 2007-05-26 Ulrich Drepper <drepper@redhat.com>
4320
4321 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4322 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4323 * pthread_rwlock_timedrdlock.c: Likewise.
4324 * pthread_rwlock_tryrdlock.c: Likewise.
4325
4326 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4327 optimization.
4328
4329 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4330 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4331 duplication of __sem_wait_cleanup.
4332
4333 * allocatestack.c: Revert last change.
4334 * init.c: Likewise.
4335 * sysdeps/i386/tls.h: Likewise.
4336 * sysdeps/x86_64/tls.h: Likewise.
4337 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4338 header structure.
4339 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4340
4341 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4342 Add private field.
4343 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4344 * pthread_barrier_init.c: Set private flag if pshared and private
4345 futexes are supported.
4346 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4347 private field in futex command setup.
4348 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4349
4350 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4351
4352 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4353 support.
4354 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4355 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4356 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4357 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4358 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4359
4360 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4361 * sem_init.c (__new_sem_init): Rewrite to initialize all three
4362 fields in the structure.
4363 (__old_sem_init): New function.
4364 * sem_open.c: Initialize all fields of the structure.
4365 * sem_getvalue.c: Adjust for renamed element.
4366 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4367 (gen-as-const-headers): Add structsem.sym.
4368 * sysdeps/unix/sysv/linux/structsem.sym: New file.
4369 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4370 struct new_sem. Add struct old_sem.
4371 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4372 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4373 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4374 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4375 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4376 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4377 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4378 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4379 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4380 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4381 * tst-sem10.c: New file.
4382 * tst-sem11.c: New file.
4383 * tst-sem12.c: New file.
4384 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4385 of struct sem.
4386
4387 2007-05-25 Ulrich Drepper <drepper@redhat.com>
4388 Jakub Jelinek <jakub@redhat.com>
4389
4390 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4391 Move __pthread_enable_asynccancel right before futex syscall.
4392 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4393 Likewise.
4394
4395 2007-05-24 Jakub Jelinek <jakub@redhat.com>
4396
4397 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4398 THREAD_COPY_PRIVATE_FUTEX): Define.
4399 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4400 THREAD_COPY_PRIVATE_FUTEX): Define.
4401 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4402 * init.c (__pthread_initialize_minimal_internal): Use
4403 THREAD_SET_PRIVATE_FUTEX.
4404
4405 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4406 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4407 THREAD_GSCOPE_FLAG_WAIT): Define.
4408 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4409 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4410 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4411 PTR_DEMANGLE.
4412 (THREAD_GSCOPE_GET_FLAG): Define.
4413 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4414 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4415 instead of ->header.gscope_flag directly.
4416
4417 2007-05-23 Ulrich Drepper <drepper@redhat.com>
4418
4419 * init.c (__pthread_initialize_minimal_internal): Check whether
4420 private futexes are available.
4421 * allocatestack.c (allocate_stack): Copy private_futex field from
4422 current thread into the new stack.
4423 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4424 futexes if they are available.
4425 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4426 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4427 in libc-lowlevellock.S allow using private futexes.
4428 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4429 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4430 FUTEX_PRIVATE_FLAG.
4431 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4432 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4433 if they are available.
4434 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4435 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4436 * sysdeps/i386/tcb-offsets.sym: Likewise.
4437 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4438 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4439
4440 2007-05-21 Ulrich Drepper <drepper@redhat.com>
4441
4442 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4443 Remove ptr_wait_lookup_done again.
4444 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4445 (__pthread_initialize_minimal_internal): Initialize
4446 _dl_wait_lookup_done pointer in _rtld_global directly.
4447 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4448 Remove code to code _dl_wait_lookup_done.
4449 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4450 encrypted for now.
4451
4452 2007-05-21 Jakub Jelinek <jakub@redhat.com>
4453
4454 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4455 pthread_mutex_init failed with ENOTSUP.
4456
4457 2007-05-19 Ulrich Drepper <drepper@redhat.com>
4458
4459 * allocatestack.c (__wait_lookup_done): New function.
4460 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4461 Add ptr_wait_lookup_done.
4462 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4463 * pthreadP.h: Declare __wait_lookup_done.
4464 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4465 Define macros to implement reference handling of global scope.
4466 * sysdeps/x86_64/tls.h: Likewise.
4467 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4468 Initialize GL(dl_wait_lookup_done).
4469
4470 2007-05-17 Ulrich Drepper <drepper@redhat.com>
4471
4472 [BZ #4512]
4473 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4474 is detected.
4475 * pthread_mutex_timedlock.c: Likewise.
4476 * pthread_mutex_trylock.c: Likewise.
4477 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4478
4479 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4480 * tst-robust9.c: New file.
4481 * tst-robustpi9.c: New file.
4482
4483 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4484 unnecessary extra cancellation test.
4485
4486 2007-05-14 Ulrich Drepper <drepper@redhat.com>
4487
4488 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4489 extra cancellation test.
4490 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4491
4492 2007-05-10 Ulrich Drepper <drepper@redhat.com>
4493
4494 * descr.h (struct pthread): Rearrange members to fill hole in
4495 64-bit layout.
4496
4497 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4498 (__pthread_setaffinity_new): If syscall was successful and
4499 RESET_VGETCPU_CACHE is defined, use it before returning.
4500 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4501
4502 2007-05-10 Jakub Jelinek <jakub@redhat.com>
4503
4504 [BZ #4455]
4505 * tst-align2.c: Include stackinfo.h.
4506 * tst-getpid1.c: Likewise.
4507
4508 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
4509
4510 [BZ #4455]
4511 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4512 * tst-getpid1.c (do_test): Likewise.
4513
4514 [BZ #4456]
4515 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4516 (allocate_stack): Likewise.
4517
4518 2007-05-07 Ulrich Drepper <drepper@redhat.com>
4519
4520 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4521 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4522 (__lll_robust_timedlock_wait): Likewise.
4523 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4524
4525 2007-05-06 Mike Frysinger <vapier@gentoo.org>
4526
4527 [BZ #4465]
4528 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4529 * tst-cancel4.c (tf_fdatasync): New test.
4530
4531 2007-04-27 Ulrich Drepper <drepper@redhat.com>
4532
4533 [BZ #4392]
4534 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4535 check mutexes like normal mutexes.
4536
4537 [BZ #4306]
4538 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4539 Initialize the whole sigevent structure to appease valgrind.
4540
4541 2007-04-25 Ulrich Drepper <drepper@redhat.com>
4542
4543 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4544 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4545
4546 2007-04-06 Ulrich Drepper <drepper@redhat.com>
4547
4548 * tst-locale1.c: Avoid warnings.
4549 * tst-locale2.c: Likewise.
4550
4551 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
4552
4553 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4554 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4555
4556 2007-03-16 Jakub Jelinek <jakub@redhat.com>
4557
4558 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4559 __extern_always_inline where appropriate.
4560 * sysdeps/pthread/pthread.h: Likewise.
4561
4562 2007-03-13 Richard Henderson <rth@redhat.com>
4563
4564 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4565 separate cfi regions for the two subsections.
4566
4567 2007-02-25 Ulrich Drepper <drepper@redhat.com>
4568
4569 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4570 new thread, don't just decrement it.
4571 Patch by Suzuki K P <suzuki@in.ibm.com>.
4572
4573 2007-02-21 Ulrich Drepper <drepper@redhat.com>
4574
4575 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4576 PTHFCT_CALL definition.
4577
4578 2007-02-18 Ulrich Drepper <drepper@redhat.com>
4579
4580 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4581 available, don't use it.
4582
4583 2007-02-09 Jakub Jelinek <jakub@redhat.com>
4584
4585 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4586 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4587 call into the kernel to delay.
4588
4589 2007-01-18 Ulrich Drepper <drepper@redhat.com>
4590
4591 * tst-initializers1.c: We want to test the initializers as seen
4592 outside of libc, so undefined _LIBC.
4593
4594 * pthread_join.c (cleanup): Avoid warning.
4595
4596 2007-01-17 Ulrich Drepper <drepper@redhat.com>
4597
4598 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4599 (__lll_timedwait_tid): Add unwind info.
4600
4601 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4602 function table, mangle the pointers.
4603 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4604 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4605 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4606 demangle pointers before use.
4607 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4608 demangle pointer.
4609 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4610 * sysdeps/pthread/setxid.h: Likewise.
4611
4612 2007-01-12 Ulrich Drepper <drepper@redhat.com>
4613
4614 * tst-rwlock7.c: Show some more information in case of correct
4615 behavior.
4616
4617 2007-01-11 Ulrich Drepper <drepper@redhat.com>
4618
4619 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4620 (lll_futex_timed_wait): Undo part of last change, don't negate
4621 return value.
4622
4623 2007-01-10 Ulrich Drepper <drepper@redhat.com>
4624
4625 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
4626 FUTEX_CMP_REQUEUE and lll_futex_requeue.
4627
4628 2006-12-28 David S. Miller <davem@davemloft.net>
4629
4630 * shlib-versions: Fix sparc64 linux target specification.
4631
4632 2007-01-10 Jakub Jelinek <jakub@redhat.com>
4633
4634 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4635 Adjust include path for pthread_barrier_wait.c move.
4636
4637 2006-12-21 Jakub Jelinek <jakub@redhat.com>
4638
4639 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4640 tid isn't reread from pd->tid in between ESRCH test and the syscall.
4641
4642 2006-12-06 Jakub Jelinek <jakub@redhat.com>
4643
4644 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4645 6 argument cancellable syscalls.
4646 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4647 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4648 6 argument cancellable syscalls.
4649 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4650
4651 2006-12-09 Ulrich Drepper <drepper@redhat.com>
4652
4653 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4654 (__rtld_mrlock_initialize): Add missing closing parenthesis.
4655
4656 2006-10-30 Jakub Jelinek <jakub@redhat.com>
4657
4658 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4659 __sync_lock_release instead of __sync_lock_release_si.
4660
4661 2006-10-29 Jakub Jelinek <jakub@redhat.com>
4662
4663 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4664 Define.
4665 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4666 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4667 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4668 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4669 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4670 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4671 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4672 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4673 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4674 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4675 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4676
4677 2006-10-27 Ulrich Drepper <drepper@redhat.com>
4678
4679 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4680 * pthread_barrier_wait.c: ...here.
4681 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4682 * pthread_cond_broadcast.c: ...here.
4683 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4684 * pthread_cond_signal.c: ...here.
4685 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4686 * pthread_cond_timedwait.c: ...here.
4687 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4688 * pthread_cond_wait.c: ...here.
4689 * sysdeps/pthread/pthread_once.c: Move to...
4690 * pthread_once.c: ...here.
4691 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4692 * pthread_rwlock_rdlock.c: ...here.
4693 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4694 * pthread_rwlock_timedrdlock.c: ...here.
4695 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4696 * pthread_rwlock_timedwrlock.c: ...here.
4697 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4698 * pthread_rwlock_unlock.c: ...here.
4699 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4700 * pthread_rwlock_wrlock.c: ...here.
4701 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4702 * pthread_spin_destroy.c: ...here.
4703 * sysdeps/pthread/pthread_spin_init.c: Move to...
4704 * pthread_spin_init.c: ...here.
4705 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4706 * pthread_spin_unlock.c: ...here.
4707 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4708 * pthread_getcpuclockid.c: ...here.
4709
4710 * init.c: USE_TLS support is now always enabled.
4711 * tst-tls5.h: Likewise.
4712 * sysdeps/alpha/tls.h: Likewise.
4713 * sysdeps/i386/tls.h: Likewise.
4714 * sysdeps/ia64/tls.h: Likewise.
4715 * sysdeps/powerpc/tls.h: Likewise.
4716 * sysdeps/s390/tls.h: Likewise.
4717 * sysdeps/sh/tls.h: Likewise.
4718 * sysdeps/sparc/tls.h: Likewise.
4719 * sysdeps/x86_64/tls.h: Likewise.
4720
4721 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4722
4723 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4724 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4725 failed.
4726
4727 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4728 Define to THREAD_SELF->header.multiple_threads.
4729 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4730 Likewise.
4731 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4732 Likewise.
4733 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4734 (SINGLE_THREAD_P): Likewise.
4735 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4736 (SINGLE_THREAD_P): Likewise.
4737 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4738 (SINGLE_THREAD_P): Likewise.
4739 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4740 (SINGLE_THREAD_P): Likewise.
4741 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4742 Likewise.
4743 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4744 (SINGLE_THREAD_P): Likewise.
4745 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4746 (SINGLE_THREAD_P): Likewise.
4747 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4748 Likewise.
4749
4750 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4751
4752 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4753 by default rather than 2_3_3.
4754
4755 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4756
4757 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4758 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4759 atomic_* instead of catomic_* macros.
4760
4761 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4762
4763 [BZ #3285]
4764 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4765 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4766 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4767 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4768 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4769 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4770 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4771 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4772 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4773 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4774 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4775 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4776 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4777
4778 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4779
4780 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4781 cancelable syscalls with six parameters.
4782
4783 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4784 operations instead of atomic_*.
4785
4786 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4787
4788 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4789
4790 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4791
4792 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4793 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4794 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4795 New file.
4796 * pthread_attr_setstack.c: Allow overwriting the version number of the
4797 new symbol.
4798 * pthread_attr_setstacksize.c: Likewise.
4799 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4800 it.
4801 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4802 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4803
4804 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4805
4806 [BZ #3251]
4807 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4808 Patch by Petr Baudis.
4809
4810 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4811
4812 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4813
4814 * tst-cancel2.c (tf): Loop as long as something was written.
4815
4816 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4817
4818 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4819 mutexes wake all mutexes.
4820 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4821 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4822 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4823
4824 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4825
4826 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4827 to guarantee the thread is always canceled.
4828
4829 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4830
4831 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4832 Include stdlib.h.
4833 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4834 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4835 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4836 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4837 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4838
4839 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4840
4841 [BZ #3123]
4842 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4843 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4844 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4845 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4846 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4847 * Makefile (tests): Add tst-cond22.
4848 * tst-cond22.c: New file.
4849
4850 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4851
4852 [BZ #3124]
4853 * descr.h (struct pthread): Add parent_cancelhandling.
4854 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4855 cancelhandling value to child.
4856 * pthread_create.c (start_thread): If parent thread was canceled
4857 reset the SIGCANCEL mask.
4858 * Makefile (tests): Add tst-cancel25.
4859 * tst-cancel25.c: New file.
4860
4861 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4862 Ulrich Drepper <drepper@redhat.com>
4863
4864 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4865 counterp if it is already zero.
4866 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4867
4868 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4869 Roland McGrath <roland@redhat.com>
4870
4871 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4872 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4873 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4874 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4875 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4876 lll_robust_mutex_timedlock, lll_mutex_unlock,
4877 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4878 Add _L_*_ symbols around the subsection.
4879 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4880 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4881
4882 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4883 Roland McGrath <roland@redhat.com>
4884
4885 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4886 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4887 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4888 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4889 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4890 lll_robust_mutex_timedlock, lll_mutex_unlock,
4891 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4892 Add _L_*_ symbols around the subsection.
4893 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4894 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4895
4896 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4897
4898 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4899 change because it can disturb too much existing code. If real hard
4900 reader preference is needed we'll introduce another type.
4901 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4902 (pthread_rwlock_timedwrlock): Likewise.
4903 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4904 Likewise.
4905
4906 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4907
4908 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4909 reader preference.
4910 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4911 (pthread_rwlock_timedwrlock): Likewise.
4912 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4913 Likewise.
4914
4915 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4916
4917 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4918 Only define ifdef SHARED.
4919
4920 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4921
4922 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4923 (free_stacks): ...here.
4924 (__free_stack_cache): New function.
4925 * pthreadP.h: Declare __free_stack_cache.
4926 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4927 ptr_freeres.
4928 * init.c (pthread_functions): Initialize ptr_freeres.
4929 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4930 New freeres function.
4931
4932 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4933
4934 [BZ #3018]
4935 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4936
4937 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4938
4939 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4940 _XOPEN_REALTIME_THREADS.
4941
4942 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4943
4944 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4945 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4946 HAVE_CLOCK_GETTIME_VSYSCALL.
4947 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4948
4949 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4950
4951 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4952 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4953 * descr.h (struct priority_protection_data): New type.
4954 (struct pthread): Add tpp field.
4955 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4956 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4957 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4958 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4959 TPP mutexes.
4960 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4961 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4962 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4963 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4964 * tpp.c: New file.
4965 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4966 boosted by TPP.
4967 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4968 * pthread_mutexattr_getprioceiling.c
4969 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4970 in the SCHED_FIFO priority range.
4971 * pthread_mutexattr_setprioceiling.c
4972 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4973 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4974 if mutex is not TPP. Ceiling is now in __data.__lock.
4975 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4976 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4977 is now in __data.__lock. Add locking.
4978 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4979 * Makefile (libpthread-routines): Add tpp.
4980 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4981 * tst-tpp.h: New file.
4982 * tst-mutexpp1.c: New file.
4983 * tst-mutexpp6.c: New file.
4984 * tst-mutexpp10.c: New file.
4985 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4986 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4987
4988 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4989
4990 [BZ #2843]
4991 * pthread_join.c (pthread_join): Account for self being canceled
4992 when checking for deadlocks.
4993 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4994 (tf1): Don't print anything after pthread_join returns, this would be
4995 another cancellation point.
4996 (tf2): Likewise.
4997 * tst-join6.c: New file.
4998 * Makefile (tests): Add tst-join6.
4999
5000 2006-08-03 Ulrich Drepper <drepper@redhat.com>
5001
5002 [BZ #2892]
5003 * pthread_setspecific.c (__pthread_setspecific): Check
5004 out-of-range index before checking for unused key.
5005
5006 * sysdeps/pthread/gai_misc.h: New file.
5007
5008 2006-08-01 Ulrich Drepper <drepper@redhat.com>
5009
5010 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
5011 file. Don't use sysctl.
5012 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
5013 overwrite the file if this is likely not true.
5014
5015 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
5016
5017 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
5018 * Makefile (tests): Add tst-getpid3.
5019 * tst-getpid3.c: New file.
5020
5021 2006-07-30 Roland McGrath <roland@redhat.com>
5022
5023 * Makefile (libpthread-routines): Add ptw-sigsuspend.
5024
5025 * sysdeps/unix/sysv/linux/i386/not-cancel.h
5026 (pause_not_cancel): New macro.
5027 (nanosleep_not_cancel): New macro.
5028 (sigsuspend_not_cancel): New macro.
5029 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
5030 nanosleep_not_cancel macro from <not-cancel.h>.
5031 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
5032 macro from <not-cancel.h>.
5033
5034 2006-07-28 Ulrich Drepper <drepper@redhat.com>
5035 Jakub Jelinek <jakub@redhat.com>
5036
5037 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
5038 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
5039 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
5040 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
5041 * pthread_mutex_init.c: Add support for priority inheritance mutex.
5042 * pthread_mutex_lock.c: Likewise.
5043 * pthread_mutex_timedlock.c: Likewise.
5044 * pthread_mutex_trylock.c: Likewise.
5045 * pthread_mutex_unlock.c: Likewise.
5046 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
5047 all mutexes.
5048 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
5049 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
5050 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
5051 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
5052 pthread-pi-defines.sym.
5053 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
5054 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
5055 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5056 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
5057 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5058 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5059 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5060 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
5061 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5062 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5063 _POSIX_THREAD_PRIO_INHERIT to 200112L.
5064 * tst-mutex1.c: Adjust to allow use in PI mutex test.
5065 * tst-mutex2.c: Likewise.
5066 * tst-mutex3.c: Likewise.
5067 * tst-mutex4.c: Likewise.
5068 * tst-mutex5.c: Likewise.
5069 * tst-mutex6.c: Likewise.
5070 * tst-mutex7.c: Likewise.
5071 * tst-mutex7a.c: Likewise.
5072 * tst-mutex8.c: Likewise.
5073 * tst-mutex9.c: Likewise.
5074 * tst-robust1.c: Likewise.
5075 * tst-robust7.c: Likewise.
5076 * tst-robust8.c: Likewise.
5077 * tst-mutexpi1.c: New file.
5078 * tst-mutexpi2.c: New file.
5079 * tst-mutexpi3.c: New file.
5080 * tst-mutexpi4.c: New file.
5081 * tst-mutexpi5.c: New file.
5082 * tst-mutexpi6.c: New file.
5083 * tst-mutexpi7.c: New file.
5084 * tst-mutexpi7a.c: New file.
5085 * tst-mutexpi8.c: New file.
5086 * tst-mutexpi9.c: New file.
5087 * tst-robust1.c: New file.
5088 * tst-robust2.c: New file.
5089 * tst-robust3.c: New file.
5090 * tst-robust4.c: New file.
5091 * tst-robust5.c: New file.
5092 * tst-robust6.c: New file.
5093 * tst-robust7.c: New file.
5094 * tst-robust8.c: New file.
5095 * Makefile (tests): Add the new tests.
5096
5097 * pthread_create.c (start_thread): Add some casts to avoid warnings.
5098 * pthread_mutex_destroy.c: Remove unneeded label.
5099
5100 2006-07-01 Ulrich Drepper <drepper@redhat.com>
5101
5102 * pthread_mutex_init.c (__pthread_mutex_init): Move some
5103 computations to compile time.
5104
5105 2006-06-04 Ulrich Drepper <drepper@redhat.com>
5106
5107 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
5108
5109 2006-05-15 Ulrich Drepper <drepper@redhat.com>
5110
5111 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
5112
5113 2006-05-11 Ulrich Drepper <drepper@redhat.com>
5114
5115 * pthread_key_create.c (__pthread_key_create): Do away with
5116 __pthread_keys_lock.
5117
5118 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5119 (__kernel_cpumask_size): Mark as hidden.
5120 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5121
5122 * sem_open.c (__sem_mappings_lock): Mark as hidden.
5123 * semaphoreP.h (__sem_mappings_lock): Likewise.
5124
5125 2006-05-10 Ulrich Drepper <drepper@redhat.com>
5126
5127 * pthread_atfork.c: Mark __dso_handle as hidden.
5128
5129 2006-05-09 Ulrich Drepper <drepper@redhat.com>
5130
5131 [BZ #2644]
5132 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
5133 the reload problem. Change the one path in pthread_cancel_init
5134 which causes the problem. Force gcc to reload. Simplify callers.
5135 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
5136 (_Unwind_GetBSP): Undo last patch.
5137
5138 2006-05-07 Ulrich Drepper <drepper@redhat.com>
5139
5140 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
5141 function pointer is reloaded after pthread_cancel_init calls.
5142
5143 [BZ #2644]
5144 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
5145 pointers are reloaded after pthread_cancel_init calls.
5146
5147 2006-05-01 Ulrich Drepper <drepper@redhat.com>
5148
5149 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
5150 __always_inline.
5151
5152 2006-04-27 Ulrich Drepper <drepper@redhat.com>
5153
5154 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5155 Allocate new object which is passed to timer_sigev_thread so that
5156 the timer can be deleted before the new thread is scheduled.
5157
5158 2006-04-26 Roland McGrath <roland@redhat.com>
5159
5160 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
5161
5162 2006-04-08 Ulrich Drepper <drepper@redhat.com>
5163
5164 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
5165 suffix for conditional jumps.
5166 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5167 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5168 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5169 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5170 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5171 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5172
5173 * init.c (sigcancel_handler): Compare with correct PID even if the
5174 thread is in the middle of a fork call.
5175 (sighandler_setxid): Likewise.
5176 Reported by Suzuki K P <suzuki@in.ibm.com> .
5177
5178 2006-04-07 Jakub Jelinek <jakub@redhat.com>
5179
5180 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
5181
5182 2006-04-06 Ulrich Drepper <drepper@redhat.com>
5183
5184 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
5185 fails [Coverity CID 105].
5186
5187 2006-04-05 Ulrich Drepper <drepper@redhat.com>
5188
5189 * sysdeps/pthread/pthread.h: Add nonnull attributes.
5190
5191 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
5192
5193 [BZ #2505]
5194 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
5195 Define __lll_rel_instr using lwsync.
5196
5197 2006-03-27 Ulrich Drepper <drepper@redhat.com>
5198
5199 * allocatestack.c (allocate_stack): Always initialize robust_head.
5200 * descr.h: Define struct robust_list_head.
5201 (struct pthread): Use robust_list_head in robust mutex list definition.
5202 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
5203 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
5204 (__pthread_initialize_minimal_internal): Register robust_list with
5205 the kernel.
5206 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
5207 Declare __set_robust_list_avail.
5208 * pthread_create.c (start_thread): Register robust_list of new thread.
5209 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
5210 waiters.
5211 * pthread_mutex_destroy.c: For robust mutexes don't look at the
5212 number of users, it's unreliable.
5213 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
5214 set_robust_list syscall is available.
5215 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
5216 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
5217 Set robust_head.list_op_pending before trying to lock a robust mutex.
5218 * pthread_mutex_timedlock.c: Likewise.
5219 * pthread_mutex_trylock.c: Likewise.
5220 * pthread_mutex_unlock.c: Likewise for unlocking.
5221 * Makefile (tests): Add tst-robust8.
5222 * tst-robust8.c: New file.
5223
5224 2006-03-08 Andreas Schwab <schwab@suse.de>
5225
5226 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5227 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5228
5229 2006-03-05 Roland McGrath <roland@redhat.com>
5230
5231 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5232 and $config_os doesn't match *linux*.
5233
5234 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
5235
5236 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5237 Use __syscall_error.
5238 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5239 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5240 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5241 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5242 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5243 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5244
5245 2006-03-02 Ulrich Drepper <drepper@redhat.com>
5246
5247 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5248
5249 2006-03-01 Ulrich Drepper <drepper@redhat.com>
5250
5251 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5252 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5253 mutex.
5254 (__lll_robust_timedlock_wait): Likewise.
5255 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5256 (__lll_robust_lock_wait): Likewise.
5257 (__lll_robust_timedlock_wait): Likewise.
5258 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5259 (__lll_robust_lock_wait): Likewise.
5260 (__lll_robust_timedlock_wait): Likewise.
5261
5262 2006-03-01 Jakub Jelinek <jakub@redhat.com>
5263
5264 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5265 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5266 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5267 lll_robust_mutex_unlock): Define.
5268 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5269
5270 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
5271
5272 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5273 instead of <clone.S>.
5274
5275 2006-02-27 Jakub Jelinek <jakub@redhat.com>
5276
5277 * Makefile (libpthread-routines): Add
5278 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5279 and pthread_mutex_[sg]etprioceiling.
5280 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5281 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5282 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5283 pthread_mutex_setprioceiling.
5284 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5285 PTHREAD_PRIO_PROTECT): New enum values.
5286 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5287 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5288 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5289 prototypes.
5290 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5291 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5292 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5293 Define.
5294 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5295 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5296 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5297 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5298 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5299 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5300 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5301 protocol mutexes.
5302 * pthread_mutex_getprioceiling.c: New file.
5303 * pthread_mutex_setprioceiling.c: New file.
5304 * pthread_mutexattr_getprioceiling.c: New file.
5305 * pthread_mutexattr_setprioceiling.c: New file.
5306 * pthread_mutexattr_getprotocol.c: New file.
5307 * pthread_mutexattr_setprotocol.c: New file.
5308
5309 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5310
5311 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5312
5313 2006-02-27 Roland McGrath <roland@redhat.com>
5314
5315 * sysdeps/pthread/Subdirs: List nptl here too.
5316 * configure (libc_add_on_canonical): New variable.
5317
5318 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5319
5320 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5321 self to get main source tree's file.
5322 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5323 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5324 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5325 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5326 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5327 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5328 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5329 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5330 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5331 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5332 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5333 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5334 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5335
5336 * Makefile: Use $(sysdirs) in vpath directive.
5337
5338 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5339 (CPPFLAGS-timer_routines.c): Likewise.
5340
5341 * Makeconfig (includes): Variable removed.
5342
5343 2006-02-26 Roland McGrath <roland@redhat.com>
5344
5345 * sysdeps/generic/pt-raise.c: Moved to ...
5346 * pt-raise.c: ... here.
5347 * sysdeps/generic/lowlevellock.h: Moved to ...
5348 * lowlevellock.h: ... here.
5349
5350 2006-02-23 Roland McGrath <roland@redhat.com>
5351
5352 * descr.h (struct pthread): Add final member `end_padding'.
5353 (PTHREAD_STRUCT_END_PADDING): Use it.
5354
5355 2006-02-20 Roland McGrath <roland@redhat.com>
5356
5357 * sysdeps/mips: Directory removed, saved in ports repository.
5358 * sysdeps/unix/sysv/linux/mips: Likewise.
5359
5360 2006-02-18 Ulrich Drepper <drepper@redhat.com>
5361
5362 * tst-robust1.c: Add second mutex to check that the mutex list is
5363 handled correctly.
5364
5365 2006-02-17 Jakub Jelinek <jakub@redhat.com>
5366
5367 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5368 lll_robust_mutex_trylock, lll_robust_mutex_lock,
5369 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5370 lll_robust_mutex_unlock): New macros.
5371 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5372 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5373 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5374 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5375 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5376
5377 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5378
5379 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5380 definitions.
5381 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5382
5383 2006-02-17 Ulrich Drepper <drepper@redhat.com>
5384
5385 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5386 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5387 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5388 (lll_robust_mutex_unlock): Likewise.
5389
5390 2006-02-13 Jakub Jelinek <jakub@redhat.com>
5391
5392 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5393 Set robust_list.__next rather than robust_list.
5394 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5395 (__pthread_list_t): New typedef.
5396 (pthread_mutex_t): Replace __next and __prev fields with __list.
5397 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5398 (__pthread_list_t): New typedef.
5399 (pthread_mutex_t): Replace __next and __prev fields with __list.
5400 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5401 (__pthread_list_t, __pthread_slist_t): New typedefs.
5402 (pthread_mutex_t): Replace __next and __prev fields with __list.
5403 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5404 (__pthread_list_t, __pthread_slist_t): New typedefs.
5405 (pthread_mutex_t): Replace __next and __prev fields with __list.
5406 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5407 (__pthread_list_t, __pthread_slist_t): New typedefs.
5408 (pthread_mutex_t): Replace __next and __prev fields with __list.
5409 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5410 (__pthread_slist_t): New typedef.
5411 (pthread_mutex_t): Replace __next field with __list.
5412
5413 2006-02-15 Ulrich Drepper <drepper@redhat.com>
5414
5415 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5416 PTHREAD_MUTEX_OWNERDEAD.
5417 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5418 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5419 * Makefile (libpthread-routines): Add lowlevelrobustlock.
5420 * pthread_create.c (start_thread): Very much simplify robust_list loop.
5421 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5422 to PTHREAD_MUTEX_INCONSISTENT.
5423 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5424 * pthread_mutex_lock.c: Reimplement robust mutex handling.
5425 * pthread_mutex_trylock.c: Likewise.
5426 * pthread_mutex_timedlock.c: Likewise.
5427 * pthread_mutex_unlock.c: Likewise.
5428 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5429 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5430 lowlevelrobustlock.sym.
5431 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5432 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5433 definitions.
5434 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5435 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5436 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5437 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5438 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5439
5440 2006-02-12 Ulrich Drepper <drepper@redhat.com>
5441
5442 * allocatestack.c (allocate_stack): Initialize robust_list.
5443 * init.c (__pthread_initialize_minimal_internal): Likewise.
5444 * descr.h (struct xid_command): Pretty printing.
5445 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5446 robust_list. Adjust macros.
5447 * pthread_create.c (start_thread): Adjust robust_list handling.
5448 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5449 but the owner for all robust mutex types.
5450 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5451 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
5452 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5453 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5454
5455 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5456 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5457
5458 2006-02-08 Jakub Jelinek <jakub@redhat.com>
5459
5460 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5461 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5462
5463 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5464
5465 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5466 Return status.
5467 (lll_futex_timed_wait): Define.
5468
5469 2006-01-19 Ulrich Drepper <drepper@redhat.com>
5470
5471 * tst-cancel4.c: Test ppoll.
5472
5473 2006-01-18 Andreas Jaeger <aj@suse.de>
5474
5475 [BZ #2167]
5476 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5477 (pthread_mutex_t): Follow changes for other archs. Based on patch
5478 by Jim Gifford <patches@jg555.com>.
5479
5480 2006-01-13 Richard Henderson <rth@redhat.com>
5481
5482 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5483
5484 2006-01-10 Roland McGrath <roland@redhat.com>
5485
5486 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5487 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5488 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5489 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5490 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5491 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5492 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5493 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5494 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5495 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5496
5497 2006-01-09 Roland McGrath <roland@redhat.com>
5498
5499 * tst-initializers1-c89.c: New file.
5500 * tst-initializers1-c99.c: New file.
5501 * tst-initializers1-gnu89.c: New file.
5502 * tst-initializers1-gnu99.c: New file.
5503 * Makefile (tests): Add them.
5504 (CFLAGS-tst-initializers1-c89.c): New variable.
5505 (CFLAGS-tst-initializers1-c99.c): New variable.
5506 (CFLAGS-tst-initializers1-gnu89.c): New variable.
5507 (CFLAGS-tst-initializers1-gnu99.c): New variable.
5508
5509 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5510 Use __extension__ on anonymous union definition.
5511 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5512 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5513 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5514 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5515 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5516
5517 2006-01-08 Jakub Jelinek <jakub@redhat.com>
5518
5519 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5520 Don't give the union a name because it changes the mangled name.
5521 Instead name the struct for __data.
5522 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5523 Likewise.
5524 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5525 Likewise.
5526
5527 2006-01-09 Jakub Jelinek <jakub@redhat.com>
5528
5529 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5530 stack bias to mc_ftp field.
5531
5532 2006-01-07 Ulrich Drepper <drepper@redhat.com>
5533
5534 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5535 being too clever and reloading the futex value where it shouldn't.
5536
5537 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5538
5539 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5540 correct type.
5541
5542 2006-01-06 Jakub Jelinek <jakub@redhat.com>
5543
5544 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5545 Add cfi directives.
5546
5547 2006-01-06 Ulrich Drepper <drepper@redhat.com>
5548
5549 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5550 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5551 rename in tcbhead_t.
5552
5553 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5554 Don't give the union a name because it changes the mangled name.
5555 Instead name the struct for __data.
5556 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5557 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5558 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5559 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5560 * pthread_create.c (start_thread): Adjust robust mutex free loop.
5561 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5562
5563 2006-01-05 Ulrich Drepper <drepper@redhat.com>
5564
5565 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5566 Return status.
5567 (lll_futex_timed_wait): Define.
5568 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5569 * sysdeps/pthread/aio_misc.h: New file.
5570
5571 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
5572
5573 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5574
5575 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
5576
5577 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5578 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5579 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5580
5581 2006-01-04 Ulrich Drepper <drepper@redhat.com>
5582
5583 * tst-cancel24.cc: Use C headers instead of C++ headers.
5584
5585 2006-01-03 Jakub Jelinek <jakub@redhat.com>
5586
5587 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5588 sparc-linux configured glibc.
5589 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5590 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5591 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5592 atomic_compare_and_exchange_val_24_acq instead of
5593 atomic_compare_and_exchange_val_acq.
5594 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5595 instead of atomic_exchange_rel.
5596 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5597 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5598 file.
5599 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5600 file.
5601 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5602 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5603 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5604 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5605 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5606 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5607 New file.
5608 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5609 New file.
5610 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5611 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5612 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5613 file.
5614 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5615 file.
5616 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5617
5618 2006-01-03 Ulrich Drepper <drepper@redhat.com>
5619
5620 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5621 mutex initializers.
5622
5623 2006-01-02 Jakub Jelinek <jakub@redhat.com>
5624
5625 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5626 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5627 THREAD_COPY_POINTER_GUARD): Define.
5628 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5629 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5630
5631 2006-01-01 Ulrich Drepper <drepper@redhat.com>
5632
5633 * version.c: Update copyright year.
5634
5635 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5636
5637 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5638 .eh_frame section, use cfi_* directives.
5639 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5640
5641 2005-12-30 Ulrich Drepper <drepper@redhat.com>
5642
5643 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5644 now.
5645
5646 2005-12-29 Ulrich Drepper <drepper@redhat.com>
5647
5648 * sysdeps/pthread/sigaction.c: Removed.
5649 * sigaction.c: New file.
5650 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5651
5652 2005-12-28 Ulrich Drepper <drepper@redhat.com>
5653
5654 * Makefile (tests): Add tst-signal7.
5655 * tst-signal7.c: New file.
5656
5657 2005-12-27 Roland McGrath <roland@redhat.com>
5658
5659 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5660 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5661 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5662 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5663 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5664 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5665 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5666 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5667 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5668 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5669 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5670
5671 2005-12-27 Jakub Jelinek <jakub@redhat.com>
5672
5673 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5674 and __prev field to pthread_mutex_t.
5675 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5676 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5677 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5678 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5679 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5680 to pthread_mutex_t.
5681
5682 2005-12-26 Ulrich Drepper <drepper@redhat.com>
5683
5684 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5685 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5686 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5687 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5688 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5689 and PTHREAD_MUTEXATTR_FLAG_BITS.
5690 * descr.h (struct pthread): Add robust_list field and define
5691 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5692 * pthread_mutexattr_getrobust.c: New file.
5693 * pthread_mutexattr_setrobust.c: New file.
5694 * pthread_mutex_consistent.c: New file.
5695 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5696 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5697 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5698 Adjust pthread_mutex_t initializers.
5699 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5700 field to pthread_mutex_t.
5701 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5702 and __prev field to pthread_mutex_t.
5703 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5704 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5705 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5706 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5707 * pthread_mutexattr_gettype.c: Likewise.
5708 * pthread_mutexattr_setpshared.c: Likewise.
5709 * pthread_mutexattr_settype.c: Likewise.
5710 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5711 Initialize mutex kind according to robust flag.
5712 * pthread_mutex_lock.c: Implement local robust mutex.
5713 * pthread_mutex_timedlock.c: Likewise.
5714 * pthread_mutex_trylock.c: Likewise.
5715 * pthread_mutex_unlock.c: Likewise.
5716 * pthread_create.c (start_thread): Mark robust mutexes which remained
5717 locked as dead.
5718 * tst-robust1.c: New file.
5719 * tst-robust2.c: New file.
5720 * tst-robust3.c: New file.
5721 * tst-robust4.c: New file.
5722 * tst-robust5.c: New file.
5723 * tst-robust6.c: New file.
5724 * tst-robust7.c: New file.
5725 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5726 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5727 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5728 tst-robust5, tst-robust6, and tst-robust7.
5729
5730 * tst-typesizes.c: New file.
5731 * Makefile (tests): Add tst-typesizes.
5732
5733 * tst-once3.c: More debug output.
5734
5735 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5736
5737 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5738 missing after last change.
5739
5740 * version.c: Update copyright year.
5741
5742 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5743
5744 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5745 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5746 * pthread_mutex_trylock.c: Likewise.
5747 * pthread_mutex_timedlock.c: Likewise.
5748 * pthread_mutex_unlock.c: Likewise.
5749
5750 2005-12-22 Roland McGrath <roland@redhat.com>
5751
5752 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5753 so that #include_next's search location is not reset to the -I..
5754 directory where <nptl/...> can be found.
5755
5756 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5757
5758 [BZ #1913]
5759 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5760 Fix unwind info. Remove useless branch prediction prefix.
5761 * tst-cancel24.cc: New file.
5762 * Makefile: Add rules to build and run tst-cancel24.
5763
5764 2005-12-21 Roland McGrath <roland@redhat.com>
5765
5766 * libc-cancellation.c: Use <> rather than "" #includes.
5767 * pt-cleanup.c: Likewise.
5768 * pthread_create.c: Likewise.
5769 * pthread_join.c: Likewise.
5770 * pthread_timedjoin.c: Likewise.
5771 * pthread_tryjoin.c: Likewise.
5772 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5773 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5774 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5775 * unwind.c: Likewise.
5776
5777 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5778
5779 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5780 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5781 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5782 THREAD_COPY_POINTER_GUARD): Define.
5783
5784 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5785
5786 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5787 rather than one.
5788 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5789 THREAD_COPY_POINTER_GUARD): Define.
5790 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5791 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5792 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5793 THREAD_COPY_POINTER_GUARD): Define.
5794 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5795 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5796 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5797 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5798 Use PTR_DEMANGLE for B0 if defined.
5799
5800 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5801
5802 * pthread_create.c (__pthread_create_2_1): Use
5803 THREAD_COPY_POINTER_GUARD if available.
5804 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5805 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5806 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5807 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5808 * sysdeps/x86_64/tls.h: Likewise.
5809
5810 2005-12-15 Roland McGrath <roland@redhat.com>
5811
5812 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5813
5814 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5815
5816 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5817 sysdeps/generic.
5818 * errno-loc.c: New file.
5819
5820 2005-12-12 Roland McGrath <roland@redhat.com>
5821
5822 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5823 adjustments before choosing stack size. Update minimum stack size
5824 calculation to match allocate_stack change.
5825
5826 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5827
5828 * allocatestack.c (allocate_stack): Don't demand that there is an
5829 additional full page available on the stack beside guard, TLS, the
5830 minimum stack.
5831
5832 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5833
5834 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5835 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5836
5837 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5838 compiling 32-bit code we must define __cleanup_fct_attribute.
5839
5840 005-11-24 Jakub Jelinek <jakub@redhat.com>
5841
5842 [BZ #1920]
5843 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5844 __attribute__ instead of __attribute.
5845 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5846 (__cleanup_fct_attribute): Likewise.
5847
5848 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5849
5850 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5851 a write barrier before writing libgcc_s_getcfa.
5852
5853 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5854
5855 * sysdeps/unix/sysv/linux/configure: Removed.
5856
5857 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5858
5859 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5860 optional init_array/fini_array support.
5861
5862 2005-10-24 Roland McGrath <roland@redhat.com>
5863
5864 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5865 versioned_symbol use.
5866
5867 2005-10-16 Roland McGrath <roland@redhat.com>
5868
5869 * init.c (__pthread_initialize_minimal_internal): Even when using a
5870 compile-time default stack size, apply the minimum that allocate_stack
5871 will require, and round up to page size.
5872
5873 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5874
5875 * Makefile ($(test-modules)): Remove static pattern rule.
5876
5877 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5878 Ulrich Drepper <drepper@redhat.com>
5879
5880 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5881 alignment in callback function.
5882 * Makefile: Add rules to build and run tst-align3.
5883 * tst-align3.c: New file.
5884
5885 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5886
5887 * allocatestack.c (setxid_signal_thread): Add
5888 INTERNAL_SYSCALL_DECL (err).
5889
5890 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5891
5892 * allocatestack.c (setxid_signal_thread): Need to use
5893 atomic_compare_and_exchange_bool_acq.
5894
5895 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5896 Jakub Jelinek <jakub@redhat.com>
5897
5898 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5899 CANCEL_RESTMASK.
5900 (struct pthread): Move specific_used field to avoid padding.
5901 Add setxid_futex field.
5902 * init.c (sighandler_setxid): Reset setxid flag and release the
5903 setxid futex.
5904 * allocatestack.c (setxid_signal_thread): New function. Broken
5905 out of the bodies of the two loops in __nptl_setxid. For undetached
5906 threads check whether they are exiting and if yes, don't send a signal.
5907 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5908 * pthread_create.c (start_thread): For undetached threads, check
5909 whether setxid bit is set. If yes, wait until signal has been
5910 processed.
5911
5912 * allocatestack.c (STACK_VARIABLES): Initialize them.
5913 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5914
5915 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5916
5917 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5918 waiters, awake all waiters on the associated mutex.
5919
5920 2005-09-22 Roland McGrath <roland@redhat.com>
5921
5922 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5923 ../sysdeps/x86_64/hp-timing.h).
5924
5925 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5926
5927 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5928 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5929 (lll_futex_wake_unlock): Define.
5930 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5931 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5932 (lll_futex_wake_unlock): Define.
5933 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5934 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5935 (lll_futex_wake_unlock): Define.
5936 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5937 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5938 (lll_futex_wake_unlock): Define.
5939 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5940 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5941 (lll_futex_wake_unlock): Define.
5942 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5943 lll_futex_wake_unlock.
5944 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5945 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5946 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5947 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5948 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5949 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5950
5951 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5952
5953 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5954 Fix typo in register name.
5955
5956 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5957
5958 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5959 Use __sigfillset. Document that sigfillset does the right thing wrt
5960 to SIGSETXID.
5961
5962 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5963
5964 [BZ #1102]
5965 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5966 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5967 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5968 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5969 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5970 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5971 in the structure.
5972 * Makefile (tests): Add tst-initializers1.
5973 (CFLAGS-tst-initializers1.c): Set.
5974 * tst-initializers1.c: New test.
5975
5976 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5977
5978 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5979 Make sure __flags are located at offset 48 from the start of the
5980 structure.
5981
5982 2005-07-02 Roland McGrath <roland@redhat.com>
5983
5984 * Makeconfig: Comment fix.
5985
5986 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5987
5988 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5989 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5990 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5991 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5992 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5993 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5994 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5995 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5996 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5997 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5998
5999 2005-06-25 Jakub Jelinek <jakub@redhat.com>
6000
6001 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
6002 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6003 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
6004 fields.
6005 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6006 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
6007 field. Put in sysinfo field unconditionally.
6008 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6009 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
6010 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6011 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
6012 fields.
6013 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6014 * pthread_create.c (__pthread_create_2_1): Use
6015 THREAD_COPY_STACK_GUARD macro.
6016 * Makefile: Add rules to build and run tst-stackguard1{,-static}
6017 tests.
6018 * tst-stackguard1.c: New file.
6019 * tst-stackguard1-static.c: New file.
6020
6021 2005-06-14 Alan Modra <amodra@bigpond.net.au>
6022
6023 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6024 Invoke CGOTSETUP and CGOTRESTORE.
6025 (CGOTSETUP, CGOTRESTORE): Define.
6026
6027 2005-05-29 Richard Henderson <rth@redhat.com>
6028
6029 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
6030 (tf_write, tf_writev): Use it.
6031 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
6032 the system minimum.
6033
6034 2005-05-23 Jakub Jelinek <jakub@redhat.com>
6035
6036 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6037 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
6038 __librt_*_asynccancel@local.
6039
6040 2005-05-17 Alan Modra <amodra@bigpond.net.au>
6041
6042 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
6043 all occurrences of JUMPTARGET. Instead append @local to labels.
6044
6045 2005-05-20 Jakub Jelinek <jakub@redhat.com>
6046
6047 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
6048 size/alignment of struct pthread rather than tcbhead_t.
6049 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6050 Likewise.
6051 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6052 Likewise.
6053 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6054 Likewise.
6055
6056 2005-05-19 Richard Henderson <rth@redhat.com>
6057
6058 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
6059 __sync_val_compare_and_swap, not explicit _si variant.
6060 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
6061
6062 2005-05-03 Ulrich Drepper <drepper@redhat.com>
6063
6064 [BZ #915]
6065 * sysdeps/pthread/pthread.h: Avoid empty initializers.
6066
6067 2005-05-03 Jakub Jelinek <jakub@redhat.com>
6068
6069 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
6070 .eh_frame section, use cfi_* directives.
6071
6072 2005-04-27 Jakub Jelinek <jakub@redhat.com>
6073
6074 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
6075 of "" includes.
6076
6077 2005-04-27 Ulrich Drepper <drepper@redhat.com>
6078
6079 [BZ #1075]
6080 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
6081 aio_write blocks.
6082
6083 2005-04-27 Roland McGrath <roland@redhat.com>
6084
6085 * Makefile (tests): Remove tst-clock2.
6086
6087 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
6088 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
6089 translating to the kernel clockid_t for our own process/thread clock.
6090
6091 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
6092
6093 2005-04-15 Jakub Jelinek <jakub@redhat.com>
6094
6095 * old_pthread_cond_init.c: Include <errno.h>.
6096 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
6097 process shared or uses clock other than CLOCK_REALTIME.
6098 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
6099
6100 2005-04-13 David S. Miller <davem@davemloft.net>
6101
6102 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
6103 * sysdeps/sparc/sparc64/clone.S: New file.
6104
6105 2005-04-05 Jakub Jelinek <jakub@redhat.com>
6106
6107 [BZ #1102]
6108 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
6109 __inline instead of inline.
6110 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
6111
6112 2005-03-31 Jakub Jelinek <jakub@redhat.com>
6113
6114 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
6115 functionally equivalent, but shorter instructions.
6116 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6117 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6118 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6119 Likewise.
6120 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
6121 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6122 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6123 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6124 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6125 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6126 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6127 Likewise.
6128 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6129 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6130 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6131 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6132 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6133
6134 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
6135
6136 * sysdeps/mips/Makefile: New file.
6137 * sysdeps/mips/nptl-sysdep.S: New file.
6138 * sysdeps/mips/tcb-offsets.sym: New file.
6139 * sysdeps/mips/pthread_spin_lock.S: New file.
6140 * sysdeps/mips/pthread_spin_trylock.S: New file.
6141 * sysdeps/mips/pthreaddef.h: New file.
6142 * sysdeps/mips/tls.h: New file.
6143 * sysdeps/mips/jmpbuf-unwind.h: New file.
6144 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
6145 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
6146 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
6147 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
6148 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
6149 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
6150 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
6151 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
6152 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
6153 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
6154
6155 2005-03-23 Ulrich Drepper <drepper@redhat.com>
6156
6157 [BZ #1112]
6158 * pthread_create.c (__pthread_create_2_1): Rename syscall error
6159 variable to scerr.
6160
6161 2005-03-10 Jakub Jelinek <jakub@redhat.com>
6162
6163 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
6164
6165 2005-02-25 Roland McGrath <roland@redhat.com>
6166
6167 * alloca_cutoff.c: Correct license text.
6168 * tst-unload.c: Likewise.
6169 * sysdeps/pthread/allocalim.h: Likewise.
6170 * sysdeps/pthread/pt-initfini.c: Likewise.
6171 * sysdeps/pthread/bits/libc-lock.h: Likewise.
6172 * sysdeps/pthread/bits/sigthread.h: Likewise.
6173 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
6174 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6175
6176 2005-02-16 Roland McGrath <roland@redhat.com>
6177
6178 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6179 Use unsigned int * for ptr_nthreads.
6180
6181 2005-02-14 Alan Modra <amodra@bigpond.net.au>
6182
6183 [BZ #721]
6184 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
6185 gcc4.
6186
6187 2005-02-07 Richard Henderson <rth@redhat.com>
6188
6189 [BZ #787]
6190 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
6191 argument.
6192
6193 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
6194
6195 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
6196 order of arguments in invocation of atomic_add_zero.
6197
6198 2005-01-26 Jakub Jelinek <jakub@redhat.com>
6199
6200 [BZ #737]
6201 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
6202 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
6203 at least gotntpoff relocation and addition.
6204 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6205 Likewise.
6206 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6207 Likewise.
6208 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6209 Likewise.
6210
6211 2005-01-06 Ulrich Drepper <drepper@redhat.com>
6212
6213 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
6214 entry for static tls deallocation fix.
6215 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
6216 also contains information whether the memory pointed to is static
6217 TLS or not.
6218 * sysdeps/i386/tls.h: Likewise.
6219 * sysdeps/ia64/tls.h: Likewise.
6220 * sysdeps/powerpc/tls.h: Likewise.
6221 * sysdeps/s390/tls.h: Likewise.
6222 * sysdeps/sh/tls.h: Likewise.
6223 * sysdeps/sparc/tls.h: Likewise.
6224 * sysdeps/x86_64/tls.h: Likewise.
6225
6226 2004-12-27 Ulrich Drepper <drepper@redhat.com>
6227
6228 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6229
6230 2004-12-21 Jakub Jelinek <jakub@redhat.com>
6231
6232 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6233 %esp.
6234 * Makefile (tests): Add tst-align2.
6235 * tst-align2.c: New test.
6236 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6237 -mpreferred-stack-boundary=4.
6238
6239 2004-12-18 Roland McGrath <roland@redhat.com>
6240
6241 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6242 New file removed withdrawn for the moment.
6243
6244 2004-12-17 Richard Henderson <rth@redhat.com>
6245
6246 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6247 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6248
6249 2004-12-16 Ulrich Drepper <drepper@redhat.com>
6250
6251 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6252 Increased PTHREAD_STACK_MIN.
6253
6254 * tst-context1.c (stacks): Use bigger stack size.
6255
6256 2004-12-16 Jakub Jelinek <jakub@redhat.com>
6257
6258 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6259 * sysdeps/sparc/tcb-offsets.sym: Add TID.
6260
6261 2004-12-15 Jakub Jelinek <jakub@redhat.com>
6262
6263 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6264 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6265 * sysdeps/s390/tcb-offsets.sym (TID): Add.
6266
6267 2004-12-15 Ulrich Drepper <drepper@redhat.com>
6268
6269 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6270
6271 2004-12-14 Ulrich Drepper <drepper@redhat.com>
6272
6273 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6274 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6275
6276 * tst-getpid1.c: If child crashes, report this first. Print which
6277 signal.
6278
6279 2004-12-09 Ulrich Drepper <drepper@redhat.com>
6280
6281 * init.c (__pthread_initialize_minimal_internal): Also unblock
6282 SIGSETXID.
6283
6284 2004-12-01 Jakub Jelinek <jakub@redhat.com>
6285
6286 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6287 _POSIX_THREAD_CPUTIME): Define to 0.
6288 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6289 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6290 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6291 __timer_signal_thread_tclk): Remove.
6292 (init_module): Remove their initialization.
6293 (thread_cleanup): Remove their cleanup assertions.
6294 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6295 __timer_signal_thread_tclk): Remove.
6296 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6297 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6298 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6299
6300 2004-12-07 Jakub Jelinek <jakub@redhat.com>
6301
6302 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6303 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6304
6305 * Makefile (tests): Add tst-getpid2.
6306 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6307 (do_test): Use it. Use __clone2 instead of clone on ia64.
6308 * tst-getpid2.c: New test.
6309
6310 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6311
6312 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6313
6314 2004-12-04 Ulrich Drepper <drepper@redhat.com>
6315
6316 * Makefile (tests): Add tst-getpid1.
6317 * tst-getpid1.c: New file.
6318 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6319 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6320
6321 2004-12-02 Roland McGrath <roland@redhat.com>
6322
6323 * Makefile (libpthread-nonshared): Variable removed.
6324 ($(objpfx)libpthread_nonshared.a): Target removed.
6325 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6326 These are now handled by generic magic from
6327 libpthread-static-only-routines being set.
6328
6329 2004-11-27 Ulrich Drepper <drepper@redhat.com>
6330
6331 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6332 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6333 _POSIX_THREAD_PRIO_PROTECT): Define.
6334 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6335 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6336 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6337
6338 2004-11-26 Jakub Jelinek <jakub@redhat.com>
6339
6340 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6341 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6342 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6343 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6344 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6345 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6346 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6347
6348 2004-11-24 Ulrich Drepper <drepper@redhat.com>
6349
6350 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6351
6352 * Makefile (libpthread-routines): Add pthread_setschedprio.
6353 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6354 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6355 * pthread_setschedprio.c: New file.
6356
6357 2004-11-20 Jakub Jelinek <jakub@redhat.com>
6358
6359 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6360 * pthread_cancel.c (pthread_create): Likewise.
6361
6362 * Makefile (libpthread-routines): Add vars.
6363 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6364 * init.c (__default_stacksize, __is_smp): Remove.
6365 * vars.c: New file.
6366 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6367 and define a wrapper macro.
6368 (PTHREAD_STATIC_FN_REQUIRE): Define.
6369 * allocatestack.c (__find_thread_by_id): Undefine.
6370 * pthread_create (__pthread_keys): Remove.
6371 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6372 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6373 PTHREAD_STATIC_FN_REQUIRE.
6374
6375 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6376
6377 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6378 parameter to REGISTER macro.
6379
6380 2004-11-17 Roland McGrath <roland@redhat.com>
6381
6382 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6383 Make sure SIGCANCEL is blocked as well.
6384
6385 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6386
6387 * sysdeps/pthread/setxid.h: New file.
6388 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6389 (struct xid_command): Add forward decl.
6390 (struct pthread_functions): Change return type of __nptl_setxid hook
6391 to int.
6392 * pthreadP.h (__nptl_setxid): Change return type to int.
6393 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6394 calling thread, return its return value and set errno on failure.
6395 * descr.h (struct xid_command): Change id type to long array.
6396
6397 * Makefile: Add rules to build and test tst-setuid1 and
6398 tst-setuid1-static.
6399 * tst-setuid1.c: New test.
6400 * tst-setuid1-static.c: New test.
6401
6402 2004-11-10 Jakub Jelinek <jakub@redhat.com>
6403
6404 * Makefile (tests): Add tst-exit3.
6405 * tst-exit3.c: New test.
6406
6407 2004-11-09 Ulrich Drepper <drepper@redhat.com>
6408
6409 * Makefile (tests): Add tst-exit2.
6410 * tst-exit2.c: New file.
6411
6412 2004-11-09 Roland McGrath <roland@redhat.com>
6413
6414 [BZ #530]
6415 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6416 here, before calling clone.
6417 * pthread_create.c (start_thread): Don't do it here.
6418
6419 2004-11-02 Jakub Jelinek <jakub@redhat.com>
6420
6421 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6422
6423 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6424
6425 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6426 Set ETIMEDOUT to errno when time is up. Tweak to avoid
6427 assembler warning.
6428
6429 2004-10-28 Jakub Jelinek <jakub@redhat.com>
6430
6431 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6432 if sched_priority is not between minprio and maxprio.
6433
6434 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6435
6436 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6437 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6438
6439 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6440 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6441
6442 2004-10-24 Ulrich Drepper <drepper@redhat.com>
6443
6444 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6445 not-cancelable I/O functions.
6446
6447 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6448
6449 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6450 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6451 make sure 2 is stored in the futex and we looked at the old value.
6452 Fix a few other problems to return the correct value.
6453
6454 2004-10-14 Richard Henderson <rth@redhat.com>
6455
6456 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6457 make gcc4 happy.
6458
6459 2004-10-06 Jakub Jelinek <jakub@redhat.com>
6460
6461 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6462 of pthread-functions.h and pthreaddef.h.
6463 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6464
6465 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6466 Change __data.__nwaiters from int to unsigned int.
6467
6468 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6469 sysconf (_SC_THREAD_CPUTIME) returns negative value.
6470
6471 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6472 before return type.
6473
6474 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6475 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6476
6477 2004-10-06 Ulrich Drepper <drepper@redhat.com>
6478
6479 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
6480 test fails, remove message queue.
6481 (tf_msgsnd): Likewise.
6482
6483 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6484
6485 * tst-clock1.c: Change #ifdef to #if defined.
6486 * tst-clock2.c: Likewise.
6487 * tst-cond11.c: Likewise.
6488
6489 * sysdeps/pthread/timer_create.c (timer_create): Use
6490 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6491 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6492 THREAD_CPUTIME.
6493
6494 2004-10-05 Jakub Jelinek <jakub@redhat.com>
6495
6496 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6497 _POSIX_THREAD_CPUTIME): Define to 0.
6498
6499 2004-10-04 Ulrich Drepper <drepper@redhat.com>
6500
6501 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6502 and _POSIX_THREAD_CPUTIME to zero.
6503 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6504 * tst-barrier2.c: Fix testing for POSIX feature.
6505 * tst-clock1.c: Likewise.
6506 * tst-clock2.c: Likewise.
6507 * tst-cond11.c: Likewise.
6508 * tst-cond4.c: Likewise.
6509 * tst-cond6.c: Likewise.
6510 * tst-flock2.c: Likewise.
6511 * tst-mutex4.c: Likewise.
6512 * tst-mutex9.c: Likewise.
6513 * tst-rwlock12.c: Likewise.
6514 * tst-rwlock4.c: Likewise.
6515 * tst-signal1.c: Likewise.
6516 * tst-spin2.c: Likewise.
6517 * sysdeps/pthread/posix-timer.h: Likewise.
6518 * sysdeps/pthread/timer_create.c: Likewise.
6519 * sysdeps/pthread/timer_routines.c: Likewise.
6520
6521 2004-10-01 Ulrich Drepper <drepper@redhat.com>
6522
6523 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6524 (__lll_mutex_timedlock_wait): Address futex correctly.
6525
6526 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6527 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6528 make sure 2 is stored in the futex and we looked at the old value.
6529 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6530 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
6531 which might very well made the code not working at all before.
6532 [BZ #417]
6533
6534 2004-09-28 Ulrich Drepper <drepper@redhat.com>
6535
6536 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6537 allow SIGSETXID to be sent.
6538 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6539 for SIGSETXID to be defined.
6540 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6541 SIGSETXID cannot be blocked.
6542
6543 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6544 Add __extension__ to long long types.
6545 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6546 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6547 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6548 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6549 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6550 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6551 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6552
6553 2004-09-25 Ulrich Drepper <drepper@redhat.com>
6554
6555 * descr.h (struct pthread): Add stopped_start field.
6556 * sysdeps/pthread/createthread.c (create_thread): Set
6557 start_stopped flag in descriptor for new thread appropriately.
6558 * pthread_create.c (start_thread): Only take lock to be stopped on
6559 startup if stopped_start flag says so.
6560
6561 2004-09-24 Ulrich Drepper <drepper@redhat.com>
6562
6563 * pthread_create.c (__pthread_create_2_1): Remember whether thread
6564 is created detached and if yes, do not try to free the stack in case
6565 the thread creation failed.
6566 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6567 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6568 case there has been no error. [BZ #405]
6569
6570 * pthread_create.c (start_thread): Don't wait for scheduler data
6571 etc to be set at the beginning of the function. The cancellation
6572 infrastructure must have been set up. And enable async
6573 cancellation before potentially going to sleep. [BZ #401]
6574
6575 2004-09-20 Ulrich Drepper <drepper@redhat.com>
6576
6577 * Versions: Remove exports for pthread_set*id_np functions.
6578 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6579 for now.
6580 * Makefile: Don't build pthread_set*id code for now.
6581
6582 2004-09-19 Ulrich Drepper <drepper@redhat.com>
6583
6584 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6585 internal use.
6586 * allocatestack.c (__nptl_setxid): New function.
6587 * descr.h (struct xid_command): Define type.
6588 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6589 (sighandler_setxid): New function.
6590 (__pthread_initialize_minimal): Register sighandler_setxid for
6591 SIGCANCEL.
6592 * pt-allocrtsig.c: Update comment.
6593 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
6594 Declare __nptl_setxid.
6595 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6596 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6597 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6598 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6599 and pthread_setresuid_np.
6600 * pthread_setgid_np.c: New file.
6601 * pthread_setuid_np.c: New file.
6602 * pthread_setegid_np.c: New file.
6603 * pthread_seteuid_np.c: New file.
6604 * pthread_setregid_np.c: New file.
6605 * pthread_setreuid_np.c: New file.
6606 * pthread_setresgid_np.c: New file.
6607 * pthread_setresuid_np.c: New file.
6608 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6609 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6610 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6611 and pthread_setresuid_np.
6612 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6613 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6614 pthread_setregid, and pthread_setresgid.
6615
6616 2004-09-18 Ulrich Drepper <drepper@redhat.com>
6617
6618 * allocatestack.c (allocate_stack): Return EAGAIN instead of
6619 ENOMEM when out of memory.
6620
6621 2004-09-10 Roland McGrath <roland@redhat.com>
6622
6623 [BZ #379]
6624 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6625 code, since we don't try to use the broken CLONE_STOPPED any more.
6626 * pthread_create.c (start_thread): Likewise.
6627
6628 2004-09-15 Richard Henderson <rth@redhat.com>
6629
6630 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6631
6632 2004-09-01 David Mosberger <davidm@hpl.hp.com>
6633
6634 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6635 (__libc_unwind_longjmp): Delete macro and declare as function.
6636 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6637 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6638 nptl directory.
6639 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6640 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6641 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6642
6643 2004-09-12 Ulrich Drepper <drepper@redhat.com>
6644
6645 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6646 for __USE_XOPEN2K.
6647 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6648 types also for __USE_XOPEN2K.
6649 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6650 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6651 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6652 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6653 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6654 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6655 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6656 [BZ #320]
6657
6658 2004-09-08 Ulrich Drepper <drepper@redhat.com>
6659
6660 * sysdeps/pthread/pthread.h
6661 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6662 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6663 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6664 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6665 [BZ #375]
6666
6667 2004-09-07 Ulrich Drepper <drepper@redhat.com>
6668
6669 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6670 PSEUDO to be used with . prefix.
6671
6672 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6673 Use atomic_increment instead of atomic_exchange_and_add.
6674 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6675 Likewise.
6676 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6677 Likewise.
6678 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6679 Likewise.
6680
6681 * allocatestack.c (allocate_stack): Use atomic_increment_val
6682 instead of atomic_exchange_and_add.
6683 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6684 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6685 Likewise.
6686 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6687 Likewise.
6688
6689 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6690 the initialization function might throw.
6691
6692 2005-09-05 Richard Henderson <rth@redhat.com>
6693
6694 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6695 Move definition inside libpthread, libc, librt check. Provide
6696 definition for rtld.
6697
6698 2004-09-02 Ulrich Drepper <drepper@redhat.com>
6699
6700 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6701 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6702 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6703 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6704 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6705 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6706 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6707 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6708 * unwind.c: Use it.
6709
6710 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6711 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6712 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6713 Likewise.
6714 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6715 Decrement __nwaiters. If pthread_cond_destroy has been called and
6716 this is the last waiter, signal pthread_cond_destroy caller and
6717 avoid using the pthread_cond_t structure after unlock.
6718 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6719 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6720 Read clock type from the least significant bits of __nwaiters instead
6721 of __clock.
6722 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6723 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6724
6725 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6726
6727 [BZ #342]
6728 * Makefile (tests): Add tst-cond20 and tst-cond21.
6729 * tst-cond20.c: New test.
6730 * tst-cond21.c: New test.
6731 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6732 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6733 it unsigned int.
6734 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6735 Likewise.
6736 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6737 (pthread_cond_t): Likewise.
6738 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6739 Likewise.
6740 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6741 Likewise.
6742 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6743 Likewise.
6744 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6745 (cond_nwaiters): New.
6746 (clock_bits): New.
6747 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6748 if there are waiters not signalled yet.
6749 Wait until all already signalled waiters wake up.
6750 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6751 __nwaiters. If pthread_cond_destroy has been called and this is the
6752 last waiter, signal pthread_cond_destroy caller and avoid using
6753 the pthread_cond_t structure after unlock.
6754 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6755 decrement it when leaving. If pthread_cond_destroy has been called
6756 and this is the last waiter, signal pthread_cond_destroy caller.
6757 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6758 Likewise. Read clock type from the least significant bits of
6759 __nwaiters instead of __clock.
6760 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6761 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6762 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6763 clock type just from the last COND_CLOCK_BITS bits of value.
6764 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6765 instead of __clock, just from second bit of condattr's value.
6766
6767 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6768
6769 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6770 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6771 != 64.
6772 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6773
6774 2004-08-15 Roland McGrath <roland@frob.com>
6775
6776 * pthread_atfork.c: Update copyright terms including special exception
6777 for these trivial files, which are statically linked into executables
6778 that use dynamic linking for the significant library code.
6779
6780 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6781
6782 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6783 pthread_rwlock_rdlock.
6784 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6785 Decrease __nr_readers_queued after reacquiring lock.
6786 * sysdeps/pthread/pthread_rwlock_timedrdlock
6787 (pthread_rwlock_timedrdlock): Likewise.
6788 Reported by Bob Cook <bobcook47@hotmail.com>.
6789
6790 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6791
6792 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6793 before pthread_barrier_wait.
6794
6795 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6796
6797 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6798 Remove unnecessary exception handling data.
6799
6800 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6801
6802 [BZ #284]
6803 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6804 instead of clockid_t.
6805
6806 2004-07-21 Roland McGrath <roland@redhat.com>
6807
6808 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6809
6810 2004-07-19 Roland McGrath <roland@redhat.com>
6811
6812 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6813
6814 2004-07-02 Roland McGrath <roland@redhat.com>
6815
6816 * configure: Don't exit.
6817
6818 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6819
6820 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6821 (__pthread_cond_timedwait): Check for invalid nanosecond in
6822 timeout value.
6823
6824 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6825
6826 * Makefile: Add rules to build and run tst-fini1.
6827 * tst-fini1.c: New file.
6828 * tst-fini1mod.c: New file.
6829
6830 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6831
6832 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6833 if no cancellation support is needed.
6834 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6835 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6836 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6837 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6838 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6839 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6840 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6841 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6842 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6843
6844 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6845 only if not already defined.
6846
6847 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6848
6849 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6850 constraint "m" instead of "0" for futex.
6851
6852 * shlib-versions: Add powerpc64-.*-linux.*.
6853
6854 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6855
6856 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6857 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6858 for valid tv_nsec.
6859 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6860 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6861 bits.
6862
6863 2004-06-29 Roland McGrath <roland@redhat.com>
6864
6865 * Banner: NPTL no longer has its own version number.
6866 * Makefile (nptl-version): Variable removed.
6867 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6868 using $(version), the glibc version number.
6869
6870 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6871
6872 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6873 Fix branch offset for a PLT entry.
6874 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6875 Likewise.
6876 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6877 Likewise.
6878 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6879 Likewise.
6880 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6881 Likewise.
6882
6883 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6884
6885 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6886 unconditionally.
6887
6888 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6889
6890 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6891 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6892 instead of tv_sec.
6893 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6894 (pthread_rwlock_timedrdlock): Likewise.
6895
6896 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6897
6898 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6899 Set __r7 to val, not mutex.
6900
6901 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6902
6903 * Makefile: Add rules to build tst-rwlock14.
6904 * tst-rwlock14.c: New file.
6905
6906 2004-06-24 Boris Hu <boris.hu@intel.com>
6907
6908 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6909 check.
6910 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6911
6912 2004-06-19 Andreas Jaeger <aj@suse.de>
6913
6914 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6915 assembler in last patch.
6916
6917 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6918
6919 * sysdeps/pthread/pthread_cond_timedwait.c
6920 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6921 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6922 (__pthread_cond_timedwait): Check for invalid nanosecond in
6923 timeout value.
6924 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6925 * tst-cond19.c: New file.
6926 * Makefile: Add rules to build and run tst-cond19.
6927
6928 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6929
6930 * tst-context1.c (GUARD_PATTERN): Defined.
6931 (tst_context_t): Define struct containing ucontext_t & guard words.
6932 (ctx): Declare as an array of tst_context_t.
6933 (fct): Verify uc_link & guard words are still valid.
6934 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6935
6936 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6937
6938 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6939 Add __data.__futex field, reshuffle __data.__clock.
6940 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6941 (__pthread_cond_signal): Increment __futex at the same time as
6942 __wakeup_seq or __total_seq. Pass address of __futex instead of
6943 address of low 32-bits of __wakeup_seq to futex syscall.
6944 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6945 (__pthread_cond_wait): Likewise. Pass __futex value from before
6946 releasing internal lock to FUTEX_WAIT.
6947 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6948 (__pthread_cond_timedwait): Likewise.
6949 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6950 (FUTEX_CMP_REQUEUE): Define.
6951 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6952 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6953 Pass __futex value from before the unlock and __futex address instead
6954 of address of low 32-bits of __wakeup_seq to futex syscall.
6955 Fallback to FUTEX_WAKE all on any errors.
6956
6957 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6958
6959 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6960 comment typo.
6961 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6962 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6963 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6964 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6965 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6966
6967 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6968
6969 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6970 Add memory clobber to inline assembly.
6971 (__lll_mutex_trylock): Likewise.
6972 (__lll_mutex_cond_trylock): Likewise.
6973
6974 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6975
6976 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6977 Pass val argument as 6th system call argument in %r7.
6978
6979 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6980
6981 * Makefile (tests): Add tst-cond16.
6982 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6983 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6984 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6985 Add __data.__futex field, reshuffle __data.__clock.
6986 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6987 (__pthread_cond_signal): Increment __futex at the same time as
6988 __wakeup_seq or __total_seq. Pass address of __futex instead of
6989 address of low 32-bits of __wakeup_seq to futex syscall.
6990 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6991 (__pthread_cond_wait): Likewise. Pass __futex value from before
6992 releasing internal lock to FUTEX_WAIT.
6993 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6994 (__pthread_cond_timedwait): Likewise.
6995 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6996 (FUTEX_CMP_REQUEUE): Define.
6997 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6998 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6999 Pass __futex value from before the unlock and __futex address instead
7000 of address of low 32-bits of __wakeup_seq to futex syscall.
7001 Fallback to FUTEX_WAKE all on any errors.
7002 * sysdeps/unix/sysv/linux/alpha/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/alpha/bits/pthreadtypes.h (pthread_cond_t):
7007 Add __data.__futex field, reshuffle __data.__clock.
7008 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
7009 Define.
7010 (lll_futex_requeue): Add val argument, return 1 unconditionally
7011 for the time being.
7012 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7013 Add __data.__futex field, reshuffle __data.__clock.
7014 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
7015 Define.
7016 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7017 internally. Return non-zero if error, zero if success.
7018 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7019 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
7020 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
7021 Define.
7022 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7023 internally. Return non-zero if error, zero if success.
7024 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
7025 Add __data.__futex field, reshuffle __data.__clock.
7026 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
7027 Define.
7028 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7029 internally. Return non-zero if error, zero if success.
7030 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
7031 Add __data.__futex field, reshuffle __data.__clock.
7032 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
7033 Add __data.__futex field, reshuffle __data.__clock.
7034 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
7035 Increment __futex at the same time as __wakeup_seq or __total_seq.
7036 Pass address of __futex instead of address of low 32-bits of
7037 __wakeup_seq to futex syscall.
7038 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7039 Pass __futex value from before releasing internal lock
7040 to FUTEX_WAIT.
7041 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7042 Likewise. Avoid unnecessary shadowing of variables.
7043 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
7044 Set __futex to 2 * __total_seq. Pass __futex value from before the
7045 unlock and __futex address instead of address of low 32-bits of
7046 __wakeup_seq to futex_requeue macro, adjust for new return value
7047 meaning.
7048 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
7049 (__pthread_cond_signal): Increment __futex at the same time as
7050 __wakeup_seq or __total_seq. Pass address of __futex instead of
7051 address of low 32-bits of __wakeup_seq to futex syscall.
7052 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7053 (__pthread_cond_wait): Likewise. Pass __futex value from before
7054 releasing internal lock to FUTEX_WAIT.
7055 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7056 (__pthread_cond_timedwait): Likewise.
7057 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7058 (FUTEX_CMP_REQUEUE): Define.
7059 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
7060 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
7061 Pass __futex value from before the unlock and __futex address instead
7062 of address of low 32-bits of __wakeup_seq to futex syscall.
7063 Fallback to FUTEX_WAKE all on any errors.
7064
7065 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7066
7067 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
7068 Add nop to align the end of critical section.
7069 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
7070
7071 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7072
7073 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7074 Add __broadcast_seq field.
7075 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
7076 all waiters as woken with woken_seq and bump broadcast counter.
7077 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
7078 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
7079 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7080 Comment typo fixes. Avoid returning -ETIMEDOUT.
7081
7082 2004-06-01 Ulrich Drepper <drepper@redhat.com>
7083
7084 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7085 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
7086 Reported by Kaz Kojima.
7087
7088 2004-05-25 Jakub Jelinek <jakub@redhat.com>
7089
7090 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
7091
7092 2004-05-21 Jakub Jelinek <jakub@redhat.com>
7093
7094 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
7095 __broadcast_seq with bc_seq after acquiring internal lock instead of
7096 before it.
7097
7098 2004-05-18 Jakub Jelinek <jakub@redhat.com>
7099
7100 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
7101 compilation.
7102 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7103 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
7104 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7105 (pthread_cond_t): Add __data.__broadcast_seq field.
7106 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7107 (FRAME_SIZE): Define.
7108 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
7109 Comment typo fixes.
7110 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
7111 Define.
7112 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
7113 typo fixes.
7114 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7115 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
7116 fixes.
7117
7118 2004-05-18 Ulrich Drepper <drepper@redhat.com>
7119
7120 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
7121 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
7122 Add __broadcast_seq field.
7123 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7124 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7125 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7126 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7127 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
7129 all waiters as woken with woken_seq and bump broadcast counter.
7130 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
7131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
7132 __broadcast_seq field.
7133 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7134 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7135 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7136 * pthread_cond_init.c: Initialize __broadcast_seq field.
7137 * Makefile (tests): Add tst-cond17 and tst-cond18.
7138 Add .NOTPARALLEL goal.
7139 * tst-cond16.c: New file. From Jakub.
7140 * tst-cond17.c: New file. From Jakub.
7141 * tst-cond18.c: New file. From Jakub.
7142
7143 2004-05-16 Ulrich Drepper <drepper@redhat.com>
7144
7145 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
7146 unwind info.
7147
7148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
7149 Parametrize frame size. Correct some unwind info.
7150 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7151
7152 2004-05-04 Jakub Jelinek <jakub@redhat.com>
7153
7154 * tst-stack3.c: Note testing functionality beyond POSIX.
7155
7156 2004-05-04 Jakub Jelinek <jakub@redhat.com>
7157
7158 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
7159 Change conditional from ifdef to if.
7160
7161 2004-04-23 Jakub Jelinek <jakub@redhat.com>
7162
7163 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
7164 SYSDEP_CANCEL_ERROR): Define.
7165 (PSEUDO): Use it.
7166
7167 2004-05-01 Jakub Jelinek <jakub@redhat.com>
7168
7169 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
7170
7171 2004-04-20 Jakub Jelinek <jakub@redhat.com>
7172
7173 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
7174
7175 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7176
7177 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
7178 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7179 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
7180 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7181
7182 2004-04-19 Ulrich Drepper <drepper@redhat.com>
7183
7184 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
7185 thread has all signals blocked.
7186
7187 2004-04-18 Andreas Jaeger <aj@suse.de>
7188
7189 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
7190 (SEM_VALUE_MAX): Add missing brace.
7191
7192 2004-04-17 Jakub Jelinek <jakub@redhat.com>
7193
7194 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
7195 in rt subdir.
7196 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
7197 * sysdeps/pthread/tst-mqueue8x.c: New test.
7198 * tst-cancel4.c: Update comment about message queues.
7199
7200 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
7201 return it_value { 0, 0 }.
7202 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
7203 like SIGEV_SIGNAL.
7204 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
7205 assertion for SIGEV_NONE.
7206 (thread_attr_compare): Compare all attributes, not just a partial
7207 subset.
7208
7209 2004-04-17 Jakub Jelinek <jakub@redhat.com>
7210
7211 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
7212
7213 2004-04-17 Ulrich Drepper <drepper@redhat.com>
7214
7215 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
7216 Just use a plain number.
7217 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
7218 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
7219 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7220 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7221 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7222 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7223 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7224
7225 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7226
7227 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7228 frame info.
7229 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7230
7231 2004-04-15 Jakub Jelinek <jakub@redhat.com>
7232
7233 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7234 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7235 of calling sigwaitinfo.
7236
7237 2004-04-16 Ulrich Drepper <drepper@redhat.com>
7238
7239 * allocatestack.c (allocate_stack): Set reported_guardsize
7240 unconditionally.
7241 * pthread_getattr_np.c (pthread_getattr_np): Use
7242 reported_guardsize instead of guardsize.
7243 * descr.h (struct pthread): Add reported_guardsize field.
7244
7245 2004-04-13 Jakub Jelinek <jakub@redhat.com>
7246
7247 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7248
7249 2004-04-12 Ulrich Drepper <drepper@redhat.com>
7250
7251 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7252
7253 2004-04-08 Jakub Jelinek <jakub@redhat.com>
7254
7255 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7256 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7257 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7258 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7259 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7260 Define.
7261 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7262 (_POSIX_MESSAGE_PASSING): Define.
7263 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7264 (_POSIX_MESSAGE_PASSING): Define.
7265 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7266 (_POSIX_MESSAGE_PASSING): Define.
7267
7268 2004-04-04 Ulrich Drepper <drepper@redhat.com>
7269
7270 * tst-context1.c (fct): Check whether correct stack is used.
7271
7272 2004-04-03 Ulrich Drepper <drepper@redhat.com>
7273
7274 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7275 matching constraints for asm mem parameters.
7276
7277 * tst-clock2.c (tf): Don't define unless needed.
7278
7279 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
7280
7281 * Makefile (link-libc-static): Use $(static-gnulib) instead of
7282 $(gnulib).
7283
7284 2004-03-30 Ulrich Drepper <drepper@redhat.com>
7285
7286 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7287 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7288 * pthreadP.h: Declare __nptl_deallocate_tsd.
7289 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7290 Adjust caller.
7291
7292 * Makefile (tests): Add tst-tsd5.
7293 * tst-tsd5.c: New file.
7294
7295 2004-03-29 Ulrich Drepper <drepper@redhat.com>
7296
7297 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7298 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7299 is SHLIB_COMPAT check.
7300 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7301 (__pthread_attr_getaffinity_old): Likewise.
7302 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7303 (__pthread_getaffinity_old): Likewise.
7304 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7305 (__pthread_setaffinity_old): Likewise.
7306
7307 2004-03-26 Ulrich Drepper <drepper@redhat.com>
7308
7309 * allocatestack.c (_make_stacks_executable): Call
7310 _dl_make_stack_executable first.
7311
7312 2004-03-24 Roland McGrath <roland@redhat.com>
7313
7314 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7315 constraint instead of "0".
7316
7317 2004-03-24 Ulrich Drepper <drepper@redhat.com>
7318
7319 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7320 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7321
7322 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7323 code to avoid warning.
7324
7325 2004-03-24 Andreas Jaeger <aj@suse.de>
7326
7327 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7328 (__pthread_attr_setaffinity_old): Remove const.
7329
7330 2004-03-23 Ulrich Drepper <drepper@redhat.com>
7331
7332 * sysdeps/unix/sysv/linux/smp.h: New file.
7333 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7334 * init.c: Define __is_smp.
7335 (__pthread_initialize_minimal_internal): Call is_smp_system to
7336 initialize __is_smp.
7337 * pthreadP.h: Declare __is_smp.
7338 Define MAX_ADAPTIVE_COUNT is necessary.
7339 * pthread_mutex_init.c: Add comment regarding __spins field.
7340 * pthread_mutex_lock.c: Implement adaptive mutex type.
7341 * pthread_mutex_timedlock.c: Likewise.
7342 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7343 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7344 Add __spins field.
7345 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7346 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7347 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7348 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7349 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7350 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7351 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7352 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7353 lll_mutex_cond_trylock.
7354 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7355 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7356 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7357 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7358 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7359 Define BUSY_WAIT_NOP.
7360 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7361 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7362
7363 * tst-mutex5.c: Add support for testing adaptive mutexes.
7364 * tst-mutex7.c: Likewise.
7365 * tst-mutex5a.c: New file.
7366 * tst-mutex7a.c: New file.
7367 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7368
7369 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7370 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7371 vgettimeofday call might destroy the content.
7372
7373 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7374 @pause in the loop.
7375
7376 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7377 No need to restrict type of ret. Make it int. Add comment.
7378
7379 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7380 Remove unnecessary setne instruction.
7381
7382 2004-03-22 Jakub Jelinek <jakub@redhat.com>
7383
7384 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7385 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7386 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7387 If realloc fails, break out of the loop.
7388
7389 2004-03-20 Andreas Jaeger <aj@suse.de>
7390
7391 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7392 (__pthread_setaffinity_old): Fix interface.
7393 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7394 (__pthread_getaffinity_old): Likewise.
7395
7396 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7397 (__pthread_setaffinity_new): Remove duplicate declaration.
7398
7399 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7400
7401 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7402 the return value to a safe register.
7403 (CDISABLE): Set the function argument correctly.
7404
7405 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7406
7407 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7408 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7409 Rewrite so that only one locked memory operation per round is needed.
7410 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7411 (pthread_barrier_wait): After wakeup, release lock only when the
7412 last thread stopped using the barrier object.
7413 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7414 (__pthread_cond_wait): Don't store mutex address if the current
7415 value is ~0l. Add correct cleanup support and unwind info.
7416 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7417 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7418 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7419 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7420 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7421 Add correct cleanup support and unwind info.
7422 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7423 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7424 information for syscall wrappers.
7425
7426 2004-03-18 Ulrich Drepper <drepper@redhat.com>
7427
7428 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7429 cpusetsize field, remove next.
7430 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7431 parameter for size of the CPU set.
7432 (pthread_setaffinity_np): Likewise.
7433 (pthread_attr_getaffinity_np): Likewise.
7434 (pthread_attr_setaffinity_np): Likewise.
7435 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7436 interface change, keep compatibility code.
7437 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7438 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7439 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7440 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
7441 __pthread_getaffinity_np.
7442 * Versions: Add version for changed interfaces.
7443 * tst-attr3.c: Adjust test for interface change.
7444 * pthread_getattr_np.c: Query the kernel about the affinity mask with
7445 increasing buffer sizes.
7446 * pthread_attr_destroy.c: Remove unused list handling.
7447 * pthread_attr_init.c: Likewise.
7448
7449 2004-03-17 Roland McGrath <roland@redhat.com>
7450
7451 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7452 first argument to clock_getres so we ever enable kernel timers.
7453
7454 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
7455
7456 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7457
7458 2004-03-12 Richard Henderson <rth@redhat.com>
7459
7460 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7461 oldvalue from CENABLE to CDISABLE.
7462
7463 2004-03-12 Ulrich Drepper <drepper@redhat.com>
7464
7465 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7466 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7467 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7468 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7469
7470 2004-03-11 Richard Henderson <rth@redhat.com>
7471
7472 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7473 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7474 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7475
7476 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7477
7478 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7479 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7480 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7481
7482 2004-03-11 Jakub Jelinek <jakub@redhat.com>
7483
7484 * forward.c (__pthread_cond_broadcast_2_0,
7485 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7486 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7487 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7488
7489 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7490
7491 * sysdeps/sh/tcb-offsets.sym: Add PID.
7492 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7493 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7494
7495 2004-03-10 Ulrich Drepper <drepper@redhat.com>
7496
7497 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7498 include <sysdep-cancel.h>, vfork is no cancellation point.
7499 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7500 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7501 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7502
7503 2004-03-10 Jakub Jelinek <jakub@redhat.com>
7504
7505 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7506 libc_hidden_def.
7507 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7508 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7509 Likewise.
7510 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7511 Likewise.
7512 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7513 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7514 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7515 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7516 of DO_CALL_VIA_BREAK. Work around a gas problem.
7517
7518 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7519 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7520 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7521 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7522 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7523 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7524
7525 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7526 a local register for saving old PID. Negate PID in parent upon exit.
7527
7528 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7529 tcb-offsets.h.
7530 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7531 before syscall, set to the old value in the parent afterwards.
7532 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7533 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7534 tcb-offsets.h.
7535 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7536 before syscall, set to the old value in the parent afterwards.
7537 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7538 * sysdeps/s390/tcb-offsets.sym: Add PID.
7539
7540 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7541 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7542 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7543 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7544 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7545 * sysdeps/sparc/tcb-offsets.sym: Add PID.
7546
7547 2004-03-10 Andreas Schwab <schwab@suse.de>
7548
7549 * sysdeps/ia64/tcb-offsets.sym: Add PID.
7550 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7551 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7552
7553 2004-03-09 Jakub Jelinek <jakub@redhat.com>
7554
7555 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7556 * tst-cancel21.c (do_one_test): Likewise.
7557 Reported by Gordon Jin <gordon.jin@intel.com>.
7558
7559 2004-02-09 Jakub Jelinek <jakub@redhat.com>
7560
7561 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7562 if non-zero and set to INT_MIN if zero.
7563 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7564 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7565 (SAVE_PID, RESTORE_PID): Define.
7566 (__vfork): Use it.
7567 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7568 Use relative path to avoid including NPTL i386/vfork.S.
7569 (SAVE_PID, RESTORE_PID): Define.
7570 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7571 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7572 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7573 tst-vfork2x.
7574 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7575 * tst-vfork1.c: New test.
7576 * tst-vfork2.c: New test.
7577 * tst-vfork1x.c: New test.
7578 * tst-vfork2x.c: New test.
7579
7580 2004-03-08 Ulrich Drepper <drepper@redhat.com>
7581
7582 * sysdeps/i386/tcb-offsets.sym: Add PID.
7583 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7584 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7585 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7586
7587 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
7588
7589 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7590
7591 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
7592
7593 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7594 _rtld_global_ro.
7595
7596 2004-03-07 Ulrich Drepper <drepper@redhat.com>
7597
7598 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7599 _rtld_global_ro.
7600
7601 * tst-once4.c: Remove unnecessary macro definition.
7602
7603 * tst-mutex7.c (do_test): Limit thread stack size.
7604 * tst-once2.c (do_test): Likewise.
7605 * tst-tls3.c (do_test): Likewise.
7606 * tst-tls1.c (do_test): Likewise.
7607 * tst-signal3.c (do_test): Likewise.
7608 * tst-kill6.c (do_test): Likewise.
7609 * tst-key4.c (do_test): Likewise.
7610 * tst-join4.c (do_test): Likewise.
7611 * tst-fork1.c (do_test): Likewise.
7612 * tst-context1.c (do_test): Likewise.
7613 * tst-cond2.c (do_test): Likewise.
7614 * tst-cond10.c (do_test): Likewise.
7615 * tst-clock2.c (do_test): Likewise.
7616 * tst-cancel10.c (do_test): Likewise.
7617 * tst-basic2.c (do_test): Likewise.
7618 * tst-barrier4.c (do_test): Likewise.
7619
7620 2004-03-05 Ulrich Drepper <drepper@redhat.com>
7621
7622 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7623
7624 2004-03-01 Ulrich Drepper <drepper@redhat.com>
7625
7626 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7627 (__pthread_cond_timedwait): Optimize wakeup test.
7628 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7629 (__pthread_cond_wait): Likewise.
7630 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7631 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7632 Likewise.
7633
7634 2004-02-29 Ulrich Drepper <drepper@redhat.com>
7635
7636 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7637 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
7638 the atomic instruction needed.
7639 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7640 (__lll_mutex_lock_wait): Likewise.
7641
7642 2004-02-28 Ulrich Drepper <drepper@redhat.com>
7643
7644 * Makefile (tests): Add tst-cond14 and tst-cond15.
7645 * tst-cond14.c: New file.
7646 * tst-cond15.c: New file.
7647
7648 2004-02-27 Ulrich Drepper <drepper@redhat.com>
7649
7650 * sysdeps/pthread/createthread.c (create_thread): Remove use of
7651 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
7652 needs to be implemented differently to be useful.
7653
7654 2004-02-26 Ulrich Drepper <drepper@redhat.com>
7655
7656 * pthread_attr_setschedparam.c: Don't test priority against limits
7657 here. Set ATTR_FLAG_SCHED_SET flag.
7658 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7659 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7660 from parent thread to child. If attribute is used and scheduling
7661 parameters are not inherited, copy parameters from attribute or
7662 compute them. Check priority value.
7663 * pthread_getschedparam.c: If the parameters aren't known yet get
7664 them from the kernel.
7665 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7666 ATTR_FLAG_POLICY_SET flag for thread.
7667 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7668 and ATTR_FLAG_POLICY_SET.
7669
7670 * sysdeps/pthread/createthread.c: Use tgkill if possible.
7671
7672 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7673 fail if stack address hasn't been set. Just return 0.
7674
7675 2004-02-25 Ulrich Drepper <drepper@redhat.com>
7676
7677 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
7678 libpthread for the files in this list.
7679 (CFLAGS-tst-unload): Removed.
7680 * tst-unload.c (do_test): Don't use complete path for
7681 LIBPHREAD_SO.
7682
7683 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7684 tst-_res1mod2.
7685
7686 2004-02-22 Ulrich Drepper <drepper@redhat.com>
7687
7688 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7689 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7690 operation per round is needed.
7691 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7692 (__lll_mutex_lock_wait): Likewise.
7693
7694 2004-02-20 Ulrich Drepper <drepper@redhat.com>
7695
7696 * tst-cancel9.c (cleanup): Don't print to stderr.
7697
7698 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7699
7700 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7701
7702 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7703
7704 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7705 (__syscall_error_handler2): Call CDISABLE.
7706 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7707 (__syscall_error_handler2): Call CDISABLE.
7708
7709 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7710 Release lock before the loop, don't reacquire it.
7711
7712 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7713
7714 2004-02-19 Andreas Schwab <schwab@suse.de>
7715
7716 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7717 Fix last change.
7718
7719 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7720
7721 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7722 (pthread_barrier_wait): After wakeup, release lock only when the
7723 last thread stopped using the barrier object.
7724 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7725 (pthread_barrier_wait): Likewise.
7726 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7727 Likewise.
7728 * Makefile (tests): Add tst-barrier4.
7729 * tst-barrier4.c: New file.
7730
7731 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7732 (__pthread_cond_timedwait): Perform timeout test while holding
7733 internal lock to prevent wakeup race.
7734 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7735 * sysdeps/pthread/pthread_cond_timedwait.c
7736 (__pthread_cond_timedwait): Likewise.
7737 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7738 (__pthread_cond_timedwait): Likewise.
7739
7740 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7741
7742 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7743 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7744 * Makefile (tests): Add tst-rwlock13.
7745 * tst-rwlock13.c: New test.
7746
7747 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7748
7749 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7750 (__condvar_tw_cleanup): Little optimization.
7751 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7752
7753 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7754
7755 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7756 libpthread as "lib" parameter to SHLIB_COMPAT.
7757 (__novmx_siglongjmp): Fix typo in function name.
7758 (__novmx_longjmp): Fix typo in function name.
7759
7760 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7761
7762 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7763 __builtin_expect.
7764
7765 * sysdeps/generic/pt-longjmp.c: Moved to...
7766 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7767
7768 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7769
7770 * Makefile (libpthread-routines): Add pt-cleanup.
7771 * pt-longjmp.c: Removed.
7772 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7773 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7774 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7775 Version longjmp, siglongjmp for GLIBC_2.3.4.
7776 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7777
7778 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7779
7780 * sysdeps/pthread/pthread_cond_timedwait.c
7781 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7782 Reuse code. Add __builtin_expects.
7783
7784 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7785 (__pthread_cond_timedwait): Get internal lock in case timeout has
7786 passed before the futex syscall.
7787 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7788
7789 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7790
7791 * allocatestack.c: Pretty printing.
7792
7793 * sysdeps/pthread/createthread.c (create_thread): Don't add
7794 CLONE_DETACHED bit if it is not necessary.
7795
7796 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7797
7798 * pthread_getattr_np.c: Include ldsodefs.h.
7799
7800 2004-01-16 Richard Henderson <rth@redhat.com>
7801
7802 * allocatestack.c: Don't declare __libc_stack_end.
7803 * init.c (__pthread_initialize_minimal_internal): Likewise.
7804 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7805
7806 2004-01-15 Richard Henderson <rth@redhat.com>
7807
7808 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7809 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7810 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7811 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7812 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7813 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7814 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7815 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7816
7817 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7818
7819 * init.c (pthread_functions): Make array const.
7820
7821 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7822
7823 * allocatestack.c (__make_stacks_executable): Change interface.
7824 Check parameters. Pass parameter on to libc counterpart.
7825 * pthreadP.h: Change declaration.
7826
7827 2004-01-13 Richard Henderson <rth@redhat.com>
7828
7829 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7830 prototype form.
7831 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7832 Likewise.
7833
7834 * sysdeps/alpha/Makefile: New file.
7835 * sysdeps/alpha/tcb-offsets.sym: New file.
7836 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7837 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7838
7839 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7840 on powerpc version.
7841
7842 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7843
7844 * Makefile (tests): Add tst-backtrace1.
7845 * tst-backtrace1.c: New test.
7846
7847 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7848
7849 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7850 register as second parameter to the REGISTER macro.
7851 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7852 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7853 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7854 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7855 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7856 of thread register as second parameter to REGISTER macro in 64 case.
7857
7858 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7859
7860 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7861 (CFLAGS-getpid.o): Defined.
7862 (CFLAGS-getpid.os): Defined.
7863
7864 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7865
7866 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7867 returned for main thread does not overlap with any other VMA.
7868 Patch by Jakub Jelinek.
7869
7870 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7871
7872 * tst-raise1.c: Include stdio.h.
7873
7874 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7875
7876 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7877 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7878 If pid is 0, set it to selftid.
7879 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7880 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7881 != 0, return self->tid without doing a syscall.
7882 * descr.h (struct pthread): Move pid field after tid.
7883
7884 * Makefile (tests): Add tst-raise1.
7885 * tst-raise1.c: New file.
7886
7887 2003-12-23 Roland McGrath <roland@redhat.com>
7888
7889 * tst-oddstacklimit.c: New file.
7890 * Makefile (tests): Add it.
7891 (tst-oddstacklimit-ENV): New variable.
7892
7893 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7894 value up to page size for __default_stacksize.
7895
7896 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7897
7898 * Makefile (tests): Add tst-eintr5.
7899 * tst-eintr5.c: New file.
7900
7901 * eintr.c (eintr_source): Prevent sending signal to self.
7902
7903 * tst-eintr2.c (tf1): Improve error message.
7904
7905 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7906
7907 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7908 * sysdeps/unix/sysv/linux/getpid.c: New file.
7909 * pthread_cancel.c: Add comment explaining use of PID field.
7910 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7911 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7912 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7913 temporarily to signal the field must not be relied on and updated
7914 by getpid().
7915 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7916 temporarily negative.
7917 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7918
7919 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7920
7921 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7922 (eintr_source): If ARG != NULL, use pthread_kill.
7923 * tst-eintr1.c: Adjust for this change.
7924 * tst-eintr2.c: Likewise.
7925 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7926 * tst-eintr3.c: New file.
7927 * tst-eintr4.c: New file.
7928
7929 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7930
7931 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7932 if CANCELSTATE_BITMASK is set.
7933 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7934 Likewise.
7935
7936 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7937 (tests-reverse): Add tst-cancel23.
7938 * tst-cancel22.c: New test.
7939 * tst-cancel23.c: New test.
7940
7941 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7942
7943 * tst-eintr1.c: Better error messages.
7944
7945 * Makefile (tests): Add tst-eintr2.
7946 * tst-eintr2.c: New file.
7947
7948 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7949
7950 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7951 (CFLAGS-tst-cancelx21.c): Set.
7952 * tst-cancel21.c: New test.
7953 * tst-cancelx21.c: New test.
7954
7955 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7956 comparison operand.
7957 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7958 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7959 * pt-longjmp.c: Include jmpbuf-unwind.h.
7960 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7961 _JMPBUF_UNWINDS. Adjust compared pointers.
7962 * init.c (__pthread_initialize_minimal_internal): Initialize
7963 pd->stackblock_size.
7964 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7965 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7966 * sysdeps/i386/jmpbuf-unwind.h: New file.
7967 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7968 * sysdeps/s390/jmpbuf-unwind.h: New file.
7969 * sysdeps/sh/jmpbuf-unwind.h: New file.
7970 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7971 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7972 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7973 (_JMPBUF_CFA_UNWINDS): Remove.
7974 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7975
7976 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7977
7978 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7979 (CFLAGS-tst-cancelx20.c): Set.
7980 * tst-cancel20.c: New test.
7981 * tst-cancelx20.c: New test.
7982
7983 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7984
7985 * init.c (__pthread_initialize_minimal_internal): Don't treat
7986 architectures with separate register stack special here when
7987 computing default stack size.
7988
7989 2003-12-17 Roland McGrath <roland@redhat.com>
7990
7991 * Makefile (tst-cancelx7-ARGS): New variable.
7992 Reportd by Greg Schafer <gschafer@zip.com.au>.
7993
7994 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7995
7996 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7997 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7998 (tst-stack3-ENV): Set.
7999 ($(objpfx)tst-stack3-mem): New.
8000 * tst-stack3.c: New test.
8001
8002 2003-12-10 David Mosberger <davidm@hpl.hp.com>
8003
8004 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
8005 Add unwind directives. Drop unused .regstk directive.
8006 (_fini_EPILOG_BEGINS): Add unwind directives.
8007
8008 2003-12-11 Ulrich Drepper <drepper@redhat.com>
8009
8010 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
8011 Assume parameter is a pointer.
8012 (lll_futex_wake): Likewise.
8013 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
8014 Likewise.
8015 (lll_futex_wake): Likewise.
8016 Reported by Boris Hu.
8017 * sysdeps/unix/sysv/linux/unregister-atfork.c
8018 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
8019
8020 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
8021
8022 2003-12-10 Ulrich Drepper <drepper@redhat.com>
8023
8024 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
8025 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
8026 __rtld_lock_initialize for ld.so lock.
8027 Patch in part by Adam Li <adam.li@intel.com>.
8028
8029 2003-12-02 David Mosberger <davidm@hpl.hp.com>
8030
8031 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
8032 in $(gnulib). Also, remove stale comment.
8033
8034 2003-11-12 David Mosberger <davidm@hpl.hp.com>
8035
8036 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
8037 advantage of new syscall stub and optimize accordingly.
8038
8039 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
8040 from SYS_futex, to match expectations of
8041 sysdep.h:DO_INLINE_SYSCALL.
8042 (lll_futex_clobbers): Remove.
8043 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
8044 (lll_futex_wake): Likewise.
8045 (lll_futex_requeue): Likewise.
8046 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
8047 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
8048 Jelinek).
8049 (__lll_mutex_lock): Likewise.
8050 (__lll_mutex_cond_lock): Likewise.
8051 (__lll_mutex_timed_lock): Likewise.
8052 (__lll_mutex_unlock): Likewise.
8053 (__lll_mutex_unlock_force): Likewise.
8054
8055 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
8056 comes before the include of <sysdep.h>.
8057 (THREAD_SELF_SYSINFO): New macro.
8058 (THREAD_SYSINFO): Likewise.
8059 (INIT_SYSINFO): New macro.
8060 (TLS_INIT_TP): Call INIT_SYSINFO.
8061
8062 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
8063
8064 * sysdeps/pthread/createthread.c (create_thread): Use
8065 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
8066 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
8067 THREAD_SELF_SYSINFO instead of open code.
8068 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
8069 (THREAD_SYSINFO): Likewise.
8070
8071 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
8072
8073 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
8074
8075 2003-12-06 Ulrich Drepper <drepper@redhat.com>
8076
8077 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
8078 instead of .init. Patch by David Mosberger.
8079
8080 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
8081
8082 * sysdeps/pthread/configure.in: Remove broken declaration in C
8083 cleanup handling check.
8084
8085 2003-11-30 Andreas Jaeger <aj@suse.de>
8086
8087 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
8088 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
8089 Likewise.
8090
8091 2003-11-27 Jakub Jelinek <jakub@redhat.com>
8092
8093 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
8094 * pthread_attr_destroy.c: Include shlib-compat.h.
8095 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
8096 is set in iattr->flags.
8097 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
8098
8099 2003-11-21 Jakub Jelinek <jakub@redhat.com>
8100
8101 * Makefile (distribute): Add tst-cleanup4aux.c.
8102
8103 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
8104 include.
8105
8106 2003-11-21 Ulrich Drepper <drepper@redhat.com>
8107
8108 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
8109 pthread_cond_signal.
8110
8111 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
8112 store mutex address if the current value is ~0l.
8113 * sysdeps/pthread/pthread_cond_timedwait.c
8114 (__pthread_cond_timedwait): Likewise.
8115 * sysdeps/pthread/pthread_cond_broadcast.c
8116 (__pthread_cond_broadcast): Don't use requeue for pshared
8117 condvars.
8118
8119 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8120 (__pthread_cond_wait): Don't store mutex address if the current
8121 value is ~0l.
8122 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
8123 (__pthread_cond_timedwait): Likewise.
8124 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
8125 (__pthread_cond_broadcast): Don't use requeue for pshared
8126 condvars.
8127
8128 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
8129 element with ~0l for pshared condvars, with NULL otherwise.
8130
8131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8132 (__pthread_cond_wait): Don't store mutex address if the current
8133 value is ~0l.
8134 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8135 (__pthread_cond_timedwait): Likewise.
8136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8137 (__pthread_cond_broadcast): Don't use requeue for pshared
8138 condvars.
8139
8140 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
8141 * tst-cond12.c: New file.
8142 * tst-cond13.c: New file.
8143
8144 2003-11-17 Ulrich Drepper <drepper@redhat.com>
8145
8146 * sysdeps/pthread/configure.in: Make missing forced unwind support
8147 fatal.
8148
8149 2003-11-11 Ulrich Drepper <drepper@redhat.com>
8150
8151 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
8152
8153 2003-11-06 Ulrich Drepper <drepper@redhat.com>
8154
8155 * Makefile: Add magic to clean up correctly.
8156
8157 2003-11-05 Jakub Jelinek <jakub@redhat.com>
8158
8159 * unwind.c (FRAME_LEFT): Define.
8160 (unwind_stop): Handle old style cleanups here.
8161 (__pthread_unwind): Handle old style cleanups only if
8162 !HAVE_FORCED_UNWIND.
8163 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
8164 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
8165 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
8166 ($(objpfx)tst-cleanupx4): Likewise.
8167 * tst-cleanup4.c: New test.
8168 * tst-cleanup4aux.c: New.
8169 * tst-cleanupx4.c: New test.
8170
8171 2003-11-04 Ulrich Drepper <drepper@redhat.com>
8172
8173 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
8174 lll_mutex_*lock macros to skip atomic operations on some archs.
8175
8176 2003-11-03 Ulrich Drepper <drepper@redhat.com>
8177
8178 * sysdeps/pthread/tst-timer.c (main): Initialize
8179 sigev2.sigev_value as well.
8180
8181 2003-10-15 Roland McGrath <roland@redhat.com>
8182
8183 * sysdeps/pthread/configure.in: Barf if visibility attribute support
8184 is missing.
8185 * sysdeps/pthread/configure: Regenerated.
8186
8187 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8188
8189 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
8190 locking macros. No distinction between normal and mutex locking
8191 anymore.
8192 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
8193 Merge bits from lowlevelmutex.S we still need.
8194 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
8195 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8196 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
8197 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
8198 new mutex implementation.
8199 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
8200 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8201 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8202 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8203 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8204 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8205 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8206 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8207 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8208 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
8209 symbol for entry point to avoid cancellation.
8210
8211 2003-10-07 Jakub Jelinek <jakub@redhat.com>
8212
8213 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
8214 changes.
8215 (SAVE_OLDTYPE_0): Fix a typo.
8216
8217 2003-10-03 Ulrich Drepper <drepper@redhat.com>
8218
8219 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8220 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
8221
8222 2003-10-02 Ulrich Drepper <drepper@redhat.com>
8223
8224 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8225 correct offset.
8226
8227 2003-10-02 Jakub Jelinek <jakub@redhat.com>
8228
8229 * Makefile (tests): Add tst-cancel19.
8230 * tst-cancel19.c: New test.
8231
8232 2003-10-02 Ulrich Drepper <drepper@redhat.com>
8233
8234 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8235 restoring of the old cancellation type.
8236
8237 2003-09-30 Jakub Jelinek <jakub@redhat.com>
8238
8239 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8240
8241 2003-09-27 Wolfram Gloger <wg@malloc.de>
8242
8243 * sysdeps/pthread/malloc-machine.h: New file
8244
8245 2003-09-24 Roland McGrath <roland@redhat.com>
8246
8247 * allocatestack.c (__make_stacks_executable): Don't ignore return
8248 value from _dl_make_stack_executable.
8249
8250 2003-09-24 Ulrich Drepper <drepper@redhat.com>
8251
8252 * allocatestack.c (__make_stacks_executable): Also change
8253 permission of the currently unused stacks.
8254
8255 * allocatestack.c (change_stack_perm): Split out from
8256 __make_stacks_executable.
8257 (allocate_stack): If the required permission changed between the time
8258 we started preparing the stack and queueing it, change the permission.
8259 (__make_stacks_executable): Call change_stack_perm.
8260
8261 * Makefile: Build tst-execstack-mod locally.
8262 * tst-execstack-mod.c: New file.
8263
8264 2003-09-23 Jakub Jelinek <jakub@redhat.com>
8265
8266 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8267
8268 2003-09-23 Roland McGrath <roland@redhat.com>
8269
8270 * tst-execstack.c: New file.
8271 * Makefile (tests): Add it.
8272 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8273 (LDFLAGS-tst-execstack): New variable.
8274
8275 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8276 whether to use PROT_EXEC for stack mmap.
8277 (__make_stacks_executable): New function.
8278 * pthreadP.h: Declare it.
8279 * init.c (__pthread_initialize_minimal_internal): Set
8280 GL(dl_make_stack_executable_hook) to that.
8281
8282 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8283
8284 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8285 recommendation from AMD re avoidance of lock prefix.
8286
8287 2003-09-22 Jakub Jelinek <jakub@redhat.com>
8288
8289 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8290 lll_futex_timed_wait instead of lll_futex_wait.
8291 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8292 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8293 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8294 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8295 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8296 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8297 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8298 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8299 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8300 Completely revamp the locking macros. No distinction between
8301 normal and mutex locking anymore.
8302 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8303 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8304 __lll_lock_timedwait): Fix prototypes.
8305 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8306 __lll_lock_timedwait): Likewise.
8307 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8308 macros, add __builtin_expect.
8309 (lll_mutex_timedlock): Likewise. Fix return value.
8310 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8311 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8312 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8313 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8314 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8315 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8316 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8317 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8318
8319 2003-09-22 Ulrich Drepper <drepper@redhat.com>
8320
8321 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8322 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8323 operation if possible.
8324
8325 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8326 like jumping over the lock prefix.
8327
8328 2003-09-21 Ulrich Drepper <drepper@redhat.com>
8329
8330 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8331 locking macros. No distinction between normal and mutex locking
8332 anymore.
8333 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8334 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8335 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8336 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8337 locking. Merge bits from lowlevelmutex.S we still need.
8338 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8339 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8340 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8341 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8342 * Makefile (routines): Remove libc-lowlevelmutex.
8343 (libpthread-rountines): Remove lowlevelmutex.
8344 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8345 for new mutex implementation.
8346 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8347 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8348 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8349 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8350 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8351 Likewise.
8352 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8353 Likewise.
8354 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8355 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8356 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8357 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8358 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8359 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8360 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8361 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8362 Likewise.
8363 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8364 Likewise.
8365 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8366 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8367 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8368 Don't use requeue.
8369 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8370 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8371
8372 2003-09-20 Ulrich Drepper <drepper@redhat.com>
8373
8374 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8375 in parameters of asm with output parameters.
8376
8377 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8378 type of DECR parameter to int.
8379 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8380
8381 2003-09-18 Jakub Jelinek <jakub@redhat.com>
8382
8383 * tst-attr3.c (tf, do_test): Print stack start/end/size and
8384 guardsize for each thread.
8385
8386 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8387
8388 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8389 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8390 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8391
8392 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8393 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8394 NULL.
8395 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8396 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8397 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8398 (pthread_getaffinity_np): Add hidden_def.
8399
8400 * Makefile (tests): Add tst-attr3.
8401 * tst-attr3.c: New test.
8402
8403 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8404
8405 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8406
8407 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8408 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8409
8410 2003-09-17 Jakub Jelinek <jakub@redhat.com>
8411
8412 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8413 * tst-align.c: Include tst-stack-align.h.
8414 (tf, do_test): Use TEST_STACK_ALIGN macro.
8415
8416 2003-09-17 Ulrich Drepper <drepper@redhat.com>
8417
8418 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8419 variable.
8420
8421 2003-09-16 Ulrich Drepper <drepper@redhat.com>
8422
8423 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8424 stack-related values for the initial thread.
8425
8426 2003-09-15 Jakub Jelinek <jakub@redhat.com>
8427
8428 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8429
8430 2003-09-11 Ulrich Drepper <drepper@redhat.com>
8431
8432 * pthread_mutex_lock.c: Minor code rearrangements.
8433
8434 2003-09-05 Roland McGrath <roland@redhat.com>
8435
8436 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8437 Instead, include ../nptl_db/db_info.c to do its magic.
8438 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8439 (__pthread_pthread_key_2ndlevel_size): Likewise.
8440 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8441 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8442 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8443 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8444 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8445 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8446 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8447 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8448 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8449 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8450 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8451 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8452 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8453 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8454 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8455 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8456 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8457
8458 2003-09-08 Ulrich Drepper <drepper@redhat.com>
8459
8460 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8461 of pthread_t to be compatible with LT.
8462 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8463 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8464 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8465 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8466 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8467 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8468 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8469
8470 2003-09-04 Ulrich Drepper <drepper@redhat.com>
8471
8472 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8473
8474 2003-09-04 Jakub Jelinek <jakub@redhat.com>
8475
8476 * unwind-forcedunwind.c: Move to...
8477 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8478 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8479 * sysdeps/pthread/jmpbuf-unwind.h: New file.
8480 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8481 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8482 * unwind.c: Include jmpbuf-unwind.h.
8483 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8484
8485 2003-09-02 Jakub Jelinek <jakub@redhat.com>
8486
8487 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8488 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8489 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8490 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8491 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8492 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8493 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8494 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8495 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8496 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8497 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8498 function.
8499 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8500 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8501 * Makefile (tests): Add tst-stack2.
8502 * tst-stack2.c: New test.
8503 * tst-stack1.c: Include limits.h and sys/param.h.
8504 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8505
8506 * pthread_condattr_setpshared.c: Include errno.h.
8507 (pthread_condattr_setpshared): Return EINVAL if pshared
8508 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8509
8510 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8511 defined symbol for entry point to avoid cancellation.
8512 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8513 Likewise.
8514 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8515 Likewise.
8516 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8517 Likewise.
8518 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8519 Likewise.
8520 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8521 Likewise.
8522 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8523 __close_nocancel, __read_nocancel, __write_nocancel,
8524 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
8525 libpthread.so or librt.so, define to corresponding function
8526 without _nocancel suffix.
8527 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8528 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8529 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8530
8531 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8532
8533 2003-09-02 Ulrich Drepper <drepper@redhat.com>
8534
8535 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8536 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8537
8538 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8539 in subsections has a symbol associated with it.
8540
8541 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8542 defined symbol for entry point to avoid cancellation.
8543 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8544
8545 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8546
8547 * Makefile (tests): Add tst-tls5.
8548 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8549 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8550 ($(objpfx)tst-tls5): New.
8551 ($(objpfx)tst-tls6.out): Likewise.
8552 (tests): Depend on $(objpfx)tst-tls6.out.
8553 * tst-tls3.c: Include stdint.h and pthreaddef.h.
8554 (do_test): Check pthread_self () return value alignment.
8555 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8556 (tf): Check pthread_self () return value alignment.
8557 * tst-tls5.c: New test.
8558 * tst-tls5.h: New.
8559 * tst-tls5mod.c: New.
8560 * tst-tls5moda.c: New.
8561 * tst-tls5modb.c: New.
8562 * tst-tls5modc.c: New.
8563 * tst-tls5modd.c: New.
8564 * tst-tls5mode.c: New.
8565 * tst-tls5modf.c: New.
8566 * tst-tls6.sh: New test.
8567
8568 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8569 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8570 * init.c (pthread_functions): Initialize them.
8571 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8572 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8573 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8574 pthread_cond_timedwait@@GLIBC_2.3.2.
8575
8576 2003-09-01 Jakub Jelinek <jakub@redhat.com>
8577
8578 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8579 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8580 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8581 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8582 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8583 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8584
8585 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8586
8587 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8588 _POSIX_THREAD_PRIORITY_SCHEDULING.
8589 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8590
8591 2003-08-31 Ulrich Drepper <drepper@redhat.com>
8592
8593 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8594 nested function, use static inline function from libio.h.
8595 Code by Richard Henderson.
8596
8597 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8598 weak.
8599
8600 2003-08-30 Jakub Jelinek <jakub@redhat.com>
8601
8602 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8603 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8604 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8605 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8606 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8607 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8608 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8609 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8610 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8611 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8612 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8613 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8614 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8615 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8616 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8617 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8618 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8619 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8620 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8621 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8622 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8623 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8624 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8625 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8626 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8627 * sysdeps/sparc/tls.h: New file.
8628 * sysdeps/sparc/tcb-offsets.sym: New file.
8629 * sysdeps/sparc/Makefile: New file.
8630 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8631 * init.c [__sparc__] (__NR_set_tid_address): Define.
8632
8633 2003-08-29 Jakub Jelinek <jakub@redhat.com>
8634
8635 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8636 _IO_release_lock): Define.
8637
8638 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
8639
8640 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8641 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
8642
8643 2003-08-27 Ulrich Drepper <drepper@redhat.com>
8644
8645 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8646 (__pthread_cleanup_class): Add missing return types of member
8647 functions.
8648
8649 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
8650
8651 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8652 (lll_mutex_unlock_force): Add memory barrier between store and futex
8653 syscall.
8654
8655 2003-08-25 Ulrich Drepper <drepper@redhat.com>
8656
8657 * tst-cancel4.c (do_test): Also unlink tempfname and remove
8658 tempmsg in first loop.
8659
8660 2003-08-18 Ulrich Drepper <drepper@redhat.com>
8661
8662 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8663 _POSIX_THREAD_PRIORITY_SCHEDULING.
8664 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8665
8666 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8667
8668 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8669 (__rtld_lock_default_lock_recursive,
8670 __rtld_lock_default_unlock_recursive): Define.
8671 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8672 __rtld_lock_unlock_recursive): Define using
8673 GL(_dl_rtld_*lock_recursive).
8674 * init.c (__pthread_initialize_minimal_internal): Initialize
8675 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8676 Lock GL(_dl_load_lock) the same number of times as
8677 GL(_dl_load_lock) using non-mt implementation was nested.
8678
8679 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8680 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8681
8682 2003-08-06 Jakub Jelinek <jakub@redhat.com>
8683
8684 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8685 PIPE_BUF.
8686
8687 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8688
8689 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8690
8691 2003-08-03 Jakub Jelinek <jakub@redhat.com>
8692
8693 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8694 to first syscall error check. Move syscall error check for tkill
8695 into __ASSUME_CLONE_STOPPED #ifdef.
8696
8697 2003-08-02 Ulrich Drepper <drepper@redhat.com>
8698
8699 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8700 is not defined, do explicit synchronization.
8701 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8702 is not defined also unlock pd->lock for non-debugging case in case
8703 it is necessary.
8704 * pthread_create.c (start_thread): Always get and release pd->lock
8705 if __ASSUME_CLONE_STOPPED is not defined.
8706 (start_thread_debug): Removed. Adjust users.
8707 * allocatestack.c (allocate_stack): Always initialize lock if
8708 __ASSUME_CLONE_STOPPED is not defined.
8709 * Makefile (tests): Add tst-sched1.
8710 * tst-sched1.c: New file.
8711
8712 * sysdeps/pthread/createthread.c (do_clone): Only use
8713 sched_setschduler and pass correct parameters.
8714
8715 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8716
8717 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8718 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8719 PTHREAD_STACK_MIN in comments.
8720
8721 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8722
8723 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8724 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8725 argument.
8726 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8727 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8728 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8729 (__pthread_cleanup_upto): Fix prototype.
8730 (_longjmp_unwind): Adjust caller.
8731 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8732 Change second argument to const struct pointer.
8733 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8734 * tst-sem9.c (main): Likewise.
8735 * unwind.c: Include string.h for strlen prototype.
8736
8737 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8738
8739 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8740 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8741 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8742 Define HAVE_CMOV.
8743 Patch by Nicholas Miell <nmiell@attbi.com>.
8744
8745 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8746
8747 * init.c (__pthread_initialize_minimal_internal): Initialize
8748 GL(dl_init_static_tls).
8749 * pthreadP.h (__pthread_init_static_tls): New prototype.
8750 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8751 New functions.
8752 * Makefile (tests): Add tst-tls4.
8753 (modules-names): Add tst-tls4moda and tst-tls4modb.
8754 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8755 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8756 tst-tls4modb.so.
8757 * tst-tls4.c: New file.
8758 * tst-tls4moda.c: New file.
8759 * tst-tls4modb.c: New file.
8760
8761 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8762
8763 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8764 before __timer_dealloc.
8765 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8766 Don't call list_unlink.
8767
8768 2003-07-29 Roland McGrath <roland@redhat.com>
8769
8770 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8771
8772 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8773
8774 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8775 Don't reuse struct aiocb A if it failed.
8776 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8777 not just one byte, as that does not block.
8778
8779 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8780
8781 * sysdeps/pthread/unwind-resume.c: New file.
8782 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8783 unwind-resume in csu subdir.
8784 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8785 exceptions.
8786 (librt-sysdep_routines, librt-shared-only-routines): Add
8787 rt-unwind-resume.
8788 * sysdeps/pthread/rt-unwind-resume.c: New file.
8789 * unwind-forcedunwind.c: New file.
8790 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8791 (libpthread-shared-only-routines): Likewise.
8792 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8793 * pthreadP.h (pthread_cancel_init): New prototype.
8794 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8795
8796 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8797 attr argument const struct pthread_attr *.
8798
8799 * res.c (__res_state): Return __resp.
8800 * descr.h: Include resolv.h.
8801 (struct pthread): Add res field.
8802 * pthread_create.c: Include resolv.h.
8803 (start_thread): Initialize __resp.
8804 * Makefile (tests): Add tst-_res1.
8805 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8806 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8807 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8808 libpthread.
8809 * tst-_res1.c: New file.
8810 * tst-_res1mod1.c: New file.
8811 * tst-_res1mod2.c: New file.
8812
8813 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8814
8815 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8816
8817 * Makefile: Define various *-no-z-defs variables for test DSOs
8818 which has undefined symbols.
8819
8820 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8821
8822 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8823 Retry if the stwcx fails to store once_control.
8824
8825 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8826
8827 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8828 pthread_attr_setaffinity.
8829 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8830 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8831 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8832 * pthread_attr_destroy.c: Free cpuset element if allocated.
8833 * pthread_create.c: Pass iattr as additional parameter to
8834 create_thread.
8835 * sysdeps/pthread/createthread.c: If attribute is provided and
8836 a new thread is created with affinity set or scheduling parameters,
8837 start thread with CLONE_STOPPED.
8838 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8839 pthread_attr_setaffinity.
8840 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8841 cpuset element.
8842
8843 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8844
8845 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8846
8847 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8848
8849 * sysdeps/pthread/configure.in: Require CFI directives also for
8850 ppc and s390.
8851
8852 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8853
8854 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8855 Add cfi directives.
8856
8857 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8858
8859 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8860 CLEANUP_JMP_BUF.
8861 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8862 registers as variables. Call __pthread_mutex_unlock_usercnt.
8863 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8864 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8865 not self pointer in __writer. Compare with TID to determine
8866 deadlocks.
8867 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8868 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8869 Likewise.
8870 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8871 Likewise.
8872 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8873 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8874 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8875 macros also when compiling librt.
8876
8877 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8878
8879 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8880 -fasynchronous-unwind-tables.
8881 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8882 (PSEUDO): Add cfi directives.
8883 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8884 Likewise.
8885 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8886 Likewise.
8887
8888 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8889
8890 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8891 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8892 * unwind.c (__pthread_unwind_next): Add hidden_def.
8893 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8894 Likewise.
8895 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8896 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8897 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8898 Likewise.
8899 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8900 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8901 Likewise.
8902 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8903 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8904 __pthread_unregister_cancel and __pthread_unwind_next.
8905
8906 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8907
8908 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8909 different symbol for the cancellation syscall wrapper and
8910 non-cancellation syscall wrapper.
8911 (PSEUDO_END): Define.
8912
8913 2003-07-05 Richard Henderson <rth@redhat.com>
8914
8915 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8916 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8917 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8918 return actual return value from the syscall, not 0.
8919
8920 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8921
8922 * descr.h (struct pthread): Add pid field.
8923 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8924 (__reclaim_stacks): Likewise.
8925 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8926 also check for PID of the signal source.
8927 (__pthread_initialize_minimal_internal): Also initialize pid field
8928 of initial thread's descriptor.
8929 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8930 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8931 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8932 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8933 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8934
8935 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8936
8937 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8938 Fix use of parameter.
8939 (__libc_cleanup_pop): Likewise.
8940
8941 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8942
8943 * init.c (sigcancel_handler): Change parameters to match handler
8944 for SA_SIGACTION. Check signal number and code to recognize
8945 invalid invocations.
8946
8947 2003-07-03 Roland McGrath <roland@redhat.com>
8948
8949 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8950 Apply sizeof (struct pthread) bias to r13 value.
8951
8952 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8953
8954 * sysdeps/pthread/configure.in: Require CFI directives.
8955
8956 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8957 definition.
8958 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8959 libpthread compilation.
8960 * unwind.c (__pthread_unwind): Add hidden_def.
8961 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8962
8963 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8964
8965 * libc-cancellation.c (__libc_cleanup_routine): Define.
8966 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8967 (__pthread_cleanup_pop): Define.
8968
8969 2003-07-01 Richard Henderson <rth@redhat.com>
8970
8971 * sysdeps/alpha/elf/pt-initfini.c: New file.
8972 * sysdeps/alpha/pthread_spin_lock.S: New file.
8973 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8974 * sysdeps/alpha/pthreaddef.h: New file.
8975 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8976 * sysdeps/alpha/tls.h: New file.
8977 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8978 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8979 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8980 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8981 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8982 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8983 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8984 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8985 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8986 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8987
8988 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8989
8990 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8991 cleanup support and unwind info.
8992
8993 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8994
8995 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8996 Use correct cleanup handler registration. Add unwind info.
8997 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8998 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8999 * tst-once3.c: Add cleanup handler and check it is called.
9000 * tst-once4.c: Likewise.
9001 * tst-oncex3.c: New file.
9002 * tst-oncex4.c: New file.
9003 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
9004
9005 2003-06-29 Ulrich Drepper <drepper@redhat.com>
9006
9007 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
9008
9009 2003-06-27 Ulrich Drepper <drepper@redhat.com>
9010
9011 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
9012 (tf_msgsnd): Likewise.
9013
9014 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
9015 premature returns a bit more.
9016
9017 2003-06-26 Ulrich Drepper <drepper@redhat.com>
9018
9019 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
9020 definition to the front.
9021
9022 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
9023 the cleanup functions to make the names unique. Fix dwarf opcode
9024 un unwind table.
9025 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
9026 functions to make the names unique. Fix CFA offset for two blocks.
9027
9028 2003-06-25 Ulrich Drepper <drepper@redhat.com>
9029
9030 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
9031 missing closing braces.
9032 Patch by Christophe Saout <christophe@saout.de>.
9033
9034 2003-06-24 Roland McGrath <roland@redhat.com>
9035
9036 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
9037
9038 2003-06-24 Ulrich Drepper <drepper@redhat.com>
9039
9040 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
9041 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
9042
9043 * pthreadP.h: Declare __find_thread_by_id.
9044 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
9045 * pthread_clock_gettime.c: Allow using other thread's clock.
9046 * pthread_clock_settime.c: Likewise.
9047 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9048 * Makefile: Add rules to build and run tst-clock2.
9049 * tst-clock2.c: New file.
9050
9051 2003-06-23 Ulrich Drepper <drepper@redhat.com>
9052
9053 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
9054 to use exception-based cleanup handler.
9055 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9056
9057 * tst-cond8.c (ch): Announce that we are done.
9058
9059 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
9060
9061 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
9062 Also test aio_suspend with timeout value.
9063
9064 2003-06-22 Ulrich Drepper <drepper@redhat.com>
9065
9066 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
9067 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
9068 attribute_hidden.
9069
9070 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
9071 (__pthread_mutex_lock_internal): Likewise.
9072 (__pthread_mutex_unlock_internal): Likewise.
9073 (__pthread_mutex_unlock_usercnt): Declare.
9074 * pthread_mutex_destroy.c: Always fail if used in any way.
9075 * pthread_mutex_init.c: Update comment.
9076 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
9077 * pthread_mutex_timedlock.c: Adjust __nusers.
9078 * pthread_mutex_trylock.c: Adjust __nusers.
9079 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
9080 and public interfaces are wrapper with pass additional parameter.
9081 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
9082 parameter zero.
9083 * tst-mutex8.c: New file.
9084 * Makefile (tests): Add tst-mutex8.
9085 * sysdeps/pthread/pthread_cond_timedwait.c: Call
9086 __pthread_mutex_unlock_usercnt.
9087 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9088 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9089 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9090 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9091 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9092 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
9093 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9094 Add __nusers.
9095 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9096 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9097 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9098 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9099 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9100
9101 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
9102 * pthread_mutex_timedlock.c: Likewise.
9103 * pthread_mutex_trylock.c: Adjust __nusers.
9104 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
9105 * tst-mutex9.c: New file.
9106 * Makefile (tests): Add tst-mutex9.
9107 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
9108 * sysdeps/ia64/tls.h: Likewise.
9109 * sysdeps/powerpc/tls.h: Likewise.
9110 * sysdeps/s390/tls.h: Likewise.
9111 * sysdeps/sh/tls.h: Likewise.
9112 * sysdeps/x86_64/tls.h: Likewise.
9113 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9114 Change type of __owner.
9115 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9116 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9117 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9118 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9119 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9120
9121 2003-06-19 Jakub Jelinek <jakub@redhat.com>
9122
9123 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
9124 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
9125
9126 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
9127 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
9128 instead of nr to lll_futex_wake. Only set errno and return -1
9129 if err < 0.
9130
9131 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
9132 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
9133 return actual return value from the syscall, not 0.
9134
9135 2003-06-18 Ulrich Drepper <drepper@redhat.com>
9136
9137 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
9138 find a random value.
9139 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
9140 errno==EIDRM.
9141
9142 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
9143 compat_timer_settime.
9144 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
9145 compat_timer_gettime.
9146 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9147 compat_timer_getoverrun.
9148 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
9149 compat_timer_delete.
9150
9151 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
9152 error-checking mutex detect busy mutexes.
9153
9154 2003-06-17 Ulrich Drepper <drepper@redhat.com>
9155
9156 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
9157 Add ax to clobber list.
9158 (lll_mutex_cond_lock): Likewise.
9159 (lll_mutex_unlock): Likewise.
9160 (lll_lock): Likewise.
9161 (lll_unlock): Likewise.
9162
9163 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
9164 * tst-cancel18.c: New file.
9165 * tst-cancelx18.c: New file.
9166
9167 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
9168 and tcdrain.
9169
9170 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
9171 * tst-cancel17.c: New file.
9172 * tst-cancelx17.c: New file.
9173
9174 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9175 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9176 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9177
9178 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
9179
9180 2003-06-16 Jakub Jelinek <jakub@redhat.com>
9181
9182 * sysdeps/pthread/createthread.c (create_thread): Set
9183 header.multiple_threads unconditionally.
9184 * allocatestack.c (allocate_stack): Likewise.
9185 * descr.h (struct pthread): Add header.multiple_threads
9186 unconditionally.
9187 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
9188 Define for librt. #error if neither libpthread, libc nor librt.
9189 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
9190 Likewise.
9191 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
9192 CDISABLE): Likewise.
9193 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
9194 CDISABLE): Likewise.
9195 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
9196 CDISABLE): Likewise.
9197 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
9198 CDISABLE): Likewise. Access header.multiple_threads outside of
9199 libc and libpthread.
9200 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
9201 Likewise.
9202 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
9203 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
9204
9205 2003-06-17 Ulrich Drepper <drepper@redhat.com>
9206
9207 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
9208 Also test early cancellation before the thread reaches the cancellation
9209 point.
9210
9211 * Makefile: Compile forward.c with exceptions.
9212
9213 * sysdeps/unix/sysv/linux/sleep.c: New file.
9214
9215 2003-06-16 Ulrich Drepper <drepper@redhat.com>
9216
9217 * Makefile: Add CFLAGS definition to compile function wrappers
9218 duplicated from libc with exceptions.
9219 * tst-cancel4.c: Also check cancellation handlers.
9220
9221 * Makefile: Add rules to build and run tst-cancel16 and
9222 tst-cancelx16. Add missing CFLAGS definitions.
9223 * tst-cancel16.c: New file.
9224 * tst-cancelx16.c: New file.
9225
9226 2003-06-15 Ulrich Drepper <drepper@redhat.com>
9227
9228 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9229 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9230 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9231 (DL_SYSINFO_IMPLEMENTATION): Likewise.
9232
9233 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9234 (LIBC_CANCEL_RESET): Likewise.
9235 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9236 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9237 librt-cancellation.
9238 (CFLAGS-libcrt-cancellation.c): Define.
9239 * sysdeps/pthread/librt-cancellation.c: New file.
9240 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9241 macros also when compiling librt.
9242 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9243 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9244 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9245 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9246 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9247 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9248 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9249
9250 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9251 compat_timer_create.
9252
9253 2003-06-14 Ulrich Drepper <drepper@redhat.com>
9254
9255 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9256
9257 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9258 __register_atfork.
9259 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9260 Add libc_hidden_def.
9261
9262 2003-06-13 Roland McGrath <roland@redhat.com>
9263
9264 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9265 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9266
9267 2003-06-11 Ulrich Drepper <drepper@redhat.com>
9268
9269 * allocatestack.c (queue_stack): Always inline.
9270 * ptreadhP.h (__do_cancel): Likewise.
9271
9272 2003-06-10 Jakub Jelinek <jakub@redhat.com>
9273
9274 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9275 a typo.
9276
9277 2003-06-10 Ulrich Drepper <drepper@redhat.com>
9278
9279 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9280 (__pthread_cond_signal): Remove incorrect second addition for
9281 cond_lock!=0.
9282
9283 2003-06-09 Ulrich Drepper <drepper@redhat.com>
9284
9285 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9286 (__pthread_cond_signal): Use correct futex pointer in
9287 __lll_mutex_lock_wait call.
9288
9289 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9290 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9291
9292 2003-06-08 Ulrich Drepper <drepper@redhat.com>
9293
9294 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9295 cancelable.
9296 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9297 Likewise.
9298
9299 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9300 hand-written CFI generation code. Since ENTRY/END also initiated
9301 CFI frames this caused two CFI sets to be generated.
9302
9303 2003-06-07 Ulrich Drepper <drepper@redhat.com>
9304
9305 * cleanup_routine.c: New file.
9306 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9307 * sysdeps/pthread/pthread.h: Add support for fully exception-based
9308 cleanup handling.
9309 * Makefile (libpthread-routines): Add cleanup_routine.
9310 Add more CFLAGS variables to compile with exceptions. Add comments
9311 why which file needs unwind tables.
9312 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9313 tests.
9314 * tst-cancelx1.c: New file.
9315 * tst-cancelx2.c: New file.
9316 * tst-cancelx3.c: New file.
9317 * tst-cancelx4.c: New file.
9318 * tst-cancelx5.c: New file.
9319 * tst-cancelx6.c: New file.
9320 * tst-cancelx7.c: New file.
9321 * tst-cancelx8.c: New file.
9322 * tst-cancelx9.c: New file.
9323 * tst-cancelx10.c: New file.
9324 * tst-cancelx11.c: New file.
9325 * tst-cancelx12.c: New file.
9326 * tst-cancelx13.c: New file.
9327 * tst-cancelx14.c: New file.
9328 * tst-cancelx15.c: New file.
9329 * tst-cleanupx0.c: New file.
9330 * tst-cleanupx0.expect: New file.
9331 * tst-cleanupx1.c: New file.
9332 * tst-cleanupx2.c: New file.
9333 * tst-cleanupx3.c: New file.
9334
9335 * tst-cleanup0.c: Make standard compliant.
9336 * tst-cleanup1.c: Likewise.
9337
9338 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9339 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9340 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9341 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9342 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9343 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9344 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9345 CLEANUP_JMP_BUF.
9346 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9347 * tst-cancel12.c: New file.
9348 * tst-cancel13.c: New file.
9349 * tst-cancel14.c: New file.
9350 * tst-cancel15.c: New file.
9351 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9352 and tst-cancel15.
9353
9354 * tst-cancel1.c: Add some comments.
9355
9356 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9357 timeout correctly.
9358
9359 2003-06-06 Ulrich Drepper <drepper@redhat.com>
9360
9361 * Makefile (CFLAGS-pthread_cancel.c): Define.
9362
9363 2003-06-05 Ulrich Drepper <drepper@redhat.com>
9364
9365 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9366 Change type of __writer element to int.
9367 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9368 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9369 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9370 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9371 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9372 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9373 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9374 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9375 Compare with TID to determine deadlocks.
9376 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9377 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9378 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9379 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9380 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9381 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9382 Likewise.
9383 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9384 Likewise.
9385 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9386 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9387 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9388 Likewise.
9389 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9390 Likewise.
9391 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9392 * Makefile (tests): Add tst-rwlock12.
9393 * tst-rwlock12.c: New file.
9394
9395 2003-06-05 Jakub Jelinek <jakub@redhat.com>
9396
9397 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9398 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9399 Remove bogus hidden_proto.
9400 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9401 Likewise.
9402 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9403 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9404 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9405 ___lll_mutex_timedlock): Likewise.
9406
9407 2003-06-04 Ulrich Drepper <drepper@redhat.com>
9408
9409 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9410 (__pthread_cond_signal): Add some code to eventually handle
9411 cond_lock!=0.
9412
9413 2003-06-01 Ulrich Drepper <drepper@redhat.com>
9414
9415 * Makefile (tests): Add tst-exec4.
9416 (tst-exec4-ARGS): Define.
9417 * tst-exec4.c: New file.
9418
9419 2003-05-31 Ulrich Drepper <drepper@redhat.com>
9420
9421 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9422 Also fail if tv_nsec < 0.
9423 (__lll_timedwait_tid): Likewise.
9424 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9425 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9426 Likewise.
9427 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9428 Likewise.
9429 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9430 Likewise.
9431 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9432 Likewise.
9433 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9434 Likewise.
9435 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9436 Likewise.
9437
9438 * Makefile (tests): Add tst-sem8 and tst-sem9.
9439 * tst-sem8.c: New file.
9440 * tst-sem9.c: New file.
9441 * sem_open.c: Fix creation of in_use record if the file exists but
9442 no internal record.
9443
9444 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9445 definitions.
9446
9447 * sysdeps/pthread/timer_create.c (timer_create): In case
9448 evp==NULL, assign timer ID to sival_ptr.
9449
9450 * descr.h (struct pthread_unwind_buf): Change type of prev element to
9451 struct pthread_unwind_buf *.
9452 (struct pthread): Likewise for cleanup_jmp_buf element.
9453
9454 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9455 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9456 * unwind.c (__pthread_unwind_next): Likewise.
9457
9458 2003-05-30 Ulrich Drepper <drepper@redhat.com>
9459
9460 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9461 (lll_futex_timed_wait): Use int for futex value parameter.
9462 (lll_futex_wake): Likewise.
9463 (lll_futex_requeue): Likewise.
9464
9465 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9466 Replace one memory operation with one register operation.
9467
9468 * tst-join4.c (do_test): Fix error message.
9469
9470 * tst-rwlock6.c (do_test): Use correct format specifier.
9471
9472 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9473 (__lll_mutex_lock_wait): Replace one memory operation with one
9474 register operation.
9475 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9476 (__lll_mutex_lock_wait): Likewise.
9477
9478 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9479 (__lll_mutex_cond_lock): Add one to value parameter of
9480 __lll_lock_wait to reflect reality in the futex syscall.
9481 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9482 (lll_mutex_cond_lock): Likewise.
9483
9484 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9485
9486 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9487 New function.
9488 (lll_mutex_cond_lock): Define.
9489
9490 2003-05-29 Ulrich Drepper <drepper@redhat.com>
9491
9492 * Makefile (tests): Add tst-signal6.
9493 * tst-signal6.c: New file.
9494
9495 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9496 (__lll_mutex_unlock_force): New function
9497 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9498
9499 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9500 (__lll_mutex_unlock_force): New function.
9501 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9502
9503 * tst-rwlock7.c (do_test): Use correct format specifier.
9504
9505 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9506 Find break parameter in correct asm argument.
9507
9508 2003-05-27 Jakub Jelinek <jakub@redhat.com>
9509
9510 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9511 Remove out4.
9512 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9513 error occured.
9514 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9515 Add __mutex.
9516 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9517 lll_futex_requeue, lll_mutex_unlock_force): Define.
9518
9519 2003-05-30 Jakub Jelinek <jakub@redhat.com>
9520
9521 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9522 (pthread_cond_t): Add __mutex.
9523 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9524 lll_futex_requeue, lll_mutex_unlock_force): Define.
9525
9526 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9527
9528 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9529 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9530 Add __mutex field.
9531 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9532 Define.
9533 (lll_futex_wait, lll_futex_wake): Define.
9534 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9535 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9536 FUTEX_REQUEUE instead of FUTEX_WAIT.
9537 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9538 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9539 mutex which was used in condvar structure. Call
9540 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9541 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9542
9543 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9544 include tcb-offsets.h. Read wakeup value in locked region.
9545 Use the value of gbr register as THREAD_ID.
9546 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9547 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9548 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9549
9550 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9551 macros.
9552
9553 2003-05-28 Ulrich Drepper <drepper@redhat.com>
9554
9555 * sysdeps/pthread/pthread_cond_broadcast.c
9556 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9557
9558 2003-05-26 Ulrich Drepper <drepper@redhat.com>
9559
9560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9561 typo in register name.
9562 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9563 correctly. Actually use requeue. Little optimization.
9564 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9565 mutex address early. Handle cancellation state as 32-bit value.
9566 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9567 Remove unnecessary label.
9568
9569 2003-05-25 Ulrich Drepper <drepper@redhat.com>
9570
9571 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9572 instead of FUTEX_WAIT.
9573 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9574 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9575 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9576 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9577 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9578 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9579 used in condvar structure. Call __pthread_mutex_cond_lock instead
9580 of __pthread_mutex_lock_internal.
9581 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9582 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9583 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9584 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9585 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9586 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9587 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9588 Add pthread_mutex_cond_lock.
9589 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9590 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9591 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9592 lll_mutex_cond_lock.
9593 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9594 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9595 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9596 Add __mutex field.
9597 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9598 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9599
9600 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9601 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9602
9603 * pthreadP.h: Declare __pthread_mutex_cond_lock.
9604 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9605 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
9606 macro don't define aliases.
9607
9608 * cancellation.c: Remove __pthread_enable_asynccancel_2.
9609 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9610 * sysdeps/pthread/pthread_cond_timedwait.c: Use
9611 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9612 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9613 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9614 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9615 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9616 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9617
9618 2003-05-17 Ulrich Drepper <drepper@redhat.com>
9619
9620 * sem_open.c: Fix one endless loop. Implement correct semantics
9621 wrt opening the same semaphore more then once.
9622 * sem_close.c: Adjust for sem_open change.
9623 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
9624 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9625 * Makefile (tests): Add tst-sem7.
9626 * tst-sem7.c: New file.
9627
9628 2003-05-16 Roland McGrath <roland@redhat.com>
9629
9630 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9631 uninitialized variable braino.
9632
9633 2003-05-16 Ulrich Drepper <drepper@redhat.com>
9634
9635 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9636 test for syscall availability.
9637
9638 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9639 __no_posix_timers to -1 if the syscalls don't exist.
9640
9641 * pthread_join.c (pthread_join): Set tid field of the joined
9642 thread to -1. This isn't necessary but helps to recognize some
9643 error conditions with almost no cost.
9644
9645 * allocatestack.c (FREE_P): Also negative values indicate an
9646 unused stack.
9647
9648 * unwind.c: Include <unistd.h>.
9649
9650 2003-05-14 Ulrich Drepper <drepper@redhat.com>
9651
9652 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9653
9654 2003-05-14 Jakub Jelinek <jakub@redhat.com>
9655
9656 * Makefile (crti-objs, crtn-objs): New variables.
9657 (omit-deps, extra-objs): Add crtn.
9658 ($(objpfx)libpthread.so): Depend on both crti and crtn
9659 and links to them in multidir.
9660 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9661
9662 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
9663
9664 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9665 (lll_mutex_unlock): Use atomic_exchange_rel.
9666
9667 2003-05-11 Ulrich Drepper <drepper@redhat.com>
9668
9669 * cond-perf.c (cons): Add missing locking around setting of alldone.
9670
9671 2003-05-10 Ulrich Drepper <drepper@redhat.com>
9672
9673 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9674 related macros.
9675 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9676
9677 2003-05-09 Ulrich Drepper <drepper@redhat.com>
9678
9679 * tst-sem6.c: New file.
9680 * Makefile (tests): Add tst-sem6.
9681
9682 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9683 Use atomic_exchange_rel instead of atomic_exchange.
9684 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9685 Likewise.
9686
9687 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9688 code for lll_futex_wait and lll_futex_wake in static apps. Use
9689 vsyscall is possible.
9690
9691 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9692 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9693 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9694 pthread_setaffinity_np.
9695 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9696 and pthread_setaffinity_np.
9697 * Makefile (libpthread-routines): Add pthread_getaffinity and
9698 pthread_setaffinity.
9699
9700 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9701 use it in case mmap to allocate the stack fails.
9702 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9703 ARCH_MAP_FLAGS here.
9704 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9705 ARCH_RETRY_MMAP.
9706
9707 2003-05-08 Ulrich Drepper <drepper@redhat.com>
9708
9709 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9710 handler implementation. It is now lockless in fork().
9711 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9712 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9713 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9714 declare the __fork_*_lists.
9715 (struct fork_handler): Include pointers to all three functions.
9716 Add next, refcntr and need_signal elements.
9717 (__fork_handlers): New declaration.
9718 (__register_atfork_malloc): Remove declaration.
9719 (HAVE_register_atfork_malloc): Remove definition.
9720 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9721 __pthread_child_handler variable.
9722 (__libc_pthread_init): Use __register_atfork instead of explicitly
9723 adding to the list.
9724 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9725 and lll_futex_wake.
9726 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9727
9728 * unwind.c (unwind_cleanup): Print error message and then abort. This
9729 function must never be reached.
9730
9731 * cond-perf.c: New file.
9732
9733 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9734
9735 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9736
9737 2003-05-04 Roland McGrath <roland@redhat.com>
9738
9739 * Makefile ($(objpfx)../libc.so): New target.
9740
9741 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9742
9743 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9744 (pthread_condattr_t): Size is only an int, don't use long for
9745 alignment.
9746 (pthread_mutexattr_t): Likewise.
9747 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9748 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9749 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9750
9751 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9752
9753 * sysdeps/i386/tls.h: Define THREAD_ID.
9754 * sysdeps/ia64/tls.h: Likewise.
9755 * sysdeps/powerpc/tls.h: Likewise.
9756 * sysdeps/s390/tls.h: Likewise.
9757 * sysdeps/sh/tls.h: Likewise.
9758 * sysdeps/x86_64/tls.h: Likewise.
9759 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9760 record ownership.
9761 * pthread_mutex_timedlock.c: Likewise.
9762 * pthread_mutex_trylock.c: Likewise.
9763 * pthread_mutex_unlock.c: Likewise.
9764 * pthread_rwlock_trywrlock.c: Likewise.
9765 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9766 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9767 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9768 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9769
9770 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9771 flag.
9772
9773 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9774
9775 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9776 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9777 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9778 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9779 Make __align long long instead of long.
9780 (pthread_rwlock_t): Formatting.
9781 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9782 (pthread_rwlock_t): Formatting.
9783 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9784 (pthread_cond_t): Make __align long long instead of long.
9785 (pthread_rwlock_t): Move __flags field to the same position as in
9786 linuxthreads.
9787
9788 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9789
9790 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9791 * tst-rwlock7.c (do_test): Likewise.
9792
9793 2003-04-26 Roland McGrath <roland@redhat.com>
9794
9795 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9796
9797 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9798
9799 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9800 sizeof (struct pthread).
9801 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9802 1 struct pthread.
9803 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9804 to 0.
9805 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9806 struct pthread.
9807 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9808 to 32-bit bytes.
9809 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9810 tcbp.
9811 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9812 unneccessarily.
9813 (NO_TLS_OFFSET): Define.
9814 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9815 add TLS_TCB_SIZE unnecessarily.
9816
9817 2003-04-22 Roland McGrath <roland@redhat.com>
9818
9819 * Makeconfig (shared-thread-library): Reverse link order to work
9820 around linker bug.
9821
9822 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9823
9824 * semaphore.h: Fix typo in comment.
9825
9826 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9827
9828 * sysdeps/pthread/sigfillset.c: New file.
9829
9830 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9831 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9832 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9833 * sysdeps/pthread/sigaction.c: Likewise.
9834 * sysdeps/pthread/sigprocmask.c: New file.
9835 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9836 __SIGRTMIN+1.
9837 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9838 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9839 in this case.
9840
9841 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9842
9843 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9844 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9845
9846 * sysdeps/unix/sysv/linux/unregister-atfork.c
9847 (__unregister_atfork): Don't free memory not allocated dynamically.
9848
9849 * semaphore.h: Remove __THROW marker from cancellation points.
9850 * nptl/sysdeps/pthread/pthread.h: Likewise.
9851
9852 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9853
9854 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9855 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9856 __THROW.
9857
9858 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9859
9860 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9861
9862 2003-04-15 Roland McGrath <roland@redhat.com>
9863
9864 * forward.c (__pthread_unwind): Tweak to avoid warning.
9865
9866 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9867
9868 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9869
9870 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9871
9872 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9873 overflow CFA advance instructions.
9874 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9875
9876 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9877
9878 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9879 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9880 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9881 defined.
9882
9883 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9884 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9885 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9886 DW_CFA_advance_loc for .Laddl-.Lsubl.
9887
9888 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9889
9890 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9891 position-independent unwind data for static libraries.
9892 Add missing unwind info. Add comments.
9893
9894 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9895 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9896 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9897 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9898
9899 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9900
9901 * Makefile: Make sure all cancellation points are compiled with
9902 exception and asynchronous unwind tables.
9903
9904 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9905 which mishandles loading of global object addresses in PIC.
9906 (THREAD_SETMEM_NC): Likewise.
9907
9908 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9909
9910 * pthread.h: Define new data structure for cleanup buffer. Declare
9911 new cleanup handler interfaces.
9912 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9913 (struct pthread): Add cleanup_jmp_buf pointer. Define
9914 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9915 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9916 it. Declare old cleanup handler installation functions.
9917 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9918 handling.
9919 * cleanup_defer.c: Likewise.
9920 * cleanup_compat.c: New file. Old cleanup code.
9921 * cleanup_def_compat.c: New file. Old cleanup code.
9922 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9923 if own thread descriptor.
9924 * unwind.c: New file.
9925 * forward.c: Add __pthread_unwind.
9926 * init.c (pthread_functions): Add __pthread_unwind.
9927 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9928 Add ptr___pthread_unwind.
9929 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9930 and unwind function.
9931 * Makefile (libpthread-routines): Add cleanup_compat,
9932 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9933 table generation if necessary.
9934 * version.c: Record whether unwind support is compiled in.
9935 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9936 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9937 handler interfaces.
9938 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9939 complication to generate unwind information for syscall wrappers.
9940 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9941 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9942 __cleanup_fct_attribute.
9943
9944 * Makefile: Add rules to build and run tst-cleanup0.
9945 * tst-cleanup0.c: New file.
9946 * tst-cleanup0.expect: New file.
9947
9948 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9949 caller. Optimize to avoid often unecessary local variable.
9950
9951 2003-04-11 Roland McGrath <roland@redhat.com>
9952
9953 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9954 sets variable `multidir'; include that.
9955 (generated): Add it.
9956 ($(objpfx)$(multidir)/crti.o): New target.
9957 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9958
9959 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9960
9961 * tst-attr2.c (do_test): Add cast to avoid warning.
9962 * tst-mutex4.c (do_test): Likewise.
9963
9964 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9965
9966 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9967 in child.
9968
9969 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9970
9971 * Makefile (tests): Add tst-detach1.
9972 * tst-detach1.c: New file.
9973
9974 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9975
9976 * sysdeps/pthread/pthread.h: Remove duplicate
9977 pthread_cleanup_{push,pop} definitions.
9978
9979 * tst-barrier2.c: Eliminate warnings.
9980 * tst-cancel4.c: Likewise.
9981 * tst-cond4.c: Likewise.
9982 * tst-cond6.c: Likewise.
9983 * tst-detach1.c: Likewise.
9984 * tst-rwlock4.c: Likewise.
9985 * tst-rwlock6.c: Likewise.
9986 * tst-rwlock7.c: Likewise.
9987 * tst-sem3.c: Likewise.
9988 * tst-spin2.c: Likewise.
9989 * tst-umask1.c: Likewise.
9990
9991 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9992
9993 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9994
9995 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9996
9997 * descr.h (struct pthread): Move cancelhandling member to the front.
9998
9999 2003-04-05 Ulrich Drepper <drepper@redhat.com>
10000
10001 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
10002 malloc_parent, and malloc_child statically.
10003 (__register_atfork_malloc): New function.
10004 (free_mem): Don't free any of the malloc_* variables on the list.
10005 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
10006 Define HAVE_register_atfork_malloc.
10007
10008 2003-04-04 Ulrich Drepper <drepper@redhat.com>
10009
10010 * sysdeps/pthread/createthread.c (create_thread): Add some more
10011 comments explaining when to set multiple_threads and when not.
10012
10013 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
10014 THREAD_ATOMIC_BIT_SET if not already defined.
10015 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
10016 THREAD_ATOMIC_BIT_SET:
10017 * sysdeps/x86_64/tls.h: Likewise.
10018 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
10019 THREAD_ATOMIC_CMPXCHG_VAL.
10020 (_pthread_cleanup_pop_restore): Likewise.
10021 * cancellation.c (__pthread_enable_asynccancel): Likewise.
10022 (__pthread_enable_asynccancel_2): Likewise.
10023 (__pthread_disable_asynccancel): Likewise.
10024 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
10025 (__libc_disable_asynccancel): Likewise.
10026 * init.c (sigcancel_handler): Likewise.
10027 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
10028 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
10029
10030 2003-04-03 Ulrich Drepper <drepper@redhat.com>
10031
10032 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
10033 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
10034 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
10035 * Makefile (tests): Add tst-cancel11.
10036 * tst-cancel11.c: New file.
10037
10038 2003-04-01 Ulrich Drepper <drepper@redhat.com>
10039
10040 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
10041 round, not the first. Use specific_used flag instead of local
10042 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
10043 (__free_tcb): Don't call deallocate_tsd here.
10044 (start_thread): Call deallocate_tsd here.
10045 * pthread_setspecific.c: Set specific_used flag really only when
10046 needed.
10047 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
10048 * tst-tsd3.c: New file.
10049 * tst-tsd4.c: New file.
10050
10051 2003-03-31 Ulrich Drepper <drepper@redhat.com>
10052
10053 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
10054 Use atomic_exchange_and_add instead of __lll_add.
10055 (__lll_mutex_timedlock): Likewise.
10056 Patch by Ian Wienand.
10057
10058 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
10059
10060 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10061 (SINGLE_THREAD_P): Fix typo.
10062 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
10063
10064 2003-03-31 Ulrich Drepper <drepper@redhat.com>
10065
10066 * Makefile (tests): Add tst-align.
10067 * tst-align.c: New file.
10068 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
10069
10070 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
10071 function correctly.
10072
10073 * tst-tsd2.c: Add casts to avoid warnings.
10074
10075 2003-03-30 Ulrich Drepper <drepper@redhat.com>
10076
10077 * descr.h (struct pthread): Move most often used elements to the front.
10078
10079 2003-03-29 Ulrich Drepper <drepper@redhat.com>
10080
10081 * Makefile (libpthread-routines): Add pthread_atfork.
10082 (libpthread-static-only-routines): Add pthread_atfork.
10083
10084 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
10085
10086 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
10087 of TLS_DTV_AT_TP.
10088 (INSTALL_DTV): Add parens.
10089 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
10090 Use passed descr instead of THREAD_SELF.
10091 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
10092 (__lll_mutex_timedlock_wait): Correct expected value after
10093 spurious wakeup.
10094 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
10095 Release lock before waking up the waiters.
10096 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
10097 criteria. Reorderstruct passed to cleanup handler. Fix
10098 handling of cancellation and failung pthread_mutex_unlock call.
10099 Use __pthread_enable_asynccancel_2 instead of
10100 __pthread_enable_asynccancel.
10101 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10102 Return result of lock re-get if it fails.
10103 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
10104 for __pthread_cleanup_push.
10105 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
10106 completely broken rwlock implementation.
10107 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10108 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10109 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10110 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
10111 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10112 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
10113 versioned_symbol macro.
10114 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
10115 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10116
10117 2003-03-27 Ulrich Drepper <drepper@redhat.com>
10118
10119 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
10120 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
10121 and __helper_tid.
10122 (struct timer): Remove th and bar field.
10123 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
10124 debugging code. Create only one helper thread.
10125 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
10126 helper thread.
10127 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
10128 Renamed. Define statically. Use thread info from siginfo.
10129 (__helper_once): New variable.
10130 (__helper_tid): New variable.
10131 (__reset_helper_control): New function.
10132 (__start_helper_thread): New function.
10133
10134 * pthread_create.c (start_thread): Don't use setjmp inside
10135 __builtin_expect to work around gcc bug.
10136
10137 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
10138 timer_delete syscall fails, but not with ENOSYS, set
10139 __no_posix_timers.
10140
10141 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
10142 (timer_settime): Fix typo.
10143 * sysdeps/unix/sysv/linux/timer_getoverr.c
10144 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
10145
10146 2003-03-27 Jakub Jelinek <jakub@redhat.com>
10147
10148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
10149 offset of cleanupbuf.__prev.
10150
10151 2003-03-26 Jakub Jelinek <jakub@redhat.com>
10152
10153 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
10154 of included file.
10155
10156 2003-03-26 Ulrich Drepper <drepper@redhat.com>
10157
10158 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
10159 NULL provide default definition to syscall.
10160
10161 2003-03-25 Roland McGrath <roland@redhat.com>
10162
10163 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
10164 (timer_id2ptr): Fix typo.
10165
10166 2003-03-25 Ulrich Drepper <drepper@redhat.com>
10167
10168 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
10169 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
10170 * sysdeps/ia64/pthreaddef.h: Likewise.
10171 * sysdeps/powerpc/pthreaddef.h: Likewise.
10172 * sysdeps/s390/pthreaddef.h: Likewise.
10173 * sysdeps/sh/pthreaddef.h: Likewise.
10174 * sysdeps/x86_64/pthreaddef.h: Likewise.
10175 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
10176 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
10177 being changed.
10178 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
10179 SIGTIMER is not unblocked.
10180 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
10181 RT signal taken.
10182 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
10183 be send.
10184 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
10185 pass pointer through as ID.
10186 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
10187 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
10188 * sysdeps/unix/sysv/linux/timer_create.c: New file.
10189 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
10190 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
10191 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
10192 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
10193 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
10194 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
10195 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
10196 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
10197 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
10198 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
10199 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
10200 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
10201 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
10202 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
10203 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
10204 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
10205 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
10206 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
10207 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
10208 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
10209 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
10210 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
10211 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
10212 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
10213 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
10214 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
10215 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
10216 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
10217 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
10218 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10219
10220 * pthreadP.h: Remove FRAME_LEFT definition.
10221 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10222 already left frame. Programs which have this problem are not POSIX
10223 compliant.
10224 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10225
10226 2003-03-24 Ulrich Drepper <drepper@redhat.com>
10227
10228 * sysdeps/pthread/tst-timer.c: Check return values of the
10229 functions we test.
10230
10231 2003-03-23 Roland McGrath <roland@redhat.com>
10232
10233 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10234 * tst-tls3mod.c: Likewise.
10235 * tst-tls1.c: Likewise.
10236 * tst-tls2.c: Likewise.
10237
10238 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10239 undefined behavior.
10240
10241 * tst-join5.c (tf1, tf2): Add a cast.
10242
10243 * Makeconfig (includes): Append -I$(..)nptl to this variable.
10244
10245 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10246 Don't test anything.
10247 * tst-cond4.c: Likewise.
10248 * tst-cond6.c: Likewise.
10249 * tst-flock2.c: Likewise.
10250 * tst-mutex4.c: Likewise.
10251 * tst-rwlock4.c: Likewise.
10252 * tst-signal1.c: Likewise.
10253 * tst-spin2.c: Likewise.
10254 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10255
10256 * tst-mutex4.c: Use test-skeleton.c.
10257 * tst-spin2.c: Likewise.
10258 * tst-sysconf.c: Likewise.
10259 * tst-barrier2.c: Likewise.
10260 * tst-cond4.c: Likewise.
10261 * tst-cond6.c: Likewise.
10262 * tst-rwlock4.c: Likewise.
10263 * tst-unload.c: Likewise.
10264 * tst-flock2.c (do_test): Use return instead of exit.
10265
10266 2003-03-22 Jakub Jelinek <jakub@redhat.com>
10267
10268 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10269
10270 2003-03-21 Ulrich Drepper <drepper@redhat.com>
10271
10272 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10273 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10274 instead of __lll_compare_and_swap.
10275 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10276 Likewise.
10277 Removed definition if __lll_compare_and_swap.
10278
10279 * cancellation.c: Adjust for new form of compare&exchange macros.
10280 * cleanup_defer.c: Likewise.
10281 * init.c: Likewise.
10282 * libc-cancellation.c: Likewise.
10283 * old_pthread_cond_broadcast.c: Likewise.
10284 * old_pthread_cond_signal.c: Likewise.
10285 * old_pthread_cond_timedwait.c: Likewise.
10286 * old_pthread_cond_wait.c: Likewise.
10287 * pthread_cancel.c: Likewise.
10288 * pthread_create.c: Likewise.
10289 * pthread_detach.c: Likewise.
10290 * pthread_join.c: Likewise.
10291 * pthread_key_delete.c: Likewise.
10292 * pthread_setcancelstate.c: Likewise.
10293 * pthread_setcanceltype.c: Likewise.
10294 * pthread_timedjoin.c: Likewise.
10295 * pthread_tryjoin.c: Likewise.
10296 * sysdeps/pthread/createthread.c: Likewise.
10297
10298 2003-03-20 Ulrich Drepper <drepper@redhat.com>
10299
10300 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10301 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10302 definitions. Replace uses with calls to atomic_* functions.
10303 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10304 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10305 __lll_test_and_set calls with atomic_exchange_and_add and
10306 atomic_exchange calls respectively.
10307 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10308 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10309 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10310 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10311 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10312 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10313 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10314
10315 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10316 returns the old value.
10317
10318 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
10319
10320 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10321 int for variable OLDVAL and correct inline assembler contraint.
10322 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10323 type int for variable OLD.
10324
10325 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10326 only for s390-32.
10327 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10328 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10329 instead of multiple_threads field in the TCB.
10330
10331 2003-03-19 Ulrich Drepper <drepper@redhat.com>
10332
10333 * sysdeps/i386/i686/bits/atomic.h: Removed.
10334 * sysdeps/i386/i586/bits/atomic.h: Removed.
10335 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
10336 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
10337 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
10338 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
10339 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
10340 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
10341 * atomic.h: Removed. Moved to glibc.
10342
10343 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10344 support for clock selection.
10345
10346 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10347 signalling waiters.
10348
10349 2003-03-18 Roland McGrath <roland@redhat.com>
10350
10351 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10352 Add __lll_rel_instr first. Add memory clobber.
10353 (lll_mutex_unlock): Use __lll_test_and_set.
10354 From Paul Mackerras <paulus@samba.org>.
10355
10356 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10357 unconditionally.
10358 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10359 (SINGLE_THREAD_P): Add `header.' prefix.
10360 From Paul Mackerras <paulus@samba.org>.
10361
10362 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10363 pthread_timedjoin_np to ...
10364 (libpthread: GLIBC_2.3.3): ... here.
10365 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10366
10367 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10368 Avoid shadowing VAL variable.
10369
10370 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10371 New macro.
10372
10373 2003-03-18 Ulrich Drepper <drepper@redhat.com>
10374
10375 * Makefile (tests): Add tst-cond11.
10376 * tst-cond11.c: New file.
10377
10378 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10379 struct passed to cleanup handler to eliminate one more
10380 instruction.
10381 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10382
10383 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10384 (pthrad_cond_t): Replace __unused field with __clock.
10385
10386 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10387 waken all waiters in cleanup handler.
10388 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10389 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10390
10391 * pthread_condattr_getclock.c: New file.
10392 * pthread_condattr_setclock.c: New file.
10393 * sysdeps/pthread/pthread.h: Declare these new functions.
10394 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10395 * Makefile (libpthread-routines): Add the new functions.
10396 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10397 Renamed field to value. Document use of the bits.
10398 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10399 change.
10400 * pthread_condattr_setpshared.c: Likewise.
10401 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10402 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10403 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10404 Add __clock field.
10405 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10406 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10407 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10408 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10409 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10410 Implement clock selection.
10411 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10412 * pthread-errnos.sym: Add ENOSYS.
10413 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10414 _POSIX_CLOCK_SELECTION.
10415 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10416
10417 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10418 invalid .size directive.
10419
10420 2003-03-17 Roland McGrath <roland@redhat.com>
10421
10422 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10423 Formatting tweaks.
10424
10425 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10426
10427 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10428 Use __lll_add instead of spelling it out. Use protected symbol names.
10429 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10430 Use __lll_add.
10431 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10432 Renamed from lll_compare_and_swap. Use new name where necessary.
10433 (__lll_add): Defined.
10434 (__lll_dec_if_positive): Defined.
10435 (__lll_test_and_set): Defined.
10436 * sysdeps/ia64/pthread_spin_init.c: Removed.
10437 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10438 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10439 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10440 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10441 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10442 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10443 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10444 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10445 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10446 __sync_lock_release_si.
10447 Patch by Jakub Jelinek.
10448
10449 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10450 Fix timeout handling.
10451 (__lll_timedwait_tid): Likewise.
10452 (lll_unlock_wake_cb): Wake up other waiters if necessary.
10453 Patch by Jakub Jelinek.
10454
10455 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10456
10457 2003-03-17 Roland McGrath <roland@redhat.com>
10458
10459 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10460 * sysdeps/pthread/pthread_spin_init.c: New file.
10461 * sysdeps/pthread/pthread_spin_unlock.c: New file.
10462 * sysdeps/powerpc/Makefile: New file.
10463 * sysdeps/powerpc/pthread_spin_lock.c: New file.
10464 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10465 * sysdeps/powerpc/pthreaddef.h: New file.
10466 * sysdeps/powerpc/tcb-offsets.sym: New file.
10467 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10468 * sysdeps/powerpc/tls.h: New file.
10469 * sysdeps/powerpc/bits/atomic.h: New file.
10470 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10471 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10472 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10473
10474 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10475 * sysdeps/unix/sysv/linux/sem_post.c: New file.
10476 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10477 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10478 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10479 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10480 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10481 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10482 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10483 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10484 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10485 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10486 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10487 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10488 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10489
10490 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10491 not gettimeofday.
10492 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10493 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10494 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10495 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10496 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10497
10498 2003-03-17 Ulrich Drepper <drepper@redhat.com>
10499
10500 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10501 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10502 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10504 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10505
10506 2003-03-16 Roland McGrath <roland@redhat.com>
10507
10508 * tst-fork4.c: Include <string.h>.
10509 * tst-signal2.c: Likewise.
10510 * tst-mutex5.c (do_test): exit -> return.
10511 * tst-mutex2.c: Include <stdlib.h>.
10512
10513 2003-03-16 Ulrich Drepper <drepper@redhat.com>
10514
10515 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10516 (__lll_mutex_timedlock_wait): Correct expected value after
10517 spurious wakeup. Otherwise we would never wait again.
10518
10519 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10520 zone versus inline asm stupidity. Use correct instructions.
10521
10522 * tst-rwlock6.c: Add some more status output.
10523
10524 2003-03-15 Roland McGrath <roland@redhat.com>
10525
10526 * sysdeps/pthread/configure.in: New file.
10527 * sysdeps/pthread/configure: New file (generated).
10528
10529 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10530
10531 * allocatestack.c (allocate_stack): Store the exact stack size of
10532 user allocated stacks.
10533
10534 2003-03-15 Jakub Jelinek <jakub@redhat.com>
10535
10536 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10537 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10538 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10539 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10540 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10541 Use `header.' prefix.
10542 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10543
10544 2003-03-15 Ulrich Drepper <drepper@redhat.com>
10545
10546 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10547 __builtin_frame_address, use stack pointer.
10548
10549 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10550 instead of __builtin_frame_pointer.
10551
10552 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10553
10554 * tst-basic1.c (do_test): Add cast to avoid warning.
10555 * tst-basic2.c (do_test): Likewise.
10556
10557 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10558 amount of stack correction.
10559
10560 * tst-fork4.c: Use test-skeleton.c.
10561
10562 2003-03-14 Roland McGrath <roland@redhat.com>
10563
10564 * init.c: Fix typo "#eli" for "#else".
10565
10566 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
10567
10568 * allocatestack.c (__stack_user): Use hidden_data_def.
10569 * pthread_create.c (__pthread_keys): Likewise.
10570
10571 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10572
10573 2003-03-14 Roland McGrath <roland@redhat.com>
10574
10575 * tst-fork4.c: New file.
10576 * Makefile (tests): Add it.
10577
10578 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10579 we always define the padding space.
10580 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10581 stopped supporting its own extensions fully.
10582 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10583 struct also called `header', so `header.multiple_threads' is the field
10584 name to use on all machines.
10585 * allocatestack.c (allocate_stack): Use `header.' prefix.
10586 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10587 * pthread_create.c (__pthread_create_2_1): Likewise.
10588 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10589 (THREAD_SELF): Likewise.
10590 * sysdeps/x86_64/tls.h: Likewise.
10591 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10592 (SINGLE_THREAD_P): Likewise.
10593 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10594 (SINGLE_THREAD_P): Likewise.
10595 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10596 (SINGLE_THREAD_P): Likewise.
10597
10598 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10599 value directly.
10600
10601 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10602
10603 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10604 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10605
10606 * pthread_create.c (start_thread): setjmp is expected to return 0.
10607
10608 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10609 (THREAD_GETMEM_NC): Likewise.
10610
10611 2003-03-13 Ulrich Drepper <drepper@redhat.com>
10612
10613 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10614 and the size of the stack which must be allocated is a multiple,
10615 allocate one more page.
10616 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10617 MULTI_PAGE_ALIASING.
10618
10619 2003-03-13 Roland McGrath <roland@redhat.com>
10620
10621 * pthread_create.c (start_thread): Set EXITING_BIT after the
10622 event-reporting (and destructors), not before.
10623
10624 2003-03-13 Jakub Jelinek <jakub@redhat.com>
10625
10626 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10627 lll_futex_wake): Declare register variables as long int instead of
10628 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10629 Make syscall arguments clobbered by the syscall.
10630 (lll_futex_wait): Define using lll_futex_timed_wait.
10631
10632 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10633 to void *.
10634
10635 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10636 PPID if [! NDEBUG].
10637
10638 * allocatestack.c (nptl_ncreated): Only declare if
10639 COLORING_INCREMENT != 0.
10640
10641 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10642 (__libc_enable_asynccancel_2): Remove prototype.
10643
10644 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10645 ctid to match kernel.
10646
10647 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10648
10649 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10650 libc_multiple_threads.
10651 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10652 __libc_multiple_threads to...
10653 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
10654
10655 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10656 versioning.
10657 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10658 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10659
10660 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10661 (__pthread_once_internal): Define.
10662
10663 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10664 macros instead of .symver directly.
10665 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10666 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10667
10668 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10669 * sysdeps/x86_64/tcb-offsets.sym: New file.
10670 * sysdeps/x86_64/Makefile: New file.
10671
10672 * sysdeps/i386/tcb-offsets.sym: Add SELF.
10673 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10674 to access own pthread_t in TCB.
10675 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10676 Likewise.
10677 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10678 Likewise.
10679 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10680
10681 2003-03-12 Roland McGrath <roland@redhat.com>
10682
10683 * pthread-errnos.sym: New file.
10684 * Makefile (gen-as-const-headers): New variable, list that file.
10685 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10686 header <pthread-errnos.h> instead of defining errno values here.
10687 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10688 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10689 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10690 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10691 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10692 Likewise.
10693 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10694 Likewise.
10695 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10697 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10698 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10699 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10700 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10701 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10702 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10703 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10704 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10705 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10706 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10707 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10708 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10709 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10710 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10711 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10712 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10713 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10714 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10715 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10716 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10717 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10718 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10719 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10720 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10721 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10722
10723 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10724 CLONE_CHILD_SETTID worked.
10725
10726 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10727
10728 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10729 file.
10730 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10731 file.
10732
10733 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10734 (pthread_cond_t): Add padding.
10735
10736 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10737 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10738 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10739
10740 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10741 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10742 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10743 (__pthread_rwlock_timedrdlock): Likewise.
10744 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10745 (__pthread_rwlock_wrlock): Likewise.
10746 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10747 (__pthread_rwlock_rdlock): Likewise.
10748
10749 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10750
10751 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10752 result of lock re-get if it fails.
10753
10754 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10755
10756 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10757 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10758 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10759 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10760 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10761 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10762 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10763 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10764 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10765 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10766
10767 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10768 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10769
10770 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10771 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10772 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10773 (create_thread): Likewise.
10774 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10775 * init.c (__pthread_initialize_minimal_internal): Initialize
10776 __libc_multiple_threads_ptr if necessary.
10777 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10778 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10779 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10780 __libc_multiple_threads.
10781 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10782 necessary.
10783
10784 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10785 (THREAD_SETMEM_NC): Likewise.
10786
10787 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10788 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10789 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10790 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10791
10792 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10793 Eliminate one entire instruction.
10794
10795 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10796 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10797 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10798 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10799 instead of __pthread_enable_asynccancel.
10800 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10801 (__pthread_cond_wait): Likewise.
10802 * sysdeps/pthread/pthread_cond_timedwait.c
10803 (__pthread_cond_timedwait): Likewise.
10804 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10805
10806 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10807 (__condvar_cleanup): Wake up all waiters in case we got signaled
10808 after being woken up but before disabling asynchronous
10809 cancellation.
10810 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10811 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10812 (__condvar_cleanup): Likewise.
10813
10814 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10815 Make it an error if architecture has no #if case. Add x86-64.
10816
10817 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10818 pt-initfini.s generation.
10819
10820 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10821 (TLS_INIT_TP): Fix typo.
10822
10823 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10824
10825 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10826 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10827
10828 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10829 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10830 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10831 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10832 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10833 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10834 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10835 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10836
10837 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10838
10839 * sysdeps/pthread/pthread_cond_timedwait.c
10840 (__pthread_cond_timedwait): Return the result of the final
10841 locking. If it succeeds, the regular function return value.
10842
10843 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10844 Return result of the final locking.
10845 * version.c (__nptl_main): Work around problems with the strange
10846 INTERNAL_SYSCALL macro on ppc32.
10847 * init.c (__pthread_initialize_minimal_internal): Unblock
10848 SIGCANCEL in case the parent blocked it.
10849 Reported by Paul Mackerras <paulus@samba.org>.
10850
10851 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10852 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10853 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10854
10855 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10856
10857 * sysdeps/pthread/pthread_cond_timedwait.c
10858 (__pthread_cond_timedwait): Unlock and fail if
10859 __pthread_mutex_unlock_internal failed.
10860
10861 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10862 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10863 Use ARCH_CLONE.
10864 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10865 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10866 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10867 ALLOCATE_STACK): New macros.
10868 (TLS_TPADJ): New macro.
10869 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10870 (allocate_stack): Handle TLS_DTV_AT_TP and
10871 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10872 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10873 Don't set PD->self.
10874 * init.c [__ia64__] (__NR_set_tid_address): Define.
10875
10876 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10877 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10878 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10879 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10880 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10881 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10882 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10883 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10884 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10885 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10886 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10887 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10888 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10889 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10890 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10891 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10892 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10893 * sysdeps/ia64/bits/atomic.h: New file.
10894 * sysdeps/ia64/Makefile: New file.
10895 * sysdeps/ia64/pthread_spin_init.c: New file.
10896 * sysdeps/ia64/pthread_spin_lock.c: New file.
10897 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10898 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10899 * sysdeps/ia64/pthreaddef.h: New file.
10900 * sysdeps/ia64/tcb-offsets.sym: New file.
10901 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10902 * sysdeps/ia64/tls.h: New file.
10903
10904 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10905 to syscall instead of no arguments.
10906
10907 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10908
10909 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10910 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10911 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10912 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10913
10914 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10915 unused code.
10916
10917 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10918
10919 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10920 lowlevelbarrier.sym.
10921 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10922 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10923 Include lowlevelbarrier.h and don't define offsets locally.
10924 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10925
10926 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10927 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10928 (__lll_mutex_timedlock_wait): Likewise.
10929 (lll_mutex_lock): Adjust asm for that.
10930 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10931 (lll_lock): Adjust asm for operand order change.
10932 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10933 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10934
10935 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10936 Reverse order of parameters.
10937 (__lll_timedwait_tid): Remove regparms attribute.
10938 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10939 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10940
10941 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10942 (__lll_timedwait_tid): Remove one unnecessary instruction.
10943
10944 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10945 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10946 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10947 lowlevelmutex.S.
10948
10949 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10950 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10951 for NOT_IN_libc.
10952 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10953 lowlevellock.S.
10954
10955 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10956 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10957 for libc.so.
10958 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10959 define LOCK here (if UP is not defined). The actual code is in
10960 lowlevelmutex.S.
10961
10962 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10963 LOCK is already defined. Don't define lll_unlock_wake_cb and
10964 __lll_timedwait_tid for libc.so.
10965 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10966 define LOCK here (if UP is not defined). The actual code is in
10967 lowlevellock.S.
10968
10969 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10970 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10971 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10972 instead of lowlevelsem.h.
10973 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10974 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10975 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10976
10977 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10978 lowlevelrwlock.sym.
10979 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10980 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10981 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10982
10983 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10984 register loading.
10985 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10986 last changed. D'oh.
10987
10988 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10989
10990 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10991 of __libc_locking_needed.
10992 (lll_trylock): Initialize %eax to zero.
10993
10994 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10995 pthread_cond_t definition.
10996
10997 2003-03-10 Roland McGrath <roland@redhat.com>
10998
10999 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
11000 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
11001 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
11002 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
11003 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
11004
11005 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
11006 Instead of setting PD->multiple_threads, set globals
11007 __pthread_multiple_threads and __libc_multiple_threads.
11008 * sysdeps/pthread/createthread.c (create_thread): Likewise.
11009 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
11010 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
11011
11012 * descr.h (struct pthread): Conditionalize first member on
11013 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
11014 containing an anonymous tcbhead_t. Move `list' member out.
11015 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
11016 * allocatestack.c: Remove use of `header.data.' prefix.
11017 * pthread_create.c: Likewise.
11018 * init.c (__pthread_initialize_minimal_internal): Likewise.
11019 * sysdeps/pthread/createthread.c (create_thread): Likewise.
11020 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
11021 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
11022 * sysdeps/x86_64/tls.h: Likewise.
11023 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
11024 (SINGLE_THREAD_P): Likewise.
11025 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
11026 (SINGLE_THREAD_P): Likewise.
11027 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
11028 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
11029
11030 2003-03-09 Ulrich Drepper <drepper@redhat.com>
11031
11032 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
11033
11034 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
11035 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
11036
11037 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
11038 leftovers from the ia32 code.
11039
11040 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
11041 memory load.
11042 (clear_once_control): Don't load %esi.
11043
11044 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
11045 handling.
11046
11047 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
11048
11049 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
11050 * sysdeps/unix/sysv/linux/createthread.c: ...here.
11051
11052 * Makefile (tests): Add tst-cond10.
11053 * tst-cond10.c: New file.
11054
11055 2003-03-08 Ulrich Drepper <drepper@redhat.com>
11056
11057 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
11058 * tst-signal3.c (do_test): Likewise.
11059 * tst-sem5.c (do_test): Likewise.
11060 * tst-kill6.c (do_test): Likewise.
11061 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
11062
11063 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
11064 of inc/dec.
11065 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11066 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
11067 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
11068 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
11069 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11070 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11071 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11072 Likewise.
11073 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11074 Likewise.
11075 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
11076 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
11077 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11078 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11079 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11080 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11081 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11082 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11083
11084 * allocatestack.c (allocate_stack): If mprotect() fails free the
11085 TLS memory.
11086
11087 2003-03-07 Ulrich Drepper <drepper@redhat.com>
11088
11089 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
11090
11091 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
11092 lll_wake_tid. This was used only to work around kernel limits in
11093 the early days.
11094 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
11095 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
11096 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
11097 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
11098
11099 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
11100 (__pthread_initialize_minimal_internal): Change initialization of
11101 __static_tls_align_m1 appropriately.
11102 * pthreadP.h (__static_tls_align_m1): Renamed from
11103 __static_tls_align.
11104 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
11105 instead of __static_tls_align-1.
11106
11107 2003-03-04 Ulrich Drepper <drepper@redhat.com>
11108
11109 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
11110
11111 * pthread_create.c: Define __pthread_keys using nocommon
11112 attribute, not by placing it explicitly in bss.
11113 Remove DEFINE_DEALLOC definition. Not needed anymore.
11114
11115 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
11116 Use it in mmap call to allocate stacks.
11117
11118 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
11119
11120 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
11121 result of the thread function.
11122
11123 2003-03-03 Ulrich Drepper <drepper@redhat.com>
11124
11125 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
11126 version is just fine.
11127
11128 * sysdeps/unix/sysv/linux/libc_pthread_init.c
11129 (__pthread_child_handler): Renamed from pthread_child_handler,
11130 exported, and marked hidden. Change all users.
11131 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
11132 free __pthread_child_handler from child list.
11133
11134 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
11135
11136 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
11137
11138 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
11139 Fix handling of cancellation and failing pthread_mutex_unlock call.
11140 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
11141 (__pthread_cond_wait): Likewise.
11142
11143 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
11144 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
11145 lll_futex_timed_wait call.
11146 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
11147 (pthread_rwlock_timedwrlock): Likewise.
11148
11149 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
11150 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
11151 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
11152
11153 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
11154 check of lll_futex_wake return value.
11155
11156 2003-03-03 Roland McGrath <roland@redhat.com>
11157
11158 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
11159
11160 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11161 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
11162 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
11163
11164 2003-03-02 Ulrich Drepper <drepper@redhat.com>
11165
11166 * sysdeps/pthread/timer_create.c (timer_create): Return correct
11167 error for CPU clocks.
11168
11169 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
11170 _POSIX_MONOTONIC_CLOCK.
11171 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
11172
11173 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
11174 recent kernels.
11175
11176 2003-03-01 Ulrich Drepper <drepper@redhat.com>
11177
11178 * descr.h (struct pthread): Move cleanup field to the front.
11179
11180 2003-03-01 Roland McGrath <roland@redhat.com>
11181
11182 * sem_open.c (sem_open): Braino fix.
11183
11184 2003-03-01 Ulrich Drepper <drepper@redhat.com>
11185
11186 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
11187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
11188 __pthread_cleanup_pop functionality.
11189 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11190
11191 * descr.h (struct pthread): Move tid field to the front now that
11192 it is often used.
11193
11194 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
11195 (__lll_mutex_timedlock_wait): Remove.
11196 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11197 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
11198 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11199 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11200 (lll_unlock_wake_cb): Don't save and restore %esi.
11201 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
11202 %esi.
11203 (__lll_timedwait_tid): Add alignment.
11204 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11205 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
11206 %esi.
11207 (__lll_timedwait_tid): Removed.
11208 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
11209 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
11210 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
11211 (pthread_barrier_wait): Don't save, load, and restore %esi for
11212 last thread.
11213 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
11214 (__pthread_cond_signal): Don't save, load, and restore %esi.
11215 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
11216 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
11217 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
11218 Don't save, load, and restore %esi.
11219
11220 2003-02-27 Ulrich Drepper <drepper@redhat.com>
11221
11222 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11223 Release lock before waking up the waiters.
11224
11225 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11226
11227 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11228 (reader_thread): Likewise.
11229
11230 * sysdeps/pthread/pthread_rwlock_unlock.c
11231 (__pthread_rwlock_unlock): Release internal lock early. Don't try
11232 to wake up readers if there are none.
11233
11234 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11235 Release internal lock before wake threads.
11236
11237 2003-02-26 Ulrich Drepper <drepper@redhat.com>
11238
11239 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11240 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
11241 predefined.
11242 * tst-rwlock9.c: Likewise.
11243 * tst-rwlock10.c: New file.
11244 * tst-rwlock11.c: New file.
11245
11246 * Makefile (tests): Add tst-dlsym1.
11247 * tst-dlsym1.c: New file.
11248
11249 * init.c (__pthread_initialize_minimal_internal): Set
11250 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11251 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11252
11253 2003-02-24 Ulrich Drepper <drepper@redhat.com>
11254
11255 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11256
11257 * tst-cond2.c: Fix sychronization with child.
11258
11259 * tst-rwlock8.c (reader_thread): Remove unused variable.
11260
11261 * Makefile: Add rules to build and run tst-tls3.
11262 * tst-tls3.c: New file.
11263 * tst-tls3mod.c: New file.
11264
11265 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11266 * tst-rwlock8.c: New file.
11267 * tst-rwlock9.c: New file.
11268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11269 complete broken rwlock implementation.
11270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11271 Likewise.
11272 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11273 Likewise.
11274 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11275 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11276 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11277 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11278 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11279 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11280 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11281
11282 2003-02-23 Roland McGrath <roland@redhat.com>
11283
11284 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11285
11286 2003-02-23 Ulrich Drepper <drepper@redhat.com>
11287
11288 * Makefile (tests): Add tst-context1.
11289 * tst-context1.c: New file.
11290
11291 * Makefile (tests): Add tst-tls1 and tst-tls2.
11292 * tst-tls1.c: New file.
11293 * tst-tls2.c: New file.
11294
11295 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11296 for failed cmpxchg.
11297
11298 * pthread_create.c (start_thread): Set EXITING_BIT early.
11299
11300 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11301 (THREAD_GETMEM_NC): Likewise.
11302
11303 2003-02-22 Ulrich Drepper <drepper@redhat.com>
11304
11305 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11306 off 3 more bytes by using offset-less instructions when possible.
11307
11308 * Makefile: Add dependency for $(objpfx)version.d.
11309
11310 * eintr.c (eintr_source): Add unnecessary return but the compiler
11311 insists.
11312
11313 * tst-kill3.c: Include <unistd.h>.
11314
11315 2003-02-21 Roland McGrath <roland@redhat.com>
11316
11317 * pthread_create.c (start_thread): Call __libc_thread_freeres.
11318
11319 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11320
11321 * Makefile (tests): Add tst-eintr1.
11322 (distribute): Add eintr.c.
11323 * tst-eintr1.c: New file.
11324 * eintr.c: New file.
11325
11326 * pthread_cancel.c (pthread_cancel): Use tkill directly.
11327
11328 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11329 Disallow sending SIGCANCEL.
11330
11331 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
11332 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11333 * tst-kill1.c: New file.
11334 * tst-kill2.c: New file.
11335 * tst-kill3.c: New file.
11336 * tst-kill5.c: New file.
11337 * tst-kill6.c: New file.
11338 * tst-basic7.c: Renamed to...
11339 * tst-kill4.c: ...this.
11340
11341 2003-02-21 Roland McGrath <roland@redhat.com>
11342
11343 * Makefile (install-lib-ldscripts): New variable.
11344
11345 2003-02-21 Ulrich Drepper <drepper@redhat.com>
11346
11347 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11348 * pthread_cancel.c: Use INVALID_TD_P.
11349 * pthread_detach.c: Likewise.
11350 * pthread_getschedparam.c: Likewise.
11351 * pthread_setschedparam.c: Likewise.
11352 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11353 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11354 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11355 * pthread_timedjoin.c: Likewise.
11356
11357 * tst-basic7.c: Include <signal.h>.
11358
11359 * pthread_join.c (pthread_join): Limited checking for invalid
11360 descriptors.
11361 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11362
11363 2003-02-20 Ulrich Drepper <drepper@redhat.com>
11364
11365 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11366 beginning of the loop. Clear the entire first block of TSD.
11367 * Makefile (tests): Add tst-key4.
11368 * tst-key4.c: New file.
11369
11370 2003-02-18 Ulrich Drepper <drepper@redhat.com>
11371
11372 * Makefile (tests): Add tst-basic7.
11373 * tst-basic7.c: New file.
11374
11375 * pthread_create.c (deallocate_tsd): Mark as internal_function.
11376 Add some more __builtin_expect.
11377
11378 * pthreadP.h: Define dummy version of DEBUGGING_P.
11379
11380 2003-02-17 Ulrich Drepper <drepper@redhat.com>
11381
11382 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11383 _POSIX_THREAD_PRIORITY_SCHEDULING.
11384 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11385 _XOPEN_REALTIME_THREADS.
11386 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11387
11388 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11389 kernel returns EINVAL for PID <= 0, work around it.
11390
11391 * Makefile (tests): Add tst-signal5.
11392 * tst-signal5.c: New file.
11393
11394 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11395 and LOGIN_NAME_MAX.
11396
11397 * tst-cancel1.c (tf): Block all signals.
11398
11399 * Makefile (tests): Add tst-basic6.
11400 * tst-basic6.c: New file.
11401
11402 * tst-basic1.c: Add test for process ID.
11403
11404 * Makefile (tests): Add tst-cancel10.
11405 * tst-cancel10.c: New file.
11406
11407 * Makefile (tests): Add tst-signal4.
11408 * tst-signal4.c: New file.
11409
11410 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11411 __sigismember instead of sigismember. Add __builtin_expect.
11412
11413 2003-02-16 Ulrich Drepper <drepper@redhat.com>
11414
11415 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11416 pthread_setcancelstate, and pthread_rwlock_setpshared.
11417
11418 * tst-cancel7.c (do_test): Make sure the pid file exists before
11419 canceling the thread.
11420
11421 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11422 pthread_rwlock_timedrdlock tests.
11423 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11424 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11425 Check for invalid tv_nsec field.
11426 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11427 Likewise.
11428
11429 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11430 recursive mutex of overflow.
11431
11432 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11433
11434 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11435 going into an endless loop.
11436 * Makefile (tests): Add tst-cancel9.
11437 * tst-cancel9.c: New file.
11438
11439 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11440
11441 2003-02-15 Ulrich Drepper <drepper@redhat.com>
11442
11443 * tst-mutex5.c (do_test): Add more timedlock tests.
11444
11445 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11446 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11447
11448 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11449 use INLINE_SYSCALL. Error number is returned, not -1.
11450
11451 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11452 and __deallocate_stack with internal_function.
11453 * pthread_create.c: Adjust definitions appropriately.
11454 * allocatestack.c: Likewise.
11455
11456 * pthread_join.c: Add one more __builtin_expect.
11457 * pthread_timedjoin.c: Likewise.
11458
11459 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11460 not data of sequence number does not match.
11461 Add one __builtin_expect.
11462
11463 * Makefile (tests): Add tst-clock1.
11464 * tst-clock1.c: New file.
11465
11466 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11467 negative arguments.
11468 * Makefile (tests): Add tst-basic5.
11469 * tst-basic5.c: New file.
11470
11471 2003-02-14 Ulrich Drepper <drepper@redhat.com>
11472
11473 * Makefile (tests): Add tst-basic4.
11474 * tst-basic4.c: New file.
11475
11476 * pthreadP.h: Add declaraction for __nptl_nthreads.
11477 * pthread_create.c: Define __nptl_nthreads
11478 (start_thread): Increment __nptl_nthreads at beginning. Decrement
11479 after thread is done. If then zero, call exit(0).
11480 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11481 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
11482 * init.c (pthread_functions): Initialize ptr_nthreads.
11483 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11484 (__reclaim_stacks): Decrement __nptl_nthreads.
11485 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11486 Define.
11487 * Makefile (tests): Add tst-basic3.
11488 * tst-basic3.c: New file.
11489
11490 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
11491 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
11492 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11493 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
11494 if asynchronous canceling is enabled.
11495 * pthread_join.c (pthread_join): When recognizing circular joins,
11496 take into account the other thread might be already canceled.
11497 * Makefile (tests): Add tst-join5.
11498 * tst-join5.c: New file.
11499
11500 * Makefile (tests): Add tst-join4.
11501 * tst-join4.c: New file.
11502
11503 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11504
11505 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11506
11507 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
11508
11509 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11510 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11511 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11512 warning.
11513 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11514 to avoid warning.
11515 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11516 error if lll_futex_wake failed.
11517
11518 2003-02-13 Ulrich Drepper <drepper@redhat.com>
11519
11520 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11521 handling of cancellation and failung pthread_mutex_unlock call.
11522 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11523 * Makefile (tests): Add tst-cond8 and tst-cond9.
11524 * tst-cond8.c: New file.
11525 * tst-cond9.c: New file.
11526
11527 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11528
11529 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
11530 non-standard initializers with __USE_GNU.
11531
11532 * Makefile (tests): Add tst-cleanup3.
11533 * tst-cleanup3.c: New file.
11534
11535 2003-02-12 Ulrich Drepper <drepper@redhat.com>
11536
11537 * Makefile (tests): Add tst-attr1 and tst-attr2.
11538 * tst-attr1.c: New file.
11539 * tst-attr2.c: New file.
11540
11541 * Makefile: Add rules to build and run tst-atfork2 test.
11542 * tst-atfork2.c: New file.
11543 * tst-atfork2mod.c: New file.
11544
11545 * sysdeps/unix/sysv/linux/unregister-atfork.c
11546 (__unregister_atfork): Free the memory allocated for the handlers
11547 after removing them from the lists.
11548
11549 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11550 cleanup function.
11551
11552 * tst-atfork1.c (do_test): Wait for the child we forked.
11553 Report error in child.
11554
11555 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11556
11557 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11558
11559 2003-02-10 Ulrich Drepper <drepper@redhat.com>
11560
11561 * Makefile (tests): Add tst-cancel8.
11562 * tst-cancel8.c: New file.
11563
11564 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11565 clearing of control variable.
11566 * Makefile (tests): Add tst-once3 and tst-once4.
11567 * tst-once3.c: New file.
11568 * tst-once4.c: New file.
11569
11570 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
11571
11572 * sysdeps/sh/Makefile: New file.
11573 * sysdeps/sh/bits/atomic.h: New file.
11574 * sysdeps/sh/pthread_spin_init.c: New file.
11575 * sysdeps/sh/pthread_spin_lock.c: New file.
11576 * sysdeps/sh/pthread_spin_trylock.S: New file.
11577 * sysdeps/sh/pthread_spin_unlock.S: New file.
11578 * sysdeps/sh/pthreaddef.h: New file.
11579 * sysdeps/sh/tcb-offsets.sym: New file.
11580 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11581 * sysdeps/sh/tls.h: New file.
11582 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11583 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11584 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11585 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11586 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11587 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11588 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11589 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11590 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11591 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11592 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11593 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11594 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11595 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11596 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11597 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11598 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11599 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11600 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11601 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11602 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11603 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11604 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11605 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11606 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11607 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11608 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11609 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11610 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11611 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11612
11613 2003-02-08 Ulrich Drepper <drepper@redhat.com>
11614
11615 * tst-cond2.c: Rearrange code to not rely on behavior undefined
11616 according to POSIX.
11617
11618 * tst-basic2.c (do_test): Lock mutex before creating the thread.
11619
11620 2003-02-07 Ulrich Drepper <drepper@redhat.com>
11621
11622 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11623 (TLS_GET_FS): New #define.
11624 (TLS_SET_FS): New #define.
11625 Correct value of __NR_set_thread_area.
11626
11627 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11628
11629 2003-02-06 Ulrich Drepper <drepper@redhat.com>
11630
11631 * Makefile (tests): Add tst-popen1.
11632 * tst-popen1.c: New file.
11633
11634 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11635 but inactive generalization.
11636 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11637 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11638 Minor optimization, remove one instruction.
11639 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11640
11641 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
11642
11643 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11644
11645 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
11646
11647 * init.c (__NR_set_tid_address): Add #ifdef for s390.
11648 * sysdeps/pthread/pthread_barrier_wait.c: New file.
11649 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11650 * sysdeps/pthread/pthread_cond_signal.c: New file.
11651 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11652 * sysdeps/pthread/pthread_cond_wait.c: New file.
11653 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11654 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11655 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11656 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11657 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11658 * sysdeps/s390/Makefile: New file.
11659 * sysdeps/s390/bits/atomic.h: New file.
11660 * sysdeps/s390/pthread_spin_init.c: New file.
11661 * sysdeps/s390/pthread_spin_lock.c: New file.
11662 * sysdeps/s390/pthread_spin_trylock.c: New file.
11663 * sysdeps/s390/pthread_spin_unlock.c: New file.
11664 * sysdeps/s390/pthreaddef.h: New file.
11665 * sysdeps/s390/tcb-offsets.sym: New file.
11666 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11667 * sysdeps/s390/tls.h: New file.
11668 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11669 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11670 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11671 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11672 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11673 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11674 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11675 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11676 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11677 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11678 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11679 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11680 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11681 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11682 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11683 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11684 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11685 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11686 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11687 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11688 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11689 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11690 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11691
11692 2003-02-04 Ulrich Drepper <drepper@redhat.com>
11693
11694 * atomic.h: Add a couple more default implementations.
11695 (atomic_compare_and_exchange_acq): Use
11696 __arch_compare_and_exchange_32_acq in return value definition. It
11697 always exists.
11698 (atomic_bit_set): Renamed from atomic_set_bit.
11699 Add missing atomic_ prefixes.
11700
11701 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11702 thread library is available, use correct value to mark initialized
11703 once variable.
11704
11705 2003-02-03 Ulrich Drepper <drepper@redhat.com>
11706
11707 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11708 __sysconf to determine pagesize.
11709
11710 * pthread_create.c: Include <atomic.h>.
11711 * allocatestack.c (allocate_stack): Implement coloring of the
11712 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11713 size minus one. Adjust users.
11714 * sysdeps/i386/i686/Makefile: New file.
11715
11716 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11717
11718 * allocatestack.c: Improve comment throughout the file.
11719
11720 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11721 (__lll_lock_wait): Add branch prediction.
11722 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11723 (__lll_lock_wait): Likewise.
11724 (lll_unlock_wake_cb): Removed.
11725
11726 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11727
11728 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11729 _POSIX_THREAD_PRIORITY_SCHEDULING.
11730
11731 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11732
11733 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11734 Fix return type of ptr___pthread_getspecific.
11735
11736 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11737
11738 * Makefile (tests): Add tst-umask1.
11739 (tst-umask1-ARGS): Define.
11740 * tst-umask1.c: New file.
11741
11742 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11743
11744 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11745 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11746 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11747 pthread_rwlock_unlock.
11748 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11749 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11750 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11751 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11752 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11753 New file.
11754 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11755 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11756 New file.
11757 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11758 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11759 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11760 New file.
11761 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11762 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11763 New file.
11764 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11765 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11766 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11767 New file.
11768 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11769 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11770 New file.
11771 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11772
11773 * Makefile (libpthread-routines): Remove lowlevelcond and
11774 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11775 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11776 and pthread_cond_broadcast.
11777 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11778 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11779 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11780 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11781 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11782 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11783 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11784 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11785 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11786 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11787 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11788 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11789 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11790 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11791 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11792 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11793 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11794 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11795 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11796 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11797 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11798 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11799 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11800 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11801 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11802 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11803 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11804 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11805 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11806 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11807 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11808
11809 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11810 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11811 of the code is moved to ...
11812 * sysdeps/pthread/createthread.c: ...here. New file.
11813
11814 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11815
11816 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11817 (__new_sem_post): Clear %eax before returning.
11818 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11819
11820 * Makefile (tests): Add tst-cleanup2.
11821 * tst-cleanup2.c: New file.
11822
11823 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11824 Interpret first parameter correctly.
11825
11826 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11827
11828 * Makefile (headers): Add bits/semaphore.h.
11829
11830 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11831
11832 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11833 if not SHARED.
11834
11835 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11836
11837 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11838 must be used and mapping failed.
11839 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11840
11841 * Makefile (CFLAGS-pthread_self.os): Define this, not
11842 CFLAGS-pthread_self.c.
11843
11844 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11845
11846 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11847 lll_unlock_wake_cb.
11848
11849 * Makefile (libpthread-routines): Add version. Add rules to build
11850 version.os and banner.h.
11851 * version.c: New file.
11852
11853 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11854
11855 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11856 the alias unconditional.
11857 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11858
11859 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11860
11861 * Makefile (CFLAGS-pthread_self.c): New definition.
11862
11863 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11864
11865 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11866 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11867 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11868 * init.c (__pthread_initialize_minimal_internal): Likewise.
11869
11870 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11871
11872 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11873
11874 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11875 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11876 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11877 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11878 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11879 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11880
11881 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11882
11883 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11884 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11885 * tst-cancel-wrappers.sh: Remove all exceptions.
11886
11887 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11888
11889 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11890 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11891
11892 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11893 Use __libc_pthread_functions array if SHARED.
11894
11895 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11896 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11897
11898 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11899 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11900 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11901 __libc_ptf_call instead of __libc_maybe_call.
11902 (PTF): New #define.
11903 (__libc_cleanup_region_start): Wrap function name with PTF call.
11904 (__libc_cleanup_region_end): Likewise.
11905 (__libc_cleanup_end): Likewise.
11906
11907 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11908 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11909 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11910 * pthreadP.h: Add prototypes.
11911
11912 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11913 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11914 __pthread_rwlock_unlock aliases.
11915 * pthreadP.h: Add prototypes for new aliases.
11916
11917 * pthreadP.h (struct pthead_functions): Moved to...
11918 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11919 * init.c (pthread_functions): Add initializers for new elements.
11920
11921 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11922 __pthread_cleanup_pop_restore aliases.
11923 * pthreadP.h: Add prototypes.
11924
11925 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11926 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11927 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11928 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11929 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11930 * pthreadP.h: Adjust prototypes and callers.
11931
11932 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11933
11934 * Makefile (tests): Add tst-cancel7.
11935 (tst-cancel7-ARGS): New variable.
11936 * tst-cancel7.c: New file.
11937
11938 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11939 around gcc defficiencies.
11940 * old_pthread_cond_signal.c: Likewise.
11941 * old_pthread_cond_timedwait.c: Likewise.
11942 * old_pthread_cond_wait.c: Likewise.
11943
11944 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11945
11946 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11947
11948 * Makefile (tests): Add tst-cond7.
11949 * tst-cond7.c: New file.
11950
11951 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11952 (condvar_cleanup): Get condvar address from the right place.
11953
11954 * atomic.h: Correct definitions of atomic_full_barrier,
11955 atomic_read_barrier, atomic_write_barrier.
11956
11957 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11958 race-free.
11959 * old_pthread_cond_signal.c: Likewise.
11960 * old_pthread_cond_timedwait.c: Likewise.
11961 * old_pthread_cond_wait.c: Likewise.
11962
11963 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11964
11965 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11966
11967 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11968
11969 * pthreadP.h (pthread_cond_2_0_t): New type.
11970 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11971 Use new type for the 2.0 condvar function prototypes.
11972 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11973 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11974 parameter.
11975 * old_pthread_cond_destroy.c: Likewise.
11976 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11977 * old_pthread_cond_signal.c: Likewise.
11978 * old_pthread_cond_timedwait.c: Likewise.
11979 * old_pthread_cond_wait.c: Likewise.
11980
11981 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11982 (__pthread_cond_wait): Don't save cancellation mode and seq value
11983 in same location.
11984
11985 * herrno.c (__h_errno_location): Don't define as weak.
11986
11987 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11988
11989 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11990 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11991 and pthread_cond_wait.
11992 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11993 Renamed to...
11994 (__pthread_cond_broadcast_2_0): ... this.
11995 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11996 Renamed to...
11997 (__pthread_cond_destroy_2_0): ... this.
11998 * old_pthread_cond_init.c (__old_pthread_cond_init):
11999 Renamed to...
12000 (__pthread_cond_init_2_0): ... this.
12001 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
12002 Renamed to...
12003 (__pthread_cond_signal_2_0): ... this.
12004 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
12005 Renamed to...
12006 (__pthread_cond_wait_2_0): ... this.
12007 * pthread_cond_destroy.c: Include shlib-compat.h.
12008 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
12009 * pthread_cond_init.c: Include shlib-compat.h.
12010 (pthread_cond_init): Change strong_alias into versioned_symbol.
12011 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
12012 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
12013 fields.
12014 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
12015 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
12016 __pthread_cond_wait_2_0): New prototypes.
12017 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
12018 __old_pthread_cond_init, __old_pthread_cond_signal,
12019 __old_pthread_cond_wait): Removed.
12020 * init.c: Include shlib-compat.h.
12021 (pthread_functions): Guard ptr___pthread_attr_init_2_0
12022 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
12023 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
12024 ptr___pthread_cond_*_2_0 fields.
12025 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
12026 pthread_cond_*@GLIBC_2.0 compatibility symbols.
12027
12028 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
12029 LIBC_SIGACTION was not yet defined.
12030 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
12031 [!defined LIBC_SIGACTION] (__sigaction): New function and
12032 libc_hidden_weak.
12033 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
12034 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
12035
12036 2003-01-02 Jakub Jelinek <jakub@redhat.com>
12037
12038 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
12039
12040 2003-01-02 Ulrich Drepper <drepper@redhat.com>
12041
12042 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
12043 New, larger type definition.
12044 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
12045 implementation.
12046 * Versions [libpthread]: Add definitions for new pthread_cond_*
12047 interfaces for version GLIBC_2.3.2.
12048 * pthread_cond_init.c: Update initialization for new type definition.
12049 * Makefile (libpthread-routines): Remove pthread_cond_wait,
12050 pthread_cond_timedwait, pthread_cond_signal, and
12051 pthread_cond_broadcast. Add old_pthread_cond_init,
12052 old_pthread_cond_destroy, old_pthread_cond_wait,
12053 old_pthread_cond_timedwait, old_pthread_cond_signal, and
12054 old_pthread_cond_broadcast.
12055 * old_pthread_cond_broadcast.c: New file.
12056 * old_pthread_cond_destroy.c: New file.
12057 * old_pthread_cond_init.c: New file.
12058 * old_pthread_cond_signal.c: New file.
12059 * old_pthread_cond_timedwait.c: New file.
12060 * old_pthread_cond_wait.c: New file.
12061 * pthreadP.h: Add prototypes for the compatibility interfaces.
12062
12063 * pthread_cond_destroy.c: Don't include <errno.h>.
12064
12065 2003-01-01 Ulrich Drepper <drepper@redhat.com>
12066
12067 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
12068 unnecessary zero offset when addressing MUTEX.
12069
12070 2002-12-31 Ulrich Drepper <drepper@redhat.com>
12071
12072 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
12073 __register_atfork.
12074 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
12075 for __register_atfork.
12076
12077 2002-12-31 Jakub Jelinek <jakub@redhat.com>
12078
12079 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
12080 instead of ASSEMBLER test macro.
12081
12082 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
12083 __libc_current_sigrtmax): Add libc_hidden_def.
12084
12085 * sysdeps/pthread/list.h: Remove assert.h include.
12086
12087 2002-12-31 Ulrich Drepper <drepper@redhat.com>
12088
12089 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
12090 __pthread_initialize_minimal_internal not
12091 __pthread_initialize_minimal.
12092
12093 2002-12-30 Ulrich Drepper <drepper@redhat.com>
12094
12095 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
12096 __pthread_initialize_minimal as hidden.
12097
12098 * init.c (__pthread_initialize_minimal_internal): Don't mark as
12099 constructor.
12100
12101 2002-12-31 Jakub Jelinek <jakub@redhat.com>
12102
12103 * Makefile ($(inst_libdir)/libpthread.so): Depend on
12104 $(common-objpfx)format.lds, include that into the output script.
12105 Fix comment.
12106 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
12107
12108 2002-12-28 Andreas Jaeger <aj@suse.de>
12109
12110 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
12111 nsec resolution changes.
12112 (xstat64_conv): Likewise.
12113 (xstat32_conv): Likewise.
12114 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
12115 struct kernel_stat.
12116 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
12117 structs stat and stat64.
12118 * time/time.h (__timespec_defined): Define for __USE_MISC.
12119 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
12120
12121 2002-12-30 Jakub Jelinek <jakub@redhat.com>
12122
12123 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
12124 argument.
12125 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
12126 (pthread_exit): Use strong_alias to avoid warnings.
12127 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
12128 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
12129 ptr___pthread_attr_init_2_*.
12130 * init.c (pthread_functions): Adjust.
12131
12132 2002-12-29 Ulrich Drepper <drepper@redhat.com>
12133
12134 * forward.c: Make all functions available by default again. It
12135 caused too much trouble.
12136
12137 * pt-siglongjmp.c: Removed.
12138
12139 2002-12-28 Jakub Jelinek <jakub@redhat.com>
12140
12141 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
12142 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
12143 * sysdeps/i386/Makefile: New file.
12144 * sysdeps/i386/tcb-offsets.sym: New file.
12145 * sysdeps/pthread/tcb-offsets.h: New file.
12146 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12147 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
12148
12149 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
12150 __register_atfork...
12151 (GLIBC_2.3.2): ...here.
12152
12153 2002-12-28 Ulrich Drepper <drepper@redhat.com>
12154
12155 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
12156 pthread_attr_setstackaddr with __attribute_deprecated__.
12157
12158 2002-12-27 Jakub Jelinek <jakub@redhat.com>
12159
12160 * pt-system.c (system): Remove cancellation handling.
12161 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
12162 cancellation routines.
12163
12164 2002-12-28 Ulrich Drepper <drepper@redhat.com>
12165
12166 * descr.h: Include <dl-sysdep.h>.
12167 (struct pthread): Move header.data.list to the back of the struct.
12168 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
12169 (MULTIPLE_THREADS_OFFSET): Adjust offset.
12170 (SYSINFO_OFFSEET): Likewise.
12171
12172 2002-12-27 Jakub Jelinek <jakub@redhat.com>
12173
12174 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
12175 Define.
12176 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
12177 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
12178 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
12179 (USE_DL_SYSINFO): Undef.
12180
12181 2002-12-22 Jakub Jelinek <jakub@redhat.com>
12182
12183 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
12184 $(common-objpfx)libc.so.
12185 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
12186 it is bigger than pipe buffer size even on arches with bigger
12187 page size.
12188 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
12189
12190 2002-12-25 Ulrich Drepper <drepper@redhat.com>
12191
12192 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
12193 correct errno access for case that USE___THREAD is not defined.
12194
12195 2002-12-24 Ulrich Drepper <drepper@redhat.com>
12196
12197 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
12198 Patch by Marijn Ros <marijn@mad.scientist.com>.
12199
12200 2002-12-22 Roland McGrath <roland@redhat.com>
12201
12202 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
12203
12204 2002-12-20 Ulrich Drepper <drepper@redhat.com>
12205
12206 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
12207
12208 2002-12-19 Ulrich Drepper <drepper@redhat.com>
12209
12210 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
12211 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
12212 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
12213
12214 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
12215 of int $0x80.
12216 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12217 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
12218 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
12219 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12220 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12221 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12222 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12223 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12224
12225 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12226 sysenter.
12227 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12228
12229 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12230
12231 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12232 in new TCB.
12233 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12234 that sysinfo is properly initialized.
12235 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12236 to 1 only for ld.so.
12237
12238 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12239 RTLD_CORRECT_DYNAMIC_WEAK.
12240
12241 2002-12-19 Jakub Jelinek <jakub@redhat.com>
12242
12243 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12244 Use return 0 as 6th argument to FORWARD4.
12245 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12246
12247 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12248
12249 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12250 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12251 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12252 (INIT_SYSINFO): New #define.
12253 (TLS_TP_INIT): Use INIT_SYSINFO.
12254 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12255 At test to make sure SYSINFO_OFFSET value is correct.
12256 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12257
12258 2002-12-18 Jakub Jelinek <jakub@redhat.com>
12259
12260 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12261 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12262 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12263 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12264 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12265 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12266 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12267
12268 2002-12-18 Ulrich Drepper <drepper@redhat.com>
12269
12270 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12271 macro instead of using int $0x80 directly.
12272
12273 * sysdeps/pthread/bits/stdio-lock.h: New file.
12274 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12275 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12276 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12277 * Makefile (routines): Add libc-lowlevelmutex.
12278
12279 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12280 __i686.get_pc_thunk.dx.
12281
12282 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12283
12284 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12285 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12286 ($(objpfx)tst-cancel-wrappers.out): New rule.
12287 * tst-cancel-wrappers.sh: New test.
12288 * tst-locale1.c: Include signal.h.
12289 (uselocale): Test static linking of __libc_current_sigrt*.
12290
12291 2002-12-17 Ulrich Drepper <drepper@redhat.com>
12292
12293 * Makefile (tests): Add tst-cancel6.
12294 * tst-cancel6.c: New file
12295
12296 2002-12-17 Jakub Jelinek <jakub@redhat.com>
12297
12298 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12299 Define meaningfully for assembler as well.
12300 * pthreadP.h (struct pthread_functions): Remove
12301 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
12302 and ptr_pthread_attr_init_2_1 fields.
12303 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12304 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12305 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12306 (FORWARD3): Define using FORWARD4.
12307 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12308 versions.
12309 * pt-system.c: Remove duplicate stdlib.h include.
12310
12311 2002-12-16 Ulrich Drepper <drepper@redhat.com>
12312
12313 * sem_init.c: Define sem_init@GLIBC_2.0.
12314 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12315 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12316
12317 * flockfile.c: Moved to...
12318 * sysdeps/pthread/flockfile.c: ...here. New file.
12319 * funlockfile.c: Moved to...
12320 * sysdeps/pthread/funlockfile.c: ...here. New file.
12321 * ftrylockfile.c: Moved to...
12322 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
12323
12324 2002-12-16 Jakub Jelinek <jakub@redhat.com>
12325
12326 * libc-cancellation.c: Guard both function with
12327 #if !defined NOT_IN_libc.
12328 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12329 automatically provided pthread wrappers.
12330 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12331 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12332 nor in libpthread.
12333 * pt-open.c: Removed.
12334 * pt-fcntl.c: Removed.
12335 * pt-fsync.c: Removed.
12336 * pt-lseek.c: Removed.
12337 * pt-msgrcv.c: Removed.
12338 * pt-msgsnd.c: Removed.
12339 * pt-msync.c: Removed.
12340 * pt-nanosleep.c: Removed.
12341 * pt-open64.c: Removed.
12342 * pt-pause.c: Removed.
12343 * pt-pread.c: Removed.
12344 * pt-pread64.c: Removed.
12345 * pt-pwrite.c: Removed.
12346 * pt-pwrite64.c: Removed.
12347 * pt-read.c: Removed.
12348 * pt-recv.c: Removed.
12349 * pt-recvfrom.c: Removed.
12350 * pt-recvmsg.c: Removed.
12351 * pt-send.c: Removed.
12352 * pt-sendto.c: Removed.
12353 * pt-sigtimedwait.c: Removed.
12354 * pt-sigwait.c: Removed.
12355 * pt-wait.c: Removed.
12356 * pt-waitpid.c: Removed.
12357 * pt-write.c: Removed.
12358 * pt-accept.c: Removed.
12359 * pt-close.c: Removed.
12360 * pt-connect.c: Removed.
12361 * pt-lseek64.c: Removed.
12362 * pt-sendmsg.c: Removed.
12363 * pt-tcdrain.c: Removed.
12364
12365 2002-12-15 Ulrich Drepper <drepper@redhat.com>
12366
12367 * init.c (__pthread_initialize_minimal_internal): Renamed from
12368 __pthread_initialize_minimal. Make old name an alias. This
12369 converts a normal relocation into a relative relocation.
12370
12371 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12372
12373 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12374 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12375 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12376 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12377 pt-sigwaitinfo, pt-waitid, and pt-writev.
12378 * pt-creat.c: Removed.
12379 * pt-poll.c: Removed.
12380 * pt-pselect.c: Removed.
12381 * pt-readv.c: Removed.
12382 * pt-select.c: Removed.
12383 * pt-sigpause.c: Removed.
12384 * pt-sigsuspend.c: Removed.
12385 * pt-sigwaitinfo.c: Removed.
12386 * pt-waitid.c: Removed.
12387 * pt-writev.c: Removed.
12388
12389 * init.c (pthread_functions): New variable.
12390 (__pthread_initialize_minimal): Pass pointer to pthread_functions
12391 (or NULL) to __libc_pthread_init.
12392 * forward.c: Rewrite to use __libc:pthread_functions array to get
12393 function addresses.
12394 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12395 prototype.
12396 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12397 Take new parameter. Copy content of variable pointed to by it
12398 to __libc_pthread_init.
12399
12400 * pthreadP.h (struct pthread_functions): New type.
12401 (__libc_pthread_init): Declare.
12402
12403 * pthread_attr_destroy.c: Add namespace protected alias.
12404 * pthread_attr_getdetachstate.c: Likewise.
12405 * pthread_attr_getinheritsched.c: Likewise.
12406 * pthread_attr_getschedparam.c: Likewise.
12407 * pthread_attr_getschedpolicy.c: Likewise.
12408 * pthread_attr_getscope.c: Likewise.
12409 * pthread_attr_setdetachstate.c: Likewise.
12410 * pthread_attr_setinheritsched.c: Likewise.
12411 * pthread_attr_setschedparam.c: Likewise.
12412 * pthread_attr_setschedpolicy.c: Likewise.
12413 * pthread_attr_setscope.c: Likewise.
12414 * pthread_cond_broadcast.c: Likewise.
12415 * pthread_cond_destroy.c: Likewise.
12416 * pthread_cond_init.c: Likewise.
12417 * pthread_cond_signal.c: Likewise.
12418 * pthread_cond_wait.c: Likewise.
12419 * pthread_condattr_destroy.c: Likewise.
12420 * pthread_condattr_init.c: Likewise.
12421 * pthread_equal.c: Likewise.
12422 * pthread_exit.c: Likewise.
12423 * pthread_getschedparam.c: Likewise.
12424 * pthread_self.c: Likewise.
12425 * pthread_setcancelstate.c: Likewise.
12426 * pthread_setschedparam.c: Likewise.
12427 * pthread_mutex_destroy.c: Likewise.
12428 * pthread_mutex_init.c: Likewise.
12429 * pthreadP.h: Add prototypes for the aliases.
12430
12431 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12432 multiple_threads member in correct TCB to 1.
12433
12434 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12435 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
12436 member of thread decriptor, otherwise return unconditionally 1.
12437
12438 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12439
12440 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12441 regular Linux version. Remove file.
12442 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
12443 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
12444 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
12445 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
12446 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
12447 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
12448 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
12449 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
12450 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
12451 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
12452 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
12453 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
12454 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
12455 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
12456 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
12457 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
12458 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
12459 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
12460 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
12461 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
12462 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
12463 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
12464 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
12465 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
12466 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
12467 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
12468 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
12469 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
12470 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
12471 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
12472
12473 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12474
12475 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12476 * sysdeps/unix/sysv/linux/open.c: Removed.
12477 * sysdeps/unix/sysv/linux/fsync.c: Removed.
12478 * sysdeps/unix/sysv/linux/lseek.c: Removed.
12479 * sysdeps/unix/sysv/linux/msync.c: Removed.
12480 * sysdeps/unix/sysv/linux/read.c: Removed.
12481 * sysdeps/unix/sysv/linux/close.c: Removed.
12482 * sysdeps/unix/sysv/linux/creat.c: Removed.
12483 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12484 * sysdeps/unix/sysv/linux/pause.c: Removed.
12485 * sysdeps/unix/sysv/linux/select.c: Removed.
12486 * sysdeps/unix/sysv/linux/write.c: Removed.
12487
12488 2002-12-14 Ulrich Drepper <drepper@redhat.com>
12489
12490 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12491 element in TCB to see whether locking is needed.
12492
12493 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12494 MULTIPLE_THREADS_OFFSET value is correct.
12495
12496 * sysdeps/unix/sysv/linux/close.c: New file.
12497 * sysdeps/unix/sysv/linux/connect.S: New file.
12498 * sysdeps/unix/sysv/linux/creat.c: New file.
12499 * sysdeps/unix/sysv/linux/fsync.c: New file.
12500 * sysdeps/unix/sysv/linux/llseek.c: New file.
12501 * sysdeps/unix/sysv/linux/lseek.c: New file.
12502 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12503 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12504 * sysdeps/unix/sysv/linux/msync.c: New file.
12505 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12506 * sysdeps/unix/sysv/linux/open.c: New file.
12507 * sysdeps/unix/sysv/linux/open64.c: New file.
12508 * sysdeps/unix/sysv/linux/pause.c: New file.
12509 * sysdeps/unix/sysv/linux/poll.c: New file.
12510 * sysdeps/unix/sysv/linux/pread.c: New file.
12511 * sysdeps/unix/sysv/linux/pread64.c: New file.
12512 * sysdeps/unix/sysv/linux/pselect.c: New file.
12513 * sysdeps/unix/sysv/linux/pwrite.c: New file.
12514 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12515 * sysdeps/unix/sysv/linux/readv.c: New file.
12516 * sysdeps/unix/sysv/linux/recv.S: New file.
12517 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12518 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12519 * sysdeps/unix/sysv/linux/select.c: New file.
12520 * sysdeps/unix/sysv/linux/send.S: New file.
12521 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12522 * sysdeps/unix/sysv/linux/sendto.S: New file.
12523 * sysdeps/unix/sysv/linux/sigpause.c: New file.
12524 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12525 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12526 * sysdeps/unix/sysv/linux/sigwait.c: New file.
12527 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12528 * sysdeps/unix/sysv/linux/system.c: New file.
12529 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12530 * sysdeps/unix/sysv/linux/wait.c: New file.
12531 * sysdeps/unix/sysv/linux/waitid.c: New file.
12532 * sysdeps/unix/sysv/linux/waitpid.c: New file.
12533 * sysdeps/unix/sysv/linux/writev.c: New file.
12534 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12535
12536 * pt-readv.c: Fix comment.
12537
12538 2002-12-14 Jakub Jelinek <jakub@redhat.com>
12539
12540 * tst-cleanup1.c: Include stdlib.h.
12541
12542 * tst-cancel5.c: New test.
12543 * Makefile (tests): Add tst-cancel5.
12544 (tst-cancel5): Link against libc.so libpthread.so in that order.
12545
12546 2002-12-13 Ulrich Drepper <drepper@redhat.com>
12547
12548 * forward.c (test_loaded): Prevent recursive calls.
12549
12550 * Makefile (routines): Add libc-cancellation.
12551 * libc-cancellation.c: New file.
12552 * descr.h (struct pthread): Add multiple_threads field.
12553 * allocatestack.c (allocate_stack): Initialize multiple_header field of
12554 new thread descriptor to 1.
12555 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12556 Initialize multiple_thread field after successful thread creation.
12557 * cancellation.c (__do_cancel): Move to pthreadP.h.
12558 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12559 (__pthread_disable_asynccancel): Add internal_function attribute.
12560 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12561 * pthread_setcancelstate.c: Likewise.
12562 * pthread_setcanceltype.c: Likewise.
12563 * pthread_exit.c: Likewise.
12564 * pthreadP.h (CANCELLATION_P): Likewise.
12565 (__do_cancel): Define as static inline.
12566 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12567 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12568 declarations.
12569 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12570 fields. Define MULTIPLE_THREADS_OFFSET.
12571 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12572 declaration.
12573 * sysdeps/unix/sysv/linux/accept.S: New file.
12574 * sysdeps/unix/sysv/linux/read.c: New file.
12575 * sysdeps/unix/sysv/linux/write.c: New file.
12576 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12577 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12578 initialization of __libc_locking_needed.
12579 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12580 __libc_locking_needed, use multiple_threads field in TCB.
12581 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12582
12583 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12584
12585 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12586 version.
12587 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12588
12589 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12590 access to __libc_locking_needed for PIC.
12591
12592 2002-12-12 Jakub Jelinek <jakub@redhat.com>
12593
12594 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12595 declare for libc.so.
12596 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12597 expression.
12598 (__libc_lock_lock): Put into statement expression.
12599 (__libc_lock_unlock): Remove trailing semicolon.
12600 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12601
12602 2002-12-12 Roland McGrath <roland@redhat.com>
12603
12604 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12605 "m" constraint to refer to __libc_locking_needed. Declare it here.
12606
12607 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12608
12609 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12610 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12611 Initialize __libc_locking_needed.
12612 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12613 instead of __register_pthread_fork_handler.
12614 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12615 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12616 fork-gen with libc_pthread_init.
12617 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12618 of __register_pthread_fork_handler.
12619 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12620 of __register_pthread_fork_handler.
12621 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12622 __libc_locking_needed to determine whether lock prefix can be avoided.
12623 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12624
12625 2002-12-11 Ulrich Drepper <drepper@redhat.com>
12626
12627 * Makefile (tests): Add tst-cleanup1.
12628 * tst-cleanup1.c: New file.
12629 * cancellation.c (__cleanup_thread): Removed.
12630 (__do_cancel): Remove call to __cleanup_thread.
12631 * pthreadP.h: Remove __cleanup_thread prorotype.
12632
12633 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12634 Remember function and argument even if cancellation handler
12635 function is not available.
12636 (__libc_cleanup_region_end): Execute registered function directly if
12637 pthread functions are not available.
12638 (__libc_cleanup_end): Likewise.
12639
12640 * init.c (__pthread_initialize_minimal): Fix initialization in
12641 static lib by preventing gcc from being too clever.
12642
12643 2002-12-10 Ulrich Drepper <drepper@redhat.com>
12644
12645 * init.c (__pthread_initialize_minimal): Remove unneccesary
12646 sigaddset call.
12647
12648 * Makefile (tests): We can run tst-locale2 now.
12649
12650 2002-12-09 Ulrich Drepper <drepper@redhat.com>
12651
12652 * Versions: Remove duplicated sigwait entry.
12653
12654 2002-12-08 Ulrich Drepper <drepper@redhat.com>
12655
12656 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12657 inside libpthread.
12658
12659 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12660
12661 * pthreadP.h: Declare __pthread_enable_asynccancel and
12662 __pthread_disable_asynccancel.
12663 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12664 (CANCEL_RESET): Use __pthread_disable_asynccancel.
12665 * cancellation.c (__pthread_enable_asynccancel): New function.
12666 (__pthread_disable_asynccancel): New function.
12667 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12668 * pt-close.c: Likewise.
12669 * pt-connect.c: Likewise.
12670 * pt-creat.c: Likewise.
12671 * pt-fcntl.c: Likewise.
12672 * pt-fsync.c: Likewise.
12673 * pt-lseek.c: Likewise.
12674 * pt-lseek64.c: Likewise.
12675 * pt-msgrcv.c: Likewise.
12676 * pt-msgsnd.c: Likewise.
12677 * pt-msync.c: Likewise.
12678 * pt-nanosleep.c: Likewise.
12679 * pt-open.c: Likewise.
12680 * pt-open64.c: Likewise.
12681 * pt-pause.c: Likewise.
12682 * pt-poll.c: Likewise.
12683 * pt-pread.c: Likewise.
12684 * pt-pread64.c: Likewise.
12685 * pt-pselect.c: Likewise.
12686 * pt-pwrite.c: Likewise.
12687 * pt-pwrite64.c: Likewise.
12688 * pt-read.c: Likewise.
12689 * pt-readv.c: Likewise.
12690 * pt-recv.c: Likewise.
12691 * pt-recvfrom.c: Likewise.
12692 * pt-recvmsg.c: Likewise.
12693 * pt-select.c: Likewise.
12694 * pt-send.c: Likewise.
12695 * pt-sendmsg.c: Likewise.
12696 * pt-sendto.c: Likewise.
12697 * pt-sigpause.c: Likewise.
12698 * pt-sigsuspend.c: Likewise.
12699 * pt-sigtimedwait.c: Likewise.
12700 * pt-sigwait.c: Likewise.
12701 * pt-sigwaitinfo.c: Likewise.
12702 * pt-system.c: Likewise.
12703 * pt-tcdrain.c: Likewise.
12704 * pt-wait.c: Likewise.
12705 * pt-waitid.c: Likewise.
12706 * pt-waitpid.c: Likewise.
12707 * pt-write.c: Likewise.
12708 * pt-writev.c: Likewise.
12709 * pthread_join.c: Likewise.
12710 * pthread_timedjoin.c: Likewise.
12711
12712 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12713 (__xpg_sigpause): New function.
12714 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12715
12716 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12717
12718 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12719
12720 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12721 _GI_pthread_cleanup_pop to pthreadP.h.
12722
12723 * ftrylockfile.c: Use _IO_lock_trylock instead of
12724 pthread_mutex_trylock.
12725
12726 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12727 (CANCEL_RESET): Likewise.
12728 (__pthread_setcanceltype_): Declare.
12729 (__pthread_mutex_lock_internal): Declare.
12730 (__pthread_mutex_unlock_internal): Declare.
12731 (__pthread_once_internal): Declare.
12732 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12733 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12734
12735 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12736 and pthread_mutex_unlock.
12737 * pthread_cond_wait.c: Likewise.
12738 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12739 * pthread_mutex_unlock.c: Likewise.
12740
12741 * pthread_setcanceltype.c: Add additional alias
12742 __pthread_setcanceltype.
12743
12744 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12745 * sem_open.c (sem_open): Likewise.
12746 Use __libc_open, __libc_write, and __libc_close instead of
12747 open, write, and close respectively.
12748
12749 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12750 Rewrite as statement expression since it must return a value.
12751
12752 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12753 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12754 __pthread_kill.
12755
12756 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12757 alias __pthread_once_internal.
12758
12759 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12760
12761 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12762
12763 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12764 * tst-stdio1.c: New file.
12765 * tst-stdio2.c: New file.
12766
12767 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12768
12769 * Makefile (tests): Comment out tst-locale2 for now.
12770 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12771
12772 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12773 -D_IO_MTSAFE_IO.
12774 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12775 Use _IO_lock_init instead of explicit assignment.
12776
12777 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12778 Define __libc_lock_* and __libc_lock_recursive macros with
12779 lowlevellock macros, not pthread mutexes.
12780
12781 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12782 of pthread_mutex_lock.
12783 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12784 instead of pthread_mutex_unlock.
12785
12786 2002-12-06 Roland McGrath <roland@redhat.com>
12787
12788 * allocatestack.c (__stack_user): Use uninitialized defn.
12789 * init.c (__pthread_initialize_minimal): Initialize it here.
12790
12791 2002-12-05 Roland McGrath <roland@redhat.com>
12792
12793 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12794 string.
12795 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12796
12797 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12798 missing & here too.
12799
12800 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12801
12802 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12803 lowlevellock.
12804 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12805 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12806 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12807 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12808 for __libc_lock_* macros.
12809 * Makefile (routines): Add libc-lowlevellock.
12810
12811 2002-10-09 Roland McGrath <roland@redhat.com>
12812
12813 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12814 Under [__PIC__], call the function via the pointer fetched for
12815 comparison rather than a call by name that uses the PLT.
12816 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12817 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12818 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12819 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12820 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12821
12822 2002-12-04 Roland McGrath <roland@redhat.com>
12823
12824 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12825
12826 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12827 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12828
12829 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12830
12831 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12832
12833 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12834 a completely opaque, non-integer type.
12835 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12836
12837 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12838
12839 * sysdeps/i386/tls.h: Include stdlib.h.
12840 * sysdeps/x86_64/tls.h: Likewise.
12841
12842 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12843
12844 * Makefile (tests): Add tst-locale2.
12845 (tests-static): Likewise.
12846 * tst-locale2.c: New file.
12847
12848 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12849 volatile and add memory clobbers to lock operations.
12850
12851 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12852
12853 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12854 * sysdeps/i386/i486/bits/atomic.h: New file.
12855 * sysdeps/i386/i586/bits/atomic.h: New file.
12856 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12857 include i486 version.
12858 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12859 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12860 Patch by Marijn Ros <marijn@mad.scientist.com>.
12861
12862 * allocatestack.c (get_cached_stack): Don't crash if we first
12863 found a stack with a larger size then needed.
12864 Reported by Hui Huang <hui.huang@sun.com>.
12865
12866 * Makefile (tests): Add tst-sysconf.
12867 * tst-sysconf.c: New file.
12868
12869 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12870 PTHREAD_THREADS_MAX.
12871
12872 2002-12-02 Roland McGrath <roland@redhat.com>
12873
12874 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12875 Declare using hidden_proto instead of attribute_hidden, so there are
12876 non-.hidden static symbols for gdb to find.
12877 (__pthread_keys): Likewise.
12878 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12879 * allocatestack.c (__stack_user): Likewise.
12880 * pthread_create.c (__pthread_keys): Likewise.
12881 (__nptl_threads_events, __nptl_last_event): Make these static instead
12882 of hidden.
12883 * pthread_key_create.c (__pthread_pthread_keys_max,
12884 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12885
12886 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12887
12888 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12889 statically.
12890 * tst-locale1.c: New file.
12891
12892 * pthread_cond_timedwait.c: Include <stdlib.h>.
12893
12894 * Makefile (tests): Add tst-fork2 and tst-fork3.
12895 * tst-fork2.c: New file.
12896 * tst-fork3.c: New file.
12897
12898 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12899
12900 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12901
12902 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12903 require it to 200112L.
12904
12905 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12906 instruction only if HAVE_CMOV is defined.
12907 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12908
12909 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12910
12911 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12912
12913 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12914
12915 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12916
12917 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12918
12919 * sysdeps/x86_64/bits/atomic.h: New file.
12920
12921 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12922 16-bit operations.
12923
12924 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12925 possible since gettid cannot fail.
12926
12927 * sysdeps/x86_64/pthreaddef.h: New file.
12928
12929 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12930
12931 * sysdeps/x86_64/pthread_spin_init.c: New file.
12932 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12933 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12934 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12935
12936 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12937 Add missing lock prefix. Minute optimization.
12938
12939 * tst-spin2.c (main): Also check successful trylock call.
12940
12941 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12942 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12943
12944 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12945 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12946
12947 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12948 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12949 value in case of an error. Add support for INTERNAL_SYSCALL.
12950
12951 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12952 value in case of an error.
12953
12954 * sysdeps/x86_64/tls.h: New file.
12955
12956 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12957
12958 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12959 takes the array member name and the index as parameters.
12960 (THREAD_SETMEM_NC): Likewise.
12961 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12962 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12963 interfaces.
12964
12965 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12966 to decide which code to use.
12967 (THREAD_SETMEM_NC): Likewise.
12968
12969 * allocatestack.c (queue_stack): Don't remove stack from list here.
12970 Do it in the caller. Correct condition to prematurely terminate
12971 loop to free stacks.
12972 (__deallocate_stack): Remove stack from list here.
12973
12974 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12975
12976 * Makefile (tests): Add tst-stack1.
12977 * tst-stack1.c: New file.
12978
12979 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12980 provided stack.
12981
12982 * pthread_attr_getstack.c: Return bottom of the thread area.
12983
12984 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12985
12986 * Makefile (libpthread-routines): Add pt-allocrtsig and
12987 pthread_kill_other_threads.
12988 * pt-allocrtsig.c: New file.
12989 * pthread_kill_other_threads.c: New file.
12990 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12991 all three functions.
12992 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12993 allocrtsig.
12994 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12995 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12996 and __libc_allocate_rtsig_private.
12997 * Versions (libpthread): Export pthread_kill_other_threads_np,
12998 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12999
13000 2002-11-24 Ulrich Drepper <drepper@redhat.com>
13001
13002 * allocatestack.c (allocate_stack): stackaddr in attribute points to
13003 the end of the stack. Adjust computations.
13004 When mprotect call fails dequeue stack and free it.
13005 * pthread_attr_setstack.c: Store top of the stack in stackaddr
13006 attribute.
13007 * pthread_getattr_np.c: Likewise.
13008
13009 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
13010 surprises.
13011
13012 2002-11-23 Ulrich Drepper <drepper@redhat.com>
13013
13014 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
13015 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
13016
13017 2002-11-22 Ulrich Drepper <drepper@redhat.com>
13018
13019 * pthread_getspecific.c: Optimize access to first 2nd-level array.
13020 * pthread_setspecific.c: Likewise.
13021
13022 2002-11-21 Ulrich Drepper <drepper@redhat.com>
13023
13024 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
13025 definitions. Get them from the official place.
13026 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
13027
13028 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
13029 Use new CLONE_ flags in clone() calls.
13030
13031 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
13032 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
13033
13034 * Versions: Add pthread_* functions for libc.
13035 * forward.c: New file.
13036
13037 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
13038 errno-loc.
13039 * herrno.c: New file.
13040 * res.c: New file.
13041
13042 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
13043 sem_trywait, and sem_timedwait. Add herrno and res.
13044 * sem_init.c: Don't initialize lock and waiters members.
13045 * sem_open.c: Likewise.
13046 * sem_post.c: Removed.
13047 * sem_wait.c: Removed.
13048 * sem_trywait.c: Removed.
13049 * sem_timedwait.c: Removed.
13050 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
13051 Includes full implementations of sem_post, sem_wait, sem_trywait,
13052 and sem_timedwait.
13053 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
13054 for new implementation.
13055 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
13056 and waiters fields.
13057
13058 * tst-sem3.c: Improve error message.
13059 * tst-signal3.c: Likewise.
13060
13061 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
13062 to tell the kernel about the termination futex and to initialize tid
13063 member. Don't initialize main_thread.
13064 * descr.h (struct pthread): Remove main_thread member.
13065 * cancelllation.c (__do_cancel): Remove code handling main thread.
13066 The main thread is not special anymore.
13067
13068 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
13069 size of the stacks to stack_cache_actsize.
13070
13071 * pt-readv.c: Add missing "defined".
13072 * pt-sigwait.c: Likewise.
13073 * pt-writev.c: Likewise.
13074
13075 2002-11-09 Ulrich Drepper <drepper@redhat.com>
13076
13077 * Versions: Export __connect from libpthread.
13078 Patch by Luca Barbieri <ldb@ldb.ods.org>.
13079
13080 * Makefile (libpthread-routines): Add pt-raise.
13081 * sysdeps/unix/sysv/linux/raise.c: New file.
13082 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
13083 * sysdeps/generic/pt-raise.c: New file.
13084
13085 * pthread_cond_init.c: Initialize all data elements of the condvar
13086 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
13087
13088 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
13089 * pthread_create.c: Likewise.
13090
13091 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
13092 * tst-key1.c: New file.
13093 * tst-key2.c: New file.
13094 * tst-key3.c: New file.
13095
13096 * Versions: Export pthread_detach for version GLIBC_2.0.
13097 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
13098
13099 2002-11-08 Ulrich Drepper <drepper@redhat.com>
13100
13101 * pthread_key_create.c: Terminate search after an unused key was found.
13102 Patch by Luca Barbieri <ldb@ldb.ods.org>.
13103
13104 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
13105 Patch by Luca Barbieri <ldb@ldb.ods.org>.
13106
13107 2002-10-10 Ulrich Drepper <drepper@redhat.com>
13108
13109 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
13110 dynamic lookup for errno in PIC.
13111
13112 * allocatestack.c (get_cached_stack): Rearrange code slightly to
13113 release the stack lock as soon as possible.
13114 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
13115 the static TLS block.
13116 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
13117
13118 * cancellation.c: Renamed from cancelation.c.
13119 * Makefile: Adjust accordingly.
13120 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
13121 * cleanup_defer.c: Use CANCELLATION_P.
13122 * pthread_testcancel.c: Likewise.
13123 * descr.h: Fix spelling in comments.
13124 * init.c: Likewise.
13125 * pthread_getattr_np.c: Likewise.
13126 * pthread_getschedparam.c: Likewise.
13127 * pthread_setschedparam.c: Likewise.
13128 * Versions: Likewise.
13129
13130 * pt-pselect.c: New file.
13131 * Makefile (libpthread-routines): Add pt-pselect.
13132 * Versions: Add pselect.
13133
13134 * tst-cancel4.c: New file.
13135 * Makefile (tests): Add tst-cancel4.
13136
13137 2002-10-09 Ulrich Drepper <drepper@redhat.com>
13138
13139 * pthread_mutex_lock.c: Always record lock ownership.
13140 * pthread_mutex_timedlock.c: Likewise.
13141 * pthread_mutex_trylock.c: Likewise.
13142
13143 * pt-readv.c: New file.
13144 * pt-writev.c: New file.
13145 * pt-creat.c: New file.
13146 * pt-msgrcv.c: New file.
13147 * pt-msgsnd.c: New file.
13148 * pt-poll.c: New file.
13149 * pt-select.c: New file.
13150 * pt-sigpause.c: New file.
13151 * pt-sigsuspend.c: New file.
13152 * pt-sigwait.c: New file.
13153 * pt-sigwaitinfo.c: New file.
13154 * pt-waitid.c: New file.
13155 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
13156 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
13157 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
13158 * Versions: Add all the new functions.
13159
13160 * tst-exit1.c: New file.
13161 * Makefile (tests): Add tst-exit1.
13162
13163 * sem_timedwait.c: Minor optimization for more optimal fastpath.
13164
13165 2002-10-08 Ulrich Drepper <drepper@redhat.com>
13166
13167 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
13168
13169 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
13170 call. pthread_join is an official cancellation point.
13171 * pthread_timedjoin.c: Likewise.
13172
13173 * pthread_cond_wait.c: Revert order in which internal lock are dropped
13174 and the condvar's mutex are retrieved.
13175 * pthread_cond_timedwait.c: Likewise.
13176 Reported by dice@saros.East.Sun.COM.
13177
13178 2002-10-07 Ulrich Drepper <drepper@redhat.com>
13179
13180 * pthreadP.h: Cut out all type definitions and move them...
13181 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
13182 * pthreadP.h: Include <internaltypes.h>.
13183
13184 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
13185 performance tweaks.
13186
13187 * sem_trywait.c: Shuffle #includes around to get right order.
13188 * sem_timedwait.c: Likewise.
13189 * sem_post.c: Likewise.
13190 * sem_wait.c: Likewise.
13191
13192 * nptl 0.3 released.
13193
13194 * Makefile (tests): Add tst-signal3.
13195 * tst-signal3.c: New file.
13196
13197 2002-10-05 Ulrich Drepper <drepper@redhat.com>
13198
13199 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
13200 the asms modify the sem object.
13201 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
13202
13203 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
13204 the actual members.
13205 * pthreadP.h (struct sem): New type. Actual semaphore type.
13206 * semaphoreP.h: Include pthreadP.h.
13207 * sem_getvalue.c: Adjust to sem_t change.
13208 * sem_init.c: Likewise.
13209 * sem_open.c: Likewise.
13210 * sem_post.c: Likewise.
13211 * sem_timedwait.c: Likewise.
13212 * sem_trywait.c: Likewise.
13213 * sem_wait.c: Likewise.
13214
13215 2002-10-04 Ulrich Drepper <drepper@redhat.com>
13216
13217 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
13218 * tst-basic2.c: New file.
13219 * tst-exec1.c: New file.
13220 * tst-exec2.c: New file.
13221 * tst-exec3.c: New file.
13222
13223 * tst-fork1.c: Remove extra */.
13224
13225 * nptl 0.2 released. The API for IA-32 is complete.
This page took 0.610316 seconds and 5 git commands to generate.