]> git.ipfire.org Git - thirdparty/glibc.git/blob - nptl/ChangeLog
Clean up internal fopen uses
[thirdparty/glibc.git] / nptl / ChangeLog
1 2011-11-15 Ulrich Drepper <drepper@gmail.com>
2
3 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
4 /proc/self/maps.
5
6 2011-10-29 Ulrich Drepper <drepper@gmail.com>
7
8 [BZ #13358]
9 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
10 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
11 path for kernels with FUTEX_CLOCK_REALTIME.
12 Debugged by H.J. Lu <hjl.tools@gmail.com>.
13
14 2011-10-27 Andreas Schwab <schwab@redhat.com>
15
16 [BZ #13344]
17 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
18 for memory synchronization functions.
19 * semaphore.h: Likewise.
20
21 2011-10-24 Ulrich Drepper <drepper@gmail.com>
22
23 * tst-cancel7.c: Avoid warning.
24 * tst-mutex6.c: Likewise.
25 * tst-mutex9.c: Likewise.
26 * tst-mutexpi6.c: Likewise.
27
28 2011-10-23 Ulrich Drepper <drepper@gmail.com>
29
30 * sysdeps/i386/tls.h: Remove #include <list.h>.
31
32 2011-10-15 Ulrich Drepper <drepper@gmail.com>
33
34 * pthread_create.c (start_thread): Call __ctype_init.
35
36 2011-09-15 Andreas Schwab <schwab@redhat.com>
37
38 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
39 defined.
40 (list_add): Add atomic_write_barrier.
41 * descr.h: Define __need_list_t before including <list.h>.
42 * nptl-init.c: Include <list.h>
43 * allocatestack.c: Likewise.
44
45 2011-09-11 Ulrich Drepper <drepper@gmail.com>
46
47 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
48 * sysdeps/ia64/tls.h: Likewise.
49 * sysdeps/powerpc/tls.h: Likewise.
50 * sysdeps/s390/tls.h: Likewise.
51 * sysdeps/sh/tls.h: Likewise.
52 * sysdeps/sparc/tls.h: Likewise.
53 * sysdeps/x86_64/tls.h: Likewise.
54
55 2011-09-10 Ulrich Drepper <drepper@gmail.com>
56
57 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
58
59 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
60 !USE___THREAD.
61 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
62 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
63 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
64 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
65 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
66 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
67 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
68 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
69 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
70 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
71 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
72 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
73
74 * tst-tls1.c: Support for __thread is now mandatory.
75 * tst-tls2.c: Likewise.
76 * tst-tls3.c: Likewise.
77 * tst-tls3mod.c: Likewise.
78 * tst-tls4.c: Likewise.
79 * tst-tls4moda.c: Likewise.
80 * tst-tls4modb.c: Likewise.
81 * tst-tls5.h: Likewise.
82
83 2011-09-08 Ulrich Drepper <drepper@gmail.com>
84
85 [BZ #12403]
86 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
87 (pthread_rwlock_timedwrlock): Use correct macro in test.
88 Patch by H.J. Lu <hongjiu.lu@intel.com>.
89
90 2011-09-06 Ulrich Drepper <drepper@gmail.com>
91
92 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
93 use gettimeofday vsyscall, just call gettimeofday.
94 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
95 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
96 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
97 Likewise.
98 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
99 Likewise.
100 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
101 Simplify __vdso_clock_gettime use.
102
103 2011-09-05 David S. Miller <davem@davemloft.net>
104
105 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
106 New function.
107 (sem_timedwait): Call it to force an exception region around
108 the async cancel enable and the futex operation.
109 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
110 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
111 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
112 (__new_sem_wait): Call it to force an exception region around
113 the async cancel enable and the futex operation.
114 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
115 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
116
117 2011-08-31 Andreas Schwab <schwab@redhat.com>
118
119 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
120 thread is woken up.
121
122 2011-08-20 David S. Miller <davem@davemloft.net>
123
124 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
125
126 2011-08-14 Roland McGrath <roland@hack.frob.com>
127
128 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
129 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
130
131 2011-08-08 Andreas Schwab <schwab@redhat.com>
132
133 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
134 stack.
135 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
136 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
137
138 2011-07-22 Ulrich Drepper <drepper@gmail.com>
139
140 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
141 barrier.
142 (__gcc_personality_v0): Likewise.
143 (_Unwind_ForcedUnwind): Likewise.
144 (_Unwind_GetCFA): Likewise.
145
146 2011-07-14 Roland McGrath <roland@hack.frob.com>
147
148 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
149 UINTMAX_C.
150
151 2011-06-30 Ulrich Drepper <drepper@gmail.com>
152
153 * nptl-init.c (__nptl_set_robust): New function.
154 (pthread_functions): Add reference.
155 * npthreadP.h: Declare __nptl_set_robust.
156 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
157 ptr_set_robust member.
158 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
159 child if threads are used.
160
161 2011-06-14 Andreas Jaeger <aj@suse.de>
162
163 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
164
165 2011-05-11 Ulrich Drepper <drepper@gmail.com>
166
167 [BZ #386]
168 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
169
170 2011-04-10 Ulrich Drepper <drepper@gmail.com>
171
172 [BZ #12650]
173 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
174 clearing memory.
175 Patch partly by Robert Rex <robert.rex@exasol.com>.
176
177 2011-01-19 Roland McGrath <roland@redhat.com>
178
179 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
180 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
181 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
182 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
183 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
184 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
185
186 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
187
188 * Makefile (test-extras): Add tst-cleanup4aux.
189
190 2011-01-14 Ulrich Drepper <drepper@gmail.com>
191
192 [BZ #10563]
193 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
194 (__SETXID_2): Likewise.
195 (__SETXID_3): Likewise.
196
197 2011-01-13 Ulrich Drepper <drepper@gmail.com>
198
199 [BZ #10484]
200 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
201 * alloca_cutoff.c: Add libc_hidden_def.
202
203 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
204
205 [BZ #12113]
206 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
207 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
208 of "struct pthread".
209
210 2010-09-21 Andreas Schwab <schwab@redhat.com>
211
212 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
213 [!__EXCEPTIONS]: Mangle local variable not_first_call.
214 (pthread_cleanup_push_defer_np): Likewise.
215
216 2010-09-03 Ulrich Drepper <drepper@redhat.com>
217
218 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
219 small.
220
221 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
222 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
223
224 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
225 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
226
227 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
228
229 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
230
231 2010-05-01 Alan Modra <amodra@gmail.com>
232
233 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
234 (PSEUDO): Use correct cr save. Don't use wrong parm save area
235 to save temps. Correct cfi for possible later frame manipulation.
236 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
237 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
238 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
239 (DOCARGS_6, UNDOCARGS_6): Likewise.
240 (CENABLE, CDISABLE): Add nops for non-shared calls.
241
242 2010-07-06 Andreas Schwab <schwab@redhat.com>
243
244 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
245 Fix type mismatch.
246
247 2010-07-03 Ulrich Drepper <drepper@redhat.com>
248
249 * tst-abstime.c (do_test): Some more cleanups
250
251 2010-07-02 Ulrich Drepper <drepper@redhat.com>
252
253 * tst-abstime.c: Correct testing and add test for sem_timedwait.
254
255 2010-07-01 Andreas Schwab <schwab@redhat.com>
256 Ulrich Drepper <drepper@redhat.com>
257
258 * Makefile (tests): Add tst-abstime.
259 * tst-abstime.c: New file.
260 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
261 (__lll_timedlock_wait): Check for timestamp before the Epoch.
262 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
263 (__lll_timedlock_wait): Likewise.
264 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
265 (__lll_robust_timedlock_wait): Likewise.
266 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
267 (__pthread_cond_timedwait): Likewise.
268 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
269 (pthread_rwlock_timedrdlock): Likewise.
270 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
271 (pthread_rwlock_timedwrlock): Likewise.
272 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
273 Likewise.
274
275 2010-07-01 Ulrich Drepper <drepper@redhat.com>
276
277 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
278
279 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
280
281 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
282 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
283
284 2010-04-09 Ulrich Drepper <drepper@redhat.com>
285
286 [BZ #11390]
287 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
288 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
289 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
290 pthread_setname.
291 * Makefile (libpthread-routines): Add pthread_getname and
292 pthread_setname.
293 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
294
295 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
296
297 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
298 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
299 * sysdeps/pthread/Makefile: Remove csu section and rt section's
300 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
301
302 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
303
304 * pthread_cond_timedwait.c: Add check for
305 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
306 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
307 INTERNAL_SYSCALL.
308
309 2010-03-09 Ulrich Drepper <drepper@redhat.com>
310
311 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
312 and the call fails wake eventually waiting setxid threads. Don't free
313 stack here if we try starting a thread.
314 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
315 if the clone call failed.
316
317 2010-03-08 Andreas Schwab <schwab@redhat.com>
318
319 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
320 * allocatestack.c (get_cached_stack): Set setxid_futex.
321 (allocate_stack): Likewise.
322
323 2010-03-05 Andreas Schwab <schwab@redhat.com>
324 Ulrich Drepper <drepper@redhat.com>
325
326 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
327 it is creating a thread or it is just being created.
328 * pthread_create.c (start_thread): Wake setxid thread if it is
329 waiting.
330 (__pthread_create_2_1): Initialize setxid_futex.
331 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
332 is waiting.
333
334 2010-01-15 Ulrich Drepper <drepper@redhat.com>
335
336 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
337 Fix unwind info.
338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
339
340 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
341
342 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
343 Fix pthread_cond_timedwait with requeue-PI.
344 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
345 Fix pthread_cond_wait with requeue-PI.
346
347 2010-01-14 Ulrich Drepper <drepper@redhat.com>
348
349 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
350 and pthread_mutexattr_setrobust for GLIBC_2.12.
351 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
352 * pthread_mutexattr_getrobust.c: Define alias
353 pthread_mutexattr_getrobust.
354 * pthread_mutexattr_setrobust.c: Define alias
355 pthread_mutexattr_setrobust.
356
357 2010-01-12 Ulrich Drepper <drepper@redhat.com>
358
359 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
360
361 2010-01-08 Ulrich Drepper <drepper@redhat.com>
362
363 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
364
365 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
366
367 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
368 call __gmon_start__.
369 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
370
371 2009-12-17 Ulrich Drepper <drepper@redhat.com>
372
373 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
374 using memset.
375
376 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
377
378 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
379 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
380 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
381 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
383 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
384 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
385 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
386
387 2009-12-12 Ulrich Drepper <drepper@redhat.com>
388
389 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
390 Don't update nwaiters after invalid timeout is recognized.
391
392 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
393
394 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
395 __gmon_start__.
396
397 2009-11-27 Andreas Schwab <schwab@redhat.com>
398
399 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
400 THREAD_SELF->cancelhandling after returning from futex call.
401
402 2009-11-24 Ulrich Drepper <drepper@redhat.com>
403
404 * tst-sem13.c: New file.
405 * Makefile (tests): Add tst-sem13.
406
407 2009-11-22 Roland McGrath <roland@redhat.com>
408
409 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
410 instead of recapitulating its contents.
411
412 2009-11-18 Ulrich Drepper <drepper@redhat.com>
413
414 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
415 optimizations and cleanups.
416
417 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
418
419 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
420 Remove redundant code. Fix cfi offsets.
421 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
422 Fix cfi offsets.
423
424 2009-11-17 Ulrich Drepper <drepper@redhat.com>
425
426 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
427 reduce size of unwind info.
428
429 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
430 cfi directives.
431 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
432 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
433
434 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
435
436 [BZ #4457]
437 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
438 LIBGCC_S_SO.
439 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
440
441 2009-10-30 Ulrich Drepper <drepper@redhat.com>
442
443 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
444
445 [BZ #3270]
446 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
447 steps to avoid races with creation and terminations.
448 * nptl-init.c (sighandler_setxid): Adjust.
449 Patch by Daniel Jacobowitz.
450
451 2009-09-07 Andreas Schwab <schwab@redhat.com>
452
453 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
454
455 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
456 Joseph Myers <joseph@codesourcery.com>
457
458 [BZ #7094]
459 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
460 Initialize the sigev_notify field for newly created timer to make sure
461 the timer gets deleted from the active timer's list upon timer_delete.
462
463 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
464
465 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
466 Correct a logic error.
467
468 2009-08-25 Ulrich Drepper <drepper@redhat.com>
469
470 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
471 of the field in local variables.
472 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
473 variable and don't unconditionally clear it.
474
475 2009-08-24 Ulrich Drepper <drepper@redhat.com>
476
477 * pthread_create.c (start_thread): Hint to the kernel that memory for
478 the stack can be reused. We do not mark all the memory. The part
479 still in use and some reserve are kept.
480
481 2009-08-23 Ulrich Drepper <drepper@redhat.com>
482
483 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
484
485 2009-08-11 Ulrich Drepper <drepper@redhat.com>
486
487 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
488 directives.
489
490 2009-08-10 Ulrich Drepper <drepper@redhat.com>
491
492 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
493 directives.
494 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
495
496 2009-08-10 Andreas Schwab <schwab@redhat.com>
497
498 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
499 (__pthread_cond_signal): Don't clobber register used for syscall
500 number.
501
502 2009-08-08 Ulrich Drepper <drepper@redhat.com>
503
504 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
505 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
506
507 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
508 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
509 register.
510
511 2009-08-07 Ulrich Drepper <drepper@redhat.com>
512
513 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
514 enabled by the special *_asynccancel functions.
515 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
516 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
517
518 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
519
520 2009-08-04 Ulrich Drepper <drepper@redhat.com>
521
522 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
523 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
524 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
525 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
526 since we can assume the special __*_{en,dis}able_asynccancel
527 functions.
528 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
529 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
530 and PTHREAD_CANCELED.
531
532 2009-07-31 Ulrich Drepper <drepper@redhat.com>
533
534 * descr.h: Better definition of *_BITMASK macros for cancellation.
535
536 2009-07-29 Ulrich Drepper <drepper@redhat.com>
537
538 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
539
540 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
541 dynamic linker might have to save.
542 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
543 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
544 printing.
545
546 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
547
548 2009-07-28 Ulrich Drepper <drepper@redhat.com>
549
550 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
551 New function.
552 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
553 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
554 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
555 requeue_pi for robust mutexes.
556 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
557 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
558 Don't only skip __pthread_mutex_cond_lock. Call instead
559 __pthread_mutex_cond_lock_adjust.
560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
561
562 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
563 optimization of PI mutex handling.
564
565 2009-07-27 Ulrich Drepper <drepper@redhat.com>
566
567 [BZ #10418]
568 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
569 instead of of _acq variants of cmpxchg.
570
571 2009-07-23 Ulrich Drepper <drepper@redhat.com>
572
573 * sysdeps/x86_64/configure.in: New file.
574
575 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
576 path when not using absolute timeout futex.
577
578 2009-07-20 Ulrich Drepper <drepper@redhat.com>
579
580 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
581 optimizations of last changes.
582 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
583
584 2009-07-19 Ulrich Drepper <drepper@redhat.com>
585
586 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
587 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
588 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
589 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
591 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
592 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
593 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
594
595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
596 (__pthread_cond_timedwait): Make more robust.
597
598 2009-07-18 Ulrich Drepper <drepper@redhat.com>
599
600 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
601 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
602 directly use absolute timeout.
603
604 * tst-sem5.c (do_test): Add test for premature timeout.
605 * Makefile: Linu tst-sem5 with librt.
606
607 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
608 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
609 directly use absolute timeout.
610 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
611 (pthread_rwlock_timedrdlock): Likewise.
612
613 * tst-cond11.c (run_test): Add test to check that the timeout is
614 long enough.
615
616 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
617 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
618 directly use absolute timeout.
619
620 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
621 (__pthread_cond_wait): Convert to using exception handler instead of
622 registered unwind buffer.
623 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
624 (__pthread_cond_timedwait): Likewise.
625
626 2009-07-17 Ulrich Drepper <drepper@redhat.com>
627
628 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
629 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
630 use absolute timeout.
631
632 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
633 handling of uncontested semaphore.
634
635 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
636 (__condvar_cleanup): Rewrite to use cfi directives instead of
637 hand-coded unwind tables.
638 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
639 Likewise.
640 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
641 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
642 Likewise.
643
644 2009-06-12 Ulrich Drepper <drepper@redhat.com>
645
646 * Makefile (libpthread-routines): Add pthread_sigqueue.
647 * Versions: Add pthread_sigqueue for GLIBC_2.11.
648 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
649 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
650
651 2009-06-11 Ulrich Drepper <drepper@redhat.com>
652
653 [BZ #10262]
654 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
655 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
656 cannot be assumed.
657 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
658
659 2009-05-16 Ulrich Drepper <drepper@redhat.com>
660
661 * libc-cancellation.c: Move __libc_cleanup_routine to...
662 * libc-cleanup.c: ...here. New file.
663 * Makefile (routines): Add libc-cleanup.
664
665 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
666 test.
667 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
668 * sysdeps/pthread/librt-cancellation.c: Likewise.
669
670 [BZ #9924]
671 * nptl-init.c: Renamed from init.c.
672 * Makefile: Change all occurences of init.c to nptl-init.c.
673
674 2009-05-15 Ulrich Drepper <drepper@redhat.com>
675
676 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
677 to test when deciding on the delay.
678 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
679 * pthread_cancel.c: Close race between deciding on sending a signal
680 and setting the CANCELING_BIT bit.
681
682 * cancellation.c (__pthread_disable_asynccancel): Don't return if
683 thread is canceled.
684 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
685
686 2009-04-27 Ulrich Drepper <drepper@redhat.com>
687
688 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
689 is available.
690 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
691 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
692 * sysdeps/i386/tls.h: Likewise.
693 (tcbhead_t): Add __private_tm member.
694
695 2009-04-26 Ulrich Drepper <drepper@redhat.com>
696
697 * sem_open.c (sem_open): Rewrite initialization of initsem to
698 avoid warnings.
699
700 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
701 Avoid warning by using may_alias attribute on ptrhack.
702
703 2009-04-22 Ulrich Drepper <drepper@redhat.com>
704
705 [BZ #10090]
706 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
707 Check policy and priority for validity.
708 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
709
710 2009-03-15 Ulrich Drepper <drepper@redhat.com>
711
712 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
713 (__pthread_cond_timedwait): Change to use cfi directives instead of
714 hand-coded unwind sections.
715
716 2009-03-10 Ulrich Drepper <drepper@redhat.com>
717
718 * init.c (nptl_freeres): Compile only for SHARED.
719
720 2009-03-09 Jakub Jelinek <jakub@redhat.com>
721
722 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
723 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
724 FUTEX_BITSET_MATCH_ANY.
725
726 2009-02-27 Roland McGrath <roland@redhat.com>
727
728 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
729 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
730
731 2009-02-26 Ulrich Drepper <drepper@redhat.com>
732
733 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
734 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
735 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
736 200112L to 200809L.
737
738 2009-02-25 Ulrich Drepper <drepper@redhat.com>
739
740 * sysdeps/pthread/pthread.h: The robust mutex functions are in
741 POSIX 2008.
742
743 2009-02-24 Ulrich Drepper <drepper@redhat.com>
744
745 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
746 Unify name of include protector macro.
747
748 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
749
750 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
751 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
752
753 2009-01-29 Ulrich Drepper <drepper@redhat.com>
754
755 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
756 pointer variables.
757
758 * allocatestack.c (__free_stacks): Renamed from free_stacks.
759 (__free_stack_cache): Removed. Change callers to call __free_stacks.
760 * init.c (nptl_freeres): New function.
761 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
762 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
763 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
764 variable.
765 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
766 load DSO. Assign last.
767 (__unwind_freeres): New function.
768
769 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
770 for better debugging. No need to use stack_list_add here.
771
772 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
773
774 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
775 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
776 instead of computing relative timeout.
777 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
778 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
779
780 2009-01-25 Ulrich Drepper <drepper@redhat.com>
781
782 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
783
784 2009-01-08 Ulrich Drepper <drepper@redhat.com>
785
786 * sysdeps/pthread/list.h (list_add): Initialize new element first.
787 (list_add_tail): Removed.
788
789 2009-01-07 Ulrich Drepper <drepper@redhat.com>
790
791 * (in_flight_stack): New variable.
792 (stack_list_del): New function. Use instead of list_del.
793 (stack_list_add): New function. Use instead of list_add when adding to
794 stack_cache and stack_used lists.
795 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
796 when the fork call interrupted another thread.
797
798 2009-01-04 Ulrich Drepper <drepper@redhat.com>
799
800 * init.c (__pthread_initialize_minimal_internal): Optimize test
801 FUTEX_CLOCK_REALTIME a bit.
802
803 2009-01-03 Ulrich Drepper <drepper@redhat.com>
804
805 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
806 only passing five parameters to FUTEX_WAIT_BITSET call.
807
808 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
809 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
810 instead of computing relative timeout.
811
812 2009-01-02 Ulrich Drepper <drepper@redhat.com>
813
814 * init.c (__pthread_initialize_minimal_internal): Check for
815 FUTEX_CLOCK_REALTIME flag.
816 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
817 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
818 relative timeout.
819
820 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
821 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
822 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
823 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
824 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
825 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
826
827 2008-12-09 Ulrich Drepper <drepper@redhat.com>
828
829 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
830 loop body instead of ; to avoid gcc warnings.
831 (pthread_cleanup_pop_restore_np): Likewise.
832 Patch by Caolán McNamara <caolanm@redhat.com>.
833
834 2008-12-09 Jakub Jelinek <jakub@redhat.com>
835
836 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
837 fast path here, for robust/PI/PP mutexes call
838 __pthread_mutex_lock_full. Don't use switch, instead use a series
839 of ifs according to their probability.
840 (__pthread_mutex_lock_full): New function.
841 * pthread_mutex_unlock.c: Include assert.h.
842 (__pthread_mutex_unlock_usercnt): Handle only the
843 fast path here, for robust/PI/PP mutexes call
844 __pthread_mutex_unlock_full. Don't use switch, instead use a series
845 of ifs according to their probability.
846 (__pthread_mutex_unlock_full): New function.
847 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
848 (__pthread_mutex_lock_full): Define.
849
850 2008-12-08 Ulrich Drepper <drepper@redhat.com>
851
852 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
853 implementation. Add necessary padding and.
854 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
855 words.
856
857 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
858
859 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
860 and FUTEX_WAKE_BITSET.
861
862 2008-12-02 Ulrich Drepper <drepper@redhat.com>
863
864 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
865 and FUTEX_WAKE_BITSET.
866 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
867 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
868 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
869 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
870
871 2008-11-25 Roland McGrath <roland@redhat.com>
872
873 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
874 Subdirectories moved to ports repository as
875 sysdeps/.../nptl subdirectories.
876
877 2008-11-12 Jakub Jelinek <jakub@redhat.com>
878
879 [BZ #7008]
880 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
881 of old value.
882 * pthread_cond_init.c (__pthread_cond_init): Fix
883 cond->__data.__nwaiters initialization.
884 * Makefile (tests): Add tst-cond23.
885 * tst-cond23.c: New test.
886
887 2008-11-07 Jakub Jelinek <jakub@redhat.com>
888
889 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
890 arguments.
891 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
892 arguments.
893
894 2008-11-01 Ulrich Drepper <drepper@redhat.com>
895
896 [BZ #6955]
897 * pthread_mutex_lock.c: Add support for private PI mutexes.
898 * pthread_mutex_timedlock.c: Likewise.
899 * pthread_mutex_trylock.c: Likewise.
900 * pthread_mutex_unlock.c: Likewise.
901 Patch mostly by Ben Jackson <ben@ben.com>.
902
903 2008-10-31 Ulrich Drepper <drepper@redhat.com>
904
905 [BZ #6843]
906 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
907 Increase stack size for helper thread.
908
909 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
910
911 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
912 assembly with a clobber list for access registers a0 and a1.
913
914 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
915
916 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
917 to force runp->refcntr to be read from memory.
918
919 2008-09-08 Richard Guenther <rguenther@suse.de>
920
921 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
922 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
923 lll_timedlock, lll_robust_timedlock, lll_unlock,
924 lll_robust_unlock): Promote private to int.
925
926 2008-08-15 Ulrich Drepper <drepper@redhat.com>
927
928 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
929 ARCH_RETRY_MMAP definitions.
930 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
931 Define MAP_STACK when not defined.
932 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
933 handling of ARCH_RETRY_MMAP.
934
935 2008-07-30 Ulrich Drepper <drepper@redhat.com>
936
937 * tst-align2.c (f): Print message that f is reached.
938
939 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
940
941 [BZ #6740]
942 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
943 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
944
945 2008-07-25 Ulrich Drepper <drepper@redhat.com>
946
947 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
948 SOCK_CLOEXEC if possible.
949
950 2008-05-29 Ulrich Drepper <drepper@redhat.com>
951
952 * Makefile (tests): Add tst-rwlock2a.
953 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
954 * tst-rwlock2a.c: New file.
955
956 2008-06-12 Ulrich Drepper <drepper@redhat.com>
957
958 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
959
960 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
961
962 * sysdeps/pthread/pthread.h: Fix typo in comment.
963
964 2008-05-28 Ulrich Drepper <drepper@redhat.com>
965
966 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
967 of CPU set to the kernel.
968
969 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
970
971 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
972 cfi directives.
973 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
974 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
975 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
976 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
977 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
978 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
979
980 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
981
982 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
983 cfi directives.
984 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
985 Likewise.
986 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
987 Likewise.
988 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
989 Likewise.
990
991 2008-05-26 Ulrich Drepper <drepper@redhat.com>
992
993 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
994
995 2008-05-20 Jakub Jelinek <jakub@redhat.com>
996
997 David S. Miller <davem@davemloft.net>
998
999 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1000
1001 2008-05-10 Ulrich Drepper <drepper@redhat.com>
1002
1003 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1004 __pshared correctly.
1005 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1006 Likewise.
1007 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1008 Likewise.
1009 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1010 Likewise.
1011 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1012 Likewise.
1013 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1014
1015 2008-04-14 David S. Miller <davem@davemloft.net>
1016
1017 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1018 (__old_sem_wait): Fix argument to lll_futex_wait().
1019
1020 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1021
1022 * pthread_create.c: Require pthread_mutex_trylock and
1023 pthread_key_delete for libgcc.
1024
1025 2008-04-08 Jakub Jelinek <jakub@redhat.com>
1026
1027 [BZ #6020]
1028 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1029 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1030 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1031
1032 2008-03-27 Ulrich Drepper <drepper@redhat.com>
1033
1034 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1035 <linux/limits.h> has defined it.
1036 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1037 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1038 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1039 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1040
1041 2008-03-18 Jakub Jelinek <jakub@redhat.com>
1042
1043 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1044 of ASSEMBLER.
1045 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1046 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1047
1048 2008-03-14 Ulrich Drepper <drepper@redhat.com>
1049
1050 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1051 HAVE_DL_DISCOVER_OSVERSION.
1052 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1053 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1054
1055 2008-03-07 Ulrich Drepper <drepper@redhat.com>
1056
1057 [BZ #5778]
1058 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1059 _POSIX_CHOWN_RESTRICTED value to zero.
1060
1061 2008-01-31 Roland McGrath <roland@redhat.com>
1062
1063 * Makefile (omit-deps): Variable removed.
1064
1065 2008-01-30 Ulrich Drepper <drepper@redhat.com>
1066
1067 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1068 unnecessary addr32 prefix.
1069
1070 2008-01-29 Roland McGrath <roland@redhat.com>
1071
1072 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1073
1074 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1075
1076 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1077
1078 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1079
1080 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1081 a scratch register.
1082 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1083 (__lll_lock_wait_private): Fix typo.
1084 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1085 (pthread_barrier_wait): Likewise. Adjust XADD use.
1086 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1087 Adjust XADD use.
1088 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1089 (pthread_rwlock_timedrdlock): Return correct return value.
1090 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1091 (pthread_rwlock_timedwrlock): Likewise.
1092
1093 2008-01-15 Ulrich Drepper <drepper@redhat.com>
1094
1095 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1096 thread returns the program exits with an error code.
1097
1098 2008-01-10 Ulrich Drepper <drepper@redhat.com>
1099
1100 * pthread-errnos.sym: Add EOVERFLOW.
1101 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1102 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1103 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1104 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1105
1106 2007-12-14 Ulrich Drepper <drepper@redhat.com>
1107
1108 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1109 parameter. Passed it as permission to mmap.
1110 * allocatestack.c (allocate_stack): Pass prot as second parameter
1111 to ARCH_RETRY_MMAP.
1112
1113 2007-12-12 Ulrich Drepper <drepper@redhat.com>
1114
1115 * tst-basic7.c: Allocate memory for the stack.
1116
1117 [BZ #5465]
1118 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1119 (__pthread_cond_timedwait): Don't use VDSO.
1120 Patch by Michal Januszewski.
1121
1122 2007-12-07 Ulrich Drepper <drepper@redhat.com>
1123
1124 [BZ #5455]
1125 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1126 Allow label before pthread_cleanup_pop.
1127 (pthread_cleanup_pop_restore_np): Likewise.
1128
1129 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1130
1131 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1132 Store 2 before returning ETIMEDOUT.
1133
1134 2007-11-23 Ulrich Drepper <drepper@redhat.com>
1135
1136 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1137 Store 2 before returning ETIMEDOUT.
1138 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1139 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1140 (__lll_lock_wait_private): Optimize.
1141 (__lll_lock_wait): Likewise.
1142
1143 2007-11-20 Jakub Jelinek <jakub@redhat.com>
1144
1145 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1146 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1147 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1148
1149 2007-11-08 Ulrich Drepper <drepper@redhat.com>
1150
1151 [BZ #5240]
1152 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1153 If we time out, try one last time to lock the futex to avoid
1154 losing a wakeup signal.
1155 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1156 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1157
1158 [BZ #5245]
1159 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1160 if necessary.
1161
1162 2007-11-07 Ulrich Drepper <drepper@redhat.com>
1163
1164 [BZ #5245]
1165 * allocatestack.c (allocate_stack): Change ENOMEM error in case
1166 mmap failed to EAGAIN.
1167 * Makefile (tests): Add tst-basic7.
1168 * tst-basic7.c: New file.
1169
1170 2007-11-05 Ulrich Drepper <drepper@redhat.com>
1171
1172 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1173 Use __linkin_atfork.
1174
1175 2007-11-03 Mike Frysinger <vapier@gentoo.org>
1176
1177 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1178 missing line continuations.
1179 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1180 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
1181
1182 2007-10-28 Ulrich Drepper <drepper@redhat.com>
1183
1184 [BZ #5220]
1185 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1186 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1187 (struct timer): Add next element.
1188 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1189 enqueue timer structure into __active_timer_sigev_thread list.
1190 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1191 remove timer struct from __active_timer_sigev_thread.
1192 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1193 Before using timer structure make sure it is still on the
1194 __active_timer_sigev_thread list. Keep lock until done.
1195 Define __active_timer_sigev_thread and
1196 __active_timer_sigev_thread_lock.
1197
1198 2007-10-27 Ulrich Drepper <drepper@redhat.com>
1199
1200 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1201 Redefine thread_atfork for use of ATFORK_MEM.
1202 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1203 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1204 function.
1205 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1206 Use atomic operation when removing first element of list.
1207
1208 2007-10-17 Jakub Jelinek <jakub@redhat.com>
1209
1210 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1211 routine instead of an alias to __new_sem_post.
1212
1213 2007-10-15 Jakub Jelinek <jakub@redhat.com>
1214
1215 * init.c (__pthread_initialize_minimal): Initialize word to appease
1216 valgrind.
1217
1218 2007-10-10 Jakub Jelinek <jakub@redhat.com>
1219
1220 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1221 libc.so just clear NAME.
1222 (__libc_rwlock_fini): Nop inside of libc.so.
1223 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1224 all zeros.
1225
1226 2007-09-02 Ulrich Drepper <drepper@redhat.com>
1227
1228 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1229 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1230 unlocking failed.
1231 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1232
1233 2007-08-21 Ulrich Drepper <drepper@redhat.com>
1234
1235 [BZ #4938]
1236 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1237 reclaimed stack if necessary.
1238 * Makefile (tests): Add tst-tsd6.
1239 * tst-tsd6.c: New file.
1240
1241 2007-08-21 Jakub Jelinek <jakub@redhat.com>
1242
1243 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1244 Add private argument.
1245
1246 2007-08-20 Ulrich Drepper <drepper@redhat.com>
1247
1248 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1249 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1250
1251 2007-08-16 Jakub Jelinek <jakub@redhat.com>
1252
1253 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1254 (__lll_robust_timedlock): Pass private as last argument to
1255 __lll_robust_timedlock_wait.
1256 (__lll_unlock): Fix a pasto.
1257
1258 2007-08-15 Jakub Jelinek <jakub@redhat.com>
1259
1260 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1261 sparc_old_sem): New structs.
1262 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1263 (__sem_wait_cleanup): New function.
1264 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1265 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1266 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1267 lll_futex_wait.
1268 (__old_sem_wait): New function.
1269 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1270 nptl/sysdeps/unix/sysv/linux/sparc version.
1271 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1272 Likewise.
1273 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1274 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1275 (__new_sem_trywait): Use sparc_old_sem structure.
1276 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1277 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
1278 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1279 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1280 lll_futex_timed_wait.
1281 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1282 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1283 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1284 lll_futex_wake.
1285 (__old_sem_post): New function.
1286 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1287 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1288 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1289 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1290 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1291 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1292
1293 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1294
1295 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1296 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1297 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1298 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1299 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1300 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1301 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1302 Use FUTEX_WAKE_OP.
1303 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1304 kernel-features.h and tcb-offsets.h.
1305 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1306 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1307 process private.
1308 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1309 tcb-offsets.h.
1310 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1311 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1312 process private.
1313 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1314 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1315 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1316 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1317 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1318 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1319 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1320
1321 2007-08-14 Jakub Jelinek <jakub@redhat.com>
1322
1323 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1324 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1325 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1326 lll_futex_timed_wait.
1327
1328 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1329 __lll_robust_unlock): Rewrite as macros instead of inline functions.
1330 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1331 __lll_robust_unlock, __lll_wait_tid): Likewise.
1332
1333 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1334
1335 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1336 Fix a pasto.
1337 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1338 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1339 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1340 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1341 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1342 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1343 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1344 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1345 kernel-features.h.
1346 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1347 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1348 process private. Switch DW_CFA_advance_loc1 and some
1349 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1350 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1351 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1352 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1353 process private. Switch DW_CFA_advance_loc{1,2} and some
1354 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1355 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1356 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1357 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1358 Likewise.
1359 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1360 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1361 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1362 Likewise.
1363 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1364 (__pthread_cond_broadcast): Compare %r8 instead of
1365 dep_mutex-cond_*(%rdi) with $-1.
1366 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1367 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1368 of oring.
1369
1370 2007-08-13 Ulrich Drepper <drepper@redhat.com>
1371
1372 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1373
1374 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1375
1376 * allocatestack.c: Include kernel-features.h.
1377 * pthread_create.c: Likewise.
1378 * pthread_mutex_init.c: Likewise.
1379 * init.c: Likewise.
1380 * pthread_cond_timedwait.c: Likewise.
1381 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1382 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1383 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1384 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1385 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1387 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1388 Likewise.
1389 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1390 Likewise.
1391 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1392 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1393 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1394 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1395
1396 2007-08-12 Jakub Jelinek <jakub@redhat.com>
1397
1398 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1399 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1400 byte elements. One of them is the new __shared element.
1401 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1402 adjust names of other padding elements.
1403 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1404 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1405 byte elements. One of them is the new __shared element.
1406 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1407 adjust names of other padding elements.
1408 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1409 Renamed __pad1 element to __shared, adjust names of other padding
1410 elements.
1411 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1412 (pthread_rwlock_t): Likewise.
1413 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1414 typo.
1415
1416 2007-08-09 Anton Blanchard <anton@samba.org>
1417
1418 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1419
1420 2007-08-12 Ulrich Drepper <drepper@redhat.com>
1421
1422 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1423 <kernel-features.h>.
1424 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1425
1426 2007-08-11 Ulrich Drepper <drepper@redhat.com>
1427
1428 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1429 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1430 dealing with robust mutexes.
1431 * pthread_mutex_timedlock.c: Likewise.
1432 * pthread_mutex_trylock.c: Likewise.
1433 * pthread_mutex_unlock.c: Likewise.
1434 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1435
1436 2007-08-06 Jakub Jelinek <jakub@redhat.com>
1437
1438 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1439 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1440 (PTHREAD_MUTEX_PSHARED): Define.
1441 * pthread_mutex_init.c (__pthread_mutex_init): Set
1442 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1443 mutexes.
1444 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1445 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1446 as second argument to lll_lock.
1447 (LLL_MUTEX_TRYLOCK): Take mutex as argument
1448 instead of its __data.__lock field.
1449 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1450 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1451 to lll_robust_lock.
1452 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1453 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1454 instead of mutex->__data.__kind directly, pass
1455 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1456 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1457 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1458 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1459 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1460 to lll_timedlock, lll_robust_timedlock, lll_unlock and
1461 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
1462 of mutex->__data.__kind directly.
1463 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1464 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1465 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
1466 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1467 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1468 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1469 and lll_futex_wake.
1470 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1471 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1472 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1473 directly.
1474 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1475 Take mutex as argument instead of its __data.__lock field, pass
1476 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1477 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1478 __data.__lock field.
1479 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1480 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1481 to lll_robust_cond_lock.
1482 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1483 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1484 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
1485 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1486 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1487 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1488 lll_futex_wait.
1489 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1490 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1491 lll_futex_wake.
1492 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1493 pshared variable, pass it to lll_lock, lll_unlock,
1494 lll_futex_timedwait and lll_futex_wake.
1495 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1496 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1497 and lll_futex_wake.
1498 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1499 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1500 macro.
1501 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1502 lll_futex_wake_unlock): Likewise.
1503 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1504 Likewise.
1505 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1506 lll_futex_wake_unlock): Likewise.
1507 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1508 Likewise.
1509 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1510 lll_futex_wake_unlock): Likewise.
1511 (lll_futex_wake): Fix a typo.
1512 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1513 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1514 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1515 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1516 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1517 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1518 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1519 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1520 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1521 (__pthread_cond_timedwait): Likewise.
1522 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1523 (__condvar_cleanup, __pthread_cond_wait): Likewise.
1524
1525 2007-08-05 Jakub Jelinek <jakub@redhat.com>
1526
1527 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1528 Don't use CGOTSETUP and CGOTRESTORE macros.
1529 (CGOTSETUP, CGOTRESTORE): Remove.
1530 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1531 @local symbol.
1532
1533 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1534
1535 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1536 definitions for private futexes.
1537 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1538 kernel-features.h and lowlevellock.h. Use private futexes if
1539 they are available.
1540 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1541 (__lll_mutex_lock_wait): Rename to
1542 (__lll_lock_wait): ... this. Don't compile in for libc.so.
1543 (__lll_mutex_timedlock_wait): Rename to ...
1544 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
1545 Don't compile in for libc.so.
1546 (__lll_mutex_unlock_wake): Rename to ...
1547 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
1548 (__lll_timedwait_tid): Use __NR_gettimeofday.
1549 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1550 the header from assembler. Renamed all lll_mutex_* resp.
1551 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1552 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1553 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1554 Define.
1555 (__lll_lock_wait_private): Add prototype.
1556 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1557 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1558 __lll_unlock_wake): Likewise.
1559 (lll_lock): Add private argument. Call __lll_lock_wait_private
1560 if private is constant LLL_PRIVATE.
1561 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1562 lll_timedlock, lll_robust_timedlock): Add private argument.
1563 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1564 if private is constant LLL_PRIVATE.
1565 (lll_robust_unlock, lll_robust_dead): Add private argument.
1566 (lll_lock_t): Remove.
1567 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1568 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1569 lll_cond_wake, lll_cond_broadcast): Remove.
1570 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1571 kernel-features.h and lowlevellock.h.
1572 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1573 (LOAD_FUTEX_WAIT): Define.
1574 (__lll_robust_mutex_lock_wait): Rename to ...
1575 (__lll_robust_lock_wait): ... this. Add private argument.
1576 Use LOAD_FUTEX_WAIT macro.
1577 (__lll_robust_mutex_timedlock_wait): Rename to ...
1578 (__lll_robust_timedlock_wait): ... this. Add private argument.
1579 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1580 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1581 lowlevellock.h.
1582 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1583 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1584 __lll_mutex_{lock,unlock}_*.
1585 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1586 lowlevellock.h and pthread-errnos.h.
1587 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1588 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1589 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1590 __lll_mutex_{lock,unlock}_*.
1591 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1592 lowlevellock.h and pthread-errnos.h.
1593 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1594 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1595 __lll_mutex_{lock,unlock}_*.
1596 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1597 lowlevellock.h.
1598 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1599 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1600 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1601 (__condvar_tw_cleanup): Likewise.
1602 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1603 lowlevellock.h.
1604 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1605 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1606 __lll_mutex_{lock,unlock}_*.
1607 ( __condvar_w_cleanup): Likewise.
1608 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1609 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1610 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1611 lowlevellock.h.
1612 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1613 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1614 __lll_mutex_{lock,unlock}_*.
1615 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1616 lowlevellock.h.
1617 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1618 FUTEX_PRIVATE_FLAG): Remove.
1619 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1620 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1621 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1622 lowlevellock.h.
1623 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1624 FUTEX_PRIVATE_FLAG): Remove.
1625 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1626 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1627 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1628 lowlevellock.h.
1629 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1630 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1631 __lll_mutex_{lock,unlock}_*.
1632 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1633 lowlevellock.h.
1634 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1635 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1636 __lll_mutex_{lock,unlock}_*.
1637 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1638 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1639 (__new_sem_post): Use standard initial exec code sequences.
1640 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1641 lowlevellock.h.
1642 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1643 FUTEX_PRIVATE_FLAG): Remove.
1644 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1645 exec code sequences.
1646 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1647 (__new_sem_trywait): Use standard initial exec code sequences.
1648 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1649 (__new_sem_wait): Use standard initial exec code sequences.
1650
1651 2007-07-31 Anton Blanchard <anton@samba.org>
1652
1653 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1654 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1655 atomic_full_barrier.
1656
1657 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1658
1659 * allocatestack.c (stack_cache_lock): Change type to int.
1660 (get_cached_stack, allocate_stack, __deallocate_stack,
1661 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1662 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1663 as second argument to lll_lock and lll_unlock macros on
1664 stack_cache_lock.
1665 * pthread_create.c (__find_in_stack_list): Likewise.
1666 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1667 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1668 as second argument.
1669 * descr.h (struct pthread): Change lock and setxid_futex field
1670 type to int.
1671 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1672 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1673 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1674 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1675 Likewise.
1676 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1677 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1678 * pthreadP.h (__attr_list_lock): Change type to int.
1679 * pthread_attr_init.c (__attr_list_lock): Likewise.
1680 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1681 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1682 lll_{,un}lock.
1683 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1684 also for lll_futex_{wake,wait}.
1685 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1686 a pointer to const.
1687 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1688 LLL_SHARED as second argument to lll_{,un}lock.
1689 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1690 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1691 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1692 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1693 Likewise.
1694 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1695 as second argument to lll_{,un}lock macros on pd->lock.
1696 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1697 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1698 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1699 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1700 Likewise.
1701 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1702 Likewise.
1703 * pthread_once.c (once_lock): Change type to int.
1704 (__pthread_once): Pass LLL_PRIVATE as second argument to
1705 lll_{,un}lock macros on once_lock.
1706 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1707 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1708 rwlock->__data.__shared as second argument to them and similarly
1709 for lll_futex_w*.
1710 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1711 Likewise.
1712 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1713 Likewise.
1714 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1715 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1716 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1717 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1718 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1719 to lll_{,un}lock macros on __sem_mappings_lock.
1720 * sem_open.c (check_add_mapping): Likewise.
1721 (__sem_mappings_lock): Change type to int.
1722 * semaphoreP.h (__sem_mappings_lock): Likewise.
1723 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1724 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1725 instead of lll_*mutex_*, pass LLL_SHARED as last
1726 argument.
1727 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1728 pass LLL_SHARED as last argument.
1729 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1730 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1731 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1732 pass LLL_SHARED as last argument.
1733 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1734 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1735 LLL_SHARED as last argument.
1736 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1737 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1738 Similarly.
1739 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1740 __libc_lock_lock_recursive, __libc_lock_unlock,
1741 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1742 argument to lll_{,un}lock.
1743 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1744 _IO_lock_unlock): Likewise.
1745 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1746 compound literal.
1747 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1748 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1749 __fork_lock.
1750 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1751 free_mem): Likewise.
1752 (__fork_lock): Change type to int.
1753 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1754 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1755 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1756 lll_futex_wake.
1757 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1758 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1759 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1760 New function.
1761 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1762 pass it through to lll_futex_*wait, only compile in when
1763 IS_IN_libpthread.
1764 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1765 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1766 argument and pass it through to lll_futex_*wait.
1767 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1768 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1769 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1770 inline functions to __lll_* resp. __lll_robust_*.
1771 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1772 (lll_mutex_dead): Add private argument.
1773 (__lll_lock_wait_private): New prototype.
1774 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1775 __lll_robust_lock_timedwait): Add private argument to prototypes.
1776 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1777 call __lll_lock_wait_private, otherwise pass private to
1778 __lll_lock_wait.
1779 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1780 __lll_robust_timedlock): Add private argument, pass it to
1781 __lll_*wait functions.
1782 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1783 call __lll_unlock_wake_private, otherwise pass private to
1784 __lll_unlock_wake.
1785 (__lll_robust_unlock): Add private argument, pass it to
1786 __lll_robust_unlock_wake.
1787 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1788 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1789 argument, pass it through to __lll_* inline function.
1790 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1791 (lll_lock_t): Remove.
1792 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1793 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1794 lll_cond_wake, lll_cond_broadcast): Remove.
1795 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1796 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1797 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1798 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1799 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1800 the header from assembler. Renamed all lll_mutex_* resp.
1801 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1802 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1803 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1804 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1805 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1806 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1807 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1808 Remove prototype.
1809 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1810 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1811 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1812 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1813 MULTIPLE_THREADS_OFFSET as another asm operand.
1814 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1815 MULTIPLE_THREADS_OFFSET as last asm operand, call
1816 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1817 otherwise pass private as another argument to __lll_lock_wait.
1818 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1819 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1820 private as another argument to __lll_*lock_wait call.
1821 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1822 MULTIPLE_THREADS_OFFSET as another asm operand, call
1823 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1824 otherwise pass private as another argument to __lll_unlock_wake.
1825 (lll_robust_unlock): Add private argument, pass private as another
1826 argument to __lll_unlock_wake.
1827 (lll_robust_dead): Add private argument, use __lll_private_flag
1828 macro.
1829 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1830 LLL_MUTEX_LOCK_INITIALIZER.
1831 (lll_lock_t): Remove.
1832 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1833 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1834 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1835 lll_cond_wake, lll_cond_broadcast): Remove.
1836 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1837 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1838 2007-05-2{3,9} changes.
1839 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1840 kernel-features.h and lowlevellock.h.
1841 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1842 (LOAD_FUTEX_WAIT): Rewritten.
1843 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1844 define.
1845 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1846 (__lll_mutex_lock_wait): Rename to ...
1847 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1848 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1849 (__lll_mutex_timedlock_wait): Rename to ...
1850 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1851 contains private argument. Don't compile in for libc.so.
1852 (__lll_mutex_unlock_wake): Rename to ...
1853 (__lll_unlock_wake): ... this. %ecx contains private argument.
1854 Don't compile in for libc.so.
1855 (__lll_timedwait_tid): Use __NR_gettimeofday.
1856 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1857 kernel-features.h and lowlevellock.h.
1858 (LOAD_FUTEX_WAIT): Define.
1859 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1860 define.
1861 (__lll_robust_mutex_lock_wait): Rename to ...
1862 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1863 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1864 macro.
1865 (__lll_robust_mutex_timedlock_wait): Rename to ...
1866 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1867 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1868 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1869 lowlevellock.h.
1870 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1871 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1872 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1873 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1874 to __lll_lock_wait in %edx.
1875 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1876 Include lowlevellock.h and pthread-errnos.h.
1877 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1878 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1879 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1880 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1881 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1882 __lll_unlock_wake.
1883 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1884 Include lowlevellock.h and pthread-errnos.h.
1885 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1886 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1887 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1888 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1889 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1890 __lll_unlock_wake.
1891 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1892 Include lowlevellock.h.
1893 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1894 Don't define.
1895 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1896 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1897 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1898 __lll_unlock_wake. Use __NR_gettimeofday.
1899 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1900 Include lowlevellock.h.
1901 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1902 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1903 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1904 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1905 and __lll_unlock_wake.
1906 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1907 Include lowlevellock.h.
1908 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1909 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1910 MUTEX(%ebx) address in %edx rather than %ecx to
1911 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1912 and __lll_unlock_wake. Move return value from %ecx to %edx
1913 register.
1914 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1915 Include lowlevellock.h.
1916 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1917 Don't define.
1918 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1919 MUTEX(%ebp) address in %edx rather than %ecx to
1920 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1921 and __lll_unlock_wake. Move return value from %ecx to %edx
1922 register. Use __NR_gettimeofday.
1923 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1924 Include lowlevellock.h.
1925 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1926 Don't define.
1927 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1928 MUTEX(%ebp) address in %edx rather than %ecx to
1929 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1930 and __lll_unlock_wake. Move return value from %ecx to %edx
1931 register. Use __NR_gettimeofday.
1932 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1933 Include lowlevellock.h.
1934 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1935 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1936 MUTEX(%edi) address in %edx rather than %ecx to
1937 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1938 and __lll_unlock_wake.
1939 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1940 Include lowlevellock.h.
1941 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1942 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1943 MUTEX(%ebx) address in %edx rather than %ecx to
1944 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1945 and __lll_unlock_wake. Move return value from %ecx to %edx
1946 register.
1947 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1948 lowlevellock.h.
1949 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1950 define.
1951 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1952 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1953 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1954 lowlevellock.h.
1955 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1956 (sem_timedwait): Use __NR_gettimeofday.
1957 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1958 lowlevellock.h.
1959 (LOCK): Don't define.
1960 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1961 lowlevellock.h.
1962 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1963 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1964 are waiters.
1965 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1966 2007-05-2{3,9} changes.
1967 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1968 kernel-features.h and lowlevellock.h.
1969 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1970 (LOAD_FUTEX_WAIT): Rewritten.
1971 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1972 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1973 (__lll_mutex_lock_wait): Rename to ...
1974 (__lll_lock_wait): ... this. %esi is now private argument.
1975 Don't compile in for libc.so.
1976 (__lll_mutex_timedlock_wait): Rename to ...
1977 (__lll_timedlock_wait): ... this. %esi contains private argument.
1978 Don't compile in for libc.so.
1979 (__lll_mutex_unlock_wake): Rename to ...
1980 (__lll_unlock_wake): ... this. %esi contains private argument.
1981 Don't compile in for libc.so.
1982 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1983 kernel-features.h and lowlevellock.h.
1984 (LOAD_FUTEX_WAIT): Define.
1985 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1986 (__lll_robust_mutex_lock_wait): Rename to ...
1987 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1988 Use LOAD_FUTEX_WAIT macro.
1989 (__lll_robust_mutex_timedlock_wait): Rename to ...
1990 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1991 private, use LOAD_FUTEX_WAIT macro.
1992 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1993 lowlevellock.h.
1994 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1995 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1996 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1997 __lll_lock_wait and __lll_unlock_wake.
1998 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1999 Include lowlevellock.h and pthread-errnos.h.
2000 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2001 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2002 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2003 pass LLL_SHARED in %esi to both __lll_lock_wait and
2004 __lll_unlock_wake.
2005 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2006 Include lowlevellock.h and pthread-errnos.h.
2007 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2008 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2009 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2010 pass LLL_SHARED in %esi to both __lll_lock_wait and
2011 __lll_unlock_wake.
2012 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2013 Include lowlevellock.h.
2014 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2015 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2016 pass LLL_SHARED in %esi to both __lll_lock_wait and
2017 __lll_unlock_wake.
2018 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2019 Include lowlevellock.h.
2020 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2021 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2022 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2023 and __lll_unlock_wake.
2024 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2025 Include lowlevellock.h.
2026 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2027 Don't define.
2028 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2029 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2030 and __lll_unlock_wake.
2031 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2032 Include lowlevellock.h.
2033 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2034 Don't define.
2035 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2036 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2037 and __lll_unlock_wake.
2038 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2039 Include lowlevellock.h.
2040 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2041 Don't define.
2042 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2043 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2044 and __lll_unlock_wake.
2045 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2046 Include lowlevellock.h.
2047 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2048 Don't define.
2049 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2050 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2051 and __lll_unlock_wake.
2052 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2053 Include lowlevellock.h.
2054 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2055 Don't define.
2056 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2057 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2058 and __lll_unlock_wake.
2059 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2060 lowlevellock.h.
2061 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2062 define.
2063 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2064 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2065 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2066 lowlevellock.h.
2067 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2068 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2069 lowlevellock.h.
2070 (LOCK): Don't define.
2071 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2072 lowlevellock.h.
2073 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2074 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2075 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2076 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2077 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2078 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2079 (__lll_lock_wait_private): New function.
2080 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2081 it to lll_futex_*wait. Don't compile in for libc.so.
2082 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2083 Remove.
2084 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2085 (struct sparc_pthread_barrier): Remove.
2086 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2087 struct sparc_pthread_barrier. Pass
2088 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2089 and lll_futex_wait macros.
2090 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2091 Remove.
2092 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2093 Include sparc pthread_barrier_wait.c instead of generic one.
2094
2095 2007-07-30 Jakub Jelinek <jakub@redhat.com>
2096
2097 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2098
2099 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2100 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2101 %ecx.
2102 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2103 (pthread_rwlock_timedwrlock): Likewise.
2104 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2105 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2106
2107 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2108
2109 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2110
2111 2007-07-26 Jakub Jelinek <jakub@redhat.com>
2112
2113 * tst-locale2.c (useless): Add return statement.
2114
2115 2007-07-24 Jakub Jelinek <jakub@redhat.com>
2116
2117 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2118 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2119 * pthread_create.c (start_thread): Likewise.
2120 * init.c (sighandler_setxid): Likewise.
2121 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2122 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2123 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2124 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2125 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2126 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2127 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2128 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2129 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2130 Likewise.
2131 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2132 Likewise.
2133 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2134 Likewise.
2135 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2136 __rtld_notify): Likewise.
2137 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2138 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2139 __pthread_once): Likewise.
2140 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2141 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2142 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2143 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2144 (lll_futex_wait): Add private argument, define as wrapper around
2145 lll_futex_timed_wait.
2146 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2147 use __lll_private_flag macro.
2148 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2149 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2150 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2151 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2152 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2153 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2154 (lll_futex_wait): Add private argument, define as wrapper around
2155 lll_futex_timed_wait.
2156 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2157 use __lll_private_flag macro.
2158 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2159 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2160 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2161 Define.
2162 (lll_futex_timed_wait, lll_futex_wake): Use it.
2163 (lll_private_futex_wait, lll_private_futex_timed_wait,
2164 lll_private_futex_wake): Removed.
2165 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2166 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2167 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2168 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2169 (lll_futex_wait): Add private argument, define as wrapper around
2170 lll_futex_timed_wait.
2171 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2172 use __lll_private_flag macro.
2173 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2174 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2175 to lll_futex_*.
2176 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2177 (lll_private_futex_wait, lll_private_futex_timed_wait,
2178 lll_private_futex_wake): Removed.
2179 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2180 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2181 (lll_private_futex_wait, lll_private_futex_timed_wait,
2182 lll_private_futex_wake): Removed.
2183 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2184 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2185 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2186 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2187 (lll_futex_wait): Add private argument, define as wrapper around
2188 lll_futex_timed_wait.
2189 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2190 use __lll_private_flag macro.
2191 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2192 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2193 to lll_futex_*.
2194 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2195 Define.
2196 (lll_futex_timed_wait, lll_futex_wake): Use it.
2197 (lll_private_futex_wait, lll_private_futex_timed_wait,
2198 lll_private_futex_wake): Removed.
2199
2200 2007-07-27 Jakub Jelinek <jakub@redhat.com>
2201
2202 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2203 of the structure for sparc32.
2204
2205 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
2206
2207 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2208
2209 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2210
2211 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2212 code used when private futexes are assumed.
2213 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2214 Likewise.
2215
2216 2007-07-23 Jakub Jelinek <jakub@redhat.com>
2217
2218 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2219 (__lll_private_flag): Define.
2220 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2221 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2222 __lll_private_flag.
2223 (lll_private_futex_wait, lll_private_futex_timedwait,
2224 lll_private_futex_wake): Define as wrapper around non-_private
2225 macros.
2226 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2227 (__lll_private_flag): Define.
2228 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2229 (lll_private_futex_wait, lll_private_futex_timedwait,
2230 lll_private_futex_wake): Define as wrapper around non-_private
2231 macros.
2232
2233 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
2234
2235 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2236 parameter to lll_futex_wait call.
2237 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2238
2239 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2240 Replace lll_futex_wait with lll_private_futex_wait.
2241 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2242 Add LLL_SHARED parameter to lll_futex_wake().
2243
2244 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2245 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2246 lll_private_futex_wake.
2247 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2248 bit from private parm before syscall.
2249 (lll_futex_timed_wait): Likewise.
2250 (lll_futex_wake): Likewise.
2251 (lll_futex_wake_unlock): Likewise.
2252 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2253 (lll_robust_mutex_unlock): Likewise.
2254 (lll_mutex_unlock_force): Likewise.
2255 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2256
2257 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2258
2259 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2260 compilation when unconditionally using private futexes.
2261 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2262 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2263 Likewise.
2264 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2265 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2266
2267 2007-07-17 Jakub Jelinek <jakub@redhat.com>
2268
2269 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2270 Define.
2271
2272 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2273
2274 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2275 kernel-features.h.
2276
2277 2007-05-16 Roland McGrath <roland@redhat.com>
2278
2279 * init.c (__nptl_initial_report_events): New variable.
2280 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2281 to that.
2282
2283 2007-06-22 Jakub Jelinek <jakub@redhat.com>
2284
2285 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2286 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2287
2288 2007-06-19 Ulrich Drepper <drepper@redhat.com>
2289
2290 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2291 implementation.
2292
2293 2007-06-18 Ulrich Drepper <drepper@redhat.com>
2294
2295 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2296 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2297 * pthread_mutex_timedlock.c: Likewise.
2298 * pthread_mutex_trylock.c: Likewise.
2299 * pthread_mutex_unlock.c: Likewise.
2300
2301 2007-06-17 Andreas Schwab <schwab@suse.de>
2302
2303 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2304 sections.
2305
2306 2007-06-17 Ulrich Drepper <drepper@redhat.com>
2307
2308 * allocatestack.c (allocate_stack): Make code compile if
2309 __ASSUME_PRIVATE_FUTEX is set.
2310
2311 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2312
2313 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2314 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2315 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2316 (__pthread_rwlock_wrlock): Likewise.
2317 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2318 (pthread_rwlock_timedrdlock): Likewise.
2319 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2320 (pthread_rwlock_timedwrlock): Likewise.
2321 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2322 (__pthread_rwlock_unlock): Likewise.
2323
2324 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2325
2326 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2327 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2328 Split __flags into __flags, __shared, __pad1 and __pad2.
2329 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2330 futexes if they are available.
2331 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2332 in libc-lowlevellock.S allow using private futexes.
2333 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2334 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
2335 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
2336 to call lll_futex_timed_wait. Add lll_private_futex_wait,
2337 lll_private_futex_timed_wait and lll_private_futex_wake.
2338 (lll_robust_mutex_unlock): Fix typo.
2339 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2340 field in futex command setup.
2341 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2342 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2343 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2344 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2345 if they are available. Remove clear_once_control.
2346 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2347 futexes if they are available.
2348 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2349 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2350 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2351 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2352 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2353 Wake only when there are waiters.
2354 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2355 support. Indicate that there are waiters. Remove unnecessary
2356 extra cancellation test.
2357 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2358 left-over duplication of __sem_wait_cleanup.
2359
2360 2007-06-07 Ulrich Drepper <drepper@redhat.com>
2361
2362 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2363 parameter to lll_futex_wait, lll_futex_timed_wait, and
2364 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
2365 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2366 lll_private_futex_wake.
2367 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2368 * allocatestack.c: Adjust use of lll_futex_* macros.
2369 * init.c: Likewise.
2370 * lowlevellock.h: Likewise.
2371 * pthread_barrier_wait.c: Likewise.
2372 * pthread_cond_broadcast.c: Likewise.
2373 * pthread_cond_destroy.c: Likewise.
2374 * pthread_cond_signal.c: Likewise.
2375 * pthread_cond_timedwait.c: Likewise.
2376 * pthread_cond_wait.c: Likewise.
2377 * pthread_create.c: Likewise.
2378 * pthread_mutex_lock.c: Likewise.
2379 * pthread_mutex_setprioceiling.c: Likewise.
2380 * pthread_mutex_timedlock.c: Likewise.
2381 * pthread_mutex_unlock.c: Likewise.
2382 * pthread_rwlock_timedrdlock.c: Likewise.
2383 * pthread_rwlock_timedwrlock.c: Likewise.
2384 * pthread_rwlock_unlock.c: Likewise.
2385 * sysdeps/alpha/tls.h: Likewise.
2386 * sysdeps/i386/tls.h: Likewise.
2387 * sysdeps/ia64/tls.h: Likewise.
2388 * sysdeps/powerpc/tls.h: Likewise.
2389 * sysdeps/pthread/aio_misc.h: Likewise.
2390 * sysdeps/pthread/gai_misc.h: Likewise.
2391 * sysdeps/s390/tls.h: Likewise.
2392 * sysdeps/sh/tls.h: Likewise.
2393 * sysdeps/sparc/tls.h: Likewise.
2394 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2395 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2396 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2397 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2398 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2399 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2400 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2401 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2402 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2403 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2404 Likewise.
2405 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2406 * sysdeps/x86_64/tls.h: Likewise.
2407
2408 2007-05-29 Ulrich Drepper <drepper@redhat.com>
2409
2410 * pthread_getattr_np.c: No need to install a cancellation handler,
2411 this is no cancellation point.
2412 * pthread_getschedparam.c: Likewise.
2413 * pthread_setschedparam.c: Likewise.
2414 * pthread_setschedprio.c: Likewise.
2415 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2416 lll_unlock_wake_cb.
2417 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2418 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2419 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2420 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2421 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2422 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2423 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2424 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2425 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2426 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2427 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2428 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2429
2430 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2431 whether there are more than one thread makes no sense here since
2432 we only call the slow path if the locks are taken.
2433 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2434
2435 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2436 COND_NWAITERS_SHIFT.
2437 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2438 COND_CLOCK_BITS.
2439 * pthread_cond_init.c: Likewise.
2440 * pthread_cond_timedwait.c: Likewise.
2441 * pthread_cond_wait.c: Likewise.
2442 * pthread_condattr_getclock.c: Likewise.
2443 * pthread_condattr_setclock.c: Likewise.
2444 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2445 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2447 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2449
2450 2007-05-28 Jakub Jelinek <jakub@redhat.com>
2451
2452 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2453 unistd.h.
2454
2455 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2456 insn suffix.
2457 (THREAD_GSCOPE_GET_FLAG): Remove.
2458 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2459 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2460 changes.
2461 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2462 (THREAD_GSCOPE_GET_FLAG): Remove.
2463 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2464 instead of THREAD_GSCOPE_GET_FLAG.
2465 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
2466 it.
2467 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2468 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2469 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2470 THREAD_GSCOPE_WAIT): Define.
2471 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2472 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2473 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2474 THREAD_GSCOPE_WAIT): Define.
2475 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2476 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2477 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2478 THREAD_GSCOPE_WAIT): Define.
2479 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2480 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2481 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2482 THREAD_GSCOPE_WAIT): Define.
2483
2484 2007-05-24 Richard Henderson <rth@redhat.com>
2485
2486 * descr.h (struct pthread): Add header.gscope_flag.
2487 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2488 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2489 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2490 THREAD_GSCOPE_WAIT): Define.
2491
2492 2007-05-27 Ulrich Drepper <drepper@redhat.com>
2493
2494 * init.c: Make it compile with older kernel headers.
2495
2496 * tst-initializers1.c: Show through exit code which test failed.
2497
2498 * pthread_rwlock_init.c: Also initialize __shared field.
2499 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2500 element in rwlock structure into four byte elements. One of them is
2501 the new __shared element.
2502 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2503 Likewise.
2504 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2505 __shared, adjust names of other padding elements.
2506 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2507 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2508 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2509 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2510 FUTEX_PRIVATE_FLAG.
2511 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2512 futex to use private operations if possible.
2513 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2514 Likewise.
2515 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2516 Likewise.
2517 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2518 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2519 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2520 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2521 Likewise.
2522 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2523 Likewise.
2524 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2525 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2526
2527 2007-05-26 Ulrich Drepper <drepper@redhat.com>
2528
2529 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2530 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2531 * pthread_rwlock_timedrdlock.c: Likewise.
2532 * pthread_rwlock_tryrdlock.c: Likewise.
2533
2534 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2535 optimization.
2536
2537 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2538 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2539 duplication of __sem_wait_cleanup.
2540
2541 * allocatestack.c: Revert last change.
2542 * init.c: Likewise.
2543 * sysdeps/i386/tls.h: Likewise.
2544 * sysdeps/x86_64/tls.h: Likewise.
2545 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2546 header structure.
2547 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2548
2549 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2550 Add private field.
2551 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2552 * pthread_barrier_init.c: Set private flag if pshared and private
2553 futexes are supported.
2554 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2555 private field in futex command setup.
2556 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2557
2558 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2559
2560 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2561 support.
2562 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2563 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2564 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2565 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2566 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2567
2568 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2569 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2570 fields in the structure.
2571 (__old_sem_init): New function.
2572 * sem_open.c: Initialize all fields of the structure.
2573 * sem_getvalue.c: Adjust for renamed element.
2574 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2575 (gen-as-const-headers): Add structsem.sym.
2576 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2577 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2578 struct new_sem. Add struct old_sem.
2579 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2580 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2581 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2582 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2583 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2584 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2585 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2586 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2587 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2588 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2589 * tst-sem10.c: New file.
2590 * tst-sem11.c: New file.
2591 * tst-sem12.c: New file.
2592 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2593 of struct sem.
2594
2595 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2596 Jakub Jelinek <jakub@redhat.com>
2597
2598 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2599 Move __pthread_enable_asynccancel right before futex syscall.
2600 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2601 Likewise.
2602
2603 2007-05-24 Jakub Jelinek <jakub@redhat.com>
2604
2605 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2606 THREAD_COPY_PRIVATE_FUTEX): Define.
2607 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2608 THREAD_COPY_PRIVATE_FUTEX): Define.
2609 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2610 * init.c (__pthread_initialize_minimal_internal): Use
2611 THREAD_SET_PRIVATE_FUTEX.
2612
2613 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2614 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2615 THREAD_GSCOPE_FLAG_WAIT): Define.
2616 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2617 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2618 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2619 PTR_DEMANGLE.
2620 (THREAD_GSCOPE_GET_FLAG): Define.
2621 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2622 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2623 instead of ->header.gscope_flag directly.
2624
2625 2007-05-23 Ulrich Drepper <drepper@redhat.com>
2626
2627 * init.c (__pthread_initialize_minimal_internal): Check whether
2628 private futexes are available.
2629 * allocatestack.c (allocate_stack): Copy private_futex field from
2630 current thread into the new stack.
2631 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2632 futexes if they are available.
2633 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2634 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2635 in libc-lowlevellock.S allow using private futexes.
2636 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2637 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2638 FUTEX_PRIVATE_FLAG.
2639 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2640 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2641 if they are available.
2642 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2643 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2644 * sysdeps/i386/tcb-offsets.sym: Likewise.
2645 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2646 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2647
2648 2007-05-21 Ulrich Drepper <drepper@redhat.com>
2649
2650 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2651 Remove ptr_wait_lookup_done again.
2652 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2653 (__pthread_initialize_minimal_internal): Initialize
2654 _dl_wait_lookup_done pointer in _rtld_global directly.
2655 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2656 Remove code to code _dl_wait_lookup_done.
2657 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2658 encrypted for now.
2659
2660 2007-05-21 Jakub Jelinek <jakub@redhat.com>
2661
2662 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2663 pthread_mutex_init failed with ENOTSUP.
2664
2665 2007-05-19 Ulrich Drepper <drepper@redhat.com>
2666
2667 * allocatestack.c (__wait_lookup_done): New function.
2668 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2669 Add ptr_wait_lookup_done.
2670 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2671 * pthreadP.h: Declare __wait_lookup_done.
2672 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2673 Define macros to implement reference handling of global scope.
2674 * sysdeps/x86_64/tls.h: Likewise.
2675 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2676 Initialize GL(dl_wait_lookup_done).
2677
2678 2007-05-17 Ulrich Drepper <drepper@redhat.com>
2679
2680 [BZ #4512]
2681 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2682 is detected.
2683 * pthread_mutex_timedlock.c: Likewise.
2684 * pthread_mutex_trylock.c: Likewise.
2685 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2686
2687 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2688 * tst-robust9.c: New file.
2689 * tst-robustpi9.c: New file.
2690
2691 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2692 unnecessary extra cancellation test.
2693
2694 2007-05-14 Ulrich Drepper <drepper@redhat.com>
2695
2696 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2697 extra cancellation test.
2698 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2699
2700 2007-05-10 Ulrich Drepper <drepper@redhat.com>
2701
2702 * descr.h (struct pthread): Rearrange members to fill hole in
2703 64-bit layout.
2704
2705 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2706 (__pthread_setaffinity_new): If syscall was successful and
2707 RESET_VGETCPU_CACHE is defined, use it before returning.
2708 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2709
2710 2007-05-10 Jakub Jelinek <jakub@redhat.com>
2711
2712 [BZ #4455]
2713 * tst-align2.c: Include stackinfo.h.
2714 * tst-getpid1.c: Likewise.
2715
2716 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2717
2718 [BZ #4455]
2719 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2720 * tst-getpid1.c (do_test): Likewise.
2721
2722 [BZ #4456]
2723 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2724 (allocate_stack): Likewise.
2725
2726 2007-05-07 Ulrich Drepper <drepper@redhat.com>
2727
2728 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2729 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2730 (__lll_robust_timedlock_wait): Likewise.
2731 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2732
2733 2007-05-06 Mike Frysinger <vapier@gentoo.org>
2734
2735 [BZ #4465]
2736 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2737 * tst-cancel4.c (tf_fdatasync): New test.
2738
2739 2007-04-27 Ulrich Drepper <drepper@redhat.com>
2740
2741 [BZ #4392]
2742 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2743 check mutexes like normal mutexes.
2744
2745 [BZ #4306]
2746 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2747 Initialize the whole sigevent structure to appease valgrind.
2748
2749 2007-04-25 Ulrich Drepper <drepper@redhat.com>
2750
2751 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2752 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2753
2754 2007-04-06 Ulrich Drepper <drepper@redhat.com>
2755
2756 * tst-locale1.c: Avoid warnings.
2757 * tst-locale2.c: Likewise.
2758
2759 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2760
2761 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2762 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2763
2764 2007-03-16 Jakub Jelinek <jakub@redhat.com>
2765
2766 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2767 __extern_always_inline where appropriate.
2768 * sysdeps/pthread/pthread.h: Likewise.
2769
2770 2007-03-13 Richard Henderson <rth@redhat.com>
2771
2772 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2773 separate cfi regions for the two subsections.
2774
2775 2007-02-25 Ulrich Drepper <drepper@redhat.com>
2776
2777 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2778 new thread, don't just decrement it.
2779 Patch by Suzuki K P <suzuki@in.ibm.com>.
2780
2781 2007-02-21 Ulrich Drepper <drepper@redhat.com>
2782
2783 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2784 PTHFCT_CALL definition.
2785
2786 2007-02-18 Ulrich Drepper <drepper@redhat.com>
2787
2788 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2789 available, don't use it.
2790
2791 2007-02-09 Jakub Jelinek <jakub@redhat.com>
2792
2793 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2794 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2795 call into the kernel to delay.
2796
2797 2007-01-18 Ulrich Drepper <drepper@redhat.com>
2798
2799 * tst-initializers1.c: We want to test the initializers as seen
2800 outside of libc, so undefined _LIBC.
2801
2802 * pthread_join.c (cleanup): Avoid warning.
2803
2804 2007-01-17 Ulrich Drepper <drepper@redhat.com>
2805
2806 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2807 (__lll_timedwait_tid): Add unwind info.
2808
2809 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2810 function table, mangle the pointers.
2811 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2812 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2813 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2814 demangle pointers before use.
2815 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2816 demangle pointer.
2817 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2818 * sysdeps/pthread/setxid.h: Likewise.
2819
2820 2007-01-12 Ulrich Drepper <drepper@redhat.com>
2821
2822 * tst-rwlock7.c: Show some more information in case of correct
2823 behavior.
2824
2825 2007-01-11 Ulrich Drepper <drepper@redhat.com>
2826
2827 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2828 (lll_futex_timed_wait): Undo part of last change, don't negate
2829 return value.
2830
2831 2007-01-10 Ulrich Drepper <drepper@redhat.com>
2832
2833 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2834 FUTEX_CMP_REQUEUE and lll_futex_requeue.
2835
2836 2006-12-28 David S. Miller <davem@davemloft.net>
2837
2838 * shlib-versions: Fix sparc64 linux target specification.
2839
2840 2007-01-10 Jakub Jelinek <jakub@redhat.com>
2841
2842 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2843 Adjust include path for pthread_barrier_wait.c move.
2844
2845 2006-12-21 Jakub Jelinek <jakub@redhat.com>
2846
2847 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2848 tid isn't reread from pd->tid in between ESRCH test and the syscall.
2849
2850 2006-12-06 Jakub Jelinek <jakub@redhat.com>
2851
2852 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2853 6 argument cancellable syscalls.
2854 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2855 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2856 6 argument cancellable syscalls.
2857 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2858
2859 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2860
2861 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2862 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2863
2864 2006-10-30 Jakub Jelinek <jakub@redhat.com>
2865
2866 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2867 __sync_lock_release instead of __sync_lock_release_si.
2868
2869 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2870
2871 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2872 Define.
2873 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2874 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2875 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2876 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2877 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2878 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2879 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2880 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2881 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2882 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2883 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2884
2885 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2886
2887 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2888 * pthread_barrier_wait.c: ...here.
2889 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2890 * pthread_cond_broadcast.c: ...here.
2891 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2892 * pthread_cond_signal.c: ...here.
2893 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2894 * pthread_cond_timedwait.c: ...here.
2895 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2896 * pthread_cond_wait.c: ...here.
2897 * sysdeps/pthread/pthread_once.c: Move to...
2898 * pthread_once.c: ...here.
2899 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2900 * pthread_rwlock_rdlock.c: ...here.
2901 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2902 * pthread_rwlock_timedrdlock.c: ...here.
2903 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2904 * pthread_rwlock_timedwrlock.c: ...here.
2905 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2906 * pthread_rwlock_unlock.c: ...here.
2907 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2908 * pthread_rwlock_wrlock.c: ...here.
2909 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2910 * pthread_spin_destroy.c: ...here.
2911 * sysdeps/pthread/pthread_spin_init.c: Move to...
2912 * pthread_spin_init.c: ...here.
2913 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2914 * pthread_spin_unlock.c: ...here.
2915 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2916 * pthread_getcpuclockid.c: ...here.
2917
2918 * init.c: USE_TLS support is now always enabled.
2919 * tst-tls5.h: Likewise.
2920 * sysdeps/alpha/tls.h: Likewise.
2921 * sysdeps/i386/tls.h: Likewise.
2922 * sysdeps/ia64/tls.h: Likewise.
2923 * sysdeps/powerpc/tls.h: Likewise.
2924 * sysdeps/s390/tls.h: Likewise.
2925 * sysdeps/sh/tls.h: Likewise.
2926 * sysdeps/sparc/tls.h: Likewise.
2927 * sysdeps/x86_64/tls.h: Likewise.
2928
2929 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2930
2931 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2932 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2933 failed.
2934
2935 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2936 Define to THREAD_SELF->header.multiple_threads.
2937 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2938 Likewise.
2939 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2940 Likewise.
2941 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2942 (SINGLE_THREAD_P): Likewise.
2943 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2944 (SINGLE_THREAD_P): Likewise.
2945 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2946 (SINGLE_THREAD_P): Likewise.
2947 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2948 (SINGLE_THREAD_P): Likewise.
2949 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2950 Likewise.
2951 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2952 (SINGLE_THREAD_P): Likewise.
2953 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2954 (SINGLE_THREAD_P): Likewise.
2955 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2956 Likewise.
2957
2958 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2959
2960 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2961 by default rather than 2_3_3.
2962
2963 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2964
2965 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2966 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2967 atomic_* instead of catomic_* macros.
2968
2969 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2970
2971 [BZ #3285]
2972 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2973 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2974 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2975 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2976 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2977 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2978 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2979 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2980 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2981 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2982 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2983 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2984 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2985
2986 2006-10-11 Ulrich Drepper <drepper@redhat.com>
2987
2988 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2989 cancelable syscalls with six parameters.
2990
2991 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2992 operations instead of atomic_*.
2993
2994 2006-10-09 Ulrich Drepper <drepper@redhat.com>
2995
2996 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2997
2998 2006-10-07 Ulrich Drepper <drepper@redhat.com>
2999
3000 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3001 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3002 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3003 New file.
3004 * pthread_attr_setstack.c: Allow overwriting the version number of the
3005 new symbol.
3006 * pthread_attr_setstacksize.c: Likewise.
3007 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3008 it.
3009 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3010 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3011
3012 2006-09-24 Ulrich Drepper <drepper@redhat.com>
3013
3014 [BZ #3251]
3015 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3016 Patch by Petr Baudis.
3017
3018 2006-09-18 Jakub Jelinek <jakub@redhat.com>
3019
3020 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3021
3022 * tst-cancel2.c (tf): Loop as long as something was written.
3023
3024 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3025
3026 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3027 mutexes wake all mutexes.
3028 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3029 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3030 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3031
3032 2006-09-12 Ulrich Drepper <drepper@redhat.com>
3033
3034 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3035 to guarantee the thread is always canceled.
3036
3037 2006-09-08 Jakub Jelinek <jakub@redhat.com>
3038
3039 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3040 Include stdlib.h.
3041 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3042 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3045 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3046
3047 2006-09-08 Ulrich Drepper <drepper@redhat.com>
3048
3049 [BZ #3123]
3050 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3051 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3052 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3053 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3054 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3055 * Makefile (tests): Add tst-cond22.
3056 * tst-cond22.c: New file.
3057
3058 2006-09-05 Ulrich Drepper <drepper@redhat.com>
3059
3060 [BZ #3124]
3061 * descr.h (struct pthread): Add parent_cancelhandling.
3062 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3063 cancelhandling value to child.
3064 * pthread_create.c (start_thread): If parent thread was canceled
3065 reset the SIGCANCEL mask.
3066 * Makefile (tests): Add tst-cancel25.
3067 * tst-cancel25.c: New file.
3068
3069 2006-09-05 Jakub Jelinek <jakub@redhat.com>
3070 Ulrich Drepper <drepper@redhat.com>
3071
3072 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3073 counterp if it is already zero.
3074 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3075
3076 2006-03-04 Jakub Jelinek <jakub@redhat.com>
3077 Roland McGrath <roland@redhat.com>
3078
3079 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3080 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3081 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3082 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3083 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3084 lll_robust_mutex_timedlock, lll_mutex_unlock,
3085 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3086 Add _L_*_ symbols around the subsection.
3087 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3088 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3089
3090 2006-03-03 Jakub Jelinek <jakub@redhat.com>
3091 Roland McGrath <roland@redhat.com>
3092
3093 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3094 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3095 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3096 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3097 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3098 lll_robust_mutex_timedlock, lll_mutex_unlock,
3099 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3100 Add _L_*_ symbols around the subsection.
3101 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3102 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3103
3104 2006-08-31 Ulrich Drepper <drepper@redhat.com>
3105
3106 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3107 change because it can disturb too much existing code. If real hard
3108 reader preference is needed we'll introduce another type.
3109 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3110 (pthread_rwlock_timedwrlock): Likewise.
3111 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3112 Likewise.
3113
3114 2006-08-30 Ulrich Drepper <drepper@redhat.com>
3115
3116 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3117 reader preference.
3118 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3119 (pthread_rwlock_timedwrlock): Likewise.
3120 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3121 Likewise.
3122
3123 2006-08-25 Jakub Jelinek <jakub@redhat.com>
3124
3125 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3126 Only define ifdef SHARED.
3127
3128 2006-08-23 Ulrich Drepper <drepper@redhat.com>
3129
3130 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3131 (free_stacks): ...here.
3132 (__free_stack_cache): New function.
3133 * pthreadP.h: Declare __free_stack_cache.
3134 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3135 ptr_freeres.
3136 * init.c (pthread_functions): Initialize ptr_freeres.
3137 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3138 New freeres function.
3139
3140 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3141
3142 [BZ #3018]
3143 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3144
3145 2006-08-20 Ulrich Drepper <drepper@redhat.com>
3146
3147 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3148 _XOPEN_REALTIME_THREADS.
3149
3150 2006-08-15 Jakub Jelinek <jakub@redhat.com>
3151
3152 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3153 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3154 HAVE_CLOCK_GETTIME_VSYSCALL.
3155 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3156
3157 2006-08-14 Jakub Jelinek <jakub@redhat.com>
3158
3159 * sysdeps/unix/sysv/linux/bits/posix_opt.h
3160 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3161 * descr.h (struct priority_protection_data): New type.
3162 (struct pthread): Add tpp field.
3163 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3164 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3165 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3166 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3167 TPP mutexes.
3168 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3169 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3170 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3171 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3172 * tpp.c: New file.
3173 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3174 boosted by TPP.
3175 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3176 * pthread_mutexattr_getprioceiling.c
3177 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3178 in the SCHED_FIFO priority range.
3179 * pthread_mutexattr_setprioceiling.c
3180 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3181 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3182 if mutex is not TPP. Ceiling is now in __data.__lock.
3183 * pthread_mutex_setprioceiling.c: Include stdbool.h.
3184 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
3185 is now in __data.__lock. Add locking.
3186 * pthread_create.c (__free_tcb): Free pd->tpp structure.
3187 * Makefile (libpthread-routines): Add tpp.
3188 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3189 * tst-tpp.h: New file.
3190 * tst-mutexpp1.c: New file.
3191 * tst-mutexpp6.c: New file.
3192 * tst-mutexpp10.c: New file.
3193 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3194 * tst-mutex6.c (TEST_FUNCTION): Likewise.
3195
3196 2006-08-12 Ulrich Drepper <drepper@redhat.com>
3197
3198 [BZ #2843]
3199 * pthread_join.c (pthread_join): Account for self being canceled
3200 when checking for deadlocks.
3201 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
3202 (tf1): Don't print anything after pthread_join returns, this would be
3203 another cancellation point.
3204 (tf2): Likewise.
3205 * tst-join6.c: New file.
3206 * Makefile (tests): Add tst-join6.
3207
3208 2006-08-03 Ulrich Drepper <drepper@redhat.com>
3209
3210 [BZ #2892]
3211 * pthread_setspecific.c (__pthread_setspecific): Check
3212 out-of-range index before checking for unused key.
3213
3214 * sysdeps/pthread/gai_misc.h: New file.
3215
3216 2006-08-01 Ulrich Drepper <drepper@redhat.com>
3217
3218 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
3219 file. Don't use sysctl.
3220 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
3221 overwrite the file if this is likely not true.
3222
3223 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
3224
3225 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3226 * Makefile (tests): Add tst-getpid3.
3227 * tst-getpid3.c: New file.
3228
3229 2006-07-30 Roland McGrath <roland@redhat.com>
3230
3231 * Makefile (libpthread-routines): Add ptw-sigsuspend.
3232
3233 * sysdeps/unix/sysv/linux/i386/not-cancel.h
3234 (pause_not_cancel): New macro.
3235 (nanosleep_not_cancel): New macro.
3236 (sigsuspend_not_cancel): New macro.
3237 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3238 nanosleep_not_cancel macro from <not-cancel.h>.
3239 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3240 macro from <not-cancel.h>.
3241
3242 2006-07-28 Ulrich Drepper <drepper@redhat.com>
3243 Jakub Jelinek <jakub@redhat.com>
3244
3245 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3246 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
3247 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3248 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3249 * pthread_mutex_init.c: Add support for priority inheritance mutex.
3250 * pthread_mutex_lock.c: Likewise.
3251 * pthread_mutex_timedlock.c: Likewise.
3252 * pthread_mutex_trylock.c: Likewise.
3253 * pthread_mutex_unlock.c: Likewise.
3254 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3255 all mutexes.
3256 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3257 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3258 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3259 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3260 pthread-pi-defines.sym.
3261 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3262 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3263 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3264 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3265 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3266 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3267 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3268 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3269 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3270 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3271 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3272 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3273 * tst-mutex2.c: Likewise.
3274 * tst-mutex3.c: Likewise.
3275 * tst-mutex4.c: Likewise.
3276 * tst-mutex5.c: Likewise.
3277 * tst-mutex6.c: Likewise.
3278 * tst-mutex7.c: Likewise.
3279 * tst-mutex7a.c: Likewise.
3280 * tst-mutex8.c: Likewise.
3281 * tst-mutex9.c: Likewise.
3282 * tst-robust1.c: Likewise.
3283 * tst-robust7.c: Likewise.
3284 * tst-robust8.c: Likewise.
3285 * tst-mutexpi1.c: New file.
3286 * tst-mutexpi2.c: New file.
3287 * tst-mutexpi3.c: New file.
3288 * tst-mutexpi4.c: New file.
3289 * tst-mutexpi5.c: New file.
3290 * tst-mutexpi6.c: New file.
3291 * tst-mutexpi7.c: New file.
3292 * tst-mutexpi7a.c: New file.
3293 * tst-mutexpi8.c: New file.
3294 * tst-mutexpi9.c: New file.
3295 * tst-robust1.c: New file.
3296 * tst-robust2.c: New file.
3297 * tst-robust3.c: New file.
3298 * tst-robust4.c: New file.
3299 * tst-robust5.c: New file.
3300 * tst-robust6.c: New file.
3301 * tst-robust7.c: New file.
3302 * tst-robust8.c: New file.
3303 * Makefile (tests): Add the new tests.
3304
3305 * pthread_create.c (start_thread): Add some casts to avoid warnings.
3306 * pthread_mutex_destroy.c: Remove unneeded label.
3307
3308 2006-07-01 Ulrich Drepper <drepper@redhat.com>
3309
3310 * pthread_mutex_init.c (__pthread_mutex_init): Move some
3311 computations to compile time.
3312
3313 2006-06-04 Ulrich Drepper <drepper@redhat.com>
3314
3315 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3316
3317 2006-05-15 Ulrich Drepper <drepper@redhat.com>
3318
3319 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3320
3321 2006-05-11 Ulrich Drepper <drepper@redhat.com>
3322
3323 * pthread_key_create.c (__pthread_key_create): Do away with
3324 __pthread_keys_lock.
3325
3326 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3327 (__kernel_cpumask_size): Mark as hidden.
3328 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3329
3330 * sem_open.c (__sem_mappings_lock): Mark as hidden.
3331 * semaphoreP.h (__sem_mappings_lock): Likewise.
3332
3333 2006-05-10 Ulrich Drepper <drepper@redhat.com>
3334
3335 * pthread_atfork.c: Mark __dso_handle as hidden.
3336
3337 2006-05-09 Ulrich Drepper <drepper@redhat.com>
3338
3339 [BZ #2644]
3340 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3341 the reload problem. Change the one path in pthread_cancel_init
3342 which causes the problem. Force gcc to reload. Simplify callers.
3343 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3344 (_Unwind_GetBSP): Undo last patch.
3345
3346 2006-05-07 Ulrich Drepper <drepper@redhat.com>
3347
3348 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3349 function pointer is reloaded after pthread_cancel_init calls.
3350
3351 [BZ #2644]
3352 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3353 pointers are reloaded after pthread_cancel_init calls.
3354
3355 2006-05-01 Ulrich Drepper <drepper@redhat.com>
3356
3357 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3358 __always_inline.
3359
3360 2006-04-27 Ulrich Drepper <drepper@redhat.com>
3361
3362 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3363 Allocate new object which is passed to timer_sigev_thread so that
3364 the timer can be deleted before the new thread is scheduled.
3365
3366 2006-04-26 Roland McGrath <roland@redhat.com>
3367
3368 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3369
3370 2006-04-08 Ulrich Drepper <drepper@redhat.com>
3371
3372 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3373 suffix for conditional jumps.
3374 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3375 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3376 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3377 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3378 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3379 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3380
3381 * init.c (sigcancel_handler): Compare with correct PID even if the
3382 thread is in the middle of a fork call.
3383 (sighandler_setxid): Likewise.
3384 Reported by Suzuki K P <suzuki@in.ibm.com> .
3385
3386 2006-04-07 Jakub Jelinek <jakub@redhat.com>
3387
3388 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3389
3390 2006-04-06 Ulrich Drepper <drepper@redhat.com>
3391
3392 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3393 fails [Coverity CID 105].
3394
3395 2006-04-05 Ulrich Drepper <drepper@redhat.com>
3396
3397 * sysdeps/pthread/pthread.h: Add nonnull attributes.
3398
3399 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
3400
3401 [BZ #2505]
3402 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3403 Define __lll_rel_instr using lwsync.
3404
3405 2006-03-27 Ulrich Drepper <drepper@redhat.com>
3406
3407 * allocatestack.c (allocate_stack): Always initialize robust_head.
3408 * descr.h: Define struct robust_list_head.
3409 (struct pthread): Use robust_list_head in robust mutex list definition.
3410 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3411 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3412 (__pthread_initialize_minimal_internal): Register robust_list with
3413 the kernel.
3414 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3415 Declare __set_robust_list_avail.
3416 * pthread_create.c (start_thread): Register robust_list of new thread.
3417 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3418 waiters.
3419 * pthread_mutex_destroy.c: For robust mutexes don't look at the
3420 number of users, it's unreliable.
3421 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3422 set_robust_list syscall is available.
3423 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3424 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3425 Set robust_head.list_op_pending before trying to lock a robust mutex.
3426 * pthread_mutex_timedlock.c: Likewise.
3427 * pthread_mutex_trylock.c: Likewise.
3428 * pthread_mutex_unlock.c: Likewise for unlocking.
3429 * Makefile (tests): Add tst-robust8.
3430 * tst-robust8.c: New file.
3431
3432 2006-03-08 Andreas Schwab <schwab@suse.de>
3433
3434 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3435 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3436
3437 2006-03-05 Roland McGrath <roland@redhat.com>
3438
3439 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3440 and $config_os doesn't match *linux*.
3441
3442 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
3443
3444 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3445 Use __syscall_error.
3446 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3447 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3448 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3449 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3450 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3451 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3452
3453 2006-03-02 Ulrich Drepper <drepper@redhat.com>
3454
3455 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3456
3457 2006-03-01 Ulrich Drepper <drepper@redhat.com>
3458
3459 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3460 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3461 mutex.
3462 (__lll_robust_timedlock_wait): Likewise.
3463 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3464 (__lll_robust_lock_wait): Likewise.
3465 (__lll_robust_timedlock_wait): Likewise.
3466 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3467 (__lll_robust_lock_wait): Likewise.
3468 (__lll_robust_timedlock_wait): Likewise.
3469
3470 2006-03-01 Jakub Jelinek <jakub@redhat.com>
3471
3472 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3473 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3474 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3475 lll_robust_mutex_unlock): Define.
3476 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3477
3478 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
3479
3480 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3481 instead of <clone.S>.
3482
3483 2006-02-27 Jakub Jelinek <jakub@redhat.com>
3484
3485 * Makefile (libpthread-routines): Add
3486 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3487 and pthread_mutex_[sg]etprioceiling.
3488 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3489 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3490 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3491 pthread_mutex_setprioceiling.
3492 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3493 PTHREAD_PRIO_PROTECT): New enum values.
3494 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3495 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3496 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3497 prototypes.
3498 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3499 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3500 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3501 Define.
3502 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3503 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3504 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3505 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3506 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3507 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3508 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3509 protocol mutexes.
3510 * pthread_mutex_getprioceiling.c: New file.
3511 * pthread_mutex_setprioceiling.c: New file.
3512 * pthread_mutexattr_getprioceiling.c: New file.
3513 * pthread_mutexattr_setprioceiling.c: New file.
3514 * pthread_mutexattr_getprotocol.c: New file.
3515 * pthread_mutexattr_setprotocol.c: New file.
3516
3517 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3518
3519 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3520
3521 2006-02-27 Roland McGrath <roland@redhat.com>
3522
3523 * sysdeps/pthread/Subdirs: List nptl here too.
3524 * configure (libc_add_on_canonical): New variable.
3525
3526 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3527
3528 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3529 self to get main source tree's file.
3530 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3531 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3532 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3533 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3534 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3535 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3536 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3537 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3538 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3539 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3540 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3541 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3542 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3543
3544 * Makefile: Use $(sysdirs) in vpath directive.
3545
3546 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3547 (CPPFLAGS-timer_routines.c): Likewise.
3548
3549 * Makeconfig (includes): Variable removed.
3550
3551 2006-02-26 Roland McGrath <roland@redhat.com>
3552
3553 * sysdeps/generic/pt-raise.c: Moved to ...
3554 * pt-raise.c: ... here.
3555 * sysdeps/generic/lowlevellock.h: Moved to ...
3556 * lowlevellock.h: ... here.
3557
3558 2006-02-23 Roland McGrath <roland@redhat.com>
3559
3560 * descr.h (struct pthread): Add final member `end_padding'.
3561 (PTHREAD_STRUCT_END_PADDING): Use it.
3562
3563 2006-02-20 Roland McGrath <roland@redhat.com>
3564
3565 * sysdeps/mips: Directory removed, saved in ports repository.
3566 * sysdeps/unix/sysv/linux/mips: Likewise.
3567
3568 2006-02-18 Ulrich Drepper <drepper@redhat.com>
3569
3570 * tst-robust1.c: Add second mutex to check that the mutex list is
3571 handled correctly.
3572
3573 2006-02-17 Jakub Jelinek <jakub@redhat.com>
3574
3575 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3576 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3577 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3578 lll_robust_mutex_unlock): New macros.
3579 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3580 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3581 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3582 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3583 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3584
3585 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3586
3587 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3588 definitions.
3589 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3590
3591 2006-02-17 Ulrich Drepper <drepper@redhat.com>
3592
3593 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3594 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3595 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3596 (lll_robust_mutex_unlock): Likewise.
3597
3598 2006-02-13 Jakub Jelinek <jakub@redhat.com>
3599
3600 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3601 Set robust_list.__next rather than robust_list.
3602 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3603 (__pthread_list_t): New typedef.
3604 (pthread_mutex_t): Replace __next and __prev fields with __list.
3605 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3606 (__pthread_list_t): New typedef.
3607 (pthread_mutex_t): Replace __next and __prev fields with __list.
3608 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3609 (__pthread_list_t, __pthread_slist_t): New typedefs.
3610 (pthread_mutex_t): Replace __next and __prev fields with __list.
3611 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3612 (__pthread_list_t, __pthread_slist_t): New typedefs.
3613 (pthread_mutex_t): Replace __next and __prev fields with __list.
3614 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3615 (__pthread_list_t, __pthread_slist_t): New typedefs.
3616 (pthread_mutex_t): Replace __next and __prev fields with __list.
3617 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3618 (__pthread_slist_t): New typedef.
3619 (pthread_mutex_t): Replace __next field with __list.
3620
3621 2006-02-15 Ulrich Drepper <drepper@redhat.com>
3622
3623 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3624 PTHREAD_MUTEX_OWNERDEAD.
3625 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3626 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3627 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3628 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3629 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3630 to PTHREAD_MUTEX_INCONSISTENT.
3631 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3632 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3633 * pthread_mutex_trylock.c: Likewise.
3634 * pthread_mutex_timedlock.c: Likewise.
3635 * pthread_mutex_unlock.c: Likewise.
3636 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3637 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3638 lowlevelrobustlock.sym.
3639 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3640 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3641 definitions.
3642 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3643 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3644 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3645 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3646 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3647
3648 2006-02-12 Ulrich Drepper <drepper@redhat.com>
3649
3650 * allocatestack.c (allocate_stack): Initialize robust_list.
3651 * init.c (__pthread_initialize_minimal_internal): Likewise.
3652 * descr.h (struct xid_command): Pretty printing.
3653 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3654 robust_list. Adjust macros.
3655 * pthread_create.c (start_thread): Adjust robust_list handling.
3656 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3657 but the owner for all robust mutex types.
3658 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3659 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
3660 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3661 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3662
3663 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3664 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3665
3666 2006-02-08 Jakub Jelinek <jakub@redhat.com>
3667
3668 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3669 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3670
3671 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3672
3673 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3674 Return status.
3675 (lll_futex_timed_wait): Define.
3676
3677 2006-01-19 Ulrich Drepper <drepper@redhat.com>
3678
3679 * tst-cancel4.c: Test ppoll.
3680
3681 2006-01-18 Andreas Jaeger <aj@suse.de>
3682
3683 [BZ #2167]
3684 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3685 (pthread_mutex_t): Follow changes for other archs. Based on patch
3686 by Jim Gifford <patches@jg555.com>.
3687
3688 2006-01-13 Richard Henderson <rth@redhat.com>
3689
3690 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3691
3692 2006-01-10 Roland McGrath <roland@redhat.com>
3693
3694 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3695 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3696 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3697 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3698 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3699 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3700 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3701 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3702 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3703 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3704
3705 2006-01-09 Roland McGrath <roland@redhat.com>
3706
3707 * tst-initializers1-c89.c: New file.
3708 * tst-initializers1-c99.c: New file.
3709 * tst-initializers1-gnu89.c: New file.
3710 * tst-initializers1-gnu99.c: New file.
3711 * Makefile (tests): Add them.
3712 (CFLAGS-tst-initializers1-c89.c): New variable.
3713 (CFLAGS-tst-initializers1-c99.c): New variable.
3714 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3715 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3716
3717 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3718 Use __extension__ on anonymous union definition.
3719 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3720 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3721 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3722 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3723 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3724
3725 2006-01-08 Jakub Jelinek <jakub@redhat.com>
3726
3727 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3728 Don't give the union a name because it changes the mangled name.
3729 Instead name the struct for __data.
3730 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3731 Likewise.
3732 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3733 Likewise.
3734
3735 2006-01-09 Jakub Jelinek <jakub@redhat.com>
3736
3737 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3738 stack bias to mc_ftp field.
3739
3740 2006-01-07 Ulrich Drepper <drepper@redhat.com>
3741
3742 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3743 being too clever and reloading the futex value where it shouldn't.
3744
3745 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3746
3747 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3748 correct type.
3749
3750 2006-01-06 Jakub Jelinek <jakub@redhat.com>
3751
3752 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3753 Add cfi directives.
3754
3755 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3756
3757 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3758 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3759 rename in tcbhead_t.
3760
3761 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3762 Don't give the union a name because it changes the mangled name.
3763 Instead name the struct for __data.
3764 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3765 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3766 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3767 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3768 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3769 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3770
3771 2006-01-05 Ulrich Drepper <drepper@redhat.com>
3772
3773 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3774 Return status.
3775 (lll_futex_timed_wait): Define.
3776 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3777 * sysdeps/pthread/aio_misc.h: New file.
3778
3779 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3780
3781 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3782
3783 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3784
3785 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3786 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3787 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3788
3789 2006-01-04 Ulrich Drepper <drepper@redhat.com>
3790
3791 * tst-cancel24.cc: Use C headers instead of C++ headers.
3792
3793 2006-01-03 Jakub Jelinek <jakub@redhat.com>
3794
3795 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3796 sparc-linux configured glibc.
3797 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3798 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3799 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3800 atomic_compare_and_exchange_val_24_acq instead of
3801 atomic_compare_and_exchange_val_acq.
3802 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3803 instead of atomic_exchange_rel.
3804 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3805 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3806 file.
3807 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3808 file.
3809 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3810 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3811 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3812 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3813 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3814 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3815 New file.
3816 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3817 New file.
3818 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3819 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3820 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3821 file.
3822 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3823 file.
3824 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3825
3826 2006-01-03 Ulrich Drepper <drepper@redhat.com>
3827
3828 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3829 mutex initializers.
3830
3831 2006-01-02 Jakub Jelinek <jakub@redhat.com>
3832
3833 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3834 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3835 THREAD_COPY_POINTER_GUARD): Define.
3836 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3837 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3838
3839 2006-01-01 Ulrich Drepper <drepper@redhat.com>
3840
3841 * version.c: Update copyright year.
3842
3843 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3844
3845 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3846 .eh_frame section, use cfi_* directives.
3847 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3848
3849 2005-12-30 Ulrich Drepper <drepper@redhat.com>
3850
3851 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3852 now.
3853
3854 2005-12-29 Ulrich Drepper <drepper@redhat.com>
3855
3856 * sysdeps/pthread/sigaction.c: Removed.
3857 * sigaction.c: New file.
3858 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3859
3860 2005-12-28 Ulrich Drepper <drepper@redhat.com>
3861
3862 * Makefile (tests): Add tst-signal7.
3863 * tst-signal7.c: New file.
3864
3865 2005-12-27 Roland McGrath <roland@redhat.com>
3866
3867 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3868 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3869 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3870 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3871 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3872 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3873 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3874 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3875 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3876 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3877 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3878
3879 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3880
3881 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3882 and __prev field to pthread_mutex_t.
3883 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3884 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3885 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3886 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3887 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3888 to pthread_mutex_t.
3889
3890 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3891
3892 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3893 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3894 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3895 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3896 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3897 and PTHREAD_MUTEXATTR_FLAG_BITS.
3898 * descr.h (struct pthread): Add robust_list field and define
3899 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3900 * pthread_mutexattr_getrobust.c: New file.
3901 * pthread_mutexattr_setrobust.c: New file.
3902 * pthread_mutex_consistent.c: New file.
3903 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3904 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3905 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3906 Adjust pthread_mutex_t initializers.
3907 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3908 field to pthread_mutex_t.
3909 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3910 and __prev field to pthread_mutex_t.
3911 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3912 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3913 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3914 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3915 * pthread_mutexattr_gettype.c: Likewise.
3916 * pthread_mutexattr_setpshared.c: Likewise.
3917 * pthread_mutexattr_settype.c: Likewise.
3918 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3919 Initialize mutex kind according to robust flag.
3920 * pthread_mutex_lock.c: Implement local robust mutex.
3921 * pthread_mutex_timedlock.c: Likewise.
3922 * pthread_mutex_trylock.c: Likewise.
3923 * pthread_mutex_unlock.c: Likewise.
3924 * pthread_create.c (start_thread): Mark robust mutexes which remained
3925 locked as dead.
3926 * tst-robust1.c: New file.
3927 * tst-robust2.c: New file.
3928 * tst-robust3.c: New file.
3929 * tst-robust4.c: New file.
3930 * tst-robust5.c: New file.
3931 * tst-robust6.c: New file.
3932 * tst-robust7.c: New file.
3933 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3934 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3935 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3936 tst-robust5, tst-robust6, and tst-robust7.
3937
3938 * tst-typesizes.c: New file.
3939 * Makefile (tests): Add tst-typesizes.
3940
3941 * tst-once3.c: More debug output.
3942
3943 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3944
3945 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3946 missing after last change.
3947
3948 * version.c: Update copyright year.
3949
3950 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3951
3952 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3953 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3954 * pthread_mutex_trylock.c: Likewise.
3955 * pthread_mutex_timedlock.c: Likewise.
3956 * pthread_mutex_unlock.c: Likewise.
3957
3958 2005-12-22 Roland McGrath <roland@redhat.com>
3959
3960 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3961 so that #include_next's search location is not reset to the -I..
3962 directory where <nptl/...> can be found.
3963
3964 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3965
3966 [BZ #1913]
3967 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3968 Fix unwind info. Remove useless branch prediction prefix.
3969 * tst-cancel24.cc: New file.
3970 * Makefile: Add rules to build and run tst-cancel24.
3971
3972 2005-12-21 Roland McGrath <roland@redhat.com>
3973
3974 * libc-cancellation.c: Use <> rather than "" #includes.
3975 * pt-cleanup.c: Likewise.
3976 * pthread_create.c: Likewise.
3977 * pthread_join.c: Likewise.
3978 * pthread_timedjoin.c: Likewise.
3979 * pthread_tryjoin.c: Likewise.
3980 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3981 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3982 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3983 * unwind.c: Likewise.
3984
3985 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3986
3987 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3988 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3989 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3990 THREAD_COPY_POINTER_GUARD): Define.
3991
3992 2005-12-19 Jakub Jelinek <jakub@redhat.com>
3993
3994 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3995 rather than one.
3996 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3997 THREAD_COPY_POINTER_GUARD): Define.
3998 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3999 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4000 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4001 THREAD_COPY_POINTER_GUARD): Define.
4002 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4003 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4004 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4005 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4006 Use PTR_DEMANGLE for B0 if defined.
4007
4008 2005-12-17 Ulrich Drepper <drepper@redhat.com>
4009
4010 * pthread_create.c (__pthread_create_2_1): Use
4011 THREAD_COPY_POINTER_GUARD if available.
4012 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4013 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4014 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4015 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4016 * sysdeps/x86_64/tls.h: Likewise.
4017
4018 2005-12-15 Roland McGrath <roland@redhat.com>
4019
4020 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4021
4022 2005-12-13 Ulrich Drepper <drepper@redhat.com>
4023
4024 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4025 sysdeps/generic.
4026 * errno-loc.c: New file.
4027
4028 2005-12-12 Roland McGrath <roland@redhat.com>
4029
4030 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4031 adjustments before choosing stack size. Update minimum stack size
4032 calculation to match allocate_stack change.
4033
4034 2005-12-12 Ulrich Drepper <drepper@redhat.com>
4035
4036 * allocatestack.c (allocate_stack): Don't demand that there is an
4037 additional full page available on the stack beside guard, TLS, the
4038 minimum stack.
4039
4040 2005-11-24 Ulrich Drepper <drepper@redhat.com>
4041
4042 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4043 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4044
4045 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4046 compiling 32-bit code we must define __cleanup_fct_attribute.
4047
4048 005-11-24 Jakub Jelinek <jakub@redhat.com>
4049
4050 [BZ #1920]
4051 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4052 __attribute__ instead of __attribute.
4053 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4054 (__cleanup_fct_attribute): Likewise.
4055
4056 2005-11-17 Jakub Jelinek <jakub@redhat.com>
4057
4058 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4059 a write barrier before writing libgcc_s_getcfa.
4060
4061 2005-11-06 Ulrich Drepper <drepper@redhat.com>
4062
4063 * sysdeps/unix/sysv/linux/configure: Removed.
4064
4065 2005-11-05 Ulrich Drepper <drepper@redhat.com>
4066
4067 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4068 optional init_array/fini_array support.
4069
4070 2005-10-24 Roland McGrath <roland@redhat.com>
4071
4072 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4073 versioned_symbol use.
4074
4075 2005-10-16 Roland McGrath <roland@redhat.com>
4076
4077 * init.c (__pthread_initialize_minimal_internal): Even when using a
4078 compile-time default stack size, apply the minimum that allocate_stack
4079 will require, and round up to page size.
4080
4081 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4082
4083 * Makefile ($(test-modules)): Remove static pattern rule.
4084
4085 2005-10-14 Jakub Jelinek <jakub@redhat.com>
4086 Ulrich Drepper <drepper@redhat.com>
4087
4088 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4089 alignment in callback function.
4090 * Makefile: Add rules to build and run tst-align3.
4091 * tst-align3.c: New file.
4092
4093 2005-10-03 Jakub Jelinek <jakub@redhat.com>
4094
4095 * allocatestack.c (setxid_signal_thread): Add
4096 INTERNAL_SYSCALL_DECL (err).
4097
4098 2005-10-02 Jakub Jelinek <jakub@redhat.com>
4099
4100 * allocatestack.c (setxid_signal_thread): Need to use
4101 atomic_compare_and_exchange_bool_acq.
4102
4103 2005-10-01 Ulrich Drepper <drepper@redhat.com>
4104 Jakub Jelinek <jakub@redhat.com>
4105
4106 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4107 CANCEL_RESTMASK.
4108 (struct pthread): Move specific_used field to avoid padding.
4109 Add setxid_futex field.
4110 * init.c (sighandler_setxid): Reset setxid flag and release the
4111 setxid futex.
4112 * allocatestack.c (setxid_signal_thread): New function. Broken
4113 out of the bodies of the two loops in __nptl_setxid. For undetached
4114 threads check whether they are exiting and if yes, don't send a signal.
4115 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4116 * pthread_create.c (start_thread): For undetached threads, check
4117 whether setxid bit is set. If yes, wait until signal has been
4118 processed.
4119
4120 * allocatestack.c (STACK_VARIABLES): Initialize them.
4121 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4122
4123 2004-09-02 Jakub Jelinek <jakub@redhat.com>
4124
4125 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4126 waiters, awake all waiters on the associated mutex.
4127
4128 2005-09-22 Roland McGrath <roland@redhat.com>
4129
4130 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4131 ../sysdeps/x86_64/hp-timing.h).
4132
4133 2005-08-29 Jakub Jelinek <jakub@redhat.com>
4134
4135 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4136 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4137 (lll_futex_wake_unlock): Define.
4138 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4139 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4140 (lll_futex_wake_unlock): Define.
4141 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4142 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4143 (lll_futex_wake_unlock): Define.
4144 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4145 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4146 (lll_futex_wake_unlock): Define.
4147 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4148 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4149 (lll_futex_wake_unlock): Define.
4150 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4151 lll_futex_wake_unlock.
4152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4153 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4154 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4156 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4157 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4158
4159 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4160
4161 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4162 Fix typo in register name.
4163
4164 2005-08-23 Ulrich Drepper <drepper@redhat.com>
4165
4166 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4167 Use __sigfillset. Document that sigfillset does the right thing wrt
4168 to SIGSETXID.
4169
4170 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4171
4172 [BZ #1102]
4173 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4174 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4175 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4176 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4177 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4178 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4179 in the structure.
4180 * Makefile (tests): Add tst-initializers1.
4181 (CFLAGS-tst-initializers1.c): Set.
4182 * tst-initializers1.c: New test.
4183
4184 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4185
4186 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4187 Make sure __flags are located at offset 48 from the start of the
4188 structure.
4189
4190 2005-07-02 Roland McGrath <roland@redhat.com>
4191
4192 * Makeconfig: Comment fix.
4193
4194 2005-07-05 Jakub Jelinek <jakub@redhat.com>
4195
4196 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4197 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4198 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4199 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4200 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4201 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4202 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4203 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4204 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4205 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4206
4207 2005-06-25 Jakub Jelinek <jakub@redhat.com>
4208
4209 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4210 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4211 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4212 fields.
4213 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4214 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4215 field. Put in sysinfo field unconditionally.
4216 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4217 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4218 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4219 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4220 fields.
4221 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4222 * pthread_create.c (__pthread_create_2_1): Use
4223 THREAD_COPY_STACK_GUARD macro.
4224 * Makefile: Add rules to build and run tst-stackguard1{,-static}
4225 tests.
4226 * tst-stackguard1.c: New file.
4227 * tst-stackguard1-static.c: New file.
4228
4229 2005-06-14 Alan Modra <amodra@bigpond.net.au>
4230
4231 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4232 Invoke CGOTSETUP and CGOTRESTORE.
4233 (CGOTSETUP, CGOTRESTORE): Define.
4234
4235 2005-05-29 Richard Henderson <rth@redhat.com>
4236
4237 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4238 (tf_write, tf_writev): Use it.
4239 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
4240 the system minimum.
4241
4242 2005-05-23 Jakub Jelinek <jakub@redhat.com>
4243
4244 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4245 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4246 __librt_*_asynccancel@local.
4247
4248 2005-05-17 Alan Modra <amodra@bigpond.net.au>
4249
4250 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4251 all occurrences of JUMPTARGET. Instead append @local to labels.
4252
4253 2005-05-20 Jakub Jelinek <jakub@redhat.com>
4254
4255 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4256 size/alignment of struct pthread rather than tcbhead_t.
4257 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4258 Likewise.
4259 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4260 Likewise.
4261 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4262 Likewise.
4263
4264 2005-05-19 Richard Henderson <rth@redhat.com>
4265
4266 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4267 __sync_val_compare_and_swap, not explicit _si variant.
4268 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4269
4270 2005-05-03 Ulrich Drepper <drepper@redhat.com>
4271
4272 [BZ #915]
4273 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4274
4275 2005-05-03 Jakub Jelinek <jakub@redhat.com>
4276
4277 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4278 .eh_frame section, use cfi_* directives.
4279
4280 2005-04-27 Jakub Jelinek <jakub@redhat.com>
4281
4282 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4283 of "" includes.
4284
4285 2005-04-27 Ulrich Drepper <drepper@redhat.com>
4286
4287 [BZ #1075]
4288 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4289 aio_write blocks.
4290
4291 2005-04-27 Roland McGrath <roland@redhat.com>
4292
4293 * Makefile (tests): Remove tst-clock2.
4294
4295 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4296 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4297 translating to the kernel clockid_t for our own process/thread clock.
4298
4299 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4300
4301 2005-04-15 Jakub Jelinek <jakub@redhat.com>
4302
4303 * old_pthread_cond_init.c: Include <errno.h>.
4304 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4305 process shared or uses clock other than CLOCK_REALTIME.
4306 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4307
4308 2005-04-13 David S. Miller <davem@davemloft.net>
4309
4310 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4311 * sysdeps/sparc/sparc64/clone.S: New file.
4312
4313 2005-04-05 Jakub Jelinek <jakub@redhat.com>
4314
4315 [BZ #1102]
4316 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4317 __inline instead of inline.
4318 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4319
4320 2005-03-31 Jakub Jelinek <jakub@redhat.com>
4321
4322 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4323 functionally equivalent, but shorter instructions.
4324 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4325 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4326 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4327 Likewise.
4328 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4329 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4330 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4331 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4332 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4333 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4334 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4335 Likewise.
4336 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4337 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4338 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4339 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4340 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4341
4342 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
4343
4344 * sysdeps/mips/Makefile: New file.
4345 * sysdeps/mips/nptl-sysdep.S: New file.
4346 * sysdeps/mips/tcb-offsets.sym: New file.
4347 * sysdeps/mips/pthread_spin_lock.S: New file.
4348 * sysdeps/mips/pthread_spin_trylock.S: New file.
4349 * sysdeps/mips/pthreaddef.h: New file.
4350 * sysdeps/mips/tls.h: New file.
4351 * sysdeps/mips/jmpbuf-unwind.h: New file.
4352 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4353 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4354 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4355 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4356 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4357 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4358 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4359 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4360 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4361 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4362
4363 2005-03-23 Ulrich Drepper <drepper@redhat.com>
4364
4365 [BZ #1112]
4366 * pthread_create.c (__pthread_create_2_1): Rename syscall error
4367 variable to scerr.
4368
4369 2005-03-10 Jakub Jelinek <jakub@redhat.com>
4370
4371 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4372
4373 2005-02-25 Roland McGrath <roland@redhat.com>
4374
4375 * alloca_cutoff.c: Correct license text.
4376 * tst-unload.c: Likewise.
4377 * sysdeps/pthread/allocalim.h: Likewise.
4378 * sysdeps/pthread/pt-initfini.c: Likewise.
4379 * sysdeps/pthread/bits/libc-lock.h: Likewise.
4380 * sysdeps/pthread/bits/sigthread.h: Likewise.
4381 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4382 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4383
4384 2005-02-16 Roland McGrath <roland@redhat.com>
4385
4386 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4387 Use unsigned int * for ptr_nthreads.
4388
4389 2005-02-14 Alan Modra <amodra@bigpond.net.au>
4390
4391 [BZ #721]
4392 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4393 gcc4.
4394
4395 2005-02-07 Richard Henderson <rth@redhat.com>
4396
4397 [BZ #787]
4398 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4399 argument.
4400
4401 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
4402
4403 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4404 order of arguments in invocation of atomic_add_zero.
4405
4406 2005-01-26 Jakub Jelinek <jakub@redhat.com>
4407
4408 [BZ #737]
4409 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4410 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4411 at least gotntpoff relocation and addition.
4412 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4413 Likewise.
4414 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4415 Likewise.
4416 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4417 Likewise.
4418
4419 2005-01-06 Ulrich Drepper <drepper@redhat.com>
4420
4421 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4422 entry for static tls deallocation fix.
4423 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4424 also contains information whether the memory pointed to is static
4425 TLS or not.
4426 * sysdeps/i386/tls.h: Likewise.
4427 * sysdeps/ia64/tls.h: Likewise.
4428 * sysdeps/powerpc/tls.h: Likewise.
4429 * sysdeps/s390/tls.h: Likewise.
4430 * sysdeps/sh/tls.h: Likewise.
4431 * sysdeps/sparc/tls.h: Likewise.
4432 * sysdeps/x86_64/tls.h: Likewise.
4433
4434 2004-12-27 Ulrich Drepper <drepper@redhat.com>
4435
4436 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4437
4438 2004-12-21 Jakub Jelinek <jakub@redhat.com>
4439
4440 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4441 %esp.
4442 * Makefile (tests): Add tst-align2.
4443 * tst-align2.c: New test.
4444 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4445 -mpreferred-stack-boundary=4.
4446
4447 2004-12-18 Roland McGrath <roland@redhat.com>
4448
4449 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4450 New file removed withdrawn for the moment.
4451
4452 2004-12-17 Richard Henderson <rth@redhat.com>
4453
4454 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4455 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4456
4457 2004-12-16 Ulrich Drepper <drepper@redhat.com>
4458
4459 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4460 Increased PTHREAD_STACK_MIN.
4461
4462 * tst-context1.c (stacks): Use bigger stack size.
4463
4464 2004-12-16 Jakub Jelinek <jakub@redhat.com>
4465
4466 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4467 * sysdeps/sparc/tcb-offsets.sym: Add TID.
4468
4469 2004-12-15 Jakub Jelinek <jakub@redhat.com>
4470
4471 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4472 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4473 * sysdeps/s390/tcb-offsets.sym (TID): Add.
4474
4475 2004-12-15 Ulrich Drepper <drepper@redhat.com>
4476
4477 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4478
4479 2004-12-14 Ulrich Drepper <drepper@redhat.com>
4480
4481 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4482 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4483
4484 * tst-getpid1.c: If child crashes, report this first. Print which
4485 signal.
4486
4487 2004-12-09 Ulrich Drepper <drepper@redhat.com>
4488
4489 * init.c (__pthread_initialize_minimal_internal): Also unblock
4490 SIGSETXID.
4491
4492 2004-12-01 Jakub Jelinek <jakub@redhat.com>
4493
4494 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4495 _POSIX_THREAD_CPUTIME): Define to 0.
4496 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4497 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4498 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4499 __timer_signal_thread_tclk): Remove.
4500 (init_module): Remove their initialization.
4501 (thread_cleanup): Remove their cleanup assertions.
4502 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4503 __timer_signal_thread_tclk): Remove.
4504 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4505 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4506 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4507
4508 2004-12-07 Jakub Jelinek <jakub@redhat.com>
4509
4510 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4511 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4512
4513 * Makefile (tests): Add tst-getpid2.
4514 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4515 (do_test): Use it. Use __clone2 instead of clone on ia64.
4516 * tst-getpid2.c: New test.
4517
4518 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4519
4520 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4521
4522 2004-12-04 Ulrich Drepper <drepper@redhat.com>
4523
4524 * Makefile (tests): Add tst-getpid1.
4525 * tst-getpid1.c: New file.
4526 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4527 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4528
4529 2004-12-02 Roland McGrath <roland@redhat.com>
4530
4531 * Makefile (libpthread-nonshared): Variable removed.
4532 ($(objpfx)libpthread_nonshared.a): Target removed.
4533 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4534 These are now handled by generic magic from
4535 libpthread-static-only-routines being set.
4536
4537 2004-11-27 Ulrich Drepper <drepper@redhat.com>
4538
4539 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4540 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4541 _POSIX_THREAD_PRIO_PROTECT): Define.
4542 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4543 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4544 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4545
4546 2004-11-26 Jakub Jelinek <jakub@redhat.com>
4547
4548 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4549 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4550 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4551 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4552 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4553 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4554 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4555
4556 2004-11-24 Ulrich Drepper <drepper@redhat.com>
4557
4558 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4559
4560 * Makefile (libpthread-routines): Add pthread_setschedprio.
4561 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4562 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4563 * pthread_setschedprio.c: New file.
4564
4565 2004-11-20 Jakub Jelinek <jakub@redhat.com>
4566
4567 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4568 * pthread_cancel.c (pthread_create): Likewise.
4569
4570 * Makefile (libpthread-routines): Add vars.
4571 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4572 * init.c (__default_stacksize, __is_smp): Remove.
4573 * vars.c: New file.
4574 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4575 and define a wrapper macro.
4576 (PTHREAD_STATIC_FN_REQUIRE): Define.
4577 * allocatestack.c (__find_thread_by_id): Undefine.
4578 * pthread_create (__pthread_keys): Remove.
4579 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4580 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4581 PTHREAD_STATIC_FN_REQUIRE.
4582
4583 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4584
4585 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4586 parameter to REGISTER macro.
4587
4588 2004-11-17 Roland McGrath <roland@redhat.com>
4589
4590 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4591 Make sure SIGCANCEL is blocked as well.
4592
4593 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4594
4595 * sysdeps/pthread/setxid.h: New file.
4596 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4597 (struct xid_command): Add forward decl.
4598 (struct pthread_functions): Change return type of __nptl_setxid hook
4599 to int.
4600 * pthreadP.h (__nptl_setxid): Change return type to int.
4601 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4602 calling thread, return its return value and set errno on failure.
4603 * descr.h (struct xid_command): Change id type to long array.
4604
4605 * Makefile: Add rules to build and test tst-setuid1 and
4606 tst-setuid1-static.
4607 * tst-setuid1.c: New test.
4608 * tst-setuid1-static.c: New test.
4609
4610 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4611
4612 * Makefile (tests): Add tst-exit3.
4613 * tst-exit3.c: New test.
4614
4615 2004-11-09 Ulrich Drepper <drepper@redhat.com>
4616
4617 * Makefile (tests): Add tst-exit2.
4618 * tst-exit2.c: New file.
4619
4620 2004-11-09 Roland McGrath <roland@redhat.com>
4621
4622 [BZ #530]
4623 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4624 here, before calling clone.
4625 * pthread_create.c (start_thread): Don't do it here.
4626
4627 2004-11-02 Jakub Jelinek <jakub@redhat.com>
4628
4629 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4630
4631 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4632
4633 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4634 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4635 assembler warning.
4636
4637 2004-10-28 Jakub Jelinek <jakub@redhat.com>
4638
4639 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4640 if sched_priority is not between minprio and maxprio.
4641
4642 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4643
4644 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4645 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4646
4647 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4648 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4649
4650 2004-10-24 Ulrich Drepper <drepper@redhat.com>
4651
4652 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4653 not-cancelable I/O functions.
4654
4655 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4656
4657 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4658 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4659 make sure 2 is stored in the futex and we looked at the old value.
4660 Fix a few other problems to return the correct value.
4661
4662 2004-10-14 Richard Henderson <rth@redhat.com>
4663
4664 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4665 make gcc4 happy.
4666
4667 2004-10-06 Jakub Jelinek <jakub@redhat.com>
4668
4669 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4670 of pthread-functions.h and pthreaddef.h.
4671 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4672
4673 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4674 Change __data.__nwaiters from int to unsigned int.
4675
4676 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4677 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4678
4679 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4680 before return type.
4681
4682 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4683 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4684
4685 2004-10-06 Ulrich Drepper <drepper@redhat.com>
4686
4687 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4688 test fails, remove message queue.
4689 (tf_msgsnd): Likewise.
4690
4691 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4692
4693 * tst-clock1.c: Change #ifdef to #if defined.
4694 * tst-clock2.c: Likewise.
4695 * tst-cond11.c: Likewise.
4696
4697 * sysdeps/pthread/timer_create.c (timer_create): Use
4698 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4699 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4700 THREAD_CPUTIME.
4701
4702 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4703
4704 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4705 _POSIX_THREAD_CPUTIME): Define to 0.
4706
4707 2004-10-04 Ulrich Drepper <drepper@redhat.com>
4708
4709 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4710 and _POSIX_THREAD_CPUTIME to zero.
4711 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4712 * tst-barrier2.c: Fix testing for POSIX feature.
4713 * tst-clock1.c: Likewise.
4714 * tst-clock2.c: Likewise.
4715 * tst-cond11.c: Likewise.
4716 * tst-cond4.c: Likewise.
4717 * tst-cond6.c: Likewise.
4718 * tst-flock2.c: Likewise.
4719 * tst-mutex4.c: Likewise.
4720 * tst-mutex9.c: Likewise.
4721 * tst-rwlock12.c: Likewise.
4722 * tst-rwlock4.c: Likewise.
4723 * tst-signal1.c: Likewise.
4724 * tst-spin2.c: Likewise.
4725 * sysdeps/pthread/posix-timer.h: Likewise.
4726 * sysdeps/pthread/timer_create.c: Likewise.
4727 * sysdeps/pthread/timer_routines.c: Likewise.
4728
4729 2004-10-01 Ulrich Drepper <drepper@redhat.com>
4730
4731 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4732 (__lll_mutex_timedlock_wait): Address futex correctly.
4733
4734 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4735 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4736 make sure 2 is stored in the futex and we looked at the old value.
4737 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4738 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4739 which might very well made the code not working at all before.
4740 [BZ #417]
4741
4742 2004-09-28 Ulrich Drepper <drepper@redhat.com>
4743
4744 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4745 allow SIGSETXID to be sent.
4746 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4747 for SIGSETXID to be defined.
4748 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4749 SIGSETXID cannot be blocked.
4750
4751 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4752 Add __extension__ to long long types.
4753 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4754 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4755 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4756 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4757 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4758 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4759 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4760
4761 2004-09-25 Ulrich Drepper <drepper@redhat.com>
4762
4763 * descr.h (struct pthread): Add stopped_start field.
4764 * sysdeps/pthread/createthread.c (create_thread): Set
4765 start_stopped flag in descriptor for new thread appropriately.
4766 * pthread_create.c (start_thread): Only take lock to be stopped on
4767 startup if stopped_start flag says so.
4768
4769 2004-09-24 Ulrich Drepper <drepper@redhat.com>
4770
4771 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4772 is created detached and if yes, do not try to free the stack in case
4773 the thread creation failed.
4774 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4775 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4776 case there has been no error. [BZ #405]
4777
4778 * pthread_create.c (start_thread): Don't wait for scheduler data
4779 etc to be set at the beginning of the function. The cancellation
4780 infrastructure must have been set up. And enable async
4781 cancellation before potentially going to sleep. [BZ #401]
4782
4783 2004-09-20 Ulrich Drepper <drepper@redhat.com>
4784
4785 * Versions: Remove exports for pthread_set*id_np functions.
4786 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4787 for now.
4788 * Makefile: Don't build pthread_set*id code for now.
4789
4790 2004-09-19 Ulrich Drepper <drepper@redhat.com>
4791
4792 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4793 internal use.
4794 * allocatestack.c (__nptl_setxid): New function.
4795 * descr.h (struct xid_command): Define type.
4796 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4797 (sighandler_setxid): New function.
4798 (__pthread_initialize_minimal): Register sighandler_setxid for
4799 SIGCANCEL.
4800 * pt-allocrtsig.c: Update comment.
4801 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4802 Declare __nptl_setxid.
4803 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4804 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4805 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4806 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4807 and pthread_setresuid_np.
4808 * pthread_setgid_np.c: New file.
4809 * pthread_setuid_np.c: New file.
4810 * pthread_setegid_np.c: New file.
4811 * pthread_seteuid_np.c: New file.
4812 * pthread_setregid_np.c: New file.
4813 * pthread_setreuid_np.c: New file.
4814 * pthread_setresgid_np.c: New file.
4815 * pthread_setresuid_np.c: New file.
4816 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4817 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4818 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4819 and pthread_setresuid_np.
4820 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4821 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4822 pthread_setregid, and pthread_setresgid.
4823
4824 2004-09-18 Ulrich Drepper <drepper@redhat.com>
4825
4826 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4827 ENOMEM when out of memory.
4828
4829 2004-09-10 Roland McGrath <roland@redhat.com>
4830
4831 [BZ #379]
4832 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4833 code, since we don't try to use the broken CLONE_STOPPED any more.
4834 * pthread_create.c (start_thread): Likewise.
4835
4836 2004-09-15 Richard Henderson <rth@redhat.com>
4837
4838 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4839
4840 2004-09-01 David Mosberger <davidm@hpl.hp.com>
4841
4842 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4843 (__libc_unwind_longjmp): Delete macro and declare as function.
4844 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4845 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4846 nptl directory.
4847 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4848 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4849 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4850
4851 2004-09-12 Ulrich Drepper <drepper@redhat.com>
4852
4853 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4854 for __USE_XOPEN2K.
4855 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4856 types also for __USE_XOPEN2K.
4857 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4858 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4859 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4860 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4861 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4862 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4863 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4864 [BZ #320]
4865
4866 2004-09-08 Ulrich Drepper <drepper@redhat.com>
4867
4868 * sysdeps/pthread/pthread.h
4869 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4870 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4871 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4872 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4873 [BZ #375]
4874
4875 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4876
4877 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4878 PSEUDO to be used with . prefix.
4879
4880 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4881 Use atomic_increment instead of atomic_exchange_and_add.
4882 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4883 Likewise.
4884 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4885 Likewise.
4886 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4887 Likewise.
4888
4889 * allocatestack.c (allocate_stack): Use atomic_increment_val
4890 instead of atomic_exchange_and_add.
4891 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4892 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4893 Likewise.
4894 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4895 Likewise.
4896
4897 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4898 the initialization function might throw.
4899
4900 2005-09-05 Richard Henderson <rth@redhat.com>
4901
4902 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4903 Move definition inside libpthread, libc, librt check. Provide
4904 definition for rtld.
4905
4906 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4907
4908 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4909 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4910 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4911 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4912 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4913 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4914 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4915 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4916 * unwind.c: Use it.
4917
4918 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4919 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4920 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4921 Likewise.
4922 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4923 Decrement __nwaiters. If pthread_cond_destroy has been called and
4924 this is the last waiter, signal pthread_cond_destroy caller and
4925 avoid using the pthread_cond_t structure after unlock.
4926 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4927 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4928 Read clock type from the least significant bits of __nwaiters instead
4929 of __clock.
4930 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4931 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4932
4933 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4934
4935 [BZ #342]
4936 * Makefile (tests): Add tst-cond20 and tst-cond21.
4937 * tst-cond20.c: New test.
4938 * tst-cond21.c: New test.
4939 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4940 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4941 it unsigned int.
4942 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4943 Likewise.
4944 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4945 (pthread_cond_t): Likewise.
4946 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4947 Likewise.
4948 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4949 Likewise.
4950 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4951 Likewise.
4952 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4953 (cond_nwaiters): New.
4954 (clock_bits): New.
4955 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4956 if there are waiters not signalled yet.
4957 Wait until all already signalled waiters wake up.
4958 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4959 __nwaiters. If pthread_cond_destroy has been called and this is the
4960 last waiter, signal pthread_cond_destroy caller and avoid using
4961 the pthread_cond_t structure after unlock.
4962 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4963 decrement it when leaving. If pthread_cond_destroy has been called
4964 and this is the last waiter, signal pthread_cond_destroy caller.
4965 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4966 Likewise. Read clock type from the least significant bits of
4967 __nwaiters instead of __clock.
4968 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4969 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4970 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4971 clock type just from the last COND_CLOCK_BITS bits of value.
4972 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4973 instead of __clock, just from second bit of condattr's value.
4974
4975 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4976
4977 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4978 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4979 != 64.
4980 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4981
4982 2004-08-15 Roland McGrath <roland@frob.com>
4983
4984 * pthread_atfork.c: Update copyright terms including special exception
4985 for these trivial files, which are statically linked into executables
4986 that use dynamic linking for the significant library code.
4987
4988 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4989
4990 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4991 pthread_rwlock_rdlock.
4992 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4993 Decrease __nr_readers_queued after reacquiring lock.
4994 * sysdeps/pthread/pthread_rwlock_timedrdlock
4995 (pthread_rwlock_timedrdlock): Likewise.
4996 Reported by Bob Cook <bobcook47@hotmail.com>.
4997
4998 2004-08-11 Jakub Jelinek <jakub@redhat.com>
4999
5000 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5001 before pthread_barrier_wait.
5002
5003 2004-08-07 Ulrich Drepper <drepper@redhat.com>
5004
5005 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5006 Remove unnecessary exception handling data.
5007
5008 2004-07-23 Jakub Jelinek <jakub@redhat.com>
5009
5010 [BZ #284]
5011 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5012 instead of clockid_t.
5013
5014 2004-07-21 Roland McGrath <roland@redhat.com>
5015
5016 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5017
5018 2004-07-19 Roland McGrath <roland@redhat.com>
5019
5020 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5021
5022 2004-07-02 Roland McGrath <roland@redhat.com>
5023
5024 * configure: Don't exit.
5025
5026 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5027
5028 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5029 (__pthread_cond_timedwait): Check for invalid nanosecond in
5030 timeout value.
5031
5032 2004-07-07 Ulrich Drepper <drepper@redhat.com>
5033
5034 * Makefile: Add rules to build and run tst-fini1.
5035 * tst-fini1.c: New file.
5036 * tst-fini1mod.c: New file.
5037
5038 2004-07-05 Ulrich Drepper <drepper@redhat.com>
5039
5040 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5041 if no cancellation support is needed.
5042 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5043 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5044 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5045 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5046 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5047 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5048 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5049 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5050 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5051
5052 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5053 only if not already defined.
5054
5055 2004-07-05 Jakub Jelinek <jakub@redhat.com>
5056
5057 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5058 constraint "m" instead of "0" for futex.
5059
5060 * shlib-versions: Add powerpc64-.*-linux.*.
5061
5062 2004-07-04 Jakub Jelinek <jakub@redhat.com>
5063
5064 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5065 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5066 for valid tv_nsec.
5067 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5068 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5069 bits.
5070
5071 2004-06-29 Roland McGrath <roland@redhat.com>
5072
5073 * Banner: NPTL no longer has its own version number.
5074 * Makefile (nptl-version): Variable removed.
5075 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5076 using $(version), the glibc version number.
5077
5078 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5079
5080 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5081 Fix branch offset for a PLT entry.
5082 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5083 Likewise.
5084 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5085 Likewise.
5086 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5087 Likewise.
5088 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5089 Likewise.
5090
5091 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5092
5093 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5094 unconditionally.
5095
5096 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5097
5098 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5099 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5100 instead of tv_sec.
5101 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5102 (pthread_rwlock_timedrdlock): Likewise.
5103
5104 2004-06-22 Jakub Jelinek <jakub@redhat.com>
5105
5106 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5107 Set __r7 to val, not mutex.
5108
5109 2004-06-27 Ulrich Drepper <drepper@redhat.com>
5110
5111 * Makefile: Add rules to build tst-rwlock14.
5112 * tst-rwlock14.c: New file.
5113
5114 2004-06-24 Boris Hu <boris.hu@intel.com>
5115
5116 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5117 check.
5118 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5119
5120 2004-06-19 Andreas Jaeger <aj@suse.de>
5121
5122 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5123 assembler in last patch.
5124
5125 2004-06-17 Ulrich Drepper <drepper@redhat.com>
5126
5127 * sysdeps/pthread/pthread_cond_timedwait.c
5128 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5130 (__pthread_cond_timedwait): Check for invalid nanosecond in
5131 timeout value.
5132 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5133 * tst-cond19.c: New file.
5134 * Makefile: Add rules to build and run tst-cond19.
5135
5136 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5137
5138 * tst-context1.c (GUARD_PATTERN): Defined.
5139 (tst_context_t): Define struct containing ucontext_t & guard words.
5140 (ctx): Declare as an array of tst_context_t.
5141 (fct): Verify uc_link & guard words are still valid.
5142 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5143
5144 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5145
5146 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5147 Add __data.__futex field, reshuffle __data.__clock.
5148 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5149 (__pthread_cond_signal): Increment __futex at the same time as
5150 __wakeup_seq or __total_seq. Pass address of __futex instead of
5151 address of low 32-bits of __wakeup_seq to futex syscall.
5152 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5153 (__pthread_cond_wait): Likewise. Pass __futex value from before
5154 releasing internal lock to FUTEX_WAIT.
5155 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5156 (__pthread_cond_timedwait): Likewise.
5157 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5158 (FUTEX_CMP_REQUEUE): Define.
5159 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5160 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5161 Pass __futex value from before the unlock and __futex address instead
5162 of address of low 32-bits of __wakeup_seq to futex syscall.
5163 Fallback to FUTEX_WAKE all on any errors.
5164
5165 2004-06-08 Jakub Jelinek <jakub@redhat.com>
5166
5167 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5168 comment typo.
5169 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5170 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5171 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5172 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5173 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
5174
5175 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
5176
5177 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5178 Add memory clobber to inline assembly.
5179 (__lll_mutex_trylock): Likewise.
5180 (__lll_mutex_cond_trylock): Likewise.
5181
5182 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
5183
5184 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5185 Pass val argument as 6th system call argument in %r7.
5186
5187 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5188
5189 * Makefile (tests): Add tst-cond16.
5190 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5191 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5192 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5193 Add __data.__futex field, reshuffle __data.__clock.
5194 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5195 (__pthread_cond_signal): Increment __futex at the same time as
5196 __wakeup_seq or __total_seq. Pass address of __futex instead of
5197 address of low 32-bits of __wakeup_seq to futex syscall.
5198 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5199 (__pthread_cond_wait): Likewise. Pass __futex value from before
5200 releasing internal lock to FUTEX_WAIT.
5201 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5202 (__pthread_cond_timedwait): Likewise.
5203 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5204 (FUTEX_CMP_REQUEUE): Define.
5205 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5206 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5207 Pass __futex value from before the unlock and __futex address instead
5208 of address of low 32-bits of __wakeup_seq to futex syscall.
5209 Fallback to FUTEX_WAKE all on any errors.
5210 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5211 Define.
5212 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5213 internally. Return non-zero if error, zero if success.
5214 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5215 Add __data.__futex field, reshuffle __data.__clock.
5216 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5217 Define.
5218 (lll_futex_requeue): Add val argument, return 1 unconditionally
5219 for the time being.
5220 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5221 Add __data.__futex field, reshuffle __data.__clock.
5222 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5223 Define.
5224 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5225 internally. Return non-zero if error, zero if success.
5226 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5227 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5228 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5229 Define.
5230 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5231 internally. Return non-zero if error, zero if success.
5232 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5233 Add __data.__futex field, reshuffle __data.__clock.
5234 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5235 Define.
5236 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5237 internally. Return non-zero if error, zero if success.
5238 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5239 Add __data.__futex field, reshuffle __data.__clock.
5240 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5241 Add __data.__futex field, reshuffle __data.__clock.
5242 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5243 Increment __futex at the same time as __wakeup_seq or __total_seq.
5244 Pass address of __futex instead of address of low 32-bits of
5245 __wakeup_seq to futex syscall.
5246 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5247 Pass __futex value from before releasing internal lock
5248 to FUTEX_WAIT.
5249 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5250 Likewise. Avoid unnecessary shadowing of variables.
5251 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5252 Set __futex to 2 * __total_seq. Pass __futex value from before the
5253 unlock and __futex address instead of address of low 32-bits of
5254 __wakeup_seq to futex_requeue macro, adjust for new return value
5255 meaning.
5256 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5257 (__pthread_cond_signal): Increment __futex at the same time as
5258 __wakeup_seq or __total_seq. Pass address of __futex instead of
5259 address of low 32-bits of __wakeup_seq to futex syscall.
5260 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5261 (__pthread_cond_wait): Likewise. Pass __futex value from before
5262 releasing internal lock to FUTEX_WAIT.
5263 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5264 (__pthread_cond_timedwait): Likewise.
5265 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5266 (FUTEX_CMP_REQUEUE): Define.
5267 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5268 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5269 Pass __futex value from before the unlock and __futex address instead
5270 of address of low 32-bits of __wakeup_seq to futex syscall.
5271 Fallback to FUTEX_WAKE all on any errors.
5272
5273 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5274
5275 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5276 Add nop to align the end of critical section.
5277 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5278
5279 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5280
5281 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5282 Add __broadcast_seq field.
5283 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5284 all waiters as woken with woken_seq and bump broadcast counter.
5285 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5286 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5287 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5288 Comment typo fixes. Avoid returning -ETIMEDOUT.
5289
5290 2004-06-01 Ulrich Drepper <drepper@redhat.com>
5291
5292 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5293 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5294 Reported by Kaz Kojima.
5295
5296 2004-05-25 Jakub Jelinek <jakub@redhat.com>
5297
5298 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5299
5300 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5301
5302 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5303 __broadcast_seq with bc_seq after acquiring internal lock instead of
5304 before it.
5305
5306 2004-05-18 Jakub Jelinek <jakub@redhat.com>
5307
5308 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5309 compilation.
5310 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5311 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5312 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5313 (pthread_cond_t): Add __data.__broadcast_seq field.
5314 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5315 (FRAME_SIZE): Define.
5316 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
5317 Comment typo fixes.
5318 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5319 Define.
5320 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
5321 typo fixes.
5322 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5323 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
5324 fixes.
5325
5326 2004-05-18 Ulrich Drepper <drepper@redhat.com>
5327
5328 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5329 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5330 Add __broadcast_seq field.
5331 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5332 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5333 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5334 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5335 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5336 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5337 all waiters as woken with woken_seq and bump broadcast counter.
5338 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5339 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5340 __broadcast_seq field.
5341 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5342 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5343 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5344 * pthread_cond_init.c: Initialize __broadcast_seq field.
5345 * Makefile (tests): Add tst-cond17 and tst-cond18.
5346 Add .NOTPARALLEL goal.
5347 * tst-cond16.c: New file. From Jakub.
5348 * tst-cond17.c: New file. From Jakub.
5349 * tst-cond18.c: New file. From Jakub.
5350
5351 2004-05-16 Ulrich Drepper <drepper@redhat.com>
5352
5353 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5354 unwind info.
5355
5356 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5357 Parametrize frame size. Correct some unwind info.
5358 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5359
5360 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5361
5362 * tst-stack3.c: Note testing functionality beyond POSIX.
5363
5364 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5365
5366 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5367 Change conditional from ifdef to if.
5368
5369 2004-04-23 Jakub Jelinek <jakub@redhat.com>
5370
5371 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5372 SYSDEP_CANCEL_ERROR): Define.
5373 (PSEUDO): Use it.
5374
5375 2004-05-01 Jakub Jelinek <jakub@redhat.com>
5376
5377 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5378
5379 2004-04-20 Jakub Jelinek <jakub@redhat.com>
5380
5381 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5382
5383 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5384
5385 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5386 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5387 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5388 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5389
5390 2004-04-19 Ulrich Drepper <drepper@redhat.com>
5391
5392 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5393 thread has all signals blocked.
5394
5395 2004-04-18 Andreas Jaeger <aj@suse.de>
5396
5397 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5398 (SEM_VALUE_MAX): Add missing brace.
5399
5400 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5401
5402 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5403 in rt subdir.
5404 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5405 * sysdeps/pthread/tst-mqueue8x.c: New test.
5406 * tst-cancel4.c: Update comment about message queues.
5407
5408 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5409 return it_value { 0, 0 }.
5410 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5411 like SIGEV_SIGNAL.
5412 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5413 assertion for SIGEV_NONE.
5414 (thread_attr_compare): Compare all attributes, not just a partial
5415 subset.
5416
5417 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5418
5419 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5420
5421 2004-04-17 Ulrich Drepper <drepper@redhat.com>
5422
5423 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5424 Just use a plain number.
5425 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5426 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5427 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5428 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5429 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5430 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5431 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5432
5433 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5434
5435 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5436 frame info.
5437 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5438
5439 2004-04-15 Jakub Jelinek <jakub@redhat.com>
5440
5441 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5442 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5443 of calling sigwaitinfo.
5444
5445 2004-04-16 Ulrich Drepper <drepper@redhat.com>
5446
5447 * allocatestack.c (allocate_stack): Set reported_guardsize
5448 unconditionally.
5449 * pthread_getattr_np.c (pthread_getattr_np): Use
5450 reported_guardsize instead of guardsize.
5451 * descr.h (struct pthread): Add reported_guardsize field.
5452
5453 2004-04-13 Jakub Jelinek <jakub@redhat.com>
5454
5455 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5456
5457 2004-04-12 Ulrich Drepper <drepper@redhat.com>
5458
5459 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5460
5461 2004-04-08 Jakub Jelinek <jakub@redhat.com>
5462
5463 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5464 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5465 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5466 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5467 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5468 Define.
5469 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5470 (_POSIX_MESSAGE_PASSING): Define.
5471 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5472 (_POSIX_MESSAGE_PASSING): Define.
5473 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5474 (_POSIX_MESSAGE_PASSING): Define.
5475
5476 2004-04-04 Ulrich Drepper <drepper@redhat.com>
5477
5478 * tst-context1.c (fct): Check whether correct stack is used.
5479
5480 2004-04-03 Ulrich Drepper <drepper@redhat.com>
5481
5482 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5483 matching constraints for asm mem parameters.
5484
5485 * tst-clock2.c (tf): Don't define unless needed.
5486
5487 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
5488
5489 * Makefile (link-libc-static): Use $(static-gnulib) instead of
5490 $(gnulib).
5491
5492 2004-03-30 Ulrich Drepper <drepper@redhat.com>
5493
5494 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5495 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5496 * pthreadP.h: Declare __nptl_deallocate_tsd.
5497 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5498 Adjust caller.
5499
5500 * Makefile (tests): Add tst-tsd5.
5501 * tst-tsd5.c: New file.
5502
5503 2004-03-29 Ulrich Drepper <drepper@redhat.com>
5504
5505 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5506 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5507 is SHLIB_COMPAT check.
5508 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5509 (__pthread_attr_getaffinity_old): Likewise.
5510 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5511 (__pthread_getaffinity_old): Likewise.
5512 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5513 (__pthread_setaffinity_old): Likewise.
5514
5515 2004-03-26 Ulrich Drepper <drepper@redhat.com>
5516
5517 * allocatestack.c (_make_stacks_executable): Call
5518 _dl_make_stack_executable first.
5519
5520 2004-03-24 Roland McGrath <roland@redhat.com>
5521
5522 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5523 constraint instead of "0".
5524
5525 2004-03-24 Ulrich Drepper <drepper@redhat.com>
5526
5527 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5528 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5529
5530 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5531 code to avoid warning.
5532
5533 2004-03-24 Andreas Jaeger <aj@suse.de>
5534
5535 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5536 (__pthread_attr_setaffinity_old): Remove const.
5537
5538 2004-03-23 Ulrich Drepper <drepper@redhat.com>
5539
5540 * sysdeps/unix/sysv/linux/smp.h: New file.
5541 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5542 * init.c: Define __is_smp.
5543 (__pthread_initialize_minimal_internal): Call is_smp_system to
5544 initialize __is_smp.
5545 * pthreadP.h: Declare __is_smp.
5546 Define MAX_ADAPTIVE_COUNT is necessary.
5547 * pthread_mutex_init.c: Add comment regarding __spins field.
5548 * pthread_mutex_lock.c: Implement adaptive mutex type.
5549 * pthread_mutex_timedlock.c: Likewise.
5550 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5551 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5552 Add __spins field.
5553 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5554 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5555 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5556 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5557 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5558 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5559 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5560 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5561 lll_mutex_cond_trylock.
5562 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5563 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5564 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5565 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5566 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5567 Define BUSY_WAIT_NOP.
5568 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5569 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5570
5571 * tst-mutex5.c: Add support for testing adaptive mutexes.
5572 * tst-mutex7.c: Likewise.
5573 * tst-mutex5a.c: New file.
5574 * tst-mutex7a.c: New file.
5575 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5576
5577 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5578 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5579 vgettimeofday call might destroy the content.
5580
5581 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5582 @pause in the loop.
5583
5584 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5585 No need to restrict type of ret. Make it int. Add comment.
5586
5587 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5588 Remove unnecessary setne instruction.
5589
5590 2004-03-22 Jakub Jelinek <jakub@redhat.com>
5591
5592 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5593 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5594 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5595 If realloc fails, break out of the loop.
5596
5597 2004-03-20 Andreas Jaeger <aj@suse.de>
5598
5599 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5600 (__pthread_setaffinity_old): Fix interface.
5601 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5602 (__pthread_getaffinity_old): Likewise.
5603
5604 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5605 (__pthread_setaffinity_new): Remove duplicate declaration.
5606
5607 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5608
5609 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5610 the return value to a safe register.
5611 (CDISABLE): Set the function argument correctly.
5612
5613 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5614
5615 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5616 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5617 Rewrite so that only one locked memory operation per round is needed.
5618 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5619 (pthread_barrier_wait): After wakeup, release lock only when the
5620 last thread stopped using the barrier object.
5621 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5622 (__pthread_cond_wait): Don't store mutex address if the current
5623 value is ~0l. Add correct cleanup support and unwind info.
5624 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5625 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5626 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5627 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5628 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5629 Add correct cleanup support and unwind info.
5630 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5631 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5632 information for syscall wrappers.
5633
5634 2004-03-18 Ulrich Drepper <drepper@redhat.com>
5635
5636 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5637 cpusetsize field, remove next.
5638 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5639 parameter for size of the CPU set.
5640 (pthread_setaffinity_np): Likewise.
5641 (pthread_attr_getaffinity_np): Likewise.
5642 (pthread_attr_setaffinity_np): Likewise.
5643 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5644 interface change, keep compatibility code.
5645 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5646 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5647 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5648 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5649 __pthread_getaffinity_np.
5650 * Versions: Add version for changed interfaces.
5651 * tst-attr3.c: Adjust test for interface change.
5652 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5653 increasing buffer sizes.
5654 * pthread_attr_destroy.c: Remove unused list handling.
5655 * pthread_attr_init.c: Likewise.
5656
5657 2004-03-17 Roland McGrath <roland@redhat.com>
5658
5659 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5660 first argument to clock_getres so we ever enable kernel timers.
5661
5662 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5663
5664 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5665
5666 2004-03-12 Richard Henderson <rth@redhat.com>
5667
5668 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5669 oldvalue from CENABLE to CDISABLE.
5670
5671 2004-03-12 Ulrich Drepper <drepper@redhat.com>
5672
5673 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5674 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5675 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5676 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5677
5678 2004-03-11 Richard Henderson <rth@redhat.com>
5679
5680 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5681 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5682 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5683
5684 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5685
5686 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5687 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5688 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5689
5690 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5691
5692 * forward.c (__pthread_cond_broadcast_2_0,
5693 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5694 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5695 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5696
5697 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5698
5699 * sysdeps/sh/tcb-offsets.sym: Add PID.
5700 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5701 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5702
5703 2004-03-10 Ulrich Drepper <drepper@redhat.com>
5704
5705 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5706 include <sysdep-cancel.h>, vfork is no cancellation point.
5707 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5708 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5709 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5710
5711 2004-03-10 Jakub Jelinek <jakub@redhat.com>
5712
5713 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5714 libc_hidden_def.
5715 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5716 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5717 Likewise.
5718 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5719 Likewise.
5720 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5721 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5722 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5723 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5724 of DO_CALL_VIA_BREAK. Work around a gas problem.
5725
5726 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5727 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5728 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5729 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5730 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5731 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5732
5733 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5734 a local register for saving old PID. Negate PID in parent upon exit.
5735
5736 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5737 tcb-offsets.h.
5738 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5739 before syscall, set to the old value in the parent afterwards.
5740 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5741 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5742 tcb-offsets.h.
5743 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5744 before syscall, set to the old value in the parent afterwards.
5745 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5746 * sysdeps/s390/tcb-offsets.sym: Add PID.
5747
5748 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5749 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5750 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5751 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5752 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5753 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5754
5755 2004-03-10 Andreas Schwab <schwab@suse.de>
5756
5757 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5758 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5759 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5760
5761 2004-03-09 Jakub Jelinek <jakub@redhat.com>
5762
5763 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5764 * tst-cancel21.c (do_one_test): Likewise.
5765 Reported by Gordon Jin <gordon.jin@intel.com>.
5766
5767 2004-02-09 Jakub Jelinek <jakub@redhat.com>
5768
5769 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5770 if non-zero and set to INT_MIN if zero.
5771 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5772 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5773 (SAVE_PID, RESTORE_PID): Define.
5774 (__vfork): Use it.
5775 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5776 Use relative path to avoid including NPTL i386/vfork.S.
5777 (SAVE_PID, RESTORE_PID): Define.
5778 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5779 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5780 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5781 tst-vfork2x.
5782 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5783 * tst-vfork1.c: New test.
5784 * tst-vfork2.c: New test.
5785 * tst-vfork1x.c: New test.
5786 * tst-vfork2x.c: New test.
5787
5788 2004-03-08 Ulrich Drepper <drepper@redhat.com>
5789
5790 * sysdeps/i386/tcb-offsets.sym: Add PID.
5791 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5792 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5793 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5794
5795 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5796
5797 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5798
5799 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5800
5801 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5802 _rtld_global_ro.
5803
5804 2004-03-07 Ulrich Drepper <drepper@redhat.com>
5805
5806 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5807 _rtld_global_ro.
5808
5809 * tst-once4.c: Remove unnecessary macro definition.
5810
5811 * tst-mutex7.c (do_test): Limit thread stack size.
5812 * tst-once2.c (do_test): Likewise.
5813 * tst-tls3.c (do_test): Likewise.
5814 * tst-tls1.c (do_test): Likewise.
5815 * tst-signal3.c (do_test): Likewise.
5816 * tst-kill6.c (do_test): Likewise.
5817 * tst-key4.c (do_test): Likewise.
5818 * tst-join4.c (do_test): Likewise.
5819 * tst-fork1.c (do_test): Likewise.
5820 * tst-context1.c (do_test): Likewise.
5821 * tst-cond2.c (do_test): Likewise.
5822 * tst-cond10.c (do_test): Likewise.
5823 * tst-clock2.c (do_test): Likewise.
5824 * tst-cancel10.c (do_test): Likewise.
5825 * tst-basic2.c (do_test): Likewise.
5826 * tst-barrier4.c (do_test): Likewise.
5827
5828 2004-03-05 Ulrich Drepper <drepper@redhat.com>
5829
5830 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5831
5832 2004-03-01 Ulrich Drepper <drepper@redhat.com>
5833
5834 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5835 (__pthread_cond_timedwait): Optimize wakeup test.
5836 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5837 (__pthread_cond_wait): Likewise.
5838 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5839 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5840 Likewise.
5841
5842 2004-02-29 Ulrich Drepper <drepper@redhat.com>
5843
5844 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5845 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5846 the atomic instruction needed.
5847 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5848 (__lll_mutex_lock_wait): Likewise.
5849
5850 2004-02-28 Ulrich Drepper <drepper@redhat.com>
5851
5852 * Makefile (tests): Add tst-cond14 and tst-cond15.
5853 * tst-cond14.c: New file.
5854 * tst-cond15.c: New file.
5855
5856 2004-02-27 Ulrich Drepper <drepper@redhat.com>
5857
5858 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5859 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5860 needs to be implemented differently to be useful.
5861
5862 2004-02-26 Ulrich Drepper <drepper@redhat.com>
5863
5864 * pthread_attr_setschedparam.c: Don't test priority against limits
5865 here. Set ATTR_FLAG_SCHED_SET flag.
5866 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5867 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5868 from parent thread to child. If attribute is used and scheduling
5869 parameters are not inherited, copy parameters from attribute or
5870 compute them. Check priority value.
5871 * pthread_getschedparam.c: If the parameters aren't known yet get
5872 them from the kernel.
5873 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5874 ATTR_FLAG_POLICY_SET flag for thread.
5875 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5876 and ATTR_FLAG_POLICY_SET.
5877
5878 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5879
5880 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5881 fail if stack address hasn't been set. Just return 0.
5882
5883 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5884
5885 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5886 libpthread for the files in this list.
5887 (CFLAGS-tst-unload): Removed.
5888 * tst-unload.c (do_test): Don't use complete path for
5889 LIBPHREAD_SO.
5890
5891 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5892 tst-_res1mod2.
5893
5894 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5895
5896 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5897 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5898 operation per round is needed.
5899 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5900 (__lll_mutex_lock_wait): Likewise.
5901
5902 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5903
5904 * tst-cancel9.c (cleanup): Don't print to stderr.
5905
5906 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5907
5908 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5909
5910 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5911
5912 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5913 (__syscall_error_handler2): Call CDISABLE.
5914 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5915 (__syscall_error_handler2): Call CDISABLE.
5916
5917 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5918 Release lock before the loop, don't reacquire it.
5919
5920 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5921
5922 2004-02-19 Andreas Schwab <schwab@suse.de>
5923
5924 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5925 Fix last change.
5926
5927 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5928
5929 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5930 (pthread_barrier_wait): After wakeup, release lock only when the
5931 last thread stopped using the barrier object.
5932 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5933 (pthread_barrier_wait): Likewise.
5934 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5935 Likewise.
5936 * Makefile (tests): Add tst-barrier4.
5937 * tst-barrier4.c: New file.
5938
5939 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5940 (__pthread_cond_timedwait): Perform timeout test while holding
5941 internal lock to prevent wakeup race.
5942 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5943 * sysdeps/pthread/pthread_cond_timedwait.c
5944 (__pthread_cond_timedwait): Likewise.
5945 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5946 (__pthread_cond_timedwait): Likewise.
5947
5948 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5949
5950 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5951 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5952 * Makefile (tests): Add tst-rwlock13.
5953 * tst-rwlock13.c: New test.
5954
5955 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5956
5957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5958 (__condvar_tw_cleanup): Little optimization.
5959 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5960
5961 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5962
5963 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5964 libpthread as "lib" parameter to SHLIB_COMPAT.
5965 (__novmx_siglongjmp): Fix typo in function name.
5966 (__novmx_longjmp): Fix typo in function name.
5967
5968 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5969
5970 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5971 __builtin_expect.
5972
5973 * sysdeps/generic/pt-longjmp.c: Moved to...
5974 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5975
5976 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5977
5978 * Makefile (libpthread-routines): Add pt-cleanup.
5979 * pt-longjmp.c: Removed.
5980 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5981 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5982 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5983 Version longjmp, siglongjmp for GLIBC_2.3.4.
5984 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5985
5986 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5987
5988 * sysdeps/pthread/pthread_cond_timedwait.c
5989 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5990 Reuse code. Add __builtin_expects.
5991
5992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5993 (__pthread_cond_timedwait): Get internal lock in case timeout has
5994 passed before the futex syscall.
5995 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5996
5997 2004-01-20 Ulrich Drepper <drepper@redhat.com>
5998
5999 * allocatestack.c: Pretty printing.
6000
6001 * sysdeps/pthread/createthread.c (create_thread): Don't add
6002 CLONE_DETACHED bit if it is not necessary.
6003
6004 2004-01-16 Ulrich Drepper <drepper@redhat.com>
6005
6006 * pthread_getattr_np.c: Include ldsodefs.h.
6007
6008 2004-01-16 Richard Henderson <rth@redhat.com>
6009
6010 * allocatestack.c: Don't declare __libc_stack_end.
6011 * init.c (__pthread_initialize_minimal_internal): Likewise.
6012 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6013
6014 2004-01-15 Richard Henderson <rth@redhat.com>
6015
6016 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6017 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6018 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6019 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6020 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6021 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6022 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6023 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6024
6025 2004-01-14 Ulrich Drepper <drepper@redhat.com>
6026
6027 * init.c (pthread_functions): Make array const.
6028
6029 2004-01-13 Ulrich Drepper <drepper@redhat.com>
6030
6031 * allocatestack.c (__make_stacks_executable): Change interface.
6032 Check parameters. Pass parameter on to libc counterpart.
6033 * pthreadP.h: Change declaration.
6034
6035 2004-01-13 Richard Henderson <rth@redhat.com>
6036
6037 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6038 prototype form.
6039 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6040 Likewise.
6041
6042 * sysdeps/alpha/Makefile: New file.
6043 * sysdeps/alpha/tcb-offsets.sym: New file.
6044 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6045 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6046
6047 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6048 on powerpc version.
6049
6050 2004-01-08 Jakub Jelinek <jakub@redhat.com>
6051
6052 * Makefile (tests): Add tst-backtrace1.
6053 * tst-backtrace1.c: New test.
6054
6055 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6056
6057 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6058 register as second parameter to the REGISTER macro.
6059 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6060 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6061 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6062 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6063 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6064 of thread register as second parameter to REGISTER macro in 64 case.
6065
6066 2004-01-03 Ulrich Drepper <drepper@redhat.com>
6067
6068 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6069 (CFLAGS-getpid.o): Defined.
6070 (CFLAGS-getpid.os): Defined.
6071
6072 2003-12-31 Ulrich Drepper <drepper@redhat.com>
6073
6074 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6075 returned for main thread does not overlap with any other VMA.
6076 Patch by Jakub Jelinek.
6077
6078 2003-12-29 Jakub Jelinek <jakub@redhat.com>
6079
6080 * tst-raise1.c: Include stdio.h.
6081
6082 2003-12-23 Jakub Jelinek <jakub@redhat.com>
6083
6084 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6085 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6086 If pid is 0, set it to selftid.
6087 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6088 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6089 != 0, return self->tid without doing a syscall.
6090 * descr.h (struct pthread): Move pid field after tid.
6091
6092 * Makefile (tests): Add tst-raise1.
6093 * tst-raise1.c: New file.
6094
6095 2003-12-23 Roland McGrath <roland@redhat.com>
6096
6097 * tst-oddstacklimit.c: New file.
6098 * Makefile (tests): Add it.
6099 (tst-oddstacklimit-ENV): New variable.
6100
6101 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6102 value up to page size for __default_stacksize.
6103
6104 2003-12-21 Ulrich Drepper <drepper@redhat.com>
6105
6106 * Makefile (tests): Add tst-eintr5.
6107 * tst-eintr5.c: New file.
6108
6109 * eintr.c (eintr_source): Prevent sending signal to self.
6110
6111 * tst-eintr2.c (tf1): Improve error message.
6112
6113 2003-12-20 Ulrich Drepper <drepper@redhat.com>
6114
6115 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6116 * sysdeps/unix/sysv/linux/getpid.c: New file.
6117 * pthread_cancel.c: Add comment explaining use of PID field.
6118 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6119 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6120 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6121 temporarily to signal the field must not be relied on and updated
6122 by getpid().
6123 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6124 temporarily negative.
6125 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6126
6127 2003-12-19 Ulrich Drepper <drepper@redhat.com>
6128
6129 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6130 (eintr_source): If ARG != NULL, use pthread_kill.
6131 * tst-eintr1.c: Adjust for this change.
6132 * tst-eintr2.c: Likewise.
6133 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6134 * tst-eintr3.c: New file.
6135 * tst-eintr4.c: New file.
6136
6137 2003-12-19 Jakub Jelinek <jakub@redhat.com>
6138
6139 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6140 if CANCELSTATE_BITMASK is set.
6141 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6142 Likewise.
6143
6144 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6145 (tests-reverse): Add tst-cancel23.
6146 * tst-cancel22.c: New test.
6147 * tst-cancel23.c: New test.
6148
6149 2003-12-18 Ulrich Drepper <drepper@redhat.com>
6150
6151 * tst-eintr1.c: Better error messages.
6152
6153 * Makefile (tests): Add tst-eintr2.
6154 * tst-eintr2.c: New file.
6155
6156 2003-12-18 Jakub Jelinek <jakub@redhat.com>
6157
6158 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6159 (CFLAGS-tst-cancelx21.c): Set.
6160 * tst-cancel21.c: New test.
6161 * tst-cancelx21.c: New test.
6162
6163 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6164 comparison operand.
6165 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6166 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6167 * pt-longjmp.c: Include jmpbuf-unwind.h.
6168 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6169 _JMPBUF_UNWINDS. Adjust compared pointers.
6170 * init.c (__pthread_initialize_minimal_internal): Initialize
6171 pd->stackblock_size.
6172 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6173 * sysdeps/alpha/jmpbuf-unwind.h: New file.
6174 * sysdeps/i386/jmpbuf-unwind.h: New file.
6175 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6176 * sysdeps/s390/jmpbuf-unwind.h: New file.
6177 * sysdeps/sh/jmpbuf-unwind.h: New file.
6178 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6179 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6180 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6181 (_JMPBUF_CFA_UNWINDS): Remove.
6182 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6183
6184 2003-12-12 Jakub Jelinek <jakub@redhat.com>
6185
6186 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6187 (CFLAGS-tst-cancelx20.c): Set.
6188 * tst-cancel20.c: New test.
6189 * tst-cancelx20.c: New test.
6190
6191 2003-12-17 Ulrich Drepper <drepper@redhat.com>
6192
6193 * init.c (__pthread_initialize_minimal_internal): Don't treat
6194 architectures with separate register stack special here when
6195 computing default stack size.
6196
6197 2003-12-17 Roland McGrath <roland@redhat.com>
6198
6199 * Makefile (tst-cancelx7-ARGS): New variable.
6200 Reportd by Greg Schafer <gschafer@zip.com.au>.
6201
6202 2003-12-17 Jakub Jelinek <jakub@redhat.com>
6203
6204 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
6205 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6206 (tst-stack3-ENV): Set.
6207 ($(objpfx)tst-stack3-mem): New.
6208 * tst-stack3.c: New test.
6209
6210 2003-12-10 David Mosberger <davidm@hpl.hp.com>
6211
6212 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6213 Add unwind directives. Drop unused .regstk directive.
6214 (_fini_EPILOG_BEGINS): Add unwind directives.
6215
6216 2003-12-11 Ulrich Drepper <drepper@redhat.com>
6217
6218 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6219 Assume parameter is a pointer.
6220 (lll_futex_wake): Likewise.
6221 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6222 Likewise.
6223 (lll_futex_wake): Likewise.
6224 Reported by Boris Hu.
6225 * sysdeps/unix/sysv/linux/unregister-atfork.c
6226 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6227
6228 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6229
6230 2003-12-10 Ulrich Drepper <drepper@redhat.com>
6231
6232 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6233 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6234 __rtld_lock_initialize for ld.so lock.
6235 Patch in part by Adam Li <adam.li@intel.com>.
6236
6237 2003-12-02 David Mosberger <davidm@hpl.hp.com>
6238
6239 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6240 in $(gnulib). Also, remove stale comment.
6241
6242 2003-11-12 David Mosberger <davidm@hpl.hp.com>
6243
6244 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6245 advantage of new syscall stub and optimize accordingly.
6246
6247 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6248 from SYS_futex, to match expectations of
6249 sysdep.h:DO_INLINE_SYSCALL.
6250 (lll_futex_clobbers): Remove.
6251 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6252 (lll_futex_wake): Likewise.
6253 (lll_futex_requeue): Likewise.
6254 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6255 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6256 Jelinek).
6257 (__lll_mutex_lock): Likewise.
6258 (__lll_mutex_cond_lock): Likewise.
6259 (__lll_mutex_timed_lock): Likewise.
6260 (__lll_mutex_unlock): Likewise.
6261 (__lll_mutex_unlock_force): Likewise.
6262
6263 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6264 comes before the include of <sysdep.h>.
6265 (THREAD_SELF_SYSINFO): New macro.
6266 (THREAD_SYSINFO): Likewise.
6267 (INIT_SYSINFO): New macro.
6268 (TLS_INIT_TP): Call INIT_SYSINFO.
6269
6270 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6271
6272 * sysdeps/pthread/createthread.c (create_thread): Use
6273 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6274 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6275 THREAD_SELF_SYSINFO instead of open code.
6276 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6277 (THREAD_SYSINFO): Likewise.
6278
6279 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6280
6281 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6282
6283 2003-12-06 Ulrich Drepper <drepper@redhat.com>
6284
6285 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6286 instead of .init. Patch by David Mosberger.
6287
6288 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
6289
6290 * sysdeps/pthread/configure.in: Remove broken declaration in C
6291 cleanup handling check.
6292
6293 2003-11-30 Andreas Jaeger <aj@suse.de>
6294
6295 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6296 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6297 Likewise.
6298
6299 2003-11-27 Jakub Jelinek <jakub@redhat.com>
6300
6301 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6302 * pthread_attr_destroy.c: Include shlib-compat.h.
6303 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6304 is set in iattr->flags.
6305 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6306
6307 2003-11-21 Jakub Jelinek <jakub@redhat.com>
6308
6309 * Makefile (distribute): Add tst-cleanup4aux.c.
6310
6311 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
6312 include.
6313
6314 2003-11-21 Ulrich Drepper <drepper@redhat.com>
6315
6316 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6317 pthread_cond_signal.
6318
6319 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6320 store mutex address if the current value is ~0l.
6321 * sysdeps/pthread/pthread_cond_timedwait.c
6322 (__pthread_cond_timedwait): Likewise.
6323 * sysdeps/pthread/pthread_cond_broadcast.c
6324 (__pthread_cond_broadcast): Don't use requeue for pshared
6325 condvars.
6326
6327 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6328 (__pthread_cond_wait): Don't store mutex address if the current
6329 value is ~0l.
6330 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6331 (__pthread_cond_timedwait): Likewise.
6332 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6333 (__pthread_cond_broadcast): Don't use requeue for pshared
6334 condvars.
6335
6336 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6337 element with ~0l for pshared condvars, with NULL otherwise.
6338
6339 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6340 (__pthread_cond_wait): Don't store mutex address if the current
6341 value is ~0l.
6342 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6343 (__pthread_cond_timedwait): Likewise.
6344 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6345 (__pthread_cond_broadcast): Don't use requeue for pshared
6346 condvars.
6347
6348 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6349 * tst-cond12.c: New file.
6350 * tst-cond13.c: New file.
6351
6352 2003-11-17 Ulrich Drepper <drepper@redhat.com>
6353
6354 * sysdeps/pthread/configure.in: Make missing forced unwind support
6355 fatal.
6356
6357 2003-11-11 Ulrich Drepper <drepper@redhat.com>
6358
6359 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6360
6361 2003-11-06 Ulrich Drepper <drepper@redhat.com>
6362
6363 * Makefile: Add magic to clean up correctly.
6364
6365 2003-11-05 Jakub Jelinek <jakub@redhat.com>
6366
6367 * unwind.c (FRAME_LEFT): Define.
6368 (unwind_stop): Handle old style cleanups here.
6369 (__pthread_unwind): Handle old style cleanups only if
6370 !HAVE_FORCED_UNWIND.
6371 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6372 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6373 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6374 ($(objpfx)tst-cleanupx4): Likewise.
6375 * tst-cleanup4.c: New test.
6376 * tst-cleanup4aux.c: New.
6377 * tst-cleanupx4.c: New test.
6378
6379 2003-11-04 Ulrich Drepper <drepper@redhat.com>
6380
6381 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6382 lll_mutex_*lock macros to skip atomic operations on some archs.
6383
6384 2003-11-03 Ulrich Drepper <drepper@redhat.com>
6385
6386 * sysdeps/pthread/tst-timer.c (main): Initialize
6387 sigev2.sigev_value as well.
6388
6389 2003-10-15 Roland McGrath <roland@redhat.com>
6390
6391 * sysdeps/pthread/configure.in: Barf if visibility attribute support
6392 is missing.
6393 * sysdeps/pthread/configure: Regenerated.
6394
6395 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6396
6397 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6398 locking macros. No distinction between normal and mutex locking
6399 anymore.
6400 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6401 Merge bits from lowlevelmutex.S we still need.
6402 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6403 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6404 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6405 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6406 new mutex implementation.
6407 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6408 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6409 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6410 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6411 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6412 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6413 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6414 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6415 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6416 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6417 symbol for entry point to avoid cancellation.
6418
6419 2003-10-07 Jakub Jelinek <jakub@redhat.com>
6420
6421 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6422 changes.
6423 (SAVE_OLDTYPE_0): Fix a typo.
6424
6425 2003-10-03 Ulrich Drepper <drepper@redhat.com>
6426
6427 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6428 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
6429
6430 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6431
6432 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6433 correct offset.
6434
6435 2003-10-02 Jakub Jelinek <jakub@redhat.com>
6436
6437 * Makefile (tests): Add tst-cancel19.
6438 * tst-cancel19.c: New test.
6439
6440 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6441
6442 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6443 restoring of the old cancellation type.
6444
6445 2003-09-30 Jakub Jelinek <jakub@redhat.com>
6446
6447 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6448
6449 2003-09-27 Wolfram Gloger <wg@malloc.de>
6450
6451 * sysdeps/pthread/malloc-machine.h: New file
6452
6453 2003-09-24 Roland McGrath <roland@redhat.com>
6454
6455 * allocatestack.c (__make_stacks_executable): Don't ignore return
6456 value from _dl_make_stack_executable.
6457
6458 2003-09-24 Ulrich Drepper <drepper@redhat.com>
6459
6460 * allocatestack.c (__make_stacks_executable): Also change
6461 permission of the currently unused stacks.
6462
6463 * allocatestack.c (change_stack_perm): Split out from
6464 __make_stacks_executable.
6465 (allocate_stack): If the required permission changed between the time
6466 we started preparing the stack and queueing it, change the permission.
6467 (__make_stacks_executable): Call change_stack_perm.
6468
6469 * Makefile: Build tst-execstack-mod locally.
6470 * tst-execstack-mod.c: New file.
6471
6472 2003-09-23 Jakub Jelinek <jakub@redhat.com>
6473
6474 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6475
6476 2003-09-23 Roland McGrath <roland@redhat.com>
6477
6478 * tst-execstack.c: New file.
6479 * Makefile (tests): Add it.
6480 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6481 (LDFLAGS-tst-execstack): New variable.
6482
6483 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6484 whether to use PROT_EXEC for stack mmap.
6485 (__make_stacks_executable): New function.
6486 * pthreadP.h: Declare it.
6487 * init.c (__pthread_initialize_minimal_internal): Set
6488 GL(dl_make_stack_executable_hook) to that.
6489
6490 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6491
6492 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6493 recommendation from AMD re avoidance of lock prefix.
6494
6495 2003-09-22 Jakub Jelinek <jakub@redhat.com>
6496
6497 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6498 lll_futex_timed_wait instead of lll_futex_wait.
6499 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6500 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6501 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6502 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6503 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6504 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6505 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6506 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6507 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6508 Completely revamp the locking macros. No distinction between
6509 normal and mutex locking anymore.
6510 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6511 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6512 __lll_lock_timedwait): Fix prototypes.
6513 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6514 __lll_lock_timedwait): Likewise.
6515 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6516 macros, add __builtin_expect.
6517 (lll_mutex_timedlock): Likewise. Fix return value.
6518 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6519 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6520 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6521 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6522 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6523 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6524 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6525 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6526
6527 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6528
6529 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6530 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6531 operation if possible.
6532
6533 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6534 like jumping over the lock prefix.
6535
6536 2003-09-21 Ulrich Drepper <drepper@redhat.com>
6537
6538 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6539 locking macros. No distinction between normal and mutex locking
6540 anymore.
6541 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6542 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6543 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6544 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6545 locking. Merge bits from lowlevelmutex.S we still need.
6546 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6547 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6548 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6549 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6550 * Makefile (routines): Remove libc-lowlevelmutex.
6551 (libpthread-rountines): Remove lowlevelmutex.
6552 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6553 for new mutex implementation.
6554 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6555 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6556 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6557 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6558 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6559 Likewise.
6560 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6561 Likewise.
6562 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6563 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6564 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6565 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6566 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6567 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6568 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6569 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6570 Likewise.
6571 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6572 Likewise.
6573 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6574 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6575 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6576 Don't use requeue.
6577 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6578 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6579
6580 2003-09-20 Ulrich Drepper <drepper@redhat.com>
6581
6582 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6583 in parameters of asm with output parameters.
6584
6585 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6586 type of DECR parameter to int.
6587 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6588
6589 2003-09-18 Jakub Jelinek <jakub@redhat.com>
6590
6591 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6592 guardsize for each thread.
6593
6594 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6595
6596 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6597 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6598 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6599
6600 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6601 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6602 NULL.
6603 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6604 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6605 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6606 (pthread_getaffinity_np): Add hidden_def.
6607
6608 * Makefile (tests): Add tst-attr3.
6609 * tst-attr3.c: New test.
6610
6611 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6612
6613 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6614
6615 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6616 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6617
6618 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6619
6620 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6621 * tst-align.c: Include tst-stack-align.h.
6622 (tf, do_test): Use TEST_STACK_ALIGN macro.
6623
6624 2003-09-17 Ulrich Drepper <drepper@redhat.com>
6625
6626 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6627 variable.
6628
6629 2003-09-16 Ulrich Drepper <drepper@redhat.com>
6630
6631 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6632 stack-related values for the initial thread.
6633
6634 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6635
6636 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6637
6638 2003-09-11 Ulrich Drepper <drepper@redhat.com>
6639
6640 * pthread_mutex_lock.c: Minor code rearrangements.
6641
6642 2003-09-05 Roland McGrath <roland@redhat.com>
6643
6644 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6645 Instead, include ../nptl_db/db_info.c to do its magic.
6646 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6647 (__pthread_pthread_key_2ndlevel_size): Likewise.
6648 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6649 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6650 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6651 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6652 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6653 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6654 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6655 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6656 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6657 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6658 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6659 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6660 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6661 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6662 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6663 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6664 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6665
6666 2003-09-08 Ulrich Drepper <drepper@redhat.com>
6667
6668 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6669 of pthread_t to be compatible with LT.
6670 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6671 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6672 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6673 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6674 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6675 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6676 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6677
6678 2003-09-04 Ulrich Drepper <drepper@redhat.com>
6679
6680 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6681
6682 2003-09-04 Jakub Jelinek <jakub@redhat.com>
6683
6684 * unwind-forcedunwind.c: Move to...
6685 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6686 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6687 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6688 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6689 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6690 * unwind.c: Include jmpbuf-unwind.h.
6691 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6692
6693 2003-09-02 Jakub Jelinek <jakub@redhat.com>
6694
6695 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6696 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6697 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6698 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6699 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6700 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6701 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6702 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6703 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6704 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6705 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6706 function.
6707 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6708 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6709 * Makefile (tests): Add tst-stack2.
6710 * tst-stack2.c: New test.
6711 * tst-stack1.c: Include limits.h and sys/param.h.
6712 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6713
6714 * pthread_condattr_setpshared.c: Include errno.h.
6715 (pthread_condattr_setpshared): Return EINVAL if pshared
6716 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6717
6718 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6719 defined symbol for entry point to avoid cancellation.
6720 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6721 Likewise.
6722 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6723 Likewise.
6724 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6725 Likewise.
6726 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6727 Likewise.
6728 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6729 Likewise.
6730 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6731 __close_nocancel, __read_nocancel, __write_nocancel,
6732 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6733 libpthread.so or librt.so, define to corresponding function
6734 without _nocancel suffix.
6735 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6736 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6737 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6738
6739 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6740
6741 2003-09-02 Ulrich Drepper <drepper@redhat.com>
6742
6743 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6744 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6745
6746 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6747 in subsections has a symbol associated with it.
6748
6749 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6750 defined symbol for entry point to avoid cancellation.
6751 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6752
6753 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6754
6755 * Makefile (tests): Add tst-tls5.
6756 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6757 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6758 ($(objpfx)tst-tls5): New.
6759 ($(objpfx)tst-tls6.out): Likewise.
6760 (tests): Depend on $(objpfx)tst-tls6.out.
6761 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6762 (do_test): Check pthread_self () return value alignment.
6763 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6764 (tf): Check pthread_self () return value alignment.
6765 * tst-tls5.c: New test.
6766 * tst-tls5.h: New.
6767 * tst-tls5mod.c: New.
6768 * tst-tls5moda.c: New.
6769 * tst-tls5modb.c: New.
6770 * tst-tls5modc.c: New.
6771 * tst-tls5modd.c: New.
6772 * tst-tls5mode.c: New.
6773 * tst-tls5modf.c: New.
6774 * tst-tls6.sh: New test.
6775
6776 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6777 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6778 * init.c (pthread_functions): Initialize them.
6779 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6780 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6781 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6782 pthread_cond_timedwait@@GLIBC_2.3.2.
6783
6784 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6785
6786 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6787 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6788 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6789 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6790 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6791 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6792
6793 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6794
6795 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6796 _POSIX_THREAD_PRIORITY_SCHEDULING.
6797 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6798
6799 2003-08-31 Ulrich Drepper <drepper@redhat.com>
6800
6801 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6802 nested function, use static inline function from libio.h.
6803 Code by Richard Henderson.
6804
6805 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6806 weak.
6807
6808 2003-08-30 Jakub Jelinek <jakub@redhat.com>
6809
6810 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6811 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6812 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6813 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6814 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6815 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6816 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6817 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6818 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6819 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6820 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6821 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6822 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6823 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6824 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6825 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6826 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6827 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6828 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6829 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6830 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6831 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6832 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6833 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6834 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6835 * sysdeps/sparc/tls.h: New file.
6836 * sysdeps/sparc/tcb-offsets.sym: New file.
6837 * sysdeps/sparc/Makefile: New file.
6838 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6839 * init.c [__sparc__] (__NR_set_tid_address): Define.
6840
6841 2003-08-29 Jakub Jelinek <jakub@redhat.com>
6842
6843 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6844 _IO_release_lock): Define.
6845
6846 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
6847
6848 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6849 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6850
6851 2003-08-27 Ulrich Drepper <drepper@redhat.com>
6852
6853 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6854 (__pthread_cleanup_class): Add missing return types of member
6855 functions.
6856
6857 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6858
6859 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6860 (lll_mutex_unlock_force): Add memory barrier between store and futex
6861 syscall.
6862
6863 2003-08-25 Ulrich Drepper <drepper@redhat.com>
6864
6865 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6866 tempmsg in first loop.
6867
6868 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6869
6870 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6871 _POSIX_THREAD_PRIORITY_SCHEDULING.
6872 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6873
6874 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6875
6876 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6877 (__rtld_lock_default_lock_recursive,
6878 __rtld_lock_default_unlock_recursive): Define.
6879 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6880 __rtld_lock_unlock_recursive): Define using
6881 GL(_dl_rtld_*lock_recursive).
6882 * init.c (__pthread_initialize_minimal_internal): Initialize
6883 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6884 Lock GL(_dl_load_lock) the same number of times as
6885 GL(_dl_load_lock) using non-mt implementation was nested.
6886
6887 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6888 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6889
6890 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6891
6892 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6893 PIPE_BUF.
6894
6895 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6896
6897 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6898
6899 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6900
6901 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6902 to first syscall error check. Move syscall error check for tkill
6903 into __ASSUME_CLONE_STOPPED #ifdef.
6904
6905 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6906
6907 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6908 is not defined, do explicit synchronization.
6909 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6910 is not defined also unlock pd->lock for non-debugging case in case
6911 it is necessary.
6912 * pthread_create.c (start_thread): Always get and release pd->lock
6913 if __ASSUME_CLONE_STOPPED is not defined.
6914 (start_thread_debug): Removed. Adjust users.
6915 * allocatestack.c (allocate_stack): Always initialize lock if
6916 __ASSUME_CLONE_STOPPED is not defined.
6917 * Makefile (tests): Add tst-sched1.
6918 * tst-sched1.c: New file.
6919
6920 * sysdeps/pthread/createthread.c (do_clone): Only use
6921 sched_setschduler and pass correct parameters.
6922
6923 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6924
6925 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6926 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6927 PTHREAD_STACK_MIN in comments.
6928
6929 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6930
6931 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6932 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6933 argument.
6934 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6935 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6936 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6937 (__pthread_cleanup_upto): Fix prototype.
6938 (_longjmp_unwind): Adjust caller.
6939 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6940 Change second argument to const struct pointer.
6941 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6942 * tst-sem9.c (main): Likewise.
6943 * unwind.c: Include string.h for strlen prototype.
6944
6945 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6946
6947 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6948 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6949 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6950 Define HAVE_CMOV.
6951 Patch by Nicholas Miell <nmiell@attbi.com>.
6952
6953 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6954
6955 * init.c (__pthread_initialize_minimal_internal): Initialize
6956 GL(dl_init_static_tls).
6957 * pthreadP.h (__pthread_init_static_tls): New prototype.
6958 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6959 New functions.
6960 * Makefile (tests): Add tst-tls4.
6961 (modules-names): Add tst-tls4moda and tst-tls4modb.
6962 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6963 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6964 tst-tls4modb.so.
6965 * tst-tls4.c: New file.
6966 * tst-tls4moda.c: New file.
6967 * tst-tls4modb.c: New file.
6968
6969 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6970
6971 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6972 before __timer_dealloc.
6973 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6974 Don't call list_unlink.
6975
6976 2003-07-29 Roland McGrath <roland@redhat.com>
6977
6978 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6979
6980 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6981
6982 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6983 Don't reuse struct aiocb A if it failed.
6984 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6985 not just one byte, as that does not block.
6986
6987 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6988
6989 * sysdeps/pthread/unwind-resume.c: New file.
6990 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6991 unwind-resume in csu subdir.
6992 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6993 exceptions.
6994 (librt-sysdep_routines, librt-shared-only-routines): Add
6995 rt-unwind-resume.
6996 * sysdeps/pthread/rt-unwind-resume.c: New file.
6997 * unwind-forcedunwind.c: New file.
6998 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6999 (libpthread-shared-only-routines): Likewise.
7000 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7001 * pthreadP.h (pthread_cancel_init): New prototype.
7002 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7003
7004 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7005 attr argument const struct pthread_attr *.
7006
7007 * res.c (__res_state): Return __resp.
7008 * descr.h: Include resolv.h.
7009 (struct pthread): Add res field.
7010 * pthread_create.c: Include resolv.h.
7011 (start_thread): Initialize __resp.
7012 * Makefile (tests): Add tst-_res1.
7013 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7014 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7015 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7016 libpthread.
7017 * tst-_res1.c: New file.
7018 * tst-_res1mod1.c: New file.
7019 * tst-_res1mod2.c: New file.
7020
7021 2003-07-21 Ulrich Drepper <drepper@redhat.com>
7022
7023 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7024
7025 * Makefile: Define various *-no-z-defs variables for test DSOs
7026 which has undefined symbols.
7027
7028 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7029
7030 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7031 Retry if the stwcx fails to store once_control.
7032
7033 2003-07-20 Ulrich Drepper <drepper@redhat.com>
7034
7035 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7036 pthread_attr_setaffinity.
7037 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7038 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7039 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7040 * pthread_attr_destroy.c: Free cpuset element if allocated.
7041 * pthread_create.c: Pass iattr as additional parameter to
7042 create_thread.
7043 * sysdeps/pthread/createthread.c: If attribute is provided and
7044 a new thread is created with affinity set or scheduling parameters,
7045 start thread with CLONE_STOPPED.
7046 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7047 pthread_attr_setaffinity.
7048 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7049 cpuset element.
7050
7051 2003-07-15 Ulrich Drepper <drepper@redhat.com>
7052
7053 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7054
7055 2003-07-14 Ulrich Drepper <drepper@redhat.com>
7056
7057 * sysdeps/pthread/configure.in: Require CFI directives also for
7058 ppc and s390.
7059
7060 2003-07-15 Jakub Jelinek <jakub@redhat.com>
7061
7062 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7063 Add cfi directives.
7064
7065 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7066
7067 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7068 CLEANUP_JMP_BUF.
7069 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7070 registers as variables. Call __pthread_mutex_unlock_usercnt.
7071 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7072 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7073 not self pointer in __writer. Compare with TID to determine
7074 deadlocks.
7075 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7076 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7077 Likewise.
7078 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7079 Likewise.
7080 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7081 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7082 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7083 macros also when compiling librt.
7084
7085 2003-07-11 Jakub Jelinek <jakub@redhat.com>
7086
7087 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7088 -fasynchronous-unwind-tables.
7089 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7090 (PSEUDO): Add cfi directives.
7091 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7092 Likewise.
7093 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7094 Likewise.
7095
7096 2003-07-08 Jakub Jelinek <jakub@redhat.com>
7097
7098 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7099 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7100 * unwind.c (__pthread_unwind_next): Add hidden_def.
7101 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7102 Likewise.
7103 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7104 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7105 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7106 Likewise.
7107 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7108 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7109 Likewise.
7110 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7111 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7112 __pthread_unregister_cancel and __pthread_unwind_next.
7113
7114 2003-07-04 Jakub Jelinek <jakub@redhat.com>
7115
7116 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7117 different symbol for the cancellation syscall wrapper and
7118 non-cancellation syscall wrapper.
7119 (PSEUDO_END): Define.
7120
7121 2003-07-05 Richard Henderson <rth@redhat.com>
7122
7123 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7124 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7125 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7126 return actual return value from the syscall, not 0.
7127
7128 2003-07-07 Ulrich Drepper <drepper@redhat.com>
7129
7130 * descr.h (struct pthread): Add pid field.
7131 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7132 (__reclaim_stacks): Likewise.
7133 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7134 also check for PID of the signal source.
7135 (__pthread_initialize_minimal_internal): Also initialize pid field
7136 of initial thread's descriptor.
7137 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7138 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7139 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7140 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7141 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7142
7143 2003-07-05 Ulrich Drepper <drepper@redhat.com>
7144
7145 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7146 Fix use of parameter.
7147 (__libc_cleanup_pop): Likewise.
7148
7149 2003-07-04 Ulrich Drepper <drepper@redhat.com>
7150
7151 * init.c (sigcancel_handler): Change parameters to match handler
7152 for SA_SIGACTION. Check signal number and code to recognize
7153 invalid invocations.
7154
7155 2003-07-03 Roland McGrath <roland@redhat.com>
7156
7157 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7158 Apply sizeof (struct pthread) bias to r13 value.
7159
7160 2003-07-03 Ulrich Drepper <drepper@redhat.com>
7161
7162 * sysdeps/pthread/configure.in: Require CFI directives.
7163
7164 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7165 definition.
7166 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7167 libpthread compilation.
7168 * unwind.c (__pthread_unwind): Add hidden_def.
7169 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7170
7171 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7172
7173 * libc-cancellation.c (__libc_cleanup_routine): Define.
7174 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7175 (__pthread_cleanup_pop): Define.
7176
7177 2003-07-01 Richard Henderson <rth@redhat.com>
7178
7179 * sysdeps/alpha/elf/pt-initfini.c: New file.
7180 * sysdeps/alpha/pthread_spin_lock.S: New file.
7181 * sysdeps/alpha/pthread_spin_trylock.S: New file.
7182 * sysdeps/alpha/pthreaddef.h: New file.
7183 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7184 * sysdeps/alpha/tls.h: New file.
7185 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7186 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7187 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7188 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7189 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7190 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7191 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7192 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7193 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7194 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7195
7196 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7197
7198 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7199 cleanup support and unwind info.
7200
7201 2003-06-30 Ulrich Drepper <drepper@redhat.com>
7202
7203 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7204 Use correct cleanup handler registration. Add unwind info.
7205 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7206 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
7207 * tst-once3.c: Add cleanup handler and check it is called.
7208 * tst-once4.c: Likewise.
7209 * tst-oncex3.c: New file.
7210 * tst-oncex4.c: New file.
7211 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7212
7213 2003-06-29 Ulrich Drepper <drepper@redhat.com>
7214
7215 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7216
7217 2003-06-27 Ulrich Drepper <drepper@redhat.com>
7218
7219 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7220 (tf_msgsnd): Likewise.
7221
7222 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7223 premature returns a bit more.
7224
7225 2003-06-26 Ulrich Drepper <drepper@redhat.com>
7226
7227 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7228 definition to the front.
7229
7230 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7231 the cleanup functions to make the names unique. Fix dwarf opcode
7232 un unwind table.
7233 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7234 functions to make the names unique. Fix CFA offset for two blocks.
7235
7236 2003-06-25 Ulrich Drepper <drepper@redhat.com>
7237
7238 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7239 missing closing braces.
7240 Patch by Christophe Saout <christophe@saout.de>.
7241
7242 2003-06-24 Roland McGrath <roland@redhat.com>
7243
7244 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7245
7246 2003-06-24 Ulrich Drepper <drepper@redhat.com>
7247
7248 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7249 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7250
7251 * pthreadP.h: Declare __find_thread_by_id.
7252 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7253 * pthread_clock_gettime.c: Allow using other thread's clock.
7254 * pthread_clock_settime.c: Likewise.
7255 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7256 * Makefile: Add rules to build and run tst-clock2.
7257 * tst-clock2.c: New file.
7258
7259 2003-06-23 Ulrich Drepper <drepper@redhat.com>
7260
7261 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7262 to use exception-based cleanup handler.
7263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7264
7265 * tst-cond8.c (ch): Announce that we are done.
7266
7267 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7268
7269 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7270 Also test aio_suspend with timeout value.
7271
7272 2003-06-22 Ulrich Drepper <drepper@redhat.com>
7273
7274 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7275 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7276 attribute_hidden.
7277
7278 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7279 (__pthread_mutex_lock_internal): Likewise.
7280 (__pthread_mutex_unlock_internal): Likewise.
7281 (__pthread_mutex_unlock_usercnt): Declare.
7282 * pthread_mutex_destroy.c: Always fail if used in any way.
7283 * pthread_mutex_init.c: Update comment.
7284 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7285 * pthread_mutex_timedlock.c: Adjust __nusers.
7286 * pthread_mutex_trylock.c: Adjust __nusers.
7287 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7288 and public interfaces are wrapper with pass additional parameter.
7289 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7290 parameter zero.
7291 * tst-mutex8.c: New file.
7292 * Makefile (tests): Add tst-mutex8.
7293 * sysdeps/pthread/pthread_cond_timedwait.c: Call
7294 __pthread_mutex_unlock_usercnt.
7295 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7296 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7297 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7298 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7299 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7300 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7301 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7302 Add __nusers.
7303 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7304 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7305 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7306 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7307 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7308
7309 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7310 * pthread_mutex_timedlock.c: Likewise.
7311 * pthread_mutex_trylock.c: Adjust __nusers.
7312 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7313 * tst-mutex9.c: New file.
7314 * Makefile (tests): Add tst-mutex9.
7315 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7316 * sysdeps/ia64/tls.h: Likewise.
7317 * sysdeps/powerpc/tls.h: Likewise.
7318 * sysdeps/s390/tls.h: Likewise.
7319 * sysdeps/sh/tls.h: Likewise.
7320 * sysdeps/x86_64/tls.h: Likewise.
7321 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7322 Change type of __owner.
7323 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7324 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7325 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7326 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7327 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7328
7329 2003-06-19 Jakub Jelinek <jakub@redhat.com>
7330
7331 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7332 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7333
7334 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7335 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
7336 instead of nr to lll_futex_wake. Only set errno and return -1
7337 if err < 0.
7338
7339 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7340 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7341 return actual return value from the syscall, not 0.
7342
7343 2003-06-18 Ulrich Drepper <drepper@redhat.com>
7344
7345 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7346 find a random value.
7347 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7348 errno==EIDRM.
7349
7350 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7351 compat_timer_settime.
7352 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7353 compat_timer_gettime.
7354 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7355 compat_timer_getoverrun.
7356 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7357 compat_timer_delete.
7358
7359 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7360 error-checking mutex detect busy mutexes.
7361
7362 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7363
7364 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7365 Add ax to clobber list.
7366 (lll_mutex_cond_lock): Likewise.
7367 (lll_mutex_unlock): Likewise.
7368 (lll_lock): Likewise.
7369 (lll_unlock): Likewise.
7370
7371 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7372 * tst-cancel18.c: New file.
7373 * tst-cancelx18.c: New file.
7374
7375 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7376 and tcdrain.
7377
7378 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7379 * tst-cancel17.c: New file.
7380 * tst-cancelx17.c: New file.
7381
7382 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7383 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7384 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7385
7386 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7387
7388 2003-06-16 Jakub Jelinek <jakub@redhat.com>
7389
7390 * sysdeps/pthread/createthread.c (create_thread): Set
7391 header.multiple_threads unconditionally.
7392 * allocatestack.c (allocate_stack): Likewise.
7393 * descr.h (struct pthread): Add header.multiple_threads
7394 unconditionally.
7395 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7396 Define for librt. #error if neither libpthread, libc nor librt.
7397 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7398 Likewise.
7399 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7400 CDISABLE): Likewise.
7401 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7402 CDISABLE): Likewise.
7403 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7404 CDISABLE): Likewise.
7405 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7406 CDISABLE): Likewise. Access header.multiple_threads outside of
7407 libc and libpthread.
7408 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7409 Likewise.
7410 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7411 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7412
7413 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7414
7415 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7416 Also test early cancellation before the thread reaches the cancellation
7417 point.
7418
7419 * Makefile: Compile forward.c with exceptions.
7420
7421 * sysdeps/unix/sysv/linux/sleep.c: New file.
7422
7423 2003-06-16 Ulrich Drepper <drepper@redhat.com>
7424
7425 * Makefile: Add CFLAGS definition to compile function wrappers
7426 duplicated from libc with exceptions.
7427 * tst-cancel4.c: Also check cancellation handlers.
7428
7429 * Makefile: Add rules to build and run tst-cancel16 and
7430 tst-cancelx16. Add missing CFLAGS definitions.
7431 * tst-cancel16.c: New file.
7432 * tst-cancelx16.c: New file.
7433
7434 2003-06-15 Ulrich Drepper <drepper@redhat.com>
7435
7436 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7437 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7438 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7439 (DL_SYSINFO_IMPLEMENTATION): Likewise.
7440
7441 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7442 (LIBC_CANCEL_RESET): Likewise.
7443 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7444 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7445 librt-cancellation.
7446 (CFLAGS-libcrt-cancellation.c): Define.
7447 * sysdeps/pthread/librt-cancellation.c: New file.
7448 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7449 macros also when compiling librt.
7450 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7451 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7452 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7453 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7454 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7455 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7456 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7457
7458 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7459 compat_timer_create.
7460
7461 2003-06-14 Ulrich Drepper <drepper@redhat.com>
7462
7463 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7464
7465 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7466 __register_atfork.
7467 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7468 Add libc_hidden_def.
7469
7470 2003-06-13 Roland McGrath <roland@redhat.com>
7471
7472 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7473 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7474
7475 2003-06-11 Ulrich Drepper <drepper@redhat.com>
7476
7477 * allocatestack.c (queue_stack): Always inline.
7478 * ptreadhP.h (__do_cancel): Likewise.
7479
7480 2003-06-10 Jakub Jelinek <jakub@redhat.com>
7481
7482 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7483 a typo.
7484
7485 2003-06-10 Ulrich Drepper <drepper@redhat.com>
7486
7487 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7488 (__pthread_cond_signal): Remove incorrect second addition for
7489 cond_lock!=0.
7490
7491 2003-06-09 Ulrich Drepper <drepper@redhat.com>
7492
7493 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7494 (__pthread_cond_signal): Use correct futex pointer in
7495 __lll_mutex_lock_wait call.
7496
7497 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7498 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7499
7500 2003-06-08 Ulrich Drepper <drepper@redhat.com>
7501
7502 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7503 cancelable.
7504 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7505 Likewise.
7506
7507 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7508 hand-written CFI generation code. Since ENTRY/END also initiated
7509 CFI frames this caused two CFI sets to be generated.
7510
7511 2003-06-07 Ulrich Drepper <drepper@redhat.com>
7512
7513 * cleanup_routine.c: New file.
7514 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7515 * sysdeps/pthread/pthread.h: Add support for fully exception-based
7516 cleanup handling.
7517 * Makefile (libpthread-routines): Add cleanup_routine.
7518 Add more CFLAGS variables to compile with exceptions. Add comments
7519 why which file needs unwind tables.
7520 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7521 tests.
7522 * tst-cancelx1.c: New file.
7523 * tst-cancelx2.c: New file.
7524 * tst-cancelx3.c: New file.
7525 * tst-cancelx4.c: New file.
7526 * tst-cancelx5.c: New file.
7527 * tst-cancelx6.c: New file.
7528 * tst-cancelx7.c: New file.
7529 * tst-cancelx8.c: New file.
7530 * tst-cancelx9.c: New file.
7531 * tst-cancelx10.c: New file.
7532 * tst-cancelx11.c: New file.
7533 * tst-cancelx12.c: New file.
7534 * tst-cancelx13.c: New file.
7535 * tst-cancelx14.c: New file.
7536 * tst-cancelx15.c: New file.
7537 * tst-cleanupx0.c: New file.
7538 * tst-cleanupx0.expect: New file.
7539 * tst-cleanupx1.c: New file.
7540 * tst-cleanupx2.c: New file.
7541 * tst-cleanupx3.c: New file.
7542
7543 * tst-cleanup0.c: Make standard compliant.
7544 * tst-cleanup1.c: Likewise.
7545
7546 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7547 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7548 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7549 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7550 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7551 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7552 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7553 CLEANUP_JMP_BUF.
7554 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7555 * tst-cancel12.c: New file.
7556 * tst-cancel13.c: New file.
7557 * tst-cancel14.c: New file.
7558 * tst-cancel15.c: New file.
7559 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7560 and tst-cancel15.
7561
7562 * tst-cancel1.c: Add some comments.
7563
7564 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7565 timeout correctly.
7566
7567 2003-06-06 Ulrich Drepper <drepper@redhat.com>
7568
7569 * Makefile (CFLAGS-pthread_cancel.c): Define.
7570
7571 2003-06-05 Ulrich Drepper <drepper@redhat.com>
7572
7573 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7574 Change type of __writer element to int.
7575 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7576 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7577 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7578 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7579 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7580 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7581 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7582 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7583 Compare with TID to determine deadlocks.
7584 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7585 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7586 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7587 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7588 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7589 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7590 Likewise.
7591 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7592 Likewise.
7593 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7594 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7595 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7596 Likewise.
7597 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7598 Likewise.
7599 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7600 * Makefile (tests): Add tst-rwlock12.
7601 * tst-rwlock12.c: New file.
7602
7603 2003-06-05 Jakub Jelinek <jakub@redhat.com>
7604
7605 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7606 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7607 Remove bogus hidden_proto.
7608 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7609 Likewise.
7610 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7611 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7612 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7613 ___lll_mutex_timedlock): Likewise.
7614
7615 2003-06-04 Ulrich Drepper <drepper@redhat.com>
7616
7617 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7618 (__pthread_cond_signal): Add some code to eventually handle
7619 cond_lock!=0.
7620
7621 2003-06-01 Ulrich Drepper <drepper@redhat.com>
7622
7623 * Makefile (tests): Add tst-exec4.
7624 (tst-exec4-ARGS): Define.
7625 * tst-exec4.c: New file.
7626
7627 2003-05-31 Ulrich Drepper <drepper@redhat.com>
7628
7629 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7630 Also fail if tv_nsec < 0.
7631 (__lll_timedwait_tid): Likewise.
7632 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7633 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7634 Likewise.
7635 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7636 Likewise.
7637 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7638 Likewise.
7639 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7640 Likewise.
7641 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7642 Likewise.
7643 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7644 Likewise.
7645
7646 * Makefile (tests): Add tst-sem8 and tst-sem9.
7647 * tst-sem8.c: New file.
7648 * tst-sem9.c: New file.
7649 * sem_open.c: Fix creation of in_use record if the file exists but
7650 no internal record.
7651
7652 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7653 definitions.
7654
7655 * sysdeps/pthread/timer_create.c (timer_create): In case
7656 evp==NULL, assign timer ID to sival_ptr.
7657
7658 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7659 struct pthread_unwind_buf *.
7660 (struct pthread): Likewise for cleanup_jmp_buf element.
7661
7662 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7663 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7664 * unwind.c (__pthread_unwind_next): Likewise.
7665
7666 2003-05-30 Ulrich Drepper <drepper@redhat.com>
7667
7668 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7669 (lll_futex_timed_wait): Use int for futex value parameter.
7670 (lll_futex_wake): Likewise.
7671 (lll_futex_requeue): Likewise.
7672
7673 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7674 Replace one memory operation with one register operation.
7675
7676 * tst-join4.c (do_test): Fix error message.
7677
7678 * tst-rwlock6.c (do_test): Use correct format specifier.
7679
7680 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7681 (__lll_mutex_lock_wait): Replace one memory operation with one
7682 register operation.
7683 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7684 (__lll_mutex_lock_wait): Likewise.
7685
7686 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7687 (__lll_mutex_cond_lock): Add one to value parameter of
7688 __lll_lock_wait to reflect reality in the futex syscall.
7689 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7690 (lll_mutex_cond_lock): Likewise.
7691
7692 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7693
7694 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7695 New function.
7696 (lll_mutex_cond_lock): Define.
7697
7698 2003-05-29 Ulrich Drepper <drepper@redhat.com>
7699
7700 * Makefile (tests): Add tst-signal6.
7701 * tst-signal6.c: New file.
7702
7703 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7704 (__lll_mutex_unlock_force): New function
7705 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7706
7707 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7708 (__lll_mutex_unlock_force): New function.
7709 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7710
7711 * tst-rwlock7.c (do_test): Use correct format specifier.
7712
7713 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7714 Find break parameter in correct asm argument.
7715
7716 2003-05-27 Jakub Jelinek <jakub@redhat.com>
7717
7718 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7719 Remove out4.
7720 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7721 error occured.
7722 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7723 Add __mutex.
7724 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7725 lll_futex_requeue, lll_mutex_unlock_force): Define.
7726
7727 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7728
7729 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7730 (pthread_cond_t): Add __mutex.
7731 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7732 lll_futex_requeue, lll_mutex_unlock_force): Define.
7733
7734 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7735
7736 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7737 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7738 Add __mutex field.
7739 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7740 Define.
7741 (lll_futex_wait, lll_futex_wake): Define.
7742 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7743 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7744 FUTEX_REQUEUE instead of FUTEX_WAIT.
7745 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7746 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7747 mutex which was used in condvar structure. Call
7748 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7749 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7750
7751 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7752 include tcb-offsets.h. Read wakeup value in locked region.
7753 Use the value of gbr register as THREAD_ID.
7754 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7755 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7756 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7757
7758 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7759 macros.
7760
7761 2003-05-28 Ulrich Drepper <drepper@redhat.com>
7762
7763 * sysdeps/pthread/pthread_cond_broadcast.c
7764 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7765
7766 2003-05-26 Ulrich Drepper <drepper@redhat.com>
7767
7768 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7769 typo in register name.
7770 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7771 correctly. Actually use requeue. Little optimization.
7772 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7773 mutex address early. Handle cancellation state as 32-bit value.
7774 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7775 Remove unnecessary label.
7776
7777 2003-05-25 Ulrich Drepper <drepper@redhat.com>
7778
7779 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7780 instead of FUTEX_WAIT.
7781 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7782 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7783 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7784 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7785 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7786 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7787 used in condvar structure. Call __pthread_mutex_cond_lock instead
7788 of __pthread_mutex_lock_internal.
7789 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7790 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7791 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7792 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7793 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7794 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7795 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7796 Add pthread_mutex_cond_lock.
7797 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7798 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7799 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7800 lll_mutex_cond_lock.
7801 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7802 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7803 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7804 Add __mutex field.
7805 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7806 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7807
7808 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7809 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7810
7811 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7812 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7813 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7814 macro don't define aliases.
7815
7816 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7817 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7818 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7819 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7820 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7821 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7822 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7823 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7824 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7825
7826 2003-05-17 Ulrich Drepper <drepper@redhat.com>
7827
7828 * sem_open.c: Fix one endless loop. Implement correct semantics
7829 wrt opening the same semaphore more then once.
7830 * sem_close.c: Adjust for sem_open change.
7831 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7832 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7833 * Makefile (tests): Add tst-sem7.
7834 * tst-sem7.c: New file.
7835
7836 2003-05-16 Roland McGrath <roland@redhat.com>
7837
7838 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7839 uninitialized variable braino.
7840
7841 2003-05-16 Ulrich Drepper <drepper@redhat.com>
7842
7843 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7844 test for syscall availability.
7845
7846 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7847 __no_posix_timers to -1 if the syscalls don't exist.
7848
7849 * pthread_join.c (pthread_join): Set tid field of the joined
7850 thread to -1. This isn't necessary but helps to recognize some
7851 error conditions with almost no cost.
7852
7853 * allocatestack.c (FREE_P): Also negative values indicate an
7854 unused stack.
7855
7856 * unwind.c: Include <unistd.h>.
7857
7858 2003-05-14 Ulrich Drepper <drepper@redhat.com>
7859
7860 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7861
7862 2003-05-14 Jakub Jelinek <jakub@redhat.com>
7863
7864 * Makefile (crti-objs, crtn-objs): New variables.
7865 (omit-deps, extra-objs): Add crtn.
7866 ($(objpfx)libpthread.so): Depend on both crti and crtn
7867 and links to them in multidir.
7868 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7869
7870 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7871
7872 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7873 (lll_mutex_unlock): Use atomic_exchange_rel.
7874
7875 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7876
7877 * cond-perf.c (cons): Add missing locking around setting of alldone.
7878
7879 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7880
7881 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7882 related macros.
7883 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7884
7885 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7886
7887 * tst-sem6.c: New file.
7888 * Makefile (tests): Add tst-sem6.
7889
7890 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7891 Use atomic_exchange_rel instead of atomic_exchange.
7892 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7893 Likewise.
7894
7895 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7896 code for lll_futex_wait and lll_futex_wake in static apps. Use
7897 vsyscall is possible.
7898
7899 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7900 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7901 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7902 pthread_setaffinity_np.
7903 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7904 and pthread_setaffinity_np.
7905 * Makefile (libpthread-routines): Add pthread_getaffinity and
7906 pthread_setaffinity.
7907
7908 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7909 use it in case mmap to allocate the stack fails.
7910 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7911 ARCH_MAP_FLAGS here.
7912 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7913 ARCH_RETRY_MMAP.
7914
7915 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7916
7917 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7918 handler implementation. It is now lockless in fork().
7919 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7920 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7921 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7922 declare the __fork_*_lists.
7923 (struct fork_handler): Include pointers to all three functions.
7924 Add next, refcntr and need_signal elements.
7925 (__fork_handlers): New declaration.
7926 (__register_atfork_malloc): Remove declaration.
7927 (HAVE_register_atfork_malloc): Remove definition.
7928 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7929 __pthread_child_handler variable.
7930 (__libc_pthread_init): Use __register_atfork instead of explicitly
7931 adding to the list.
7932 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7933 and lll_futex_wake.
7934 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7935
7936 * unwind.c (unwind_cleanup): Print error message and then abort. This
7937 function must never be reached.
7938
7939 * cond-perf.c: New file.
7940
7941 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7942
7943 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7944
7945 2003-05-04 Roland McGrath <roland@redhat.com>
7946
7947 * Makefile ($(objpfx)../libc.so): New target.
7948
7949 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7950
7951 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7952 (pthread_condattr_t): Size is only an int, don't use long for
7953 alignment.
7954 (pthread_mutexattr_t): Likewise.
7955 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7956 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7957 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7958
7959 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7960
7961 * sysdeps/i386/tls.h: Define THREAD_ID.
7962 * sysdeps/ia64/tls.h: Likewise.
7963 * sysdeps/powerpc/tls.h: Likewise.
7964 * sysdeps/s390/tls.h: Likewise.
7965 * sysdeps/sh/tls.h: Likewise.
7966 * sysdeps/x86_64/tls.h: Likewise.
7967 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7968 record ownership.
7969 * pthread_mutex_timedlock.c: Likewise.
7970 * pthread_mutex_trylock.c: Likewise.
7971 * pthread_mutex_unlock.c: Likewise.
7972 * pthread_rwlock_trywrlock.c: Likewise.
7973 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7974 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7975 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7976 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7977
7978 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7979 flag.
7980
7981 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7982
7983 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7984 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7985 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7986 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7987 Make __align long long instead of long.
7988 (pthread_rwlock_t): Formatting.
7989 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7990 (pthread_rwlock_t): Formatting.
7991 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7992 (pthread_cond_t): Make __align long long instead of long.
7993 (pthread_rwlock_t): Move __flags field to the same position as in
7994 linuxthreads.
7995
7996 2003-04-30 Ulrich Drepper <drepper@redhat.com>
7997
7998 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7999 * tst-rwlock7.c (do_test): Likewise.
8000
8001 2003-04-26 Roland McGrath <roland@redhat.com>
8002
8003 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8004
8005 2003-04-22 Jakub Jelinek <jakub@redhat.com>
8006
8007 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8008 sizeof (struct pthread).
8009 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8010 1 struct pthread.
8011 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8012 to 0.
8013 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8014 struct pthread.
8015 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8016 to 32-bit bytes.
8017 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8018 tcbp.
8019 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8020 unneccessarily.
8021 (NO_TLS_OFFSET): Define.
8022 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8023 add TLS_TCB_SIZE unnecessarily.
8024
8025 2003-04-22 Roland McGrath <roland@redhat.com>
8026
8027 * Makeconfig (shared-thread-library): Reverse link order to work
8028 around linker bug.
8029
8030 2003-04-22 Ulrich Drepper <drepper@redhat.com>
8031
8032 * semaphore.h: Fix typo in comment.
8033
8034 2003-04-21 Ulrich Drepper <drepper@redhat.com>
8035
8036 * sysdeps/pthread/sigfillset.c: New file.
8037
8038 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8039 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8040 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8041 * sysdeps/pthread/sigaction.c: Likewise.
8042 * sysdeps/pthread/sigprocmask.c: New file.
8043 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8044 __SIGRTMIN+1.
8045 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8046 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8047 in this case.
8048
8049 2003-04-19 Ulrich Drepper <drepper@redhat.com>
8050
8051 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8052 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8053
8054 * sysdeps/unix/sysv/linux/unregister-atfork.c
8055 (__unregister_atfork): Don't free memory not allocated dynamically.
8056
8057 * semaphore.h: Remove __THROW marker from cancellation points.
8058 * nptl/sysdeps/pthread/pthread.h: Likewise.
8059
8060 2003-04-18 Ulrich Drepper <drepper@redhat.com>
8061
8062 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8063 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8064 __THROW.
8065
8066 2003-04-16 Jakub Jelinek <jakub@redhat.com>
8067
8068 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8069
8070 2003-04-15 Roland McGrath <roland@redhat.com>
8071
8072 * forward.c (__pthread_unwind): Tweak to avoid warning.
8073
8074 2003-04-15 Ulrich Drepper <drepper@redhat.com>
8075
8076 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8077
8078 2003-04-14 Ulrich Drepper <drepper@redhat.com>
8079
8080 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8081 overflow CFA advance instructions.
8082 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8083
8084 2003-04-14 Jakub Jelinek <jakub@redhat.com>
8085
8086 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8087 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8088 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8089 defined.
8090
8091 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8092 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8093 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8094 DW_CFA_advance_loc for .Laddl-.Lsubl.
8095
8096 2003-04-13 Ulrich Drepper <drepper@redhat.com>
8097
8098 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8099 position-independent unwind data for static libraries.
8100 Add missing unwind info. Add comments.
8101
8102 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8103 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8104 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8105 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8106
8107 2003-04-12 Ulrich Drepper <drepper@redhat.com>
8108
8109 * Makefile: Make sure all cancellation points are compiled with
8110 exception and asynchronous unwind tables.
8111
8112 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8113 which mishandles loading of global object addresses in PIC.
8114 (THREAD_SETMEM_NC): Likewise.
8115
8116 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8117
8118 * pthread.h: Define new data structure for cleanup buffer. Declare
8119 new cleanup handler interfaces.
8120 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8121 (struct pthread): Add cleanup_jmp_buf pointer. Define
8122 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8123 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8124 it. Declare old cleanup handler installation functions.
8125 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8126 handling.
8127 * cleanup_defer.c: Likewise.
8128 * cleanup_compat.c: New file. Old cleanup code.
8129 * cleanup_def_compat.c: New file. Old cleanup code.
8130 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8131 if own thread descriptor.
8132 * unwind.c: New file.
8133 * forward.c: Add __pthread_unwind.
8134 * init.c (pthread_functions): Add __pthread_unwind.
8135 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8136 Add ptr___pthread_unwind.
8137 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8138 and unwind function.
8139 * Makefile (libpthread-routines): Add cleanup_compat,
8140 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8141 table generation if necessary.
8142 * version.c: Record whether unwind support is compiled in.
8143 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8144 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8145 handler interfaces.
8146 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8147 complication to generate unwind information for syscall wrappers.
8148 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8149 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8150 __cleanup_fct_attribute.
8151
8152 * Makefile: Add rules to build and run tst-cleanup0.
8153 * tst-cleanup0.c: New file.
8154 * tst-cleanup0.expect: New file.
8155
8156 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8157 caller. Optimize to avoid often unecessary local variable.
8158
8159 2003-04-11 Roland McGrath <roland@redhat.com>
8160
8161 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8162 sets variable `multidir'; include that.
8163 (generated): Add it.
8164 ($(objpfx)$(multidir)/crti.o): New target.
8165 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8166
8167 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8168
8169 * tst-attr2.c (do_test): Add cast to avoid warning.
8170 * tst-mutex4.c (do_test): Likewise.
8171
8172 2003-04-10 Ulrich Drepper <drepper@redhat.com>
8173
8174 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8175 in child.
8176
8177 2003-04-09 Ulrich Drepper <drepper@redhat.com>
8178
8179 * Makefile (tests): Add tst-detach1.
8180 * tst-detach1.c: New file.
8181
8182 2003-04-08 Ulrich Drepper <drepper@redhat.com>
8183
8184 * sysdeps/pthread/pthread.h: Remove duplicate
8185 pthread_cleanup_{push,pop} definitions.
8186
8187 * tst-barrier2.c: Eliminate warnings.
8188 * tst-cancel4.c: Likewise.
8189 * tst-cond4.c: Likewise.
8190 * tst-cond6.c: Likewise.
8191 * tst-detach1.c: Likewise.
8192 * tst-rwlock4.c: Likewise.
8193 * tst-rwlock6.c: Likewise.
8194 * tst-rwlock7.c: Likewise.
8195 * tst-sem3.c: Likewise.
8196 * tst-spin2.c: Likewise.
8197 * tst-umask1.c: Likewise.
8198
8199 2003-04-07 Ulrich Drepper <drepper@redhat.com>
8200
8201 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8202
8203 2003-04-06 Ulrich Drepper <drepper@redhat.com>
8204
8205 * descr.h (struct pthread): Move cancelhandling member to the front.
8206
8207 2003-04-05 Ulrich Drepper <drepper@redhat.com>
8208
8209 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8210 malloc_parent, and malloc_child statically.
8211 (__register_atfork_malloc): New function.
8212 (free_mem): Don't free any of the malloc_* variables on the list.
8213 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8214 Define HAVE_register_atfork_malloc.
8215
8216 2003-04-04 Ulrich Drepper <drepper@redhat.com>
8217
8218 * sysdeps/pthread/createthread.c (create_thread): Add some more
8219 comments explaining when to set multiple_threads and when not.
8220
8221 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8222 THREAD_ATOMIC_BIT_SET if not already defined.
8223 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8224 THREAD_ATOMIC_BIT_SET:
8225 * sysdeps/x86_64/tls.h: Likewise.
8226 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8227 THREAD_ATOMIC_CMPXCHG_VAL.
8228 (_pthread_cleanup_pop_restore): Likewise.
8229 * cancellation.c (__pthread_enable_asynccancel): Likewise.
8230 (__pthread_enable_asynccancel_2): Likewise.
8231 (__pthread_disable_asynccancel): Likewise.
8232 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8233 (__libc_disable_asynccancel): Likewise.
8234 * init.c (sigcancel_handler): Likewise.
8235 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8236 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8237
8238 2003-04-03 Ulrich Drepper <drepper@redhat.com>
8239
8240 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8241 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8242 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8243 * Makefile (tests): Add tst-cancel11.
8244 * tst-cancel11.c: New file.
8245
8246 2003-04-01 Ulrich Drepper <drepper@redhat.com>
8247
8248 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8249 round, not the first. Use specific_used flag instead of local
8250 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
8251 (__free_tcb): Don't call deallocate_tsd here.
8252 (start_thread): Call deallocate_tsd here.
8253 * pthread_setspecific.c: Set specific_used flag really only when
8254 needed.
8255 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8256 * tst-tsd3.c: New file.
8257 * tst-tsd4.c: New file.
8258
8259 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8260
8261 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8262 Use atomic_exchange_and_add instead of __lll_add.
8263 (__lll_mutex_timedlock): Likewise.
8264 Patch by Ian Wienand.
8265
8266 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8267
8268 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8269 (SINGLE_THREAD_P): Fix typo.
8270 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8271
8272 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8273
8274 * Makefile (tests): Add tst-align.
8275 * tst-align.c: New file.
8276 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8277
8278 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8279 function correctly.
8280
8281 * tst-tsd2.c: Add casts to avoid warnings.
8282
8283 2003-03-30 Ulrich Drepper <drepper@redhat.com>
8284
8285 * descr.h (struct pthread): Move most often used elements to the front.
8286
8287 2003-03-29 Ulrich Drepper <drepper@redhat.com>
8288
8289 * Makefile (libpthread-routines): Add pthread_atfork.
8290 (libpthread-static-only-routines): Add pthread_atfork.
8291
8292 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8293
8294 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8295 of TLS_DTV_AT_TP.
8296 (INSTALL_DTV): Add parens.
8297 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8298 Use passed descr instead of THREAD_SELF.
8299 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8300 (__lll_mutex_timedlock_wait): Correct expected value after
8301 spurious wakeup.
8302 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8303 Release lock before waking up the waiters.
8304 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8305 criteria. Reorderstruct passed to cleanup handler. Fix
8306 handling of cancellation and failung pthread_mutex_unlock call.
8307 Use __pthread_enable_asynccancel_2 instead of
8308 __pthread_enable_asynccancel.
8309 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8310 Return result of lock re-get if it fails.
8311 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8312 for __pthread_cleanup_push.
8313 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8314 completely broken rwlock implementation.
8315 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8316 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8317 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8318 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8319 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8320 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
8321 versioned_symbol macro.
8322 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8323 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8324
8325 2003-03-27 Ulrich Drepper <drepper@redhat.com>
8326
8327 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8328 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
8329 and __helper_tid.
8330 (struct timer): Remove th and bar field.
8331 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8332 debugging code. Create only one helper thread.
8333 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8334 helper thread.
8335 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8336 Renamed. Define statically. Use thread info from siginfo.
8337 (__helper_once): New variable.
8338 (__helper_tid): New variable.
8339 (__reset_helper_control): New function.
8340 (__start_helper_thread): New function.
8341
8342 * pthread_create.c (start_thread): Don't use setjmp inside
8343 __builtin_expect to work around gcc bug.
8344
8345 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8346 timer_delete syscall fails, but not with ENOSYS, set
8347 __no_posix_timers.
8348
8349 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8350 (timer_settime): Fix typo.
8351 * sysdeps/unix/sysv/linux/timer_getoverr.c
8352 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8353
8354 2003-03-27 Jakub Jelinek <jakub@redhat.com>
8355
8356 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8357 offset of cleanupbuf.__prev.
8358
8359 2003-03-26 Jakub Jelinek <jakub@redhat.com>
8360
8361 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8362 of included file.
8363
8364 2003-03-26 Ulrich Drepper <drepper@redhat.com>
8365
8366 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8367 NULL provide default definition to syscall.
8368
8369 2003-03-25 Roland McGrath <roland@redhat.com>
8370
8371 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8372 (timer_id2ptr): Fix typo.
8373
8374 2003-03-25 Ulrich Drepper <drepper@redhat.com>
8375
8376 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8377 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8378 * sysdeps/ia64/pthreaddef.h: Likewise.
8379 * sysdeps/powerpc/pthreaddef.h: Likewise.
8380 * sysdeps/s390/pthreaddef.h: Likewise.
8381 * sysdeps/sh/pthreaddef.h: Likewise.
8382 * sysdeps/x86_64/pthreaddef.h: Likewise.
8383 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8384 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8385 being changed.
8386 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8387 SIGTIMER is not unblocked.
8388 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8389 RT signal taken.
8390 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8391 be send.
8392 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8393 pass pointer through as ID.
8394 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8395 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8396 * sysdeps/unix/sysv/linux/timer_create.c: New file.
8397 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8398 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8399 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8400 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8401 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8402 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8403 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8404 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8405 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8406 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8407 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8408 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8409 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8410 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8411 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8412 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8413 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8414 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8415 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8416 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8417 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8418 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8419 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8420 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8421 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8422 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8423 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8424 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8425 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8426 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8427
8428 * pthreadP.h: Remove FRAME_LEFT definition.
8429 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8430 already left frame. Programs which have this problem are not POSIX
8431 compliant.
8432 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8433
8434 2003-03-24 Ulrich Drepper <drepper@redhat.com>
8435
8436 * sysdeps/pthread/tst-timer.c: Check return values of the
8437 functions we test.
8438
8439 2003-03-23 Roland McGrath <roland@redhat.com>
8440
8441 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8442 * tst-tls3mod.c: Likewise.
8443 * tst-tls1.c: Likewise.
8444 * tst-tls2.c: Likewise.
8445
8446 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8447 undefined behavior.
8448
8449 * tst-join5.c (tf1, tf2): Add a cast.
8450
8451 * Makeconfig (includes): Append -I$(..)nptl to this variable.
8452
8453 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8454 Don't test anything.
8455 * tst-cond4.c: Likewise.
8456 * tst-cond6.c: Likewise.
8457 * tst-flock2.c: Likewise.
8458 * tst-mutex4.c: Likewise.
8459 * tst-rwlock4.c: Likewise.
8460 * tst-signal1.c: Likewise.
8461 * tst-spin2.c: Likewise.
8462 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8463
8464 * tst-mutex4.c: Use test-skeleton.c.
8465 * tst-spin2.c: Likewise.
8466 * tst-sysconf.c: Likewise.
8467 * tst-barrier2.c: Likewise.
8468 * tst-cond4.c: Likewise.
8469 * tst-cond6.c: Likewise.
8470 * tst-rwlock4.c: Likewise.
8471 * tst-unload.c: Likewise.
8472 * tst-flock2.c (do_test): Use return instead of exit.
8473
8474 2003-03-22 Jakub Jelinek <jakub@redhat.com>
8475
8476 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8477
8478 2003-03-21 Ulrich Drepper <drepper@redhat.com>
8479
8480 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8481 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8482 instead of __lll_compare_and_swap.
8483 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8484 Likewise.
8485 Removed definition if __lll_compare_and_swap.
8486
8487 * cancellation.c: Adjust for new form of compare&exchange macros.
8488 * cleanup_defer.c: Likewise.
8489 * init.c: Likewise.
8490 * libc-cancellation.c: Likewise.
8491 * old_pthread_cond_broadcast.c: Likewise.
8492 * old_pthread_cond_signal.c: Likewise.
8493 * old_pthread_cond_timedwait.c: Likewise.
8494 * old_pthread_cond_wait.c: Likewise.
8495 * pthread_cancel.c: Likewise.
8496 * pthread_create.c: Likewise.
8497 * pthread_detach.c: Likewise.
8498 * pthread_join.c: Likewise.
8499 * pthread_key_delete.c: Likewise.
8500 * pthread_setcancelstate.c: Likewise.
8501 * pthread_setcanceltype.c: Likewise.
8502 * pthread_timedjoin.c: Likewise.
8503 * pthread_tryjoin.c: Likewise.
8504 * sysdeps/pthread/createthread.c: Likewise.
8505
8506 2003-03-20 Ulrich Drepper <drepper@redhat.com>
8507
8508 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8509 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8510 definitions. Replace uses with calls to atomic_* functions.
8511 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8512 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8513 __lll_test_and_set calls with atomic_exchange_and_add and
8514 atomic_exchange calls respectively.
8515 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8516 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8517 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8518 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8519 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8520 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8521 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8522
8523 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8524 returns the old value.
8525
8526 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
8527
8528 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8529 int for variable OLDVAL and correct inline assembler contraint.
8530 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8531 type int for variable OLD.
8532
8533 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8534 only for s390-32.
8535 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8536 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8537 instead of multiple_threads field in the TCB.
8538
8539 2003-03-19 Ulrich Drepper <drepper@redhat.com>
8540
8541 * sysdeps/i386/i686/bits/atomic.h: Removed.
8542 * sysdeps/i386/i586/bits/atomic.h: Removed.
8543 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
8544 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
8545 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
8546 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
8547 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
8548 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
8549 * atomic.h: Removed. Moved to glibc.
8550
8551 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8552 support for clock selection.
8553
8554 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8555 signalling waiters.
8556
8557 2003-03-18 Roland McGrath <roland@redhat.com>
8558
8559 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8560 Add __lll_rel_instr first. Add memory clobber.
8561 (lll_mutex_unlock): Use __lll_test_and_set.
8562 From Paul Mackerras <paulus@samba.org>.
8563
8564 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8565 unconditionally.
8566 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8567 (SINGLE_THREAD_P): Add `header.' prefix.
8568 From Paul Mackerras <paulus@samba.org>.
8569
8570 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8571 pthread_timedjoin_np to ...
8572 (libpthread: GLIBC_2.3.3): ... here.
8573 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8574
8575 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8576 Avoid shadowing VAL variable.
8577
8578 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8579 New macro.
8580
8581 2003-03-18 Ulrich Drepper <drepper@redhat.com>
8582
8583 * Makefile (tests): Add tst-cond11.
8584 * tst-cond11.c: New file.
8585
8586 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8587 struct passed to cleanup handler to eliminate one more
8588 instruction.
8589 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8590
8591 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8592 (pthrad_cond_t): Replace __unused field with __clock.
8593
8594 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8595 waken all waiters in cleanup handler.
8596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8597 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8598
8599 * pthread_condattr_getclock.c: New file.
8600 * pthread_condattr_setclock.c: New file.
8601 * sysdeps/pthread/pthread.h: Declare these new functions.
8602 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8603 * Makefile (libpthread-routines): Add the new functions.
8604 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8605 Renamed field to value. Document use of the bits.
8606 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8607 change.
8608 * pthread_condattr_setpshared.c: Likewise.
8609 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8610 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8611 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8612 Add __clock field.
8613 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8614 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8615 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8616 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8617 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8618 Implement clock selection.
8619 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8620 * pthread-errnos.sym: Add ENOSYS.
8621 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8622 _POSIX_CLOCK_SELECTION.
8623 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8624
8625 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8626 invalid .size directive.
8627
8628 2003-03-17 Roland McGrath <roland@redhat.com>
8629
8630 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8631 Formatting tweaks.
8632
8633 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8634
8635 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8636 Use __lll_add instead of spelling it out. Use protected symbol names.
8637 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8638 Use __lll_add.
8639 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8640 Renamed from lll_compare_and_swap. Use new name where necessary.
8641 (__lll_add): Defined.
8642 (__lll_dec_if_positive): Defined.
8643 (__lll_test_and_set): Defined.
8644 * sysdeps/ia64/pthread_spin_init.c: Removed.
8645 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8646 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8647 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8648 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8649 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8650 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8651 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8652 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8653 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8654 __sync_lock_release_si.
8655 Patch by Jakub Jelinek.
8656
8657 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8658 Fix timeout handling.
8659 (__lll_timedwait_tid): Likewise.
8660 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8661 Patch by Jakub Jelinek.
8662
8663 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8664
8665 2003-03-17 Roland McGrath <roland@redhat.com>
8666
8667 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8668 * sysdeps/pthread/pthread_spin_init.c: New file.
8669 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8670 * sysdeps/powerpc/Makefile: New file.
8671 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8672 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8673 * sysdeps/powerpc/pthreaddef.h: New file.
8674 * sysdeps/powerpc/tcb-offsets.sym: New file.
8675 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8676 * sysdeps/powerpc/tls.h: New file.
8677 * sysdeps/powerpc/bits/atomic.h: New file.
8678 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8679 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8680 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8681
8682 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8683 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8684 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8685 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8686 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8687 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8688 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8689 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8690 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8691 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8692 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8693 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8694 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8695 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8696 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8697
8698 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8699 not gettimeofday.
8700 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8701 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8702 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8703 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8704 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8705
8706 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8707
8708 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8709 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8710 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8711 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8712 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8713
8714 2003-03-16 Roland McGrath <roland@redhat.com>
8715
8716 * tst-fork4.c: Include <string.h>.
8717 * tst-signal2.c: Likewise.
8718 * tst-mutex5.c (do_test): exit -> return.
8719 * tst-mutex2.c: Include <stdlib.h>.
8720
8721 2003-03-16 Ulrich Drepper <drepper@redhat.com>
8722
8723 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8724 (__lll_mutex_timedlock_wait): Correct expected value after
8725 spurious wakeup. Otherwise we would never wait again.
8726
8727 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8728 zone versus inline asm stupidity. Use correct instructions.
8729
8730 * tst-rwlock6.c: Add some more status output.
8731
8732 2003-03-15 Roland McGrath <roland@redhat.com>
8733
8734 * sysdeps/pthread/configure.in: New file.
8735 * sysdeps/pthread/configure: New file (generated).
8736
8737 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8738
8739 * allocatestack.c (allocate_stack): Store the exact stack size of
8740 user allocated stacks.
8741
8742 2003-03-15 Jakub Jelinek <jakub@redhat.com>
8743
8744 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8745 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8746 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8747 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8748 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8749 Use `header.' prefix.
8750 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8751
8752 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8753
8754 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8755 __builtin_frame_address, use stack pointer.
8756
8757 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8758 instead of __builtin_frame_pointer.
8759
8760 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8761
8762 * tst-basic1.c (do_test): Add cast to avoid warning.
8763 * tst-basic2.c (do_test): Likewise.
8764
8765 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8766 amount of stack correction.
8767
8768 * tst-fork4.c: Use test-skeleton.c.
8769
8770 2003-03-14 Roland McGrath <roland@redhat.com>
8771
8772 * init.c: Fix typo "#eli" for "#else".
8773
8774 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8775
8776 * allocatestack.c (__stack_user): Use hidden_data_def.
8777 * pthread_create.c (__pthread_keys): Likewise.
8778
8779 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8780
8781 2003-03-14 Roland McGrath <roland@redhat.com>
8782
8783 * tst-fork4.c: New file.
8784 * Makefile (tests): Add it.
8785
8786 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8787 we always define the padding space.
8788 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8789 stopped supporting its own extensions fully.
8790 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8791 struct also called `header', so `header.multiple_threads' is the field
8792 name to use on all machines.
8793 * allocatestack.c (allocate_stack): Use `header.' prefix.
8794 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8795 * pthread_create.c (__pthread_create_2_1): Likewise.
8796 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8797 (THREAD_SELF): Likewise.
8798 * sysdeps/x86_64/tls.h: Likewise.
8799 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8800 (SINGLE_THREAD_P): Likewise.
8801 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8802 (SINGLE_THREAD_P): Likewise.
8803 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8804 (SINGLE_THREAD_P): Likewise.
8805
8806 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8807 value directly.
8808
8809 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8810
8811 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8812 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8813
8814 * pthread_create.c (start_thread): setjmp is expected to return 0.
8815
8816 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8817 (THREAD_GETMEM_NC): Likewise.
8818
8819 2003-03-13 Ulrich Drepper <drepper@redhat.com>
8820
8821 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8822 and the size of the stack which must be allocated is a multiple,
8823 allocate one more page.
8824 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8825 MULTI_PAGE_ALIASING.
8826
8827 2003-03-13 Roland McGrath <roland@redhat.com>
8828
8829 * pthread_create.c (start_thread): Set EXITING_BIT after the
8830 event-reporting (and destructors), not before.
8831
8832 2003-03-13 Jakub Jelinek <jakub@redhat.com>
8833
8834 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8835 lll_futex_wake): Declare register variables as long int instead of
8836 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8837 Make syscall arguments clobbered by the syscall.
8838 (lll_futex_wait): Define using lll_futex_timed_wait.
8839
8840 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8841 to void *.
8842
8843 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8844 PPID if [! NDEBUG].
8845
8846 * allocatestack.c (nptl_ncreated): Only declare if
8847 COLORING_INCREMENT != 0.
8848
8849 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8850 (__libc_enable_asynccancel_2): Remove prototype.
8851
8852 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8853 ctid to match kernel.
8854
8855 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8856
8857 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8858 libc_multiple_threads.
8859 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8860 __libc_multiple_threads to...
8861 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8862
8863 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8864 versioning.
8865 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8866 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8867
8868 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8869 (__pthread_once_internal): Define.
8870
8871 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8872 macros instead of .symver directly.
8873 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8874 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8875
8876 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8877 * sysdeps/x86_64/tcb-offsets.sym: New file.
8878 * sysdeps/x86_64/Makefile: New file.
8879
8880 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8881 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8882 to access own pthread_t in TCB.
8883 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8884 Likewise.
8885 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8886 Likewise.
8887 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8888
8889 2003-03-12 Roland McGrath <roland@redhat.com>
8890
8891 * pthread-errnos.sym: New file.
8892 * Makefile (gen-as-const-headers): New variable, list that file.
8893 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8894 header <pthread-errnos.h> instead of defining errno values here.
8895 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8896 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8897 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8898 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8899 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8900 Likewise.
8901 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8902 Likewise.
8903 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8904 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8905 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8906 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8907 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8908 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8909 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8910 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8911 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8912 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8913 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8914 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8915 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8916 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8917 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8918 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8919 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8920 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8921 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8922 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8923 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8924 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8925 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8926 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8927 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8928 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8929 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8930
8931 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8932 CLONE_CHILD_SETTID worked.
8933
8934 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8935
8936 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8937 file.
8938 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8939 file.
8940
8941 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8942 (pthread_cond_t): Add padding.
8943
8944 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8945 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8946 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8947
8948 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8949 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8950 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8951 (__pthread_rwlock_timedrdlock): Likewise.
8952 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8953 (__pthread_rwlock_wrlock): Likewise.
8954 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8955 (__pthread_rwlock_rdlock): Likewise.
8956
8957 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8958
8959 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8960 result of lock re-get if it fails.
8961
8962 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8963
8964 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8965 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8966 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8967 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8969 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8970 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8971 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8972 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8973 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8974
8975 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8976 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8977
8978 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8979 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8980 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8981 (create_thread): Likewise.
8982 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8983 * init.c (__pthread_initialize_minimal_internal): Initialize
8984 __libc_multiple_threads_ptr if necessary.
8985 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8986 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8987 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8988 __libc_multiple_threads.
8989 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8990 necessary.
8991
8992 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8993 (THREAD_SETMEM_NC): Likewise.
8994
8995 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8996 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8997 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8998 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8999
9000 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9001 Eliminate one entire instruction.
9002
9003 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9004 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9005 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9006 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9007 instead of __pthread_enable_asynccancel.
9008 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9009 (__pthread_cond_wait): Likewise.
9010 * sysdeps/pthread/pthread_cond_timedwait.c
9011 (__pthread_cond_timedwait): Likewise.
9012 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9013
9014 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9015 (__condvar_cleanup): Wake up all waiters in case we got signaled
9016 after being woken up but before disabling asynchronous
9017 cancellation.
9018 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9019 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9020 (__condvar_cleanup): Likewise.
9021
9022 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9023 Make it an error if architecture has no #if case. Add x86-64.
9024
9025 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9026 pt-initfini.s generation.
9027
9028 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9029 (TLS_INIT_TP): Fix typo.
9030
9031 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9032
9033 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9034 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9035
9036 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9037 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9038 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9039 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9040 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9041 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9042 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9043 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9044
9045 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9046
9047 * sysdeps/pthread/pthread_cond_timedwait.c
9048 (__pthread_cond_timedwait): Return the result of the final
9049 locking. If it succeeds, the regular function return value.
9050
9051 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9052 Return result of the final locking.
9053 * version.c (__nptl_main): Work around problems with the strange
9054 INTERNAL_SYSCALL macro on ppc32.
9055 * init.c (__pthread_initialize_minimal_internal): Unblock
9056 SIGCANCEL in case the parent blocked it.
9057 Reported by Paul Mackerras <paulus@samba.org>.
9058
9059 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9060 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9061 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9062
9063 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9064
9065 * sysdeps/pthread/pthread_cond_timedwait.c
9066 (__pthread_cond_timedwait): Unlock and fail if
9067 __pthread_mutex_unlock_internal failed.
9068
9069 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9070 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9071 Use ARCH_CLONE.
9072 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9073 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9074 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9075 ALLOCATE_STACK): New macros.
9076 (TLS_TPADJ): New macro.
9077 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9078 (allocate_stack): Handle TLS_DTV_AT_TP and
9079 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9080 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9081 Don't set PD->self.
9082 * init.c [__ia64__] (__NR_set_tid_address): Define.
9083
9084 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9085 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9086 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9087 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9088 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9089 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9090 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9091 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9092 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9093 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9094 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9095 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9096 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9097 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9098 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9099 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9100 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9101 * sysdeps/ia64/bits/atomic.h: New file.
9102 * sysdeps/ia64/Makefile: New file.
9103 * sysdeps/ia64/pthread_spin_init.c: New file.
9104 * sysdeps/ia64/pthread_spin_lock.c: New file.
9105 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9106 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9107 * sysdeps/ia64/pthreaddef.h: New file.
9108 * sysdeps/ia64/tcb-offsets.sym: New file.
9109 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9110 * sysdeps/ia64/tls.h: New file.
9111
9112 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9113 to syscall instead of no arguments.
9114
9115 2003-03-10 Ulrich Drepper <drepper@redhat.com>
9116
9117 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9118 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9119 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9120 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9121
9122 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9123 unused code.
9124
9125 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9126
9127 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9128 lowlevelbarrier.sym.
9129 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9130 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9131 Include lowlevelbarrier.h and don't define offsets locally.
9132 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9133
9134 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9135 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9136 (__lll_mutex_timedlock_wait): Likewise.
9137 (lll_mutex_lock): Adjust asm for that.
9138 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9139 (lll_lock): Adjust asm for operand order change.
9140 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9141 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9142
9143 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9144 Reverse order of parameters.
9145 (__lll_timedwait_tid): Remove regparms attribute.
9146 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9147 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9148
9149 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9150 (__lll_timedwait_tid): Remove one unnecessary instruction.
9151
9152 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9153 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9154 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9155 lowlevelmutex.S.
9156
9157 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9158 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9159 for NOT_IN_libc.
9160 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9161 lowlevellock.S.
9162
9163 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9164 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9165 for libc.so.
9166 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9167 define LOCK here (if UP is not defined). The actual code is in
9168 lowlevelmutex.S.
9169
9170 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9171 LOCK is already defined. Don't define lll_unlock_wake_cb and
9172 __lll_timedwait_tid for libc.so.
9173 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9174 define LOCK here (if UP is not defined). The actual code is in
9175 lowlevellock.S.
9176
9177 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9178 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9179 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9180 instead of lowlevelsem.h.
9181 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9182 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9183 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9184
9185 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9186 lowlevelrwlock.sym.
9187 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9188 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9189 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9190
9191 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9192 register loading.
9193 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9194 last changed. D'oh.
9195
9196 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9197
9198 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9199 of __libc_locking_needed.
9200 (lll_trylock): Initialize %eax to zero.
9201
9202 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9203 pthread_cond_t definition.
9204
9205 2003-03-10 Roland McGrath <roland@redhat.com>
9206
9207 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9208 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9209 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9210 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9211 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9212
9213 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9214 Instead of setting PD->multiple_threads, set globals
9215 __pthread_multiple_threads and __libc_multiple_threads.
9216 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9217 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9218 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9219
9220 * descr.h (struct pthread): Conditionalize first member on
9221 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
9222 containing an anonymous tcbhead_t. Move `list' member out.
9223 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9224 * allocatestack.c: Remove use of `header.data.' prefix.
9225 * pthread_create.c: Likewise.
9226 * init.c (__pthread_initialize_minimal_internal): Likewise.
9227 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9228 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9229 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9230 * sysdeps/x86_64/tls.h: Likewise.
9231 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9232 (SINGLE_THREAD_P): Likewise.
9233 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9234 (SINGLE_THREAD_P): Likewise.
9235 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9236 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9237
9238 2003-03-09 Ulrich Drepper <drepper@redhat.com>
9239
9240 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9241
9242 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9243 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9244
9245 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9246 leftovers from the ia32 code.
9247
9248 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9249 memory load.
9250 (clear_once_control): Don't load %esi.
9251
9252 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9253 handling.
9254
9255 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9256
9257 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9258 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9259
9260 * Makefile (tests): Add tst-cond10.
9261 * tst-cond10.c: New file.
9262
9263 2003-03-08 Ulrich Drepper <drepper@redhat.com>
9264
9265 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9266 * tst-signal3.c (do_test): Likewise.
9267 * tst-sem5.c (do_test): Likewise.
9268 * tst-kill6.c (do_test): Likewise.
9269 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9270
9271 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9272 of inc/dec.
9273 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9274 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9275 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9276 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9277 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9278 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9279 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9280 Likewise.
9281 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9282 Likewise.
9283 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9284 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9285 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9286 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9287 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9288 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9289 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9290 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9291
9292 * allocatestack.c (allocate_stack): If mprotect() fails free the
9293 TLS memory.
9294
9295 2003-03-07 Ulrich Drepper <drepper@redhat.com>
9296
9297 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9298
9299 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9300 lll_wake_tid. This was used only to work around kernel limits in
9301 the early days.
9302 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9303 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9304 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9305 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9306
9307 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9308 (__pthread_initialize_minimal_internal): Change initialization of
9309 __static_tls_align_m1 appropriately.
9310 * pthreadP.h (__static_tls_align_m1): Renamed from
9311 __static_tls_align.
9312 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9313 instead of __static_tls_align-1.
9314
9315 2003-03-04 Ulrich Drepper <drepper@redhat.com>
9316
9317 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9318
9319 * pthread_create.c: Define __pthread_keys using nocommon
9320 attribute, not by placing it explicitly in bss.
9321 Remove DEFINE_DEALLOC definition. Not needed anymore.
9322
9323 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9324 Use it in mmap call to allocate stacks.
9325
9326 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9327
9328 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9329 result of the thread function.
9330
9331 2003-03-03 Ulrich Drepper <drepper@redhat.com>
9332
9333 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
9334 version is just fine.
9335
9336 * sysdeps/unix/sysv/linux/libc_pthread_init.c
9337 (__pthread_child_handler): Renamed from pthread_child_handler,
9338 exported, and marked hidden. Change all users.
9339 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9340 free __pthread_child_handler from child list.
9341
9342 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
9343
9344 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9345
9346 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9347 Fix handling of cancellation and failing pthread_mutex_unlock call.
9348 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9349 (__pthread_cond_wait): Likewise.
9350
9351 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9352 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9353 lll_futex_timed_wait call.
9354 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9355 (pthread_rwlock_timedwrlock): Likewise.
9356
9357 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9358 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9359 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9360
9361 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9362 check of lll_futex_wake return value.
9363
9364 2003-03-03 Roland McGrath <roland@redhat.com>
9365
9366 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9367
9368 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9369 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9370 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9371
9372 2003-03-02 Ulrich Drepper <drepper@redhat.com>
9373
9374 * sysdeps/pthread/timer_create.c (timer_create): Return correct
9375 error for CPU clocks.
9376
9377 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9378 _POSIX_MONOTONIC_CLOCK.
9379 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9380
9381 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9382 recent kernels.
9383
9384 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9385
9386 * descr.h (struct pthread): Move cleanup field to the front.
9387
9388 2003-03-01 Roland McGrath <roland@redhat.com>
9389
9390 * sem_open.c (sem_open): Braino fix.
9391
9392 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9393
9394 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9396 __pthread_cleanup_pop functionality.
9397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9398
9399 * descr.h (struct pthread): Move tid field to the front now that
9400 it is often used.
9401
9402 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9403 (__lll_mutex_timedlock_wait): Remove.
9404 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9405 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9406 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9407 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9408 (lll_unlock_wake_cb): Don't save and restore %esi.
9409 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9410 %esi.
9411 (__lll_timedwait_tid): Add alignment.
9412 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9413 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9414 %esi.
9415 (__lll_timedwait_tid): Removed.
9416 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9417 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9418 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9419 (pthread_barrier_wait): Don't save, load, and restore %esi for
9420 last thread.
9421 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9422 (__pthread_cond_signal): Don't save, load, and restore %esi.
9423 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9424 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9425 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9426 Don't save, load, and restore %esi.
9427
9428 2003-02-27 Ulrich Drepper <drepper@redhat.com>
9429
9430 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9431 Release lock before waking up the waiters.
9432
9433 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9434
9435 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9436 (reader_thread): Likewise.
9437
9438 * sysdeps/pthread/pthread_rwlock_unlock.c
9439 (__pthread_rwlock_unlock): Release internal lock early. Don't try
9440 to wake up readers if there are none.
9441
9442 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9443 Release internal lock before wake threads.
9444
9445 2003-02-26 Ulrich Drepper <drepper@redhat.com>
9446
9447 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9448 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
9449 predefined.
9450 * tst-rwlock9.c: Likewise.
9451 * tst-rwlock10.c: New file.
9452 * tst-rwlock11.c: New file.
9453
9454 * Makefile (tests): Add tst-dlsym1.
9455 * tst-dlsym1.c: New file.
9456
9457 * init.c (__pthread_initialize_minimal_internal): Set
9458 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9459 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9460
9461 2003-02-24 Ulrich Drepper <drepper@redhat.com>
9462
9463 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9464
9465 * tst-cond2.c: Fix sychronization with child.
9466
9467 * tst-rwlock8.c (reader_thread): Remove unused variable.
9468
9469 * Makefile: Add rules to build and run tst-tls3.
9470 * tst-tls3.c: New file.
9471 * tst-tls3mod.c: New file.
9472
9473 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9474 * tst-rwlock8.c: New file.
9475 * tst-rwlock9.c: New file.
9476 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9477 complete broken rwlock implementation.
9478 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9479 Likewise.
9480 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9481 Likewise.
9482 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9483 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9484 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9485 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9486 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9487 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9488 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9489
9490 2003-02-23 Roland McGrath <roland@redhat.com>
9491
9492 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9493
9494 2003-02-23 Ulrich Drepper <drepper@redhat.com>
9495
9496 * Makefile (tests): Add tst-context1.
9497 * tst-context1.c: New file.
9498
9499 * Makefile (tests): Add tst-tls1 and tst-tls2.
9500 * tst-tls1.c: New file.
9501 * tst-tls2.c: New file.
9502
9503 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9504 for failed cmpxchg.
9505
9506 * pthread_create.c (start_thread): Set EXITING_BIT early.
9507
9508 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9509 (THREAD_GETMEM_NC): Likewise.
9510
9511 2003-02-22 Ulrich Drepper <drepper@redhat.com>
9512
9513 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9514 off 3 more bytes by using offset-less instructions when possible.
9515
9516 * Makefile: Add dependency for $(objpfx)version.d.
9517
9518 * eintr.c (eintr_source): Add unnecessary return but the compiler
9519 insists.
9520
9521 * tst-kill3.c: Include <unistd.h>.
9522
9523 2003-02-21 Roland McGrath <roland@redhat.com>
9524
9525 * pthread_create.c (start_thread): Call __libc_thread_freeres.
9526
9527 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9528
9529 * Makefile (tests): Add tst-eintr1.
9530 (distribute): Add eintr.c.
9531 * tst-eintr1.c: New file.
9532 * eintr.c: New file.
9533
9534 * pthread_cancel.c (pthread_cancel): Use tkill directly.
9535
9536 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9537 Disallow sending SIGCANCEL.
9538
9539 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9540 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9541 * tst-kill1.c: New file.
9542 * tst-kill2.c: New file.
9543 * tst-kill3.c: New file.
9544 * tst-kill5.c: New file.
9545 * tst-kill6.c: New file.
9546 * tst-basic7.c: Renamed to...
9547 * tst-kill4.c: ...this.
9548
9549 2003-02-21 Roland McGrath <roland@redhat.com>
9550
9551 * Makefile (install-lib-ldscripts): New variable.
9552
9553 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9554
9555 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9556 * pthread_cancel.c: Use INVALID_TD_P.
9557 * pthread_detach.c: Likewise.
9558 * pthread_getschedparam.c: Likewise.
9559 * pthread_setschedparam.c: Likewise.
9560 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9561 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9562 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9563 * pthread_timedjoin.c: Likewise.
9564
9565 * tst-basic7.c: Include <signal.h>.
9566
9567 * pthread_join.c (pthread_join): Limited checking for invalid
9568 descriptors.
9569 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9570
9571 2003-02-20 Ulrich Drepper <drepper@redhat.com>
9572
9573 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9574 beginning of the loop. Clear the entire first block of TSD.
9575 * Makefile (tests): Add tst-key4.
9576 * tst-key4.c: New file.
9577
9578 2003-02-18 Ulrich Drepper <drepper@redhat.com>
9579
9580 * Makefile (tests): Add tst-basic7.
9581 * tst-basic7.c: New file.
9582
9583 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9584 Add some more __builtin_expect.
9585
9586 * pthreadP.h: Define dummy version of DEBUGGING_P.
9587
9588 2003-02-17 Ulrich Drepper <drepper@redhat.com>
9589
9590 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9591 _POSIX_THREAD_PRIORITY_SCHEDULING.
9592 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9593 _XOPEN_REALTIME_THREADS.
9594 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9595
9596 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9597 kernel returns EINVAL for PID <= 0, work around it.
9598
9599 * Makefile (tests): Add tst-signal5.
9600 * tst-signal5.c: New file.
9601
9602 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9603 and LOGIN_NAME_MAX.
9604
9605 * tst-cancel1.c (tf): Block all signals.
9606
9607 * Makefile (tests): Add tst-basic6.
9608 * tst-basic6.c: New file.
9609
9610 * tst-basic1.c: Add test for process ID.
9611
9612 * Makefile (tests): Add tst-cancel10.
9613 * tst-cancel10.c: New file.
9614
9615 * Makefile (tests): Add tst-signal4.
9616 * tst-signal4.c: New file.
9617
9618 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9619 __sigismember instead of sigismember. Add __builtin_expect.
9620
9621 2003-02-16 Ulrich Drepper <drepper@redhat.com>
9622
9623 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9624 pthread_setcancelstate, and pthread_rwlock_setpshared.
9625
9626 * tst-cancel7.c (do_test): Make sure the pid file exists before
9627 canceling the thread.
9628
9629 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9630 pthread_rwlock_timedrdlock tests.
9631 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9632 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9633 Check for invalid tv_nsec field.
9634 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9635 Likewise.
9636
9637 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9638 recursive mutex of overflow.
9639
9640 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9641
9642 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9643 going into an endless loop.
9644 * Makefile (tests): Add tst-cancel9.
9645 * tst-cancel9.c: New file.
9646
9647 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9648
9649 2003-02-15 Ulrich Drepper <drepper@redhat.com>
9650
9651 * tst-mutex5.c (do_test): Add more timedlock tests.
9652
9653 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9654 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9655
9656 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9657 use INLINE_SYSCALL. Error number is returned, not -1.
9658
9659 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9660 and __deallocate_stack with internal_function.
9661 * pthread_create.c: Adjust definitions appropriately.
9662 * allocatestack.c: Likewise.
9663
9664 * pthread_join.c: Add one more __builtin_expect.
9665 * pthread_timedjoin.c: Likewise.
9666
9667 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9668 not data of sequence number does not match.
9669 Add one __builtin_expect.
9670
9671 * Makefile (tests): Add tst-clock1.
9672 * tst-clock1.c: New file.
9673
9674 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9675 negative arguments.
9676 * Makefile (tests): Add tst-basic5.
9677 * tst-basic5.c: New file.
9678
9679 2003-02-14 Ulrich Drepper <drepper@redhat.com>
9680
9681 * Makefile (tests): Add tst-basic4.
9682 * tst-basic4.c: New file.
9683
9684 * pthreadP.h: Add declaraction for __nptl_nthreads.
9685 * pthread_create.c: Define __nptl_nthreads
9686 (start_thread): Increment __nptl_nthreads at beginning. Decrement
9687 after thread is done. If then zero, call exit(0).
9688 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9689 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9690 * init.c (pthread_functions): Initialize ptr_nthreads.
9691 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9692 (__reclaim_stacks): Decrement __nptl_nthreads.
9693 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9694 Define.
9695 * Makefile (tests): Add tst-basic3.
9696 * tst-basic3.c: New file.
9697
9698 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9699 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9700 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9701 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9702 if asynchronous canceling is enabled.
9703 * pthread_join.c (pthread_join): When recognizing circular joins,
9704 take into account the other thread might be already canceled.
9705 * Makefile (tests): Add tst-join5.
9706 * tst-join5.c: New file.
9707
9708 * Makefile (tests): Add tst-join4.
9709 * tst-join4.c: New file.
9710
9711 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9712
9713 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9714
9715 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9716
9717 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9718 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9719 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9720 warning.
9721 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9722 to avoid warning.
9723 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9724 error if lll_futex_wake failed.
9725
9726 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9727
9728 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9729 handling of cancellation and failung pthread_mutex_unlock call.
9730 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9731 * Makefile (tests): Add tst-cond8 and tst-cond9.
9732 * tst-cond8.c: New file.
9733 * tst-cond9.c: New file.
9734
9735 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9736
9737 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9738 non-standard initializers with __USE_GNU.
9739
9740 * Makefile (tests): Add tst-cleanup3.
9741 * tst-cleanup3.c: New file.
9742
9743 2003-02-12 Ulrich Drepper <drepper@redhat.com>
9744
9745 * Makefile (tests): Add tst-attr1 and tst-attr2.
9746 * tst-attr1.c: New file.
9747 * tst-attr2.c: New file.
9748
9749 * Makefile: Add rules to build and run tst-atfork2 test.
9750 * tst-atfork2.c: New file.
9751 * tst-atfork2mod.c: New file.
9752
9753 * sysdeps/unix/sysv/linux/unregister-atfork.c
9754 (__unregister_atfork): Free the memory allocated for the handlers
9755 after removing them from the lists.
9756
9757 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9758 cleanup function.
9759
9760 * tst-atfork1.c (do_test): Wait for the child we forked.
9761 Report error in child.
9762
9763 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9764
9765 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9766
9767 2003-02-10 Ulrich Drepper <drepper@redhat.com>
9768
9769 * Makefile (tests): Add tst-cancel8.
9770 * tst-cancel8.c: New file.
9771
9772 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9773 clearing of control variable.
9774 * Makefile (tests): Add tst-once3 and tst-once4.
9775 * tst-once3.c: New file.
9776 * tst-once4.c: New file.
9777
9778 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9779
9780 * sysdeps/sh/Makefile: New file.
9781 * sysdeps/sh/bits/atomic.h: New file.
9782 * sysdeps/sh/pthread_spin_init.c: New file.
9783 * sysdeps/sh/pthread_spin_lock.c: New file.
9784 * sysdeps/sh/pthread_spin_trylock.S: New file.
9785 * sysdeps/sh/pthread_spin_unlock.S: New file.
9786 * sysdeps/sh/pthreaddef.h: New file.
9787 * sysdeps/sh/tcb-offsets.sym: New file.
9788 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9789 * sysdeps/sh/tls.h: New file.
9790 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9791 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9792 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9793 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9794 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9795 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9796 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9797 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9798 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9799 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9800 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9801 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9802 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9803 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9804 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9805 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9806 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9807 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9808 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9809 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9810 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9811 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9812 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9813 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9814 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9815 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9816 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9817 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9818 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9819 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9820
9821 2003-02-08 Ulrich Drepper <drepper@redhat.com>
9822
9823 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9824 according to POSIX.
9825
9826 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9827
9828 2003-02-07 Ulrich Drepper <drepper@redhat.com>
9829
9830 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9831 (TLS_GET_FS): New #define.
9832 (TLS_SET_FS): New #define.
9833 Correct value of __NR_set_thread_area.
9834
9835 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9836
9837 2003-02-06 Ulrich Drepper <drepper@redhat.com>
9838
9839 * Makefile (tests): Add tst-popen1.
9840 * tst-popen1.c: New file.
9841
9842 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9843 but inactive generalization.
9844 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9845 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9846 Minor optimization, remove one instruction.
9847 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9848
9849 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9850
9851 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9852
9853 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9854
9855 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9856 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9857 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9858 * sysdeps/pthread/pthread_cond_signal.c: New file.
9859 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9860 * sysdeps/pthread/pthread_cond_wait.c: New file.
9861 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9862 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9863 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9864 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9865 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9866 * sysdeps/s390/Makefile: New file.
9867 * sysdeps/s390/bits/atomic.h: New file.
9868 * sysdeps/s390/pthread_spin_init.c: New file.
9869 * sysdeps/s390/pthread_spin_lock.c: New file.
9870 * sysdeps/s390/pthread_spin_trylock.c: New file.
9871 * sysdeps/s390/pthread_spin_unlock.c: New file.
9872 * sysdeps/s390/pthreaddef.h: New file.
9873 * sysdeps/s390/tcb-offsets.sym: New file.
9874 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9875 * sysdeps/s390/tls.h: New file.
9876 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9877 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9878 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9879 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9880 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9881 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9882 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9883 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9884 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9885 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9886 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9887 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9888 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9889 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9890 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9891 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9892 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9893 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9894 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9895 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9896 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9897 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9898 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9899
9900 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9901
9902 * atomic.h: Add a couple more default implementations.
9903 (atomic_compare_and_exchange_acq): Use
9904 __arch_compare_and_exchange_32_acq in return value definition. It
9905 always exists.
9906 (atomic_bit_set): Renamed from atomic_set_bit.
9907 Add missing atomic_ prefixes.
9908
9909 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9910 thread library is available, use correct value to mark initialized
9911 once variable.
9912
9913 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9914
9915 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9916 __sysconf to determine pagesize.
9917
9918 * pthread_create.c: Include <atomic.h>.
9919 * allocatestack.c (allocate_stack): Implement coloring of the
9920 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9921 size minus one. Adjust users.
9922 * sysdeps/i386/i686/Makefile: New file.
9923
9924 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9925
9926 * allocatestack.c: Improve comment throughout the file.
9927
9928 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9929 (__lll_lock_wait): Add branch prediction.
9930 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9931 (__lll_lock_wait): Likewise.
9932 (lll_unlock_wake_cb): Removed.
9933
9934 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9935
9936 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9937 _POSIX_THREAD_PRIORITY_SCHEDULING.
9938
9939 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9940
9941 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9942 Fix return type of ptr___pthread_getspecific.
9943
9944 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9945
9946 * Makefile (tests): Add tst-umask1.
9947 (tst-umask1-ARGS): Define.
9948 * tst-umask1.c: New file.
9949
9950 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9951
9952 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9953 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9954 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9955 pthread_rwlock_unlock.
9956 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9957 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9958 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9959 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9960 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9961 New file.
9962 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9963 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9964 New file.
9965 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9966 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9967 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9968 New file.
9969 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9970 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9971 New file.
9972 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9973 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9974 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9975 New file.
9976 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9977 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9978 New file.
9979 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9980
9981 * Makefile (libpthread-routines): Remove lowlevelcond and
9982 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9983 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9984 and pthread_cond_broadcast.
9985 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9986 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9987 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9988 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9989 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9990 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9991 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9992 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9993 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9994 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9995 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9996 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9997 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9999 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10000 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10001 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10002 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10003 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10004 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10005 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10006 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10007 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10008 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10009 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10010 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10011 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10012 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10013 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10014 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10015 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10016
10017 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10018 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10019 of the code is moved to ...
10020 * sysdeps/pthread/createthread.c: ...here. New file.
10021
10022 2003-01-27 Ulrich Drepper <drepper@redhat.com>
10023
10024 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10025 (__new_sem_post): Clear %eax before returning.
10026 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10027
10028 * Makefile (tests): Add tst-cleanup2.
10029 * tst-cleanup2.c: New file.
10030
10031 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10032 Interpret first parameter correctly.
10033
10034 2003-01-17 Ulrich Drepper <drepper@redhat.com>
10035
10036 * Makefile (headers): Add bits/semaphore.h.
10037
10038 2003-01-16 Jakub Jelinek <jakub@redhat.com>
10039
10040 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10041 if not SHARED.
10042
10043 2003-01-14 Ulrich Drepper <drepper@redhat.com>
10044
10045 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10046 must be used and mapping failed.
10047 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10048
10049 * Makefile (CFLAGS-pthread_self.os): Define this, not
10050 CFLAGS-pthread_self.c.
10051
10052 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10053
10054 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10055 lll_unlock_wake_cb.
10056
10057 * Makefile (libpthread-routines): Add version. Add rules to build
10058 version.os and banner.h.
10059 * version.c: New file.
10060
10061 2003-01-13 Jakub Jelinek <jakub@redhat.com>
10062
10063 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10064 the alias unconditional.
10065 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10066
10067 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10068
10069 * Makefile (CFLAGS-pthread_self.c): New definition.
10070
10071 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10072
10073 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10074 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10075 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10076 * init.c (__pthread_initialize_minimal_internal): Likewise.
10077
10078 2003-01-07 Jakub Jelinek <jakub@redhat.com>
10079
10080 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10081
10082 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10083 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10084 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10085 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10086 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10087 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10088
10089 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10090
10091 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10092 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10093 * tst-cancel-wrappers.sh: Remove all exceptions.
10094
10095 2003-01-05 Ulrich Drepper <drepper@redhat.com>
10096
10097 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10098 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10099
10100 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10101 Use __libc_pthread_functions array if SHARED.
10102
10103 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10104 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10105
10106 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10107 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10108 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10109 __libc_ptf_call instead of __libc_maybe_call.
10110 (PTF): New #define.
10111 (__libc_cleanup_region_start): Wrap function name with PTF call.
10112 (__libc_cleanup_region_end): Likewise.
10113 (__libc_cleanup_end): Likewise.
10114
10115 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10116 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10117 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10118 * pthreadP.h: Add prototypes.
10119
10120 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10121 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10122 __pthread_rwlock_unlock aliases.
10123 * pthreadP.h: Add prototypes for new aliases.
10124
10125 * pthreadP.h (struct pthead_functions): Moved to...
10126 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10127 * init.c (pthread_functions): Add initializers for new elements.
10128
10129 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10130 __pthread_cleanup_pop_restore aliases.
10131 * pthreadP.h: Add prototypes.
10132
10133 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10134 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10135 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10136 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10137 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10138 * pthreadP.h: Adjust prototypes and callers.
10139
10140 2003-01-04 Ulrich Drepper <drepper@redhat.com>
10141
10142 * Makefile (tests): Add tst-cancel7.
10143 (tst-cancel7-ARGS): New variable.
10144 * tst-cancel7.c: New file.
10145
10146 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10147 around gcc defficiencies.
10148 * old_pthread_cond_signal.c: Likewise.
10149 * old_pthread_cond_timedwait.c: Likewise.
10150 * old_pthread_cond_wait.c: Likewise.
10151
10152 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10153
10154 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10155
10156 * Makefile (tests): Add tst-cond7.
10157 * tst-cond7.c: New file.
10158
10159 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10160 (condvar_cleanup): Get condvar address from the right place.
10161
10162 * atomic.h: Correct definitions of atomic_full_barrier,
10163 atomic_read_barrier, atomic_write_barrier.
10164
10165 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10166 race-free.
10167 * old_pthread_cond_signal.c: Likewise.
10168 * old_pthread_cond_timedwait.c: Likewise.
10169 * old_pthread_cond_wait.c: Likewise.
10170
10171 2003-01-03 Jakub Jelinek <jakub@redhat.com>
10172
10173 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10174
10175 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10176
10177 * pthreadP.h (pthread_cond_2_0_t): New type.
10178 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10179 Use new type for the 2.0 condvar function prototypes.
10180 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10181 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10182 parameter.
10183 * old_pthread_cond_destroy.c: Likewise.
10184 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
10185 * old_pthread_cond_signal.c: Likewise.
10186 * old_pthread_cond_timedwait.c: Likewise.
10187 * old_pthread_cond_wait.c: Likewise.
10188
10189 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10190 (__pthread_cond_wait): Don't save cancellation mode and seq value
10191 in same location.
10192
10193 * herrno.c (__h_errno_location): Don't define as weak.
10194
10195 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10196
10197 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10198 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10199 and pthread_cond_wait.
10200 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10201 Renamed to...
10202 (__pthread_cond_broadcast_2_0): ... this.
10203 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10204 Renamed to...
10205 (__pthread_cond_destroy_2_0): ... this.
10206 * old_pthread_cond_init.c (__old_pthread_cond_init):
10207 Renamed to...
10208 (__pthread_cond_init_2_0): ... this.
10209 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10210 Renamed to...
10211 (__pthread_cond_signal_2_0): ... this.
10212 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10213 Renamed to...
10214 (__pthread_cond_wait_2_0): ... this.
10215 * pthread_cond_destroy.c: Include shlib-compat.h.
10216 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10217 * pthread_cond_init.c: Include shlib-compat.h.
10218 (pthread_cond_init): Change strong_alias into versioned_symbol.
10219 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10220 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10221 fields.
10222 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10223 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10224 __pthread_cond_wait_2_0): New prototypes.
10225 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10226 __old_pthread_cond_init, __old_pthread_cond_signal,
10227 __old_pthread_cond_wait): Removed.
10228 * init.c: Include shlib-compat.h.
10229 (pthread_functions): Guard ptr___pthread_attr_init_2_0
10230 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10231 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10232 ptr___pthread_cond_*_2_0 fields.
10233 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10234 pthread_cond_*@GLIBC_2.0 compatibility symbols.
10235
10236 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10237 LIBC_SIGACTION was not yet defined.
10238 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10239 [!defined LIBC_SIGACTION] (__sigaction): New function and
10240 libc_hidden_weak.
10241 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10242 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10243
10244 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10245
10246 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10247
10248 2003-01-02 Ulrich Drepper <drepper@redhat.com>
10249
10250 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10251 New, larger type definition.
10252 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10253 implementation.
10254 * Versions [libpthread]: Add definitions for new pthread_cond_*
10255 interfaces for version GLIBC_2.3.2.
10256 * pthread_cond_init.c: Update initialization for new type definition.
10257 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10258 pthread_cond_timedwait, pthread_cond_signal, and
10259 pthread_cond_broadcast. Add old_pthread_cond_init,
10260 old_pthread_cond_destroy, old_pthread_cond_wait,
10261 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10262 old_pthread_cond_broadcast.
10263 * old_pthread_cond_broadcast.c: New file.
10264 * old_pthread_cond_destroy.c: New file.
10265 * old_pthread_cond_init.c: New file.
10266 * old_pthread_cond_signal.c: New file.
10267 * old_pthread_cond_timedwait.c: New file.
10268 * old_pthread_cond_wait.c: New file.
10269 * pthreadP.h: Add prototypes for the compatibility interfaces.
10270
10271 * pthread_cond_destroy.c: Don't include <errno.h>.
10272
10273 2003-01-01 Ulrich Drepper <drepper@redhat.com>
10274
10275 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10276 unnecessary zero offset when addressing MUTEX.
10277
10278 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10279
10280 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10281 __register_atfork.
10282 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10283 for __register_atfork.
10284
10285 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10286
10287 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10288 instead of ASSEMBLER test macro.
10289
10290 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10291 __libc_current_sigrtmax): Add libc_hidden_def.
10292
10293 * sysdeps/pthread/list.h: Remove assert.h include.
10294
10295 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10296
10297 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10298 __pthread_initialize_minimal_internal not
10299 __pthread_initialize_minimal.
10300
10301 2002-12-30 Ulrich Drepper <drepper@redhat.com>
10302
10303 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10304 __pthread_initialize_minimal as hidden.
10305
10306 * init.c (__pthread_initialize_minimal_internal): Don't mark as
10307 constructor.
10308
10309 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10310
10311 * Makefile ($(inst_libdir)/libpthread.so): Depend on
10312 $(common-objpfx)format.lds, include that into the output script.
10313 Fix comment.
10314 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10315
10316 2002-12-28 Andreas Jaeger <aj@suse.de>
10317
10318 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10319 nsec resolution changes.
10320 (xstat64_conv): Likewise.
10321 (xstat32_conv): Likewise.
10322 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10323 struct kernel_stat.
10324 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10325 structs stat and stat64.
10326 * time/time.h (__timespec_defined): Define for __USE_MISC.
10327 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10328
10329 2002-12-30 Jakub Jelinek <jakub@redhat.com>
10330
10331 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
10332 argument.
10333 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10334 (pthread_exit): Use strong_alias to avoid warnings.
10335 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10336 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10337 ptr___pthread_attr_init_2_*.
10338 * init.c (pthread_functions): Adjust.
10339
10340 2002-12-29 Ulrich Drepper <drepper@redhat.com>
10341
10342 * forward.c: Make all functions available by default again. It
10343 caused too much trouble.
10344
10345 * pt-siglongjmp.c: Removed.
10346
10347 2002-12-28 Jakub Jelinek <jakub@redhat.com>
10348
10349 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10350 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10351 * sysdeps/i386/Makefile: New file.
10352 * sysdeps/i386/tcb-offsets.sym: New file.
10353 * sysdeps/pthread/tcb-offsets.h: New file.
10354 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10355 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10356
10357 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10358 __register_atfork...
10359 (GLIBC_2.3.2): ...here.
10360
10361 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10362
10363 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10364 pthread_attr_setstackaddr with __attribute_deprecated__.
10365
10366 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10367
10368 * pt-system.c (system): Remove cancellation handling.
10369 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10370 cancellation routines.
10371
10372 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10373
10374 * descr.h: Include <dl-sysdep.h>.
10375 (struct pthread): Move header.data.list to the back of the struct.
10376 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10377 (MULTIPLE_THREADS_OFFSET): Adjust offset.
10378 (SYSINFO_OFFSEET): Likewise.
10379
10380 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10381
10382 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10383 Define.
10384 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10385 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10386 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10387 (USE_DL_SYSINFO): Undef.
10388
10389 2002-12-22 Jakub Jelinek <jakub@redhat.com>
10390
10391 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10392 $(common-objpfx)libc.so.
10393 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10394 it is bigger than pipe buffer size even on arches with bigger
10395 page size.
10396 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10397
10398 2002-12-25 Ulrich Drepper <drepper@redhat.com>
10399
10400 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10401 correct errno access for case that USE___THREAD is not defined.
10402
10403 2002-12-24 Ulrich Drepper <drepper@redhat.com>
10404
10405 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10406 Patch by Marijn Ros <marijn@mad.scientist.com>.
10407
10408 2002-12-22 Roland McGrath <roland@redhat.com>
10409
10410 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10411
10412 2002-12-20 Ulrich Drepper <drepper@redhat.com>
10413
10414 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10415
10416 2002-12-19 Ulrich Drepper <drepper@redhat.com>
10417
10418 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10419 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10420 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10421
10422 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10423 of int $0x80.
10424 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10425 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10426 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10427 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10428 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10429 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10430 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10431 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10432
10433 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10434 sysenter.
10435 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10436
10437 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10438
10439 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10440 in new TCB.
10441 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10442 that sysinfo is properly initialized.
10443 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10444 to 1 only for ld.so.
10445
10446 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10447 RTLD_CORRECT_DYNAMIC_WEAK.
10448
10449 2002-12-19 Jakub Jelinek <jakub@redhat.com>
10450
10451 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10452 Use return 0 as 6th argument to FORWARD4.
10453 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10454
10455 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10456
10457 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10458 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10459 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10460 (INIT_SYSINFO): New #define.
10461 (TLS_TP_INIT): Use INIT_SYSINFO.
10462 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10463 At test to make sure SYSINFO_OFFSET value is correct.
10464 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10465
10466 2002-12-18 Jakub Jelinek <jakub@redhat.com>
10467
10468 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10469 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10470 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10471 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10472 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10473 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10474 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10475
10476 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10477
10478 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10479 macro instead of using int $0x80 directly.
10480
10481 * sysdeps/pthread/bits/stdio-lock.h: New file.
10482 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10483 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10484 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10485 * Makefile (routines): Add libc-lowlevelmutex.
10486
10487 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10488 __i686.get_pc_thunk.dx.
10489
10490 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10491
10492 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10493 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10494 ($(objpfx)tst-cancel-wrappers.out): New rule.
10495 * tst-cancel-wrappers.sh: New test.
10496 * tst-locale1.c: Include signal.h.
10497 (uselocale): Test static linking of __libc_current_sigrt*.
10498
10499 2002-12-17 Ulrich Drepper <drepper@redhat.com>
10500
10501 * Makefile (tests): Add tst-cancel6.
10502 * tst-cancel6.c: New file
10503
10504 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10505
10506 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10507 Define meaningfully for assembler as well.
10508 * pthreadP.h (struct pthread_functions): Remove
10509 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
10510 and ptr_pthread_attr_init_2_1 fields.
10511 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10512 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10513 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10514 (FORWARD3): Define using FORWARD4.
10515 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10516 versions.
10517 * pt-system.c: Remove duplicate stdlib.h include.
10518
10519 2002-12-16 Ulrich Drepper <drepper@redhat.com>
10520
10521 * sem_init.c: Define sem_init@GLIBC_2.0.
10522 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10523 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10524
10525 * flockfile.c: Moved to...
10526 * sysdeps/pthread/flockfile.c: ...here. New file.
10527 * funlockfile.c: Moved to...
10528 * sysdeps/pthread/funlockfile.c: ...here. New file.
10529 * ftrylockfile.c: Moved to...
10530 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
10531
10532 2002-12-16 Jakub Jelinek <jakub@redhat.com>
10533
10534 * libc-cancellation.c: Guard both function with
10535 #if !defined NOT_IN_libc.
10536 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10537 automatically provided pthread wrappers.
10538 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10539 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10540 nor in libpthread.
10541 * pt-open.c: Removed.
10542 * pt-fcntl.c: Removed.
10543 * pt-fsync.c: Removed.
10544 * pt-lseek.c: Removed.
10545 * pt-msgrcv.c: Removed.
10546 * pt-msgsnd.c: Removed.
10547 * pt-msync.c: Removed.
10548 * pt-nanosleep.c: Removed.
10549 * pt-open64.c: Removed.
10550 * pt-pause.c: Removed.
10551 * pt-pread.c: Removed.
10552 * pt-pread64.c: Removed.
10553 * pt-pwrite.c: Removed.
10554 * pt-pwrite64.c: Removed.
10555 * pt-read.c: Removed.
10556 * pt-recv.c: Removed.
10557 * pt-recvfrom.c: Removed.
10558 * pt-recvmsg.c: Removed.
10559 * pt-send.c: Removed.
10560 * pt-sendto.c: Removed.
10561 * pt-sigtimedwait.c: Removed.
10562 * pt-sigwait.c: Removed.
10563 * pt-wait.c: Removed.
10564 * pt-waitpid.c: Removed.
10565 * pt-write.c: Removed.
10566 * pt-accept.c: Removed.
10567 * pt-close.c: Removed.
10568 * pt-connect.c: Removed.
10569 * pt-lseek64.c: Removed.
10570 * pt-sendmsg.c: Removed.
10571 * pt-tcdrain.c: Removed.
10572
10573 2002-12-15 Ulrich Drepper <drepper@redhat.com>
10574
10575 * init.c (__pthread_initialize_minimal_internal): Renamed from
10576 __pthread_initialize_minimal. Make old name an alias. This
10577 converts a normal relocation into a relative relocation.
10578
10579 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10580
10581 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10582 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10583 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10584 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10585 pt-sigwaitinfo, pt-waitid, and pt-writev.
10586 * pt-creat.c: Removed.
10587 * pt-poll.c: Removed.
10588 * pt-pselect.c: Removed.
10589 * pt-readv.c: Removed.
10590 * pt-select.c: Removed.
10591 * pt-sigpause.c: Removed.
10592 * pt-sigsuspend.c: Removed.
10593 * pt-sigwaitinfo.c: Removed.
10594 * pt-waitid.c: Removed.
10595 * pt-writev.c: Removed.
10596
10597 * init.c (pthread_functions): New variable.
10598 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10599 (or NULL) to __libc_pthread_init.
10600 * forward.c: Rewrite to use __libc:pthread_functions array to get
10601 function addresses.
10602 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10603 prototype.
10604 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10605 Take new parameter. Copy content of variable pointed to by it
10606 to __libc_pthread_init.
10607
10608 * pthreadP.h (struct pthread_functions): New type.
10609 (__libc_pthread_init): Declare.
10610
10611 * pthread_attr_destroy.c: Add namespace protected alias.
10612 * pthread_attr_getdetachstate.c: Likewise.
10613 * pthread_attr_getinheritsched.c: Likewise.
10614 * pthread_attr_getschedparam.c: Likewise.
10615 * pthread_attr_getschedpolicy.c: Likewise.
10616 * pthread_attr_getscope.c: Likewise.
10617 * pthread_attr_setdetachstate.c: Likewise.
10618 * pthread_attr_setinheritsched.c: Likewise.
10619 * pthread_attr_setschedparam.c: Likewise.
10620 * pthread_attr_setschedpolicy.c: Likewise.
10621 * pthread_attr_setscope.c: Likewise.
10622 * pthread_cond_broadcast.c: Likewise.
10623 * pthread_cond_destroy.c: Likewise.
10624 * pthread_cond_init.c: Likewise.
10625 * pthread_cond_signal.c: Likewise.
10626 * pthread_cond_wait.c: Likewise.
10627 * pthread_condattr_destroy.c: Likewise.
10628 * pthread_condattr_init.c: Likewise.
10629 * pthread_equal.c: Likewise.
10630 * pthread_exit.c: Likewise.
10631 * pthread_getschedparam.c: Likewise.
10632 * pthread_self.c: Likewise.
10633 * pthread_setcancelstate.c: Likewise.
10634 * pthread_setschedparam.c: Likewise.
10635 * pthread_mutex_destroy.c: Likewise.
10636 * pthread_mutex_init.c: Likewise.
10637 * pthreadP.h: Add prototypes for the aliases.
10638
10639 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10640 multiple_threads member in correct TCB to 1.
10641
10642 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10643 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10644 member of thread decriptor, otherwise return unconditionally 1.
10645
10646 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10647
10648 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10649 regular Linux version. Remove file.
10650 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10651 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10652 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10653 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10654 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10655 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10656 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10657 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10658 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10659 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10660 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10661 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10662 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10663 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10664 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10665 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10666 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10667 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10668 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10669 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10670 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10671 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10672 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10673 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10674 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10675 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10676 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10677 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10678 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10679 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10680
10681 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10682
10683 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10684 * sysdeps/unix/sysv/linux/open.c: Removed.
10685 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10686 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10687 * sysdeps/unix/sysv/linux/msync.c: Removed.
10688 * sysdeps/unix/sysv/linux/read.c: Removed.
10689 * sysdeps/unix/sysv/linux/close.c: Removed.
10690 * sysdeps/unix/sysv/linux/creat.c: Removed.
10691 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10692 * sysdeps/unix/sysv/linux/pause.c: Removed.
10693 * sysdeps/unix/sysv/linux/select.c: Removed.
10694 * sysdeps/unix/sysv/linux/write.c: Removed.
10695
10696 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10697
10698 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10699 element in TCB to see whether locking is needed.
10700
10701 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10702 MULTIPLE_THREADS_OFFSET value is correct.
10703
10704 * sysdeps/unix/sysv/linux/close.c: New file.
10705 * sysdeps/unix/sysv/linux/connect.S: New file.
10706 * sysdeps/unix/sysv/linux/creat.c: New file.
10707 * sysdeps/unix/sysv/linux/fsync.c: New file.
10708 * sysdeps/unix/sysv/linux/llseek.c: New file.
10709 * sysdeps/unix/sysv/linux/lseek.c: New file.
10710 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10711 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10712 * sysdeps/unix/sysv/linux/msync.c: New file.
10713 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10714 * sysdeps/unix/sysv/linux/open.c: New file.
10715 * sysdeps/unix/sysv/linux/open64.c: New file.
10716 * sysdeps/unix/sysv/linux/pause.c: New file.
10717 * sysdeps/unix/sysv/linux/poll.c: New file.
10718 * sysdeps/unix/sysv/linux/pread.c: New file.
10719 * sysdeps/unix/sysv/linux/pread64.c: New file.
10720 * sysdeps/unix/sysv/linux/pselect.c: New file.
10721 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10722 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10723 * sysdeps/unix/sysv/linux/readv.c: New file.
10724 * sysdeps/unix/sysv/linux/recv.S: New file.
10725 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10726 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10727 * sysdeps/unix/sysv/linux/select.c: New file.
10728 * sysdeps/unix/sysv/linux/send.S: New file.
10729 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10730 * sysdeps/unix/sysv/linux/sendto.S: New file.
10731 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10732 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10733 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10734 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10735 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10736 * sysdeps/unix/sysv/linux/system.c: New file.
10737 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10738 * sysdeps/unix/sysv/linux/wait.c: New file.
10739 * sysdeps/unix/sysv/linux/waitid.c: New file.
10740 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10741 * sysdeps/unix/sysv/linux/writev.c: New file.
10742 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10743
10744 * pt-readv.c: Fix comment.
10745
10746 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10747
10748 * tst-cleanup1.c: Include stdlib.h.
10749
10750 * tst-cancel5.c: New test.
10751 * Makefile (tests): Add tst-cancel5.
10752 (tst-cancel5): Link against libc.so libpthread.so in that order.
10753
10754 2002-12-13 Ulrich Drepper <drepper@redhat.com>
10755
10756 * forward.c (test_loaded): Prevent recursive calls.
10757
10758 * Makefile (routines): Add libc-cancellation.
10759 * libc-cancellation.c: New file.
10760 * descr.h (struct pthread): Add multiple_threads field.
10761 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10762 new thread descriptor to 1.
10763 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10764 Initialize multiple_thread field after successful thread creation.
10765 * cancellation.c (__do_cancel): Move to pthreadP.h.
10766 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10767 (__pthread_disable_asynccancel): Add internal_function attribute.
10768 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10769 * pthread_setcancelstate.c: Likewise.
10770 * pthread_setcanceltype.c: Likewise.
10771 * pthread_exit.c: Likewise.
10772 * pthreadP.h (CANCELLATION_P): Likewise.
10773 (__do_cancel): Define as static inline.
10774 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10775 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10776 declarations.
10777 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10778 fields. Define MULTIPLE_THREADS_OFFSET.
10779 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10780 declaration.
10781 * sysdeps/unix/sysv/linux/accept.S: New file.
10782 * sysdeps/unix/sysv/linux/read.c: New file.
10783 * sysdeps/unix/sysv/linux/write.c: New file.
10784 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10785 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10786 initialization of __libc_locking_needed.
10787 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10788 __libc_locking_needed, use multiple_threads field in TCB.
10789 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10790
10791 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10792
10793 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10794 version.
10795 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10796
10797 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10798 access to __libc_locking_needed for PIC.
10799
10800 2002-12-12 Jakub Jelinek <jakub@redhat.com>
10801
10802 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10803 declare for libc.so.
10804 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10805 expression.
10806 (__libc_lock_lock): Put into statement expression.
10807 (__libc_lock_unlock): Remove trailing semicolon.
10808 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10809
10810 2002-12-12 Roland McGrath <roland@redhat.com>
10811
10812 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10813 "m" constraint to refer to __libc_locking_needed. Declare it here.
10814
10815 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10816
10817 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10818 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10819 Initialize __libc_locking_needed.
10820 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10821 instead of __register_pthread_fork_handler.
10822 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10823 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10824 fork-gen with libc_pthread_init.
10825 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10826 of __register_pthread_fork_handler.
10827 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10828 of __register_pthread_fork_handler.
10829 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10830 __libc_locking_needed to determine whether lock prefix can be avoided.
10831 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10832
10833 2002-12-11 Ulrich Drepper <drepper@redhat.com>
10834
10835 * Makefile (tests): Add tst-cleanup1.
10836 * tst-cleanup1.c: New file.
10837 * cancellation.c (__cleanup_thread): Removed.
10838 (__do_cancel): Remove call to __cleanup_thread.
10839 * pthreadP.h: Remove __cleanup_thread prorotype.
10840
10841 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10842 Remember function and argument even if cancellation handler
10843 function is not available.
10844 (__libc_cleanup_region_end): Execute registered function directly if
10845 pthread functions are not available.
10846 (__libc_cleanup_end): Likewise.
10847
10848 * init.c (__pthread_initialize_minimal): Fix initialization in
10849 static lib by preventing gcc from being too clever.
10850
10851 2002-12-10 Ulrich Drepper <drepper@redhat.com>
10852
10853 * init.c (__pthread_initialize_minimal): Remove unneccesary
10854 sigaddset call.
10855
10856 * Makefile (tests): We can run tst-locale2 now.
10857
10858 2002-12-09 Ulrich Drepper <drepper@redhat.com>
10859
10860 * Versions: Remove duplicated sigwait entry.
10861
10862 2002-12-08 Ulrich Drepper <drepper@redhat.com>
10863
10864 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10865 inside libpthread.
10866
10867 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10868
10869 * pthreadP.h: Declare __pthread_enable_asynccancel and
10870 __pthread_disable_asynccancel.
10871 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10872 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10873 * cancellation.c (__pthread_enable_asynccancel): New function.
10874 (__pthread_disable_asynccancel): New function.
10875 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10876 * pt-close.c: Likewise.
10877 * pt-connect.c: Likewise.
10878 * pt-creat.c: Likewise.
10879 * pt-fcntl.c: Likewise.
10880 * pt-fsync.c: Likewise.
10881 * pt-lseek.c: Likewise.
10882 * pt-lseek64.c: Likewise.
10883 * pt-msgrcv.c: Likewise.
10884 * pt-msgsnd.c: Likewise.
10885 * pt-msync.c: Likewise.
10886 * pt-nanosleep.c: Likewise.
10887 * pt-open.c: Likewise.
10888 * pt-open64.c: Likewise.
10889 * pt-pause.c: Likewise.
10890 * pt-poll.c: Likewise.
10891 * pt-pread.c: Likewise.
10892 * pt-pread64.c: Likewise.
10893 * pt-pselect.c: Likewise.
10894 * pt-pwrite.c: Likewise.
10895 * pt-pwrite64.c: Likewise.
10896 * pt-read.c: Likewise.
10897 * pt-readv.c: Likewise.
10898 * pt-recv.c: Likewise.
10899 * pt-recvfrom.c: Likewise.
10900 * pt-recvmsg.c: Likewise.
10901 * pt-select.c: Likewise.
10902 * pt-send.c: Likewise.
10903 * pt-sendmsg.c: Likewise.
10904 * pt-sendto.c: Likewise.
10905 * pt-sigpause.c: Likewise.
10906 * pt-sigsuspend.c: Likewise.
10907 * pt-sigtimedwait.c: Likewise.
10908 * pt-sigwait.c: Likewise.
10909 * pt-sigwaitinfo.c: Likewise.
10910 * pt-system.c: Likewise.
10911 * pt-tcdrain.c: Likewise.
10912 * pt-wait.c: Likewise.
10913 * pt-waitid.c: Likewise.
10914 * pt-waitpid.c: Likewise.
10915 * pt-write.c: Likewise.
10916 * pt-writev.c: Likewise.
10917 * pthread_join.c: Likewise.
10918 * pthread_timedjoin.c: Likewise.
10919
10920 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10921 (__xpg_sigpause): New function.
10922 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10923
10924 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10925
10926 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10927
10928 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10929 _GI_pthread_cleanup_pop to pthreadP.h.
10930
10931 * ftrylockfile.c: Use _IO_lock_trylock instead of
10932 pthread_mutex_trylock.
10933
10934 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10935 (CANCEL_RESET): Likewise.
10936 (__pthread_setcanceltype_): Declare.
10937 (__pthread_mutex_lock_internal): Declare.
10938 (__pthread_mutex_unlock_internal): Declare.
10939 (__pthread_once_internal): Declare.
10940 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10941 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10942
10943 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10944 and pthread_mutex_unlock.
10945 * pthread_cond_wait.c: Likewise.
10946 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10947 * pthread_mutex_unlock.c: Likewise.
10948
10949 * pthread_setcanceltype.c: Add additional alias
10950 __pthread_setcanceltype.
10951
10952 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10953 * sem_open.c (sem_open): Likewise.
10954 Use __libc_open, __libc_write, and __libc_close instead of
10955 open, write, and close respectively.
10956
10957 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10958 Rewrite as statement expression since it must return a value.
10959
10960 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10961 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10962 __pthread_kill.
10963
10964 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10965 alias __pthread_once_internal.
10966
10967 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10968
10969 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10970
10971 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10972 * tst-stdio1.c: New file.
10973 * tst-stdio2.c: New file.
10974
10975 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10976
10977 * Makefile (tests): Comment out tst-locale2 for now.
10978 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10979
10980 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10981 -D_IO_MTSAFE_IO.
10982 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10983 Use _IO_lock_init instead of explicit assignment.
10984
10985 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10986 Define __libc_lock_* and __libc_lock_recursive macros with
10987 lowlevellock macros, not pthread mutexes.
10988
10989 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10990 of pthread_mutex_lock.
10991 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10992 instead of pthread_mutex_unlock.
10993
10994 2002-12-06 Roland McGrath <roland@redhat.com>
10995
10996 * allocatestack.c (__stack_user): Use uninitialized defn.
10997 * init.c (__pthread_initialize_minimal): Initialize it here.
10998
10999 2002-12-05 Roland McGrath <roland@redhat.com>
11000
11001 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11002 string.
11003 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11004
11005 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11006 missing & here too.
11007
11008 2002-12-05 Ulrich Drepper <drepper@redhat.com>
11009
11010 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11011 lowlevellock.
11012 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11013 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11014 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11015 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11016 for __libc_lock_* macros.
11017 * Makefile (routines): Add libc-lowlevellock.
11018
11019 2002-10-09 Roland McGrath <roland@redhat.com>
11020
11021 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11022 Under [__PIC__], call the function via the pointer fetched for
11023 comparison rather than a call by name that uses the PLT.
11024 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11025 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11026 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11027 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11028 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11029
11030 2002-12-04 Roland McGrath <roland@redhat.com>
11031
11032 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11033
11034 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11035 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11036
11037 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11038
11039 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11040
11041 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11042 a completely opaque, non-integer type.
11043 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11044
11045 2002-12-05 Jakub Jelinek <jakub@redhat.com>
11046
11047 * sysdeps/i386/tls.h: Include stdlib.h.
11048 * sysdeps/x86_64/tls.h: Likewise.
11049
11050 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11051
11052 * Makefile (tests): Add tst-locale2.
11053 (tests-static): Likewise.
11054 * tst-locale2.c: New file.
11055
11056 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11057 volatile and add memory clobbers to lock operations.
11058
11059 2002-12-03 Ulrich Drepper <drepper@redhat.com>
11060
11061 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11062 * sysdeps/i386/i486/bits/atomic.h: New file.
11063 * sysdeps/i386/i586/bits/atomic.h: New file.
11064 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11065 include i486 version.
11066 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11067 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11068 Patch by Marijn Ros <marijn@mad.scientist.com>.
11069
11070 * allocatestack.c (get_cached_stack): Don't crash if we first
11071 found a stack with a larger size then needed.
11072 Reported by Hui Huang <hui.huang@sun.com>.
11073
11074 * Makefile (tests): Add tst-sysconf.
11075 * tst-sysconf.c: New file.
11076
11077 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11078 PTHREAD_THREADS_MAX.
11079
11080 2002-12-02 Roland McGrath <roland@redhat.com>
11081
11082 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11083 Declare using hidden_proto instead of attribute_hidden, so there are
11084 non-.hidden static symbols for gdb to find.
11085 (__pthread_keys): Likewise.
11086 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11087 * allocatestack.c (__stack_user): Likewise.
11088 * pthread_create.c (__pthread_keys): Likewise.
11089 (__nptl_threads_events, __nptl_last_event): Make these static instead
11090 of hidden.
11091 * pthread_key_create.c (__pthread_pthread_keys_max,
11092 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11093
11094 2002-12-02 Ulrich Drepper <drepper@redhat.com>
11095
11096 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11097 statically.
11098 * tst-locale1.c: New file.
11099
11100 * pthread_cond_timedwait.c: Include <stdlib.h>.
11101
11102 * Makefile (tests): Add tst-fork2 and tst-fork3.
11103 * tst-fork2.c: New file.
11104 * tst-fork3.c: New file.
11105
11106 2002-11-28 Ulrich Drepper <drepper@redhat.com>
11107
11108 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11109
11110 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11111 require it to 200112L.
11112
11113 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11114 instruction only if HAVE_CMOV is defined.
11115 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11116
11117 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11118
11119 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11120
11121 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11122
11123 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11124
11125 2002-11-27 Ulrich Drepper <drepper@redhat.com>
11126
11127 * sysdeps/x86_64/bits/atomic.h: New file.
11128
11129 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11130 16-bit operations.
11131
11132 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11133 possible since gettid cannot fail.
11134
11135 * sysdeps/x86_64/pthreaddef.h: New file.
11136
11137 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11138
11139 * sysdeps/x86_64/pthread_spin_init.c: New file.
11140 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11141 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11142 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11143
11144 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11145 Add missing lock prefix. Minute optimization.
11146
11147 * tst-spin2.c (main): Also check successful trylock call.
11148
11149 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11150 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11151
11152 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11153 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11154
11155 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11156 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11157 value in case of an error. Add support for INTERNAL_SYSCALL.
11158
11159 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11160 value in case of an error.
11161
11162 * sysdeps/x86_64/tls.h: New file.
11163
11164 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11165
11166 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11167 takes the array member name and the index as parameters.
11168 (THREAD_SETMEM_NC): Likewise.
11169 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11170 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11171 interfaces.
11172
11173 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11174 to decide which code to use.
11175 (THREAD_SETMEM_NC): Likewise.
11176
11177 * allocatestack.c (queue_stack): Don't remove stack from list here.
11178 Do it in the caller. Correct condition to prematurely terminate
11179 loop to free stacks.
11180 (__deallocate_stack): Remove stack from list here.
11181
11182 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11183
11184 * Makefile (tests): Add tst-stack1.
11185 * tst-stack1.c: New file.
11186
11187 * allocatestack.c (allocate_stack): Initialize the TCB on a user
11188 provided stack.
11189
11190 * pthread_attr_getstack.c: Return bottom of the thread area.
11191
11192 2002-11-25 Ulrich Drepper <drepper@redhat.com>
11193
11194 * Makefile (libpthread-routines): Add pt-allocrtsig and
11195 pthread_kill_other_threads.
11196 * pt-allocrtsig.c: New file.
11197 * pthread_kill_other_threads.c: New file.
11198 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11199 all three functions.
11200 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11201 allocrtsig.
11202 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11203 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11204 and __libc_allocate_rtsig_private.
11205 * Versions (libpthread): Export pthread_kill_other_threads_np,
11206 __libc_current_sigrtmin, and __libc_current_sigrtmax.
11207
11208 2002-11-24 Ulrich Drepper <drepper@redhat.com>
11209
11210 * allocatestack.c (allocate_stack): stackaddr in attribute points to
11211 the end of the stack. Adjust computations.
11212 When mprotect call fails dequeue stack and free it.
11213 * pthread_attr_setstack.c: Store top of the stack in stackaddr
11214 attribute.
11215 * pthread_getattr_np.c: Likewise.
11216
11217 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11218 surprises.
11219
11220 2002-11-23 Ulrich Drepper <drepper@redhat.com>
11221
11222 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11223 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11224
11225 2002-11-22 Ulrich Drepper <drepper@redhat.com>
11226
11227 * pthread_getspecific.c: Optimize access to first 2nd-level array.
11228 * pthread_setspecific.c: Likewise.
11229
11230 2002-11-21 Ulrich Drepper <drepper@redhat.com>
11231
11232 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11233 definitions. Get them from the official place.
11234 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11235
11236 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11237 Use new CLONE_ flags in clone() calls.
11238
11239 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11240 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11241
11242 * Versions: Add pthread_* functions for libc.
11243 * forward.c: New file.
11244
11245 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11246 errno-loc.
11247 * herrno.c: New file.
11248 * res.c: New file.
11249
11250 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11251 sem_trywait, and sem_timedwait. Add herrno and res.
11252 * sem_init.c: Don't initialize lock and waiters members.
11253 * sem_open.c: Likewise.
11254 * sem_post.c: Removed.
11255 * sem_wait.c: Removed.
11256 * sem_trywait.c: Removed.
11257 * sem_timedwait.c: Removed.
11258 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11259 Includes full implementations of sem_post, sem_wait, sem_trywait,
11260 and sem_timedwait.
11261 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11262 for new implementation.
11263 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11264 and waiters fields.
11265
11266 * tst-sem3.c: Improve error message.
11267 * tst-signal3.c: Likewise.
11268
11269 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11270 to tell the kernel about the termination futex and to initialize tid
11271 member. Don't initialize main_thread.
11272 * descr.h (struct pthread): Remove main_thread member.
11273 * cancelllation.c (__do_cancel): Remove code handling main thread.
11274 The main thread is not special anymore.
11275
11276 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11277 size of the stacks to stack_cache_actsize.
11278
11279 * pt-readv.c: Add missing "defined".
11280 * pt-sigwait.c: Likewise.
11281 * pt-writev.c: Likewise.
11282
11283 2002-11-09 Ulrich Drepper <drepper@redhat.com>
11284
11285 * Versions: Export __connect from libpthread.
11286 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11287
11288 * Makefile (libpthread-routines): Add pt-raise.
11289 * sysdeps/unix/sysv/linux/raise.c: New file.
11290 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11291 * sysdeps/generic/pt-raise.c: New file.
11292
11293 * pthread_cond_init.c: Initialize all data elements of the condvar
11294 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11295
11296 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11297 * pthread_create.c: Likewise.
11298
11299 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11300 * tst-key1.c: New file.
11301 * tst-key2.c: New file.
11302 * tst-key3.c: New file.
11303
11304 * Versions: Export pthread_detach for version GLIBC_2.0.
11305 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11306
11307 2002-11-08 Ulrich Drepper <drepper@redhat.com>
11308
11309 * pthread_key_create.c: Terminate search after an unused key was found.
11310 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11311
11312 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11313 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11314
11315 2002-10-10 Ulrich Drepper <drepper@redhat.com>
11316
11317 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11318 dynamic lookup for errno in PIC.
11319
11320 * allocatestack.c (get_cached_stack): Rearrange code slightly to
11321 release the stack lock as soon as possible.
11322 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11323 the static TLS block.
11324 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11325
11326 * cancellation.c: Renamed from cancelation.c.
11327 * Makefile: Adjust accordingly.
11328 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11329 * cleanup_defer.c: Use CANCELLATION_P.
11330 * pthread_testcancel.c: Likewise.
11331 * descr.h: Fix spelling in comments.
11332 * init.c: Likewise.
11333 * pthread_getattr_np.c: Likewise.
11334 * pthread_getschedparam.c: Likewise.
11335 * pthread_setschedparam.c: Likewise.
11336 * Versions: Likewise.
11337
11338 * pt-pselect.c: New file.
11339 * Makefile (libpthread-routines): Add pt-pselect.
11340 * Versions: Add pselect.
11341
11342 * tst-cancel4.c: New file.
11343 * Makefile (tests): Add tst-cancel4.
11344
11345 2002-10-09 Ulrich Drepper <drepper@redhat.com>
11346
11347 * pthread_mutex_lock.c: Always record lock ownership.
11348 * pthread_mutex_timedlock.c: Likewise.
11349 * pthread_mutex_trylock.c: Likewise.
11350
11351 * pt-readv.c: New file.
11352 * pt-writev.c: New file.
11353 * pt-creat.c: New file.
11354 * pt-msgrcv.c: New file.
11355 * pt-msgsnd.c: New file.
11356 * pt-poll.c: New file.
11357 * pt-select.c: New file.
11358 * pt-sigpause.c: New file.
11359 * pt-sigsuspend.c: New file.
11360 * pt-sigwait.c: New file.
11361 * pt-sigwaitinfo.c: New file.
11362 * pt-waitid.c: New file.
11363 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11364 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11365 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11366 * Versions: Add all the new functions.
11367
11368 * tst-exit1.c: New file.
11369 * Makefile (tests): Add tst-exit1.
11370
11371 * sem_timedwait.c: Minor optimization for more optimal fastpath.
11372
11373 2002-10-08 Ulrich Drepper <drepper@redhat.com>
11374
11375 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11376
11377 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11378 call. pthread_join is an official cancellation point.
11379 * pthread_timedjoin.c: Likewise.
11380
11381 * pthread_cond_wait.c: Revert order in which internal lock are dropped
11382 and the condvar's mutex are retrieved.
11383 * pthread_cond_timedwait.c: Likewise.
11384 Reported by dice@saros.East.Sun.COM.
11385
11386 2002-10-07 Ulrich Drepper <drepper@redhat.com>
11387
11388 * pthreadP.h: Cut out all type definitions and move them...
11389 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
11390 * pthreadP.h: Include <internaltypes.h>.
11391
11392 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11393 performance tweaks.
11394
11395 * sem_trywait.c: Shuffle #includes around to get right order.
11396 * sem_timedwait.c: Likewise.
11397 * sem_post.c: Likewise.
11398 * sem_wait.c: Likewise.
11399
11400 * nptl 0.3 released.
11401
11402 * Makefile (tests): Add tst-signal3.
11403 * tst-signal3.c: New file.
11404
11405 2002-10-05 Ulrich Drepper <drepper@redhat.com>
11406
11407 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11408 the asms modify the sem object.
11409 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11410
11411 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11412 the actual members.
11413 * pthreadP.h (struct sem): New type. Actual semaphore type.
11414 * semaphoreP.h: Include pthreadP.h.
11415 * sem_getvalue.c: Adjust to sem_t change.
11416 * sem_init.c: Likewise.
11417 * sem_open.c: Likewise.
11418 * sem_post.c: Likewise.
11419 * sem_timedwait.c: Likewise.
11420 * sem_trywait.c: Likewise.
11421 * sem_wait.c: Likewise.
11422
11423 2002-10-04 Ulrich Drepper <drepper@redhat.com>
11424
11425 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11426 * tst-basic2.c: New file.
11427 * tst-exec1.c: New file.
11428 * tst-exec2.c: New file.
11429 * tst-exec3.c: New file.
11430
11431 * tst-fork1.c: Remove extra */.
11432
11433 * nptl 0.2 released. The API for IA-32 is complete.