]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Avoid race between {,__de}allocate_stack and __reclaim_stacks during fork
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
7a775e6b
AS
12011-09-15 Andreas Schwab <schwab@redhat.com>
2
3 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
4 defined.
5 (list_add): Add atomic_write_barrier.
6 * descr.h: Define __need_list_t before including <list.h>.
7 * nptl-init.c: Include <list.h>
8 * allocatestack.c: Likewise.
9
83cd1420
UD
102011-09-11 Ulrich Drepper <drepper@gmail.com>
11
12 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
13 * sysdeps/ia64/tls.h: Likewise.
14 * sysdeps/powerpc/tls.h: Likewise.
15 * sysdeps/s390/tls.h: Likewise.
16 * sysdeps/sh/tls.h: Likewise.
17 * sysdeps/sparc/tls.h: Likewise.
18 * sysdeps/x86_64/tls.h: Likewise.
19
3ce1f295
UD
202011-09-10 Ulrich Drepper <drepper@gmail.com>
21
02d46fc4
UD
22 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
23
d063d164
UD
24 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
25 !USE___THREAD.
26 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
27 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
28 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
29 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
30 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
31 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
32 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
33 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
34 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
35 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
36 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
37 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
38
3ce1f295
UD
39 * tst-tls1.c: Support for __thread is now mandatory.
40 * tst-tls2.c: Likewise.
41 * tst-tls3.c: Likewise.
42 * tst-tls3mod.c: Likewise.
43 * tst-tls4.c: Likewise.
44 * tst-tls4moda.c: Likewise.
45 * tst-tls4modb.c: Likewise.
46 * tst-tls5.h: Likewise.
47
1e4bd093
L
482011-09-08 Ulrich Drepper <drepper@gmail.com>
49
50 [BZ #12403]
51 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
52 (pthread_rwlock_timedwrlock): Use correct macro in test.
53 Patch by H.J. Lu <hongjiu.lu@intel.com>.
54
a0e1f41b
UD
552011-09-06 Ulrich Drepper <drepper@gmail.com>
56
57 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
58 use gettimeofday vsyscall, just call gettimeofday.
9e5c9dcd
UD
59 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
60 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
61 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
62 Likewise.
63 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
64 Likewise.
65 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
66 Simplify __vdso_clock_gettime use.
a0e1f41b 67
39c4451c
DM
682011-09-05 David S. Miller <davem@davemloft.net>
69
70 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
71 New function.
72 (sem_timedwait): Call it to force an exception region around
73 the async cancel enable and the futex operation.
74 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
75 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
76 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
77 (__new_sem_wait): Call it to force an exception region around
78 the async cancel enable and the futex operation.
79 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
80 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
81
523df511
AS
822011-08-31 Andreas Schwab <schwab@redhat.com>
83
84 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
85 thread is woken up.
86
e315850c
DM
872011-08-20 David S. Miller <davem@davemloft.net>
88
89 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
90
5744c68d
RM
912011-08-14 Roland McGrath <roland@hack.frob.com>
92
93 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
94 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
95
a724d1b9
AS
962011-08-08 Andreas Schwab <schwab@redhat.com>
97
98 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
99 stack.
100 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
101 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
102
7a03a9c8
UD
1032011-07-22 Ulrich Drepper <drepper@gmail.com>
104
105 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
106 barrier.
107 (__gcc_personality_v0): Likewise.
108 (_Unwind_ForcedUnwind): Likewise.
109 (_Unwind_GetCFA): Likewise.
110
4b3d3e28
RM
1112011-07-14 Roland McGrath <roland@hack.frob.com>
112
113 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
114 UINTMAX_C.
115
6f8326ca
UD
1162011-06-30 Ulrich Drepper <drepper@gmail.com>
117
118 * nptl-init.c (__nptl_set_robust): New function.
119 (pthread_functions): Add reference.
120 * npthreadP.h: Declare __nptl_set_robust.
121 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
122 ptr_set_robust member.
123 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
124 child if threads are used.
125
c71ca1f8
AJ
1262011-06-14 Andreas Jaeger <aj@suse.de>
127
128 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
129
5bdcc103
UD
1302011-05-11 Ulrich Drepper <drepper@gmail.com>
131
132 [BZ #386]
133 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
134
e6c61494
UD
1352011-04-10 Ulrich Drepper <drepper@gmail.com>
136
137 [BZ #12650]
138 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
139 clearing memory.
140 Patch partly by Robert Rex <robert.rex@exasol.com>.
141
c5be0f71
RM
1422011-01-19 Roland McGrath <roland@redhat.com>
143
144 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
145 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
146 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
147 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
148 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
149 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
150
1f20b93a
AS
1512011-01-16 Andreas Schwab <schwab@linux-m68k.org>
152
153 * Makefile (test-extras): Add tst-cleanup4aux.
154
70181fdd
UD
1552011-01-14 Ulrich Drepper <drepper@gmail.com>
156
157 [BZ #10563]
158 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
159 (__SETXID_2): Likewise.
160 (__SETXID_3): Likewise.
161
451f001b
UD
1622011-01-13 Ulrich Drepper <drepper@gmail.com>
163
164 [BZ #10484]
165 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
a85b5cb4 166 * alloca_cutoff.c: Add libc_hidden_def.
451f001b 167
f9068148
L
1682010-10-13 H.J. Lu <hongjiu.lu@intel.com>
169
170 [BZ #12113]
171 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
172 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
173 of "struct pthread".
174
c3758fee
AS
1752010-09-21 Andreas Schwab <schwab@redhat.com>
176
177 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
178 [!__EXCEPTIONS]: Mangle local variable not_first_call.
179 (pthread_cleanup_push_defer_np): Likewise.
180
4ac42e19
UD
1812010-09-03 Ulrich Drepper <drepper@redhat.com>
182
183 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
184 small.
185
022f6b89
DG
1862010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
187 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
188
189 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
190 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
191
f8392f40
L
1922010-08-12 H.J. Lu <hongjiu.lu@intel.com>
193
93f17abf 194 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
f8392f40 195
bebff237
AM
1962010-05-01 Alan Modra <amodra@gmail.com>
197
198 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
199 (PSEUDO): Use correct cr save. Don't use wrong parm save area
200 to save temps. Correct cfi for possible later frame manipulation.
201 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
202 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
203 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
204 (DOCARGS_6, UNDOCARGS_6): Likewise.
205 (CENABLE, CDISABLE): Add nops for non-shared calls.
206
e8ee8bdf
AS
2072010-07-06 Andreas Schwab <schwab@redhat.com>
208
209 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
210 Fix type mismatch.
211
03e87550
UD
2122010-07-03 Ulrich Drepper <drepper@redhat.com>
213
214 * tst-abstime.c (do_test): Some more cleanups
215
145569dc
UD
2162010-07-02 Ulrich Drepper <drepper@redhat.com>
217
218 * tst-abstime.c: Correct testing and add test for sem_timedwait.
219
2983d85e
AS
2202010-07-01 Andreas Schwab <schwab@redhat.com>
221 Ulrich Drepper <drepper@redhat.com>
222
223 * Makefile (tests): Add tst-abstime.
224 * tst-abstime.c: New file.
225 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
226 (__lll_timedlock_wait): Check for timestamp before the Epoch.
227 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
228 (__lll_timedlock_wait): Likewise.
229 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
230 (__lll_robust_timedlock_wait): Likewise.
231 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
232 (__pthread_cond_timedwait): Likewise.
233 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
234 (pthread_rwlock_timedrdlock): Likewise.
235 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
236 (pthread_rwlock_timedwrlock): Likewise.
237 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
238 Likewise.
239
72b6e8c8
UD
2402010-07-01 Ulrich Drepper <drepper@redhat.com>
241
242 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
243
4bc93b30
TY
2442010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
245
246 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
247 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
248
86a4c67f
UD
2492010-04-09 Ulrich Drepper <drepper@redhat.com>
250
251 [BZ #11390]
252 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
253 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
254 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
255 pthread_setname.
256 * Makefile (libpthread-routines): Add pthread_getname and
257 pthread_setname.
258 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
259
f571a994
RM
2602010-04-05 Thomas Schwinge <thomas@schwinge.name>
261
262 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
263 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
264 * sysdeps/pthread/Makefile: Remove csu section and rt section's
265 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
266
7749bf5f
LM
2672010-03-23 Luis Machado <luisgpm@br.ibm.com>
268
269 * pthread_cond_timedwait.c: Add check for
270 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
271 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
272 INTERNAL_SYSCALL.
273
1d78f299
UD
2742010-03-09 Ulrich Drepper <drepper@redhat.com>
275
276 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
277 and the call fails wake eventually waiting setxid threads. Don't free
278 stack here if we try starting a thread.
279 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
280 if the clone call failed.
281
058e9ba9
AS
2822010-03-08 Andreas Schwab <schwab@redhat.com>
283
284 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
285 * allocatestack.c (get_cached_stack): Set setxid_futex.
286 (allocate_stack): Likewise.
287
66f1b8ee
UD
2882010-03-05 Andreas Schwab <schwab@redhat.com>
289 Ulrich Drepper <drepper@redhat.com>
290
291 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
292 it is creating a thread or it is just being created.
293 * pthread_create.c (start_thread): Wake setxid thread if it is
294 waiting.
295 (__pthread_create_2_1): Initialize setxid_futex.
296 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
297 is waiting.
298
893549c5
MS
2992010-01-15 Ulrich Drepper <drepper@redhat.com>
300
301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
302 Fix unwind info.
303 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
304
3052010-01-15 Michal Schmidt <mschmidt@redhat.com>
306
307 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
308 Fix pthread_cond_timedwait with requeue-PI.
309 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
310 Fix pthread_cond_wait with requeue-PI.
311
402cd987
UD
3122010-01-14 Ulrich Drepper <drepper@redhat.com>
313
78ee2185
UD
314 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
315 and pthread_mutexattr_setrobust for GLIBC_2.12.
402cd987 316 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
78ee2185
UD
317 * pthread_mutexattr_getrobust.c: Define alias
318 pthread_mutexattr_getrobust.
319 * pthread_mutexattr_setrobust.c: Define alias
320 pthread_mutexattr_setrobust.
402cd987 321
d3c7e686
UD
3222010-01-12 Ulrich Drepper <drepper@redhat.com>
323
324 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
325
f095bb72
UD
3262010-01-08 Ulrich Drepper <drepper@redhat.com>
327
328 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
329
d34bd80f
TS
3302009-12-18 Thomas Schwinge <thomas@codesourcery.com>
331
332 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
333 call __gmon_start__.
334 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
335
f01c2359
UD
3362009-12-17 Ulrich Drepper <drepper@redhat.com>
337
338 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
339 using memset.
340
75956694
DG
3412009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
342
343 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
344 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
345 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
346 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
347 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
348 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
349 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
350 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
351
9554ebf2
UD
3522009-12-12 Ulrich Drepper <drepper@redhat.com>
353
354 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
355 Don't update nwaiters after invalid timeout is recognized.
356
ebb92a49
TS
3572009-11-27 Thomas Schwinge <thomas@codesourcery.com>
358
359 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
360 __gmon_start__.
361
b55ec98c
AS
3622009-11-27 Andreas Schwab <schwab@redhat.com>
363
364 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
365 THREAD_SELF->cancelhandling after returning from futex call.
366
80b3a4ea
UD
3672009-11-24 Ulrich Drepper <drepper@redhat.com>
368
369 * tst-sem13.c: New file.
370 * Makefile (tests): Add tst-sem13.
371
57a299fe
RM
3722009-11-22 Roland McGrath <roland@redhat.com>
373
374 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
375 instead of recapitulating its contents.
376
dfedb126
UD
3772009-11-18 Ulrich Drepper <drepper@redhat.com>
378
379 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
380 optimizations and cleanups.
381
dd7106b3
DG
3822009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
383
384 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
385 Remove redundant code. Fix cfi offsets.
386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
387 Fix cfi offsets.
388
f8c10bb4
UD
3892009-11-17 Ulrich Drepper <drepper@redhat.com>
390
62616842
UD
391 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
392 reduce size of unwind info.
393
f8c10bb4
UD
394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
395 cfi directives.
396 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
397 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
398
13f6812f
AS
3992009-11-03 Andreas Schwab <schwab@linux-m68k.org>
400
401 [BZ #4457]
402 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
403 LIBGCC_S_SO.
404 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
405
25db0f6c
DJ
4062009-10-30 Ulrich Drepper <drepper@redhat.com>
407
9c04f7c1
UD
408 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
409
25db0f6c
DJ
410 [BZ #3270]
411 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
412 steps to avoid races with creation and terminations.
413 * nptl-init.c (sighandler_setxid): Adjust.
414 Patch by Daniel Jacobowitz.
415
3d60eb17
AS
4162009-09-07 Andreas Schwab <schwab@redhat.com>
417
418 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
419
38eb6136
SP
4202009-09-02 Suzuki K P <suzuki@in.ibm.com>
421 Joseph Myers <joseph@codesourcery.com>
422
423 [BZ #7094]
424 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
425 Initialize the sigev_notify field for newly created timer to make sure
01034d75 426 the timer gets deleted from the active timer's list upon timer_delete.
38eb6136 427
7812c65b
AS
4282009-08-27 Andrew Stubbs <ams@codesourcery.com>
429
430 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
431 Correct a logic error.
432
84088310
UD
4332009-08-25 Ulrich Drepper <drepper@redhat.com>
434
435 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
436 of the field in local variables.
437 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
438 variable and don't unconditionally clear it.
439
b42a214c
UD
4402009-08-24 Ulrich Drepper <drepper@redhat.com>
441
442 * pthread_create.c (start_thread): Hint to the kernel that memory for
443 the stack can be reused. We do not mark all the memory. The part
444 still in use and some reserve are kept.
445
2d094b73
UD
4462009-08-23 Ulrich Drepper <drepper@redhat.com>
447
448 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
449
ae0d5450
UD
4502009-08-11 Ulrich Drepper <drepper@redhat.com>
451
452 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
453 directives.
454
1bc2b97e
UD
4552009-08-10 Ulrich Drepper <drepper@redhat.com>
456
457 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
458 directives.
459 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
460
ec492239
AS
4612009-08-10 Andreas Schwab <schwab@redhat.com>
462
463 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
464 (__pthread_cond_signal): Don't clobber register used for syscall
465 number.
466
49eea97b
UD
4672009-08-08 Ulrich Drepper <drepper@redhat.com>
468
efa0569d
UD
469 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
470 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
471
49eea97b
UD
472 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
473 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
474 register.
475
9083bcc5
UD
4762009-08-07 Ulrich Drepper <drepper@redhat.com>
477
478 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
479 enabled by the special *_asynccancel functions.
480 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
481 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
482
483 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
484
421665c4
UD
4852009-08-04 Ulrich Drepper <drepper@redhat.com>
486
487 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
488 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
489 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
490 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
491 since we can assume the special __*_{en,dis}able_asynccancel
492 functions.
493 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
494 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
495 and PTHREAD_CANCELED.
496
bd03a1af
UD
4972009-07-31 Ulrich Drepper <drepper@redhat.com>
498
499 * descr.h: Better definition of *_BITMASK macros for cancellation.
500
b48a267b
UD
5012009-07-29 Ulrich Drepper <drepper@redhat.com>
502
586fa886
UD
503 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
504
b48a267b 505 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
586fa886
UD
506 dynamic linker might have to save.
507 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
508 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
509 printing.
510
b48a267b
UD
511 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
512
b0948ffd
UD
5132009-07-28 Ulrich Drepper <drepper@redhat.com>
514
515 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
516 New function.
517 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
518 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
519 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
520 requeue_pi for robust mutexes.
521 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
522 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
523 Don't only skip __pthread_mutex_cond_lock. Call instead
524 __pthread_mutex_cond_lock_adjust.
525 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
526
527 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
528 optimization of PI mutex handling.
529
e73e694e
UD
5302009-07-27 Ulrich Drepper <drepper@redhat.com>
531
532 [BZ #10418]
533 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
534 instead of of _acq variants of cmpxchg.
535
f1adf1f4
UD
5362009-07-23 Ulrich Drepper <drepper@redhat.com>
537
01b597da
UD
538 * sysdeps/x86_64/configure.in: New file.
539
f1adf1f4
UD
540 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
541 path when not using absolute timeout futex.
542
c3db953c
UD
5432009-07-20 Ulrich Drepper <drepper@redhat.com>
544
545 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
546 optimizations of last changes.
547 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
548
515a8908
UD
5492009-07-19 Ulrich Drepper <drepper@redhat.com>
550
42e69bcf
UD
551 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
552 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
553 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
554 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
555 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
556 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
557 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
558 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
559
515a8908
UD
560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
561 (__pthread_cond_timedwait): Make more robust.
562
30b1954a
UD
5632009-07-18 Ulrich Drepper <drepper@redhat.com>
564
e2dca2fe
UD
565 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
566 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
567 directly use absolute timeout.
568
3d77b268
UD
569 * tst-sem5.c (do_test): Add test for premature timeout.
570 * Makefile: Linu tst-sem5 with librt.
571
d979611e
UD
572 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
573 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
574 directly use absolute timeout.
32c6c342
UD
575 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
576 (pthread_rwlock_timedrdlock): Likewise.
d979611e 577
f8b6cd21
UD
578 * tst-cond11.c (run_test): Add test to check that the timeout is
579 long enough.
580
e88726b4
UD
581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
582 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
583 directly use absolute timeout.
584
30b1954a
UD
585 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
586 (__pthread_cond_wait): Convert to using exception handler instead of
587 registered unwind buffer.
92618c95
UD
588 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
589 (__pthread_cond_timedwait): Likewise.
30b1954a 590
d52c96e7
UD
5912009-07-17 Ulrich Drepper <drepper@redhat.com>
592
f351f2b7
UD
593 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
594 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
595 use absolute timeout.
596
0adae468
UD
597 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
598 handling of uncontested semaphore.
599
d52c96e7
UD
600 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
601 (__condvar_cleanup): Rewrite to use cfi directives instead of
602 hand-coded unwind tables.
63601ccd
UD
603 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
604 Likewise.
c3c2f3cf 605 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
aee2665a
UD
606 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
607 Likewise.
d52c96e7 608
bfdb73e1
UD
6092009-06-12 Ulrich Drepper <drepper@redhat.com>
610
611 * Makefile (libpthread-routines): Add pthread_sigqueue.
612 * Versions: Add pthread_sigqueue for GLIBC_2.11.
613 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
614 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
615
1828530f
BK
6162009-06-11 Ulrich Drepper <drepper@redhat.com>
617
618 [BZ #10262]
619 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
620 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
621 cannot be assumed.
622 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
623
a5b8b56d
UD
6242009-05-16 Ulrich Drepper <drepper@redhat.com>
625
e20c4ef0
UD
626 * libc-cancellation.c: Move __libc_cleanup_routine to...
627 * libc-cleanup.c: ...here. New file.
628 * Makefile (routines): Add libc-cleanup.
629
cba0ca79
UD
630 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
631 test.
632 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
633 * sysdeps/pthread/librt-cancellation.c: Likewise.
634
a5b8b56d
UD
635 [BZ #9924]
636 * nptl-init.c: Renamed from init.c.
637 * Makefile: Change all occurences of init.c to nptl-init.c.
638
1a7f254b
UD
6392009-05-15 Ulrich Drepper <drepper@redhat.com>
640
9437b427
UD
641 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
642 to test when deciding on the delay.
643 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
644 * pthread_cancel.c: Close race between deciding on sending a signal
645 and setting the CANCELING_BIT bit.
646
1a7f254b
UD
647 * cancellation.c (__pthread_disable_asynccancel): Don't return if
648 thread is canceled.
649 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
650
d5c157a9
UD
6512009-04-27 Ulrich Drepper <drepper@redhat.com>
652
653 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
654 is available.
655 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
656 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
657 * sysdeps/i386/tls.h: Likewise.
658 (tcbhead_t): Add __private_tm member.
659
f521be31
UD
6602009-04-26 Ulrich Drepper <drepper@redhat.com>
661
5efe8650
UD
662 * sem_open.c (sem_open): Rewrite initialization of initsem to
663 avoid warnings.
664
f521be31
UD
665 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
666 Avoid warning by using may_alias attribute on ptrhack.
667
d301a6e1
UD
6682009-04-22 Ulrich Drepper <drepper@redhat.com>
669
5497de87 670 [BZ #10090]
d301a6e1
UD
671 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
672 Check policy and priority for validity.
673 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
674
71a5bd3e
UD
6752009-03-15 Ulrich Drepper <drepper@redhat.com>
676
677 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
678 (__pthread_cond_timedwait): Change to use cfi directives instead of
679 hand-coded unwind sections.
680
30991b8b
UD
6812009-03-10 Ulrich Drepper <drepper@redhat.com>
682
683 * init.c (nptl_freeres): Compile only for SHARED.
684
9920a6b8
JJ
6852009-03-09 Jakub Jelinek <jakub@redhat.com>
686
687 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
688 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
689 FUTEX_BITSET_MATCH_ANY.
690
e965d514
RM
6912009-02-27 Roland McGrath <roland@redhat.com>
692
693 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
694 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
695
6cbe890a
UD
6962009-02-26 Ulrich Drepper <drepper@redhat.com>
697
698 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
699 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
700 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
701 200112L to 200809L.
702
77db439e
UD
7032009-02-25 Ulrich Drepper <drepper@redhat.com>
704
705 * sysdeps/pthread/pthread.h: The robust mutex functions are in
706 POSIX 2008.
707
5be0a688
UD
7082009-02-24 Ulrich Drepper <drepper@redhat.com>
709
710 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
711 Unify name of include protector macro.
712
4c869eb6
UD
7132009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
714
715 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
716 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
717
cca50323
UD
7182009-01-29 Ulrich Drepper <drepper@redhat.com>
719
7f901dd7
UD
720 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
721 pointer variables.
722
cca50323
UD
723 * allocatestack.c (__free_stacks): Renamed from free_stacks.
724 (__free_stack_cache): Removed. Change callers to call __free_stacks.
725 * init.c (nptl_freeres): New function.
726 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
727 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
728 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
729 variable.
730 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
731 load DSO. Assign last.
732 (__unwind_freeres): New function.
733
734 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
735 for better debugging. No need to use stack_list_add here.
736
a7bd183f
UD
7372009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
738
739 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
740 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
741 instead of computing relative timeout.
742 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
743 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
744
563ee1cb
UD
7452009-01-25 Ulrich Drepper <drepper@redhat.com>
746
747 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
748
f25c7b08
UD
7492009-01-08 Ulrich Drepper <drepper@redhat.com>
750
751 * sysdeps/pthread/list.h (list_add): Initialize new element first.
752 (list_add_tail): Removed.
753
40de0fe3
JJ
7542009-01-07 Ulrich Drepper <drepper@redhat.com>
755
756 * (in_flight_stack): New variable.
757 (stack_list_del): New function. Use instead of list_del.
758 (stack_list_add): New function. Use instead of list_add when adding to
759 stack_cache and stack_used lists.
760 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
761 when the fork call interrupted another thread.
762
3c612057
UD
7632009-01-04 Ulrich Drepper <drepper@redhat.com>
764
765 * init.c (__pthread_initialize_minimal_internal): Optimize test
766 FUTEX_CLOCK_REALTIME a bit.
767
19834b42
UD
7682009-01-03 Ulrich Drepper <drepper@redhat.com>
769
770 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
771 only passing five parameters to FUTEX_WAIT_BITSET call.
772
773 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a9fa090b 774 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
19834b42
UD
775 instead of computing relative timeout.
776
7dd650d7
UD
7772009-01-02 Ulrich Drepper <drepper@redhat.com>
778
cbd8aeb8
UD
779 * init.c (__pthread_initialize_minimal_internal): Check for
780 FUTEX_CLOCK_REALTIME flag.
781 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
a9fa090b 782 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
cbd8aeb8
UD
783 relative timeout.
784
7dd650d7
UD
785 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
786 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
787 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
788 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
789 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
790 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
791
217d45cd
UD
7922008-12-09 Ulrich Drepper <drepper@redhat.com>
793
794 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
795 loop body instead of ; to avoid gcc warnings.
796 (pthread_cleanup_pop_restore_np): Likewise.
797 Patch by Caolán McNamara <caolanm@redhat.com>.
798
6de79a49
UD
7992008-12-09 Jakub Jelinek <jakub@redhat.com>
800
801 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
802 fast path here, for robust/PI/PP mutexes call
803 __pthread_mutex_lock_full. Don't use switch, instead use a series
804 of ifs according to their probability.
805 (__pthread_mutex_lock_full): New function.
806 * pthread_mutex_unlock.c: Include assert.h.
807 (__pthread_mutex_unlock_usercnt): Handle only the
808 fast path here, for robust/PI/PP mutexes call
809 __pthread_mutex_unlock_full. Don't use switch, instead use a series
810 of ifs according to their probability.
811 (__pthread_mutex_unlock_full): New function.
812 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
813 (__pthread_mutex_lock_full): Define.
814
71bb2639
UD
8152008-12-08 Ulrich Drepper <drepper@redhat.com>
816
817 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
818 implementation. Add necessary padding and.
819 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
820 words.
821
247626f3
UD
8222008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
823
824 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
825 and FUTEX_WAKE_BITSET.
826
da5ac135
UD
8272008-12-02 Ulrich Drepper <drepper@redhat.com>
828
829 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
830 and FUTEX_WAKE_BITSET.
831 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
832 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
833 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
834 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
835
c0439b95
RM
8362008-11-25 Roland McGrath <roland@redhat.com>
837
838 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
839 Subdirectories moved to ports repository as
840 sysdeps/.../nptl subdirectories.
841
0e54a725
UD
8422008-11-12 Jakub Jelinek <jakub@redhat.com>
843
844 [BZ #7008]
845 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
846 of old value.
847 * pthread_cond_init.c (__pthread_cond_init): Fix
848 cond->__data.__nwaiters initialization.
849 * Makefile (tests): Add tst-cond23.
850 * tst-cond23.c: New test.
851
4b23f9bd
JJ
8522008-11-07 Jakub Jelinek <jakub@redhat.com>
853
854 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
855 arguments.
856 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
857 arguments.
858
efac1fce
UD
8592008-11-01 Ulrich Drepper <drepper@redhat.com>
860
861 [BZ #6955]
862 * pthread_mutex_lock.c: Add support for private PI mutexes.
863 * pthread_mutex_timedlock.c: Likewise.
864 * pthread_mutex_trylock.c: Likewise.
865 * pthread_mutex_unlock.c: Likewise.
866 Patch mostly by Ben Jackson <ben@ben.com>.
867
bf837fa3
UD
8682008-10-31 Ulrich Drepper <drepper@redhat.com>
869
870 [BZ #6843]
871 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
872 Increase stack size for helper thread.
873
208bc836
UD
8742008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
875
876 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
877 assembly with a clobber list for access registers a0 and a1.
878
17f8b4a9
UD
8792008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
880
881 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
882 to force runp->refcntr to be read from memory.
883
2458c748
AJ
8842008-09-08 Richard Guenther <rguenther@suse.de>
885
886 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
887 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
888 lll_timedlock, lll_robust_timedlock, lll_unlock,
889 lll_robust_unlock): Promote private to int.
890
965805e8
UD
8912008-08-15 Ulrich Drepper <drepper@redhat.com>
892
893 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
894 ARCH_RETRY_MMAP definitions.
895 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
896 Define MAP_STACK when not defined.
897 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
898 handling of ARCH_RETRY_MMAP.
899
bd7f4857
UD
9002008-07-30 Ulrich Drepper <drepper@redhat.com>
901
902 * tst-align2.c (f): Print message that f is reached.
903
619cc2f6
UD
9042008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
905
906 [BZ #6740]
907 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
908 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
909
8ccf22f9
UD
9102008-07-25 Ulrich Drepper <drepper@redhat.com>
911
912 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
913 SOCK_CLOEXEC if possible.
914
9152008-05-29 Ulrich Drepper <drepper@redhat.com>
916
917 * Makefile (tests): Add tst-rwlock2a.
918 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
919 * tst-rwlock2a.c: New file.
920
5a337776
UD
9212008-06-12 Ulrich Drepper <drepper@redhat.com>
922
923 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
924
e4d6e7f5
UD
9252008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
926
927 * sysdeps/pthread/pthread.h: Fix typo in comment.
928
d6296e88
UD
9292008-05-28 Ulrich Drepper <drepper@redhat.com>
930
931 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
932 of CPU set to the kernel.
933
62605cbf
UD
9342008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
935
936 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
937 cfi directives.
938 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
939 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
940 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
941 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
942 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
943 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
944
9452008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
946
947 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
948 cfi directives.
949 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
950 Likewise.
951 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
952 Likewise.
953 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
954 Likewise.
955
4b2c85c0
UD
9562008-05-26 Ulrich Drepper <drepper@redhat.com>
957
958 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
959
b72f5692 9602008-05-20 Jakub Jelinek <jakub@redhat.com>
4b2c85c0
UD
961
962 David S. Miller <davem@davemloft.net>
3b15b590 963
b72f5692 964 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3b15b590 965
cdffaaa6
UD
9662008-05-10 Ulrich Drepper <drepper@redhat.com>
967
968 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
969 __pshared correctly.
970 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
971 Likewise.
972 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
973 Likewise.
974 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
975 Likewise.
976 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
977 Likewise.
978 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
979
2313c48f
JJ
9802008-04-14 David S. Miller <davem@davemloft.net>
981
982 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
983 (__old_sem_wait): Fix argument to lll_futex_wait().
984
2f611ada
UD
9852007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
986
987 * pthread_create.c: Require pthread_mutex_trylock and
988 pthread_key_delete for libgcc.
989
d24be489
JJ
9902008-04-08 Jakub Jelinek <jakub@redhat.com>
991
992 [BZ #6020]
993 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
994 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
995 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
996
f96853be
UD
9972008-03-27 Ulrich Drepper <drepper@redhat.com>
998
8ccf22f9 999 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
f96853be
UD
1000 <linux/limits.h> has defined it.
1001 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1002 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1003 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1004 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1005
354b7527
JJ
10062008-03-18 Jakub Jelinek <jakub@redhat.com>
1007
1008 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1009 of ASSEMBLER.
1010 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1011 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1012
702ae329
UD
10132008-03-14 Ulrich Drepper <drepper@redhat.com>
1014
1015 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1016 HAVE_DL_DISCOVER_OSVERSION.
1017 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1018 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1019
443db178
UD
10202008-03-07 Ulrich Drepper <drepper@redhat.com>
1021
1022 [BZ #5778]
1023 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1024 _POSIX_CHOWN_RESTRICTED value to zero.
1025
67fbfa5c
RM
10262008-01-31 Roland McGrath <roland@redhat.com>
1027
1028 * Makefile (omit-deps): Variable removed.
1029
dd3113da
UD
10302008-01-30 Ulrich Drepper <drepper@redhat.com>
1031
1032 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1033 unnecessary addr32 prefix.
1034
16cd816f
RM
10352008-01-29 Roland McGrath <roland@redhat.com>
1036
1037 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1038
b4b166af
UD
10392008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1040
1041 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1042
10432008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1044
1045 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1046 a scratch register.
1047 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1048 (__lll_lock_wait_private): Fix typo.
1049 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1050 (pthread_barrier_wait): Likewise. Adjust XADD use.
1051 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1052 Adjust XADD use.
1053 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1054 (pthread_rwlock_timedrdlock): Return correct return value.
1055 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
16cd816f 1056 (pthread_rwlock_timedwrlock): Likewise.
b4b166af 1057
eaf95a26
UD
10582008-01-15 Ulrich Drepper <drepper@redhat.com>
1059
1060 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1061 thread returns the program exits with an error code.
1062
ab355d9a
UD
10632008-01-10 Ulrich Drepper <drepper@redhat.com>
1064
1065 * pthread-errnos.sym: Add EOVERFLOW.
1066 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1067 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1068 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1069 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1070
b8cca206
UD
10712007-12-14 Ulrich Drepper <drepper@redhat.com>
1072
1073 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1074 parameter. Passed it as permission to mmap.
1075 * allocatestack.c (allocate_stack): Pass prot as second parameter
1076 to ARCH_RETRY_MMAP.
1077
189dce4f
UD
10782007-12-12 Ulrich Drepper <drepper@redhat.com>
1079
3eb0e1c6
UD
1080 * tst-basic7.c: Allocate memory for the stack.
1081
189dce4f
UD
1082 [BZ #5465]
1083 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1084 (__pthread_cond_timedwait): Don't use VDSO.
58d11795 1085 Patch by Michal Januszewski.
189dce4f 1086
26e21e75
UD
10872007-12-07 Ulrich Drepper <drepper@redhat.com>
1088
1089 [BZ #5455]
1090 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1091 Allow label before pthread_cleanup_pop.
1092 (pthread_cleanup_pop_restore_np): Likewise.
1093
191ec77f
UD
10942007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1095
1096 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1097 Store 2 before returning ETIMEDOUT.
1098
c012be6f
UD
10992007-11-23 Ulrich Drepper <drepper@redhat.com>
1100
1101 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1102 Store 2 before returning ETIMEDOUT.
1103 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1104 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1105 (__lll_lock_wait_private): Optimize.
1106 (__lll_lock_wait): Likewise.
1107
77f1e09a
UD
11082007-11-20 Jakub Jelinek <jakub@redhat.com>
1109
1110 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1111 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1112 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1113
0f7e0ee5
UD
11142007-11-08 Ulrich Drepper <drepper@redhat.com>
1115
cbed6a60
UD
1116 [BZ #5240]
1117 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1118 If we time out, try one last time to lock the futex to avoid
1119 losing a wakeup signal.
1120 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1121 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1122
0f7e0ee5
UD
1123 [BZ #5245]
1124 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1125 if necessary.
1126
f6ed654c
UD
11272007-11-07 Ulrich Drepper <drepper@redhat.com>
1128
1129 [BZ #5245]
1130 * allocatestack.c (allocate_stack): Change ENOMEM error in case
1131 mmap failed to EAGAIN.
1132 * Makefile (tests): Add tst-basic7.
1133 * tst-basic7.c: New file.
1134
b92e3780
UD
11352007-11-05 Ulrich Drepper <drepper@redhat.com>
1136
1137 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1138 Use __linkin_atfork.
1139
94a749f6
UD
11402007-11-03 Mike Frysinger <vapier@gentoo.org>
1141
1142 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1143 missing line continuations.
1144 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1145 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
1146
f160a450
UD
11472007-10-28 Ulrich Drepper <drepper@redhat.com>
1148
1149 [BZ #5220]
1150 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1151 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1152 (struct timer): Add next element.
1153 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1154 enqueue timer structure into __active_timer_sigev_thread list.
1155 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1156 remove timer struct from __active_timer_sigev_thread.
1157 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1158 Before using timer structure make sure it is still on the
1159 __active_timer_sigev_thread list. Keep lock until done.
1160 Define __active_timer_sigev_thread and
1161 __active_timer_sigev_thread_lock.
1162
94833f11
UD
11632007-10-27 Ulrich Drepper <drepper@redhat.com>
1164
1165 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1166 Redefine thread_atfork for use of ATFORK_MEM.
1167 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1168 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1169 function.
1170 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1171 Use atomic operation when removing first element of list.
1172
96c06e08
JJ
11732007-10-17 Jakub Jelinek <jakub@redhat.com>
1174
1175 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1176 routine instead of an alias to __new_sem_post.
1177
e807818b
JJ
11782007-10-15 Jakub Jelinek <jakub@redhat.com>
1179
1180 * init.c (__pthread_initialize_minimal): Initialize word to appease
1181 valgrind.
1182
59d430c6
UD
11832007-10-10 Jakub Jelinek <jakub@redhat.com>
1184
1185 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1186 libc.so just clear NAME.
1187 (__libc_rwlock_fini): Nop inside of libc.so.
1188 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1189 all zeros.
1190
221d9d8e
UD
11912007-09-02 Ulrich Drepper <drepper@redhat.com>
1192
1193 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1194 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1195 unlocking failed.
1196 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1197
2a01ce56
UD
11982007-08-21 Ulrich Drepper <drepper@redhat.com>
1199
1200 [BZ #4938]
1201 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1202 reclaimed stack if necessary.
1203 * Makefile (tests): Add tst-tsd6.
1204 * tst-tsd6.c: New file.
1205
c273641b
JJ
12062007-08-21 Jakub Jelinek <jakub@redhat.com>
1207
1208 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1209 Add private argument.
1210
fb84593c
UD
12112007-08-20 Ulrich Drepper <drepper@redhat.com>
1212
1213 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1214 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1215
3e8d1eab
JJ
12162007-08-16 Jakub Jelinek <jakub@redhat.com>
1217
1218 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1219 (__lll_robust_timedlock): Pass private as last argument to
1220 __lll_robust_timedlock_wait.
1221 (__lll_unlock): Fix a pasto.
1222
e4720b0e
JJ
12232007-08-15 Jakub Jelinek <jakub@redhat.com>
1224
1225 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1226 sparc_old_sem): New structs.
1227 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1228 (__sem_wait_cleanup): New function.
1229 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1230 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1231 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1232 lll_futex_wait.
1233 (__old_sem_wait): New function.
1234 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1235 nptl/sysdeps/unix/sysv/linux/sparc version.
1236 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1237 Likewise.
1238 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1239 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1240 (__new_sem_trywait): Use sparc_old_sem structure.
1241 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1242 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
1243 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1244 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1245 lll_futex_timed_wait.
1246 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1247 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1248 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1249 lll_futex_wake.
1250 (__old_sem_post): New function.
1251 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1252 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1253 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1254 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1255 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1256 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1257
d13f4a43
UD
12582007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1259
1260 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1261 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1262 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1263 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1264 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1265 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1266 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1267 Use FUTEX_WAKE_OP.
1268 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1269 kernel-features.h and tcb-offsets.h.
1270 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1271 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1272 process private.
1273 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1274 tcb-offsets.h.
1275 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1276 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1277 process private.
1278 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1279 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1280 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1281 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1282 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1283 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1284 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1285
702a9414
JJ
12862007-08-14 Jakub Jelinek <jakub@redhat.com>
1287
467d1345
JJ
1288 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1289 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1290 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1291 lll_futex_timed_wait.
1292
702a9414
JJ
1293 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1294 __lll_robust_unlock): Rewrite as macros instead of inline functions.
1295 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1296 __lll_robust_unlock, __lll_wait_tid): Likewise.
1297
22502ea2
UD
12982007-08-13 Jakub Jelinek <jakub@redhat.com>
1299
1300 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1301 Fix a pasto.
1302 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1303 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1304 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1305 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1306 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1307 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1308 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1309 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1310 kernel-features.h.
1311 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1312 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1313 process private. Switch DW_CFA_advance_loc1 and some
1314 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1315 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1316 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1317 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1318 process private. Switch DW_CFA_advance_loc{1,2} and some
1319 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1320 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1321 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1322 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1323 Likewise.
1324 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1325 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1326 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1327 Likewise.
1328 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1329 (__pthread_cond_broadcast): Compare %r8 instead of
1330 dep_mutex-cond_*(%rdi) with $-1.
1331 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1332 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1333 of oring.
1334
4baf59ad
UD
13352007-08-13 Ulrich Drepper <drepper@redhat.com>
1336
1337 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1338
9c6f6953
UD
13392007-08-13 Jakub Jelinek <jakub@redhat.com>
1340
1341 * allocatestack.c: Include kernel-features.h.
1342 * pthread_create.c: Likewise.
1343 * pthread_mutex_init.c: Likewise.
1344 * init.c: Likewise.
1345 * pthread_cond_timedwait.c: Likewise.
1346 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1347 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1348 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1349 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1350 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1351 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1352 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1353 Likewise.
1354 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1355 Likewise.
1356 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1357 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1358 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1359 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1360
974a1f0f
UD
13612007-08-12 Jakub Jelinek <jakub@redhat.com>
1362
1363 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1364 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1365 byte elements. One of them is the new __shared element.
1366 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1367 adjust names of other padding elements.
1368 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1369 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1370 byte elements. One of them is the new __shared element.
1371 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1372 adjust names of other padding elements.
1373 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1374 Renamed __pad1 element to __shared, adjust names of other padding
1375 elements.
1376 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1377 (pthread_rwlock_t): Likewise.
1378 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1379 typo.
1380
13812007-08-09 Anton Blanchard <anton@samba.org>
1382
1383 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1384
f47e2626
UD
13852007-08-12 Ulrich Drepper <drepper@redhat.com>
1386
1387 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1388 <kernel-features.h>.
1389 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1390
5bd8a249
UD
13912007-08-11 Ulrich Drepper <drepper@redhat.com>
1392
1393 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1394 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1395 dealing with robust mutexes.
1396 * pthread_mutex_timedlock.c: Likewise.
1397 * pthread_mutex_trylock.c: Likewise.
1398 * pthread_mutex_unlock.c: Likewise.
1399 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1400
14012007-08-06 Jakub Jelinek <jakub@redhat.com>
1402
1403 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1404 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1405 (PTHREAD_MUTEX_PSHARED): Define.
1406 * pthread_mutex_init.c (__pthread_mutex_init): Set
1407 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1408 mutexes.
1409 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1410 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1411 as second argument to lll_lock.
1412 (LLL_MUTEX_TRYLOCK): Take mutex as argument
1413 instead of its __data.__lock field.
1414 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1415 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1416 to lll_robust_lock.
1417 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1418 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1419 instead of mutex->__data.__kind directly, pass
1420 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1421 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1422 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1423 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1424 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1425 to lll_timedlock, lll_robust_timedlock, lll_unlock and
1426 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
1427 of mutex->__data.__kind directly.
1428 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1429 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1430 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
1431 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1432 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1433 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1434 and lll_futex_wake.
1435 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1436 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1437 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1438 directly.
1439 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1440 Take mutex as argument instead of its __data.__lock field, pass
1441 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1442 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1443 __data.__lock field.
1444 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1445 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1446 to lll_robust_cond_lock.
1447 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1448 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1449 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
1450 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1451 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1452 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1453 lll_futex_wait.
1454 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1455 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1456 lll_futex_wake.
1457 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1458 pshared variable, pass it to lll_lock, lll_unlock,
1459 lll_futex_timedwait and lll_futex_wake.
1460 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1461 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1462 and lll_futex_wake.
1463 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1464 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1465 macro.
1466 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1467 lll_futex_wake_unlock): Likewise.
1468 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1469 Likewise.
1470 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1471 lll_futex_wake_unlock): Likewise.
1472 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1473 Likewise.
1474 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1475 lll_futex_wake_unlock): Likewise.
1476 (lll_futex_wake): Fix a typo.
1477 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1478 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1479 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1480 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1481 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1482 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1483 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1484 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1485 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1486 (__pthread_cond_timedwait): Likewise.
1487 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1488 (__condvar_cleanup, __pthread_cond_wait): Likewise.
1489
0470fa46
JJ
14902007-08-05 Jakub Jelinek <jakub@redhat.com>
1491
1492 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1493 Don't use CGOTSETUP and CGOTRESTORE macros.
1494 (CGOTSETUP, CGOTRESTORE): Remove.
1495 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1496 @local symbol.
1497
64f6281c
UD
14982007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1499
1500 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1501 definitions for private futexes.
1502 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1503 kernel-features.h and lowlevellock.h. Use private futexes if
1504 they are available.
1505 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1506 (__lll_mutex_lock_wait): Rename to
1507 (__lll_lock_wait): ... this. Don't compile in for libc.so.
1508 (__lll_mutex_timedlock_wait): Rename to ...
1509 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
1510 Don't compile in for libc.so.
1511 (__lll_mutex_unlock_wake): Rename to ...
1512 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
1513 (__lll_timedwait_tid): Use __NR_gettimeofday.
1514 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1515 the header from assembler. Renamed all lll_mutex_* resp.
1516 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1517 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1518 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1519 Define.
1520 (__lll_lock_wait_private): Add prototype.
1521 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1522 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1523 __lll_unlock_wake): Likewise.
1524 (lll_lock): Add private argument. Call __lll_lock_wait_private
1525 if private is constant LLL_PRIVATE.
1526 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1527 lll_timedlock, lll_robust_timedlock): Add private argument.
1528 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1529 if private is constant LLL_PRIVATE.
1530 (lll_robust_unlock, lll_robust_dead): Add private argument.
1531 (lll_lock_t): Remove.
1532 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1533 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1534 lll_cond_wake, lll_cond_broadcast): Remove.
1535 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1536 kernel-features.h and lowlevellock.h.
1537 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1538 (LOAD_FUTEX_WAIT): Define.
1539 (__lll_robust_mutex_lock_wait): Rename to ...
1540 (__lll_robust_lock_wait): ... this. Add private argument.
1541 Use LOAD_FUTEX_WAIT macro.
1542 (__lll_robust_mutex_timedlock_wait): Rename to ...
1543 (__lll_robust_timedlock_wait): ... this. Add private argument.
1544 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1545 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1546 lowlevellock.h.
1547 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1548 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1549 __lll_mutex_{lock,unlock}_*.
1550 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1551 lowlevellock.h and pthread-errnos.h.
1552 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1553 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1554 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1555 __lll_mutex_{lock,unlock}_*.
1556 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1557 lowlevellock.h and pthread-errnos.h.
1558 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1559 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1560 __lll_mutex_{lock,unlock}_*.
1561 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1562 lowlevellock.h.
1563 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1564 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1565 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1566 (__condvar_tw_cleanup): Likewise.
1567 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1568 lowlevellock.h.
1569 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1570 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1571 __lll_mutex_{lock,unlock}_*.
1572 ( __condvar_w_cleanup): Likewise.
1573 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1574 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1575 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1576 lowlevellock.h.
1577 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1578 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1579 __lll_mutex_{lock,unlock}_*.
1580 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1581 lowlevellock.h.
1582 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1583 FUTEX_PRIVATE_FLAG): Remove.
1584 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1585 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1586 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1587 lowlevellock.h.
1588 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1589 FUTEX_PRIVATE_FLAG): Remove.
1590 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1591 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1592 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1593 lowlevellock.h.
1594 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1595 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1596 __lll_mutex_{lock,unlock}_*.
1597 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1598 lowlevellock.h.
1599 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1600 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1601 __lll_mutex_{lock,unlock}_*.
1602 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1603 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1604 (__new_sem_post): Use standard initial exec code sequences.
1605 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1606 lowlevellock.h.
1607 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1608 FUTEX_PRIVATE_FLAG): Remove.
1609 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1610 exec code sequences.
1611 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1612 (__new_sem_trywait): Use standard initial exec code sequences.
1613 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1614 (__new_sem_wait): Use standard initial exec code sequences.
1615
e51deae7
UD
16162007-07-31 Anton Blanchard <anton@samba.org>
1617
1618 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1619 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1620 atomic_full_barrier.
1621
16222007-07-31 Jakub Jelinek <jakub@redhat.com>
1623
1624 * allocatestack.c (stack_cache_lock): Change type to int.
1625 (get_cached_stack, allocate_stack, __deallocate_stack,
1626 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1627 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1628 as second argument to lll_lock and lll_unlock macros on
1629 stack_cache_lock.
1630 * pthread_create.c (__find_in_stack_list): Likewise.
1631 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1632 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1633 as second argument.
1634 * descr.h (struct pthread): Change lock and setxid_futex field
1635 type to int.
1636 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1637 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1638 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1639 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1640 Likewise.
1641 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1642 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1643 * pthreadP.h (__attr_list_lock): Change type to int.
1644 * pthread_attr_init.c (__attr_list_lock): Likewise.
1645 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1646 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1647 lll_{,un}lock.
1648 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1649 also for lll_futex_{wake,wait}.
1650 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1651 a pointer to const.
1652 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1653 LLL_SHARED as second argument to lll_{,un}lock.
1654 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1655 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1656 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1657 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1658 Likewise.
1659 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1660 as second argument to lll_{,un}lock macros on pd->lock.
1661 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1662 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1663 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1664 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1665 Likewise.
1666 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1667 Likewise.
1668 * pthread_once.c (once_lock): Change type to int.
1669 (__pthread_once): Pass LLL_PRIVATE as second argument to
1670 lll_{,un}lock macros on once_lock.
1671 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1672 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1673 rwlock->__data.__shared as second argument to them and similarly
1674 for lll_futex_w*.
1675 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1676 Likewise.
1677 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1678 Likewise.
1679 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1680 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1681 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1682 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1683 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1684 to lll_{,un}lock macros on __sem_mappings_lock.
1685 * sem_open.c (check_add_mapping): Likewise.
1686 (__sem_mappings_lock): Change type to int.
1687 * semaphoreP.h (__sem_mappings_lock): Likewise.
1688 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1689 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1690 instead of lll_*mutex_*, pass LLL_SHARED as last
1691 argument.
1692 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1693 pass LLL_SHARED as last argument.
1694 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1695 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1696 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1697 pass LLL_SHARED as last argument.
1698 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1699 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1700 LLL_SHARED as last argument.
1701 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1702 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1703 Similarly.
1704 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1705 __libc_lock_lock_recursive, __libc_lock_unlock,
1706 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1707 argument to lll_{,un}lock.
1708 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1709 _IO_lock_unlock): Likewise.
1710 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1711 compound literal.
1712 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1713 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1714 __fork_lock.
1715 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1716 free_mem): Likewise.
1717 (__fork_lock): Change type to int.
1718 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1719 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1720 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1721 lll_futex_wake.
1722 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1723 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1724 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1725 New function.
1726 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1727 pass it through to lll_futex_*wait, only compile in when
1728 IS_IN_libpthread.
1729 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1730 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1731 argument and pass it through to lll_futex_*wait.
1732 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1733 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1734 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1735 inline functions to __lll_* resp. __lll_robust_*.
1736 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1737 (lll_mutex_dead): Add private argument.
1738 (__lll_lock_wait_private): New prototype.
1739 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1740 __lll_robust_lock_timedwait): Add private argument to prototypes.
1741 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1742 call __lll_lock_wait_private, otherwise pass private to
1743 __lll_lock_wait.
1744 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1745 __lll_robust_timedlock): Add private argument, pass it to
1746 __lll_*wait functions.
1747 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1748 call __lll_unlock_wake_private, otherwise pass private to
1749 __lll_unlock_wake.
1750 (__lll_robust_unlock): Add private argument, pass it to
1751 __lll_robust_unlock_wake.
1752 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1753 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1754 argument, pass it through to __lll_* inline function.
1755 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1756 (lll_lock_t): Remove.
1757 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1758 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1759 lll_cond_wake, lll_cond_broadcast): Remove.
1760 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1761 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1762 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1763 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1764 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1765 the header from assembler. Renamed all lll_mutex_* resp.
1766 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1767 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1768 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1769 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1770 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1771 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1772 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1773 Remove prototype.
1774 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1775 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1776 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1777 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1778 MULTIPLE_THREADS_OFFSET as another asm operand.
1779 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1780 MULTIPLE_THREADS_OFFSET as last asm operand, call
1781 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1782 otherwise pass private as another argument to __lll_lock_wait.
1783 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1784 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1785 private as another argument to __lll_*lock_wait call.
1786 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1787 MULTIPLE_THREADS_OFFSET as another asm operand, call
1788 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1789 otherwise pass private as another argument to __lll_unlock_wake.
1790 (lll_robust_unlock): Add private argument, pass private as another
1791 argument to __lll_unlock_wake.
1792 (lll_robust_dead): Add private argument, use __lll_private_flag
1793 macro.
1794 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1795 LLL_MUTEX_LOCK_INITIALIZER.
1796 (lll_lock_t): Remove.
1797 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1798 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1799 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1800 lll_cond_wake, lll_cond_broadcast): Remove.
1801 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1802 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1803 2007-05-2{3,9} changes.
1804 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1805 kernel-features.h and lowlevellock.h.
1806 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1807 (LOAD_FUTEX_WAIT): Rewritten.
1808 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1809 define.
1810 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1811 (__lll_mutex_lock_wait): Rename to ...
1812 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1813 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1814 (__lll_mutex_timedlock_wait): Rename to ...
1815 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1816 contains private argument. Don't compile in for libc.so.
1817 (__lll_mutex_unlock_wake): Rename to ...
1818 (__lll_unlock_wake): ... this. %ecx contains private argument.
1819 Don't compile in for libc.so.
1820 (__lll_timedwait_tid): Use __NR_gettimeofday.
1821 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1822 kernel-features.h and lowlevellock.h.
1823 (LOAD_FUTEX_WAIT): Define.
1824 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1825 define.
1826 (__lll_robust_mutex_lock_wait): Rename to ...
1827 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1828 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1829 macro.
1830 (__lll_robust_mutex_timedlock_wait): Rename to ...
1831 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1832 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1833 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1834 lowlevellock.h.
1835 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1836 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1837 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1838 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1839 to __lll_lock_wait in %edx.
1840 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1841 Include lowlevellock.h and pthread-errnos.h.
1842 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1843 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1844 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1845 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1846 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1847 __lll_unlock_wake.
1848 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1849 Include lowlevellock.h and pthread-errnos.h.
1850 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1851 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1852 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1853 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1854 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1855 __lll_unlock_wake.
1856 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1857 Include lowlevellock.h.
1858 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1859 Don't define.
1860 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1861 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1862 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1863 __lll_unlock_wake. Use __NR_gettimeofday.
1864 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1865 Include lowlevellock.h.
1866 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1867 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1868 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1869 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1870 and __lll_unlock_wake.
1871 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1872 Include lowlevellock.h.
1873 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1874 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1875 MUTEX(%ebx) address in %edx rather than %ecx to
1876 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1877 and __lll_unlock_wake. Move return value from %ecx to %edx
1878 register.
1879 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1880 Include lowlevellock.h.
1881 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1882 Don't define.
1883 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1884 MUTEX(%ebp) address in %edx rather than %ecx to
1885 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1886 and __lll_unlock_wake. Move return value from %ecx to %edx
1887 register. Use __NR_gettimeofday.
1888 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1889 Include lowlevellock.h.
1890 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1891 Don't define.
1892 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1893 MUTEX(%ebp) address in %edx rather than %ecx to
1894 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1895 and __lll_unlock_wake. Move return value from %ecx to %edx
1896 register. Use __NR_gettimeofday.
1897 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1898 Include lowlevellock.h.
1899 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1900 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1901 MUTEX(%edi) address in %edx rather than %ecx to
1902 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1903 and __lll_unlock_wake.
1904 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1905 Include lowlevellock.h.
1906 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1907 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1908 MUTEX(%ebx) address in %edx rather than %ecx to
1909 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1910 and __lll_unlock_wake. Move return value from %ecx to %edx
1911 register.
1912 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1913 lowlevellock.h.
1914 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1915 define.
1916 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1917 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1918 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1919 lowlevellock.h.
1920 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1921 (sem_timedwait): Use __NR_gettimeofday.
1922 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1923 lowlevellock.h.
1924 (LOCK): Don't define.
1925 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1926 lowlevellock.h.
1927 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1928 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1929 are waiters.
1930 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1931 2007-05-2{3,9} changes.
1932 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1933 kernel-features.h and lowlevellock.h.
1934 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1935 (LOAD_FUTEX_WAIT): Rewritten.
1936 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1937 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1938 (__lll_mutex_lock_wait): Rename to ...
1939 (__lll_lock_wait): ... this. %esi is now private argument.
1940 Don't compile in for libc.so.
1941 (__lll_mutex_timedlock_wait): Rename to ...
1942 (__lll_timedlock_wait): ... this. %esi contains private argument.
1943 Don't compile in for libc.so.
1944 (__lll_mutex_unlock_wake): Rename to ...
1945 (__lll_unlock_wake): ... this. %esi contains private argument.
1946 Don't compile in for libc.so.
1947 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1948 kernel-features.h and lowlevellock.h.
1949 (LOAD_FUTEX_WAIT): Define.
1950 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1951 (__lll_robust_mutex_lock_wait): Rename to ...
1952 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1953 Use LOAD_FUTEX_WAIT macro.
1954 (__lll_robust_mutex_timedlock_wait): Rename to ...
1955 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1956 private, use LOAD_FUTEX_WAIT macro.
1957 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1958 lowlevellock.h.
1959 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1960 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1961 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1962 __lll_lock_wait and __lll_unlock_wake.
1963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1964 Include lowlevellock.h and pthread-errnos.h.
1965 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1966 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1967 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1968 pass LLL_SHARED in %esi to both __lll_lock_wait and
1969 __lll_unlock_wake.
1970 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1971 Include lowlevellock.h and pthread-errnos.h.
1972 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1973 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1974 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1975 pass LLL_SHARED in %esi to both __lll_lock_wait and
1976 __lll_unlock_wake.
1977 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1978 Include lowlevellock.h.
1979 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1980 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1981 pass LLL_SHARED in %esi to both __lll_lock_wait and
1982 __lll_unlock_wake.
1983 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1984 Include lowlevellock.h.
1985 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1986 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1987 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1988 and __lll_unlock_wake.
1989 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1990 Include lowlevellock.h.
1991 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1992 Don't define.
1993 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1994 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1995 and __lll_unlock_wake.
1996 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1997 Include lowlevellock.h.
1998 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1999 Don't define.
2000 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2001 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2002 and __lll_unlock_wake.
2003 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2004 Include lowlevellock.h.
2005 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2006 Don't define.
2007 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2008 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2009 and __lll_unlock_wake.
2010 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2011 Include lowlevellock.h.
2012 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2013 Don't define.
2014 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2015 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2016 and __lll_unlock_wake.
2017 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2018 Include lowlevellock.h.
2019 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2020 Don't define.
2021 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2022 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2023 and __lll_unlock_wake.
2024 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2025 lowlevellock.h.
2026 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2027 define.
2028 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2029 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2030 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2031 lowlevellock.h.
2032 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2033 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2034 lowlevellock.h.
2035 (LOCK): Don't define.
2036 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2037 lowlevellock.h.
2038 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2039 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2040 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2041 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2042 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2043 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2044 (__lll_lock_wait_private): New function.
2045 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2046 it to lll_futex_*wait. Don't compile in for libc.so.
2047 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2048 Remove.
2049 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2050 (struct sparc_pthread_barrier): Remove.
2051 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2052 struct sparc_pthread_barrier. Pass
2053 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2054 and lll_futex_wait macros.
2055 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2056 Remove.
2057 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2058 Include sparc pthread_barrier_wait.c instead of generic one.
2059
6f59d56e
UD
20602007-07-30 Jakub Jelinek <jakub@redhat.com>
2061
1475e201
UD
2062 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2063
6f59d56e
UD
2064 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2065 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2066 %ecx.
2067 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2068 (pthread_rwlock_timedwrlock): Likewise.
2069 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2070 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2071
558f0300
JJ
20722007-07-31 Jakub Jelinek <jakub@redhat.com>
2073
2074 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2075
cedb4109
UD
20762007-07-26 Jakub Jelinek <jakub@redhat.com>
2077
2078 * tst-locale2.c (useless): Add return statement.
2079
085a4412
UD
20802007-07-24 Jakub Jelinek <jakub@redhat.com>
2081
2082 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2083 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2084 * pthread_create.c (start_thread): Likewise.
2085 * init.c (sighandler_setxid): Likewise.
2086 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2087 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2088 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2089 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2090 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2091 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2092 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2093 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2094 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2095 Likewise.
2096 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2097 Likewise.
2098 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2099 Likewise.
2100 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2101 __rtld_notify): Likewise.
2102 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2103 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2104 __pthread_once): Likewise.
2105 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2106 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2107 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2108 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2109 (lll_futex_wait): Add private argument, define as wrapper around
2110 lll_futex_timed_wait.
2111 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2112 use __lll_private_flag macro.
2113 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2114 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2115 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2116 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2117 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2118 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2119 (lll_futex_wait): Add private argument, define as wrapper around
2120 lll_futex_timed_wait.
2121 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2122 use __lll_private_flag macro.
2123 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2124 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2125 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2126 Define.
2127 (lll_futex_timed_wait, lll_futex_wake): Use it.
2128 (lll_private_futex_wait, lll_private_futex_timed_wait,
2129 lll_private_futex_wake): Removed.
2130 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2131 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2132 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2133 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2134 (lll_futex_wait): Add private argument, define as wrapper around
2135 lll_futex_timed_wait.
2136 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2137 use __lll_private_flag macro.
2138 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2139 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2140 to lll_futex_*.
2141 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2142 (lll_private_futex_wait, lll_private_futex_timed_wait,
2143 lll_private_futex_wake): Removed.
2144 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2145 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2146 (lll_private_futex_wait, lll_private_futex_timed_wait,
2147 lll_private_futex_wake): Removed.
2148 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2149 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2150 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2151 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2152 (lll_futex_wait): Add private argument, define as wrapper around
2153 lll_futex_timed_wait.
2154 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2155 use __lll_private_flag macro.
2156 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2157 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2158 to lll_futex_*.
2159 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2160 Define.
2161 (lll_futex_timed_wait, lll_futex_wake): Use it.
2162 (lll_private_futex_wait, lll_private_futex_timed_wait,
2163 lll_private_futex_wake): Removed.
2164
ef0af159
JJ
21652007-07-27 Jakub Jelinek <jakub@redhat.com>
2166
2167 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2168 of the structure for sparc32.
2169
21702007-07-26 Aurelien Jarno <aurelien@aurel32.net>
2171
2172 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2173
eb4f5909
UD
21742007-07-23 Ulrich Drepper <drepper@redhat.com>
2175
2176 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2177 code used when private futexes are assumed.
2178 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2179 Likewise.
2180
b5f13526
UD
21812007-07-23 Jakub Jelinek <jakub@redhat.com>
2182
2183 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2184 (__lll_private_flag): Define.
2185 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2186 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2187 __lll_private_flag.
2188 (lll_private_futex_wait, lll_private_futex_timedwait,
2189 lll_private_futex_wake): Define as wrapper around non-_private
2190 macros.
2191 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2192 (__lll_private_flag): Define.
2193 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2194 (lll_private_futex_wait, lll_private_futex_timedwait,
2195 lll_private_futex_wake): Define as wrapper around non-_private
2196 macros.
2197
eb7721f2
UD
21982007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
2199
2200 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2201 parameter to lll_futex_wait call.
2202 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2203
2204 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2205 Replace lll_futex_wait with lll_private_futex_wait.
2206 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2207 Add LLL_SHARED parameter to lll_futex_wake().
2208
2209 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2210 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2211 lll_private_futex_wake.
2212 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2213 bit from private parm before syscall.
2214 (lll_futex_timed_wait): Likewise.
2215 (lll_futex_wake): Likewise.
2216 (lll_futex_wake_unlock): Likewise.
2217 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2218 (lll_robust_mutex_unlock): Likewise.
2219 (lll_mutex_unlock_force): Likewise.
2220 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2221
defc45f2
UD
22222007-07-23 Ulrich Drepper <drepper@redhat.com>
2223
2224 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2225 compilation when unconditionally using private futexes.
2226 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2227 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2228 Likewise.
2229 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2230 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2231
087722b8
UD
22322007-07-17 Jakub Jelinek <jakub@redhat.com>
2233
2234 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2235 Define.
2236
765c6b0c
UD
22372007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2238
2239 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2240 kernel-features.h.
2241
7d9d8bd1
RM
22422007-05-16 Roland McGrath <roland@redhat.com>
2243
2244 * init.c (__nptl_initial_report_events): New variable.
2245 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2246 to that.
2247
a4915df2
UD
22482007-06-22 Jakub Jelinek <jakub@redhat.com>
2249
2250 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2251 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2252
e4eb675d
UD
22532007-06-19 Ulrich Drepper <drepper@redhat.com>
2254
2255 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2256 implementation.
2257
ae1ad3ae
UD
22582007-06-18 Ulrich Drepper <drepper@redhat.com>
2259
2260 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2261 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2262 * pthread_mutex_timedlock.c: Likewise.
2263 * pthread_mutex_trylock.c: Likewise.
2264 * pthread_mutex_unlock.c: Likewise.
2265
89074592
UD
22662007-06-17 Andreas Schwab <schwab@suse.de>
2267
2268 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2269 sections.
2270
d4201cc4
UD
22712007-06-17 Ulrich Drepper <drepper@redhat.com>
2272
2273 * allocatestack.c (allocate_stack): Make code compile if
2274 __ASSUME_PRIVATE_FUTEX is set.
2275
339dbf0e
UD
22762007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2277
2278 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2279 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2280 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2281 (__pthread_rwlock_wrlock): Likewise.
2282 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2283 (pthread_rwlock_timedrdlock): Likewise.
2284 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2285 (pthread_rwlock_timedwrlock): Likewise.
2286 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2287 (__pthread_rwlock_unlock): Likewise.
2288
22892007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2290
2291 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2292 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2293 Split __flags into __flags, __shared, __pad1 and __pad2.
2294 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
b42a214c 2295 futexes if they are available.
339dbf0e 2296 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
b42a214c 2297 in libc-lowlevellock.S allow using private futexes.
339dbf0e
UD
2298 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2299 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
2300 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
2301 to call lll_futex_timed_wait. Add lll_private_futex_wait,
2302 lll_private_futex_timed_wait and lll_private_futex_wake.
2303 (lll_robust_mutex_unlock): Fix typo.
2304 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
b42a214c 2305 field in futex command setup.
339dbf0e
UD
2306 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2307 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2308 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2309 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
b42a214c 2310 if they are available. Remove clear_once_control.
339dbf0e
UD
2311 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2312 futexes if they are available.
2313 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2314 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2315 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2316 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2317 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2318 Wake only when there are waiters.
2319 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2320 support. Indicate that there are waiters. Remove unnecessary
b42a214c 2321 extra cancellation test.
339dbf0e
UD
2322 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2323 left-over duplication of __sem_wait_cleanup.
2324
26f56c1c
UD
23252007-06-07 Ulrich Drepper <drepper@redhat.com>
2326
2327 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2328 parameter to lll_futex_wait, lll_futex_timed_wait, and
2329 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
2330 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2331 lll_private_futex_wake.
2332 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2333 * allocatestack.c: Adjust use of lll_futex_* macros.
2334 * init.c: Likewise.
2335 * lowlevellock.h: Likewise.
2336 * pthread_barrier_wait.c: Likewise.
2337 * pthread_cond_broadcast.c: Likewise.
2338 * pthread_cond_destroy.c: Likewise.
2339 * pthread_cond_signal.c: Likewise.
2340 * pthread_cond_timedwait.c: Likewise.
2341 * pthread_cond_wait.c: Likewise.
2342 * pthread_create.c: Likewise.
2343 * pthread_mutex_lock.c: Likewise.
2344 * pthread_mutex_setprioceiling.c: Likewise.
2345 * pthread_mutex_timedlock.c: Likewise.
2346 * pthread_mutex_unlock.c: Likewise.
2347 * pthread_rwlock_timedrdlock.c: Likewise.
2348 * pthread_rwlock_timedwrlock.c: Likewise.
2349 * pthread_rwlock_unlock.c: Likewise.
2350 * sysdeps/alpha/tls.h: Likewise.
2351 * sysdeps/i386/tls.h: Likewise.
2352 * sysdeps/ia64/tls.h: Likewise.
2353 * sysdeps/powerpc/tls.h: Likewise.
2354 * sysdeps/pthread/aio_misc.h: Likewise.
2355 * sysdeps/pthread/gai_misc.h: Likewise.
2356 * sysdeps/s390/tls.h: Likewise.
2357 * sysdeps/sh/tls.h: Likewise.
2358 * sysdeps/sparc/tls.h: Likewise.
2359 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2360 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2361 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2362 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2363 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2364 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2365 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2366 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2367 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2368 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2369 Likewise.
2370 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2371 * sysdeps/x86_64/tls.h: Likewise.
2372
ee5d5755
UD
23732007-05-29 Ulrich Drepper <drepper@redhat.com>
2374
b03b0c29
UD
2375 * pthread_getattr_np.c: No need to install a cancellation handler,
2376 this is no cancellation point.
2377 * pthread_getschedparam.c: Likewise.
2378 * pthread_setschedparam.c: Likewise.
2379 * pthread_setschedprio.c: Likewise.
2380 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2381 lll_unlock_wake_cb.
2382 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2383 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2384 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2385 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2386 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2387 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2388 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2389 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2390 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2391 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2392 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2393 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 2394
0154658d
UD
2395 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2396 whether there are more than one thread makes no sense here since
2397 we only call the slow path if the locks are taken.
2398 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2399
ee5d5755
UD
2400 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2401 COND_NWAITERS_SHIFT.
2402 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2403 COND_CLOCK_BITS.
2404 * pthread_cond_init.c: Likewise.
2405 * pthread_cond_timedwait.c: Likewise.
2406 * pthread_cond_wait.c: Likewise.
2407 * pthread_condattr_getclock.c: Likewise.
2408 * pthread_condattr_setclock.c: Likewise.
2409 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2410 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2411 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2412 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2413 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2414
991fa82b
UD
24152007-05-28 Jakub Jelinek <jakub@redhat.com>
2416
40f57573
UD
2417 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2418 unistd.h.
2419
991fa82b
UD
2420 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2421 insn suffix.
2422 (THREAD_GSCOPE_GET_FLAG): Remove.
2423 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2424 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2425 changes.
2426 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2427 (THREAD_GSCOPE_GET_FLAG): Remove.
2428 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2429 instead of THREAD_GSCOPE_GET_FLAG.
2430 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
2431 it.
2432 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2433 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2434 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2435 THREAD_GSCOPE_WAIT): Define.
2436 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2437 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2438 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2439 THREAD_GSCOPE_WAIT): Define.
2440 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2441 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2442 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2443 THREAD_GSCOPE_WAIT): Define.
2444 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2445 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2446 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2447 THREAD_GSCOPE_WAIT): Define.
2448
24492007-05-24 Richard Henderson <rth@redhat.com>
2450
2451 * descr.h (struct pthread): Add header.gscope_flag.
2452 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2453 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2454 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2455 THREAD_GSCOPE_WAIT): Define.
2456
e59660bc
UD
24572007-05-27 Ulrich Drepper <drepper@redhat.com>
2458
2459 * init.c: Make it compile with older kernel headers.
2460
2461 * tst-initializers1.c: Show through exit code which test failed.
2462
2463 * pthread_rwlock_init.c: Also initialize __shared field.
2464 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2465 element in rwlock structure into four byte elements. One of them is
2466 the new __shared element.
2467 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2468 Likewise.
cd0dbd89 2469 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
2470 __shared, adjust names of other padding elements.
2471 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2472 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2473 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2474 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2475 FUTEX_PRIVATE_FLAG.
2476 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2477 futex to use private operations if possible.
2478 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2479 Likewise.
2480 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2481 Likewise.
2482 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2483 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
2484 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2485 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2486 Likewise.
2487 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2488 Likewise.
2489 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2490 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 2491
d8ff3792
UD
24922007-05-26 Ulrich Drepper <drepper@redhat.com>
2493
546346b6
UD
2494 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2495 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2496 * pthread_rwlock_timedrdlock.c: Likewise.
2497 * pthread_rwlock_tryrdlock.c: Likewise.
2498
a2dd3360
UD
2499 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2500 optimization.
2501
6df7ffad
UD
2502 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2503 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2504 duplication of __sem_wait_cleanup.
2505
2506 * allocatestack.c: Revert last change.
2507 * init.c: Likewise.
2508 * sysdeps/i386/tls.h: Likewise.
2509 * sysdeps/x86_64/tls.h: Likewise.
2510 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2511 header structure.
2512 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2513
d8ff3792
UD
2514 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2515 Add private field.
2516 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2517 * pthread_barrier_init.c: Set private flag if pshared and private
2518 futexes are supported.
2519 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2520 private field in futex command setup.
2521 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2522
3d2dd6ca
UD
25232007-05-25 Ulrich Drepper <drepper@redhat.com>
2524
42e6c665
UD
2525 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2526 support.
2527 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2528 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2529 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2530 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2531 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2532
3d2dd6ca
UD
2533 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2534 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2535 fields in the structure.
2536 (__old_sem_init): New function.
2537 * sem_open.c: Initialize all fields of the structure.
2538 * sem_getvalue.c: Adjust for renamed element.
2539 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2540 (gen-as-const-headers): Add structsem.sym.
2541 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2542 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2543 struct new_sem. Add struct old_sem.
2544 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2545 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2546 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2547 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2548 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2549 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2550 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2551 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2552 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2553 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2554 * tst-sem10.c: New file.
2555 * tst-sem11.c: New file.
2556 * tst-sem12.c: New file.
2557 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2558 of struct sem.
2559
20a4d722
JJ
25602007-05-25 Ulrich Drepper <drepper@redhat.com>
2561 Jakub Jelinek <jakub@redhat.com>
2562
2563 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2564 Move __pthread_enable_asynccancel right before futex syscall.
2565 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2566 Likewise.
2567
25682007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
2569
2570 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2571 THREAD_COPY_PRIVATE_FUTEX): Define.
2572 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2573 THREAD_COPY_PRIVATE_FUTEX): Define.
2574 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2575 * init.c (__pthread_initialize_minimal_internal): Use
2576 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
2577
2578 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2579 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2580 THREAD_GSCOPE_FLAG_WAIT): Define.
2581 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2582 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2583 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2584 PTR_DEMANGLE.
2585 (THREAD_GSCOPE_GET_FLAG): Define.
2586 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2587 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2588 instead of ->header.gscope_flag directly.
2589
5a8075b1
UD
25902007-05-23 Ulrich Drepper <drepper@redhat.com>
2591
2592 * init.c (__pthread_initialize_minimal_internal): Check whether
2593 private futexes are available.
2594 * allocatestack.c (allocate_stack): Copy private_futex field from
2595 current thread into the new stack.
2596 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2597 futexes if they are available.
2598 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2599 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2600 in libc-lowlevellock.S allow using private futexes.
2601 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2602 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2603 FUTEX_PRIVATE_FLAG.
2604 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2605 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2606 if they are available.
2607 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2608 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2609 * sysdeps/i386/tcb-offsets.sym: Likewise.
2610 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2611 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2612
6d59823c
UD
26132007-05-21 Ulrich Drepper <drepper@redhat.com>
2614
2615 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2616 Remove ptr_wait_lookup_done again.
2617 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2618 (__pthread_initialize_minimal_internal): Initialize
2619 _dl_wait_lookup_done pointer in _rtld_global directly.
2620 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2621 Remove code to code _dl_wait_lookup_done.
2622 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2623 encrypted for now.
2624
2c9718f3
JJ
26252007-05-21 Jakub Jelinek <jakub@redhat.com>
2626
2627 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2628 pthread_mutex_init failed with ENOTSUP.
2629
df94b641
UD
26302007-05-19 Ulrich Drepper <drepper@redhat.com>
2631
2632 * allocatestack.c (__wait_lookup_done): New function.
2633 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2634 Add ptr_wait_lookup_done.
2635 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2636 * pthreadP.h: Declare __wait_lookup_done.
2637 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2638 Define macros to implement reference handling of global scope.
2639 * sysdeps/x86_64/tls.h: Likewise.
2640 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2641 Initialize GL(dl_wait_lookup_done).
2642
bec51a30
UD
26432007-05-17 Ulrich Drepper <drepper@redhat.com>
2644
113ad5fc
UD
2645 [BZ #4512]
2646 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2647 is detected.
2648 * pthread_mutex_timedlock.c: Likewise.
2649 * pthread_mutex_trylock.c: Likewise.
2650 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2651
2652 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2653 * tst-robust9.c: New file.
2654 * tst-robustpi9.c: New file.
2655
bec51a30
UD
2656 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2657 unnecessary extra cancellation test.
2658
83d87915
UD
26592007-05-14 Ulrich Drepper <drepper@redhat.com>
2660
83d87915
UD
2661 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2662 extra cancellation test.
2663 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2664
3771196d
UD
26652007-05-10 Ulrich Drepper <drepper@redhat.com>
2666
341c566f
UD
2667 * descr.h (struct pthread): Rearrange members to fill hole in
2668 64-bit layout.
2669
3771196d
UD
2670 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2671 (__pthread_setaffinity_new): If syscall was successful and
2672 RESET_VGETCPU_CACHE is defined, use it before returning.
2673 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2674
7d29b542
JJ
26752007-05-10 Jakub Jelinek <jakub@redhat.com>
2676
2677 [BZ #4455]
2678 * tst-align2.c: Include stackinfo.h.
2679 * tst-getpid1.c: Likewise.
2680
16105fe0
UD
26812007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2682
29c113f0
UD
2683 [BZ #4455]
2684 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2685 * tst-getpid1.c (do_test): Likewise.
2686
16105fe0
UD
2687 [BZ #4456]
2688 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2689 (allocate_stack): Likewise.
2690
6780bc44
UD
26912007-05-07 Ulrich Drepper <drepper@redhat.com>
2692
2693 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2694 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2695 (__lll_robust_timedlock_wait): Likewise.
2696 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2697
aa75f64c
UD
26982007-05-06 Mike Frysinger <vapier@gentoo.org>
2699
15eca720 2700 [BZ #4465]
aa75f64c
UD
2701 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2702 * tst-cancel4.c (tf_fdatasync): New test.
2703
f672076e
UD
27042007-04-27 Ulrich Drepper <drepper@redhat.com>
2705
1bb5f5a1
UD
2706 [BZ #4392]
2707 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2708 check mutexes like normal mutexes.
2709
f672076e
UD
2710 [BZ #4306]
2711 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2712 Initialize the whole sigevent structure to appease valgrind.
2713
bce20b9a
UD
27142007-04-25 Ulrich Drepper <drepper@redhat.com>
2715
2716 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2717 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2718
0c786eac
UD
27192007-04-06 Ulrich Drepper <drepper@redhat.com>
2720
2721 * tst-locale1.c: Avoid warnings.
2722 * tst-locale2.c: Likewise.
2723
e1f0c5bc
UD
27242007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2725
2726 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2727 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2728
965cba04
UD
27292007-03-16 Jakub Jelinek <jakub@redhat.com>
2730
2731 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2732 __extern_always_inline where appropriate.
2733 * sysdeps/pthread/pthread.h: Likewise.
2734
a5ea509b
RH
27352007-03-13 Richard Henderson <rth@redhat.com>
2736
2737 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2738 separate cfi regions for the two subsections.
2739
00a1430e
UD
27402007-02-25 Ulrich Drepper <drepper@redhat.com>
2741
2742 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2743 new thread, don't just decrement it.
2744 Patch by Suzuki K P <suzuki@in.ibm.com>.
2745
63a2f305
UD
27462007-02-21 Ulrich Drepper <drepper@redhat.com>
2747
2748 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2749 PTHFCT_CALL definition.
2750
2484468b
UD
27512007-02-18 Ulrich Drepper <drepper@redhat.com>
2752
2753 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2754 available, don't use it.
2755
5ed61e0f
UD
27562007-02-09 Jakub Jelinek <jakub@redhat.com>
2757
2758 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2759 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2760 call into the kernel to delay.
2761
10ccaa5c
UD
27622007-01-18 Ulrich Drepper <drepper@redhat.com>
2763
f8a17855
UD
2764 * tst-initializers1.c: We want to test the initializers as seen
2765 outside of libc, so undefined _LIBC.
2766
10ccaa5c
UD
2767 * pthread_join.c (cleanup): Avoid warning.
2768
ea1533e0
UD
27692007-01-17 Ulrich Drepper <drepper@redhat.com>
2770
1476bce6
UD
2771 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2772 (__lll_timedwait_tid): Add unwind info.
2773
ea1533e0
UD
2774 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2775 function table, mangle the pointers.
2776 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2777 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2778 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2779 demangle pointers before use.
2780 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2781 demangle pointer.
2782 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2783 * sysdeps/pthread/setxid.h: Likewise.
2784
8980796b
UD
27852007-01-12 Ulrich Drepper <drepper@redhat.com>
2786
2787 * tst-rwlock7.c: Show some more information in case of correct
2788 behavior.
2789
a1d87b5d
UD
27902007-01-11 Ulrich Drepper <drepper@redhat.com>
2791
2792 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2793 (lll_futex_timed_wait): Undo part of last change, don't negate
2794 return value.
2795
11bf311e 27962007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 2797
11bf311e
UD
2798 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2799 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 2800
11bf311e 28012006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 2802
11bf311e 2803 * shlib-versions: Fix sparc64 linux target specification.
a744da90 2804
11bf311e 28052007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 2806
11bf311e
UD
2807 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2808 Adjust include path for pthread_barrier_wait.c move.
fc242bef 2809
11bf311e 28102006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 2811
11bf311e
UD
2812 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2813 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 2814
11bf311e
UD
28152006-12-06 Jakub Jelinek <jakub@redhat.com>
2816
2817 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2818 6 argument cancellable syscalls.
2819 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2820 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2821 6 argument cancellable syscalls.
2822 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 2823
66f17705
UD
28242006-12-09 Ulrich Drepper <drepper@redhat.com>
2825
2826 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2827 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2828
11bf311e
UD
28292006-10-30 Jakub Jelinek <jakub@redhat.com>
2830
2831 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2832 __sync_lock_release instead of __sync_lock_release_si.
2833
536e40e2
UD
28342006-10-29 Jakub Jelinek <jakub@redhat.com>
2835
2836 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2837 Define.
2838 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2839 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2840 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2841 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2842 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2843 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2844 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2845 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2846 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2847 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2848 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2849
11bf311e
UD
28502006-10-27 Ulrich Drepper <drepper@redhat.com>
2851
2852 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2853 * pthread_barrier_wait.c: ...here.
2854 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2855 * pthread_cond_broadcast.c: ...here.
2856 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2857 * pthread_cond_signal.c: ...here.
2858 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2859 * pthread_cond_timedwait.c: ...here.
2860 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2861 * pthread_cond_wait.c: ...here.
2862 * sysdeps/pthread/pthread_once.c: Move to...
2863 * pthread_once.c: ...here.
2864 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2865 * pthread_rwlock_rdlock.c: ...here.
2866 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2867 * pthread_rwlock_timedrdlock.c: ...here.
2868 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2869 * pthread_rwlock_timedwrlock.c: ...here.
2870 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2871 * pthread_rwlock_unlock.c: ...here.
2872 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2873 * pthread_rwlock_wrlock.c: ...here.
2874 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2875 * pthread_spin_destroy.c: ...here.
2876 * sysdeps/pthread/pthread_spin_init.c: Move to...
2877 * pthread_spin_init.c: ...here.
2878 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2879 * pthread_spin_unlock.c: ...here.
2880 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2881 * pthread_getcpuclockid.c: ...here.
2882
2883 * init.c: USE_TLS support is now always enabled.
2884 * tst-tls5.h: Likewise.
2885 * sysdeps/alpha/tls.h: Likewise.
2886 * sysdeps/i386/tls.h: Likewise.
2887 * sysdeps/ia64/tls.h: Likewise.
2888 * sysdeps/powerpc/tls.h: Likewise.
2889 * sysdeps/s390/tls.h: Likewise.
2890 * sysdeps/sh/tls.h: Likewise.
2891 * sysdeps/sparc/tls.h: Likewise.
2892 * sysdeps/x86_64/tls.h: Likewise.
2893
006a8f6f 28942006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
2895
2896 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2897 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2898 failed.
2899
2900 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2901 Define to THREAD_SELF->header.multiple_threads.
2902 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2903 Likewise.
2904 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2905 Likewise.
2906 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2907 (SINGLE_THREAD_P): Likewise.
2908 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2909 (SINGLE_THREAD_P): Likewise.
2910 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2911 (SINGLE_THREAD_P): Likewise.
2912 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2913 (SINGLE_THREAD_P): Likewise.
2914 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2915 Likewise.
2916 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2917 (SINGLE_THREAD_P): Likewise.
2918 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2919 (SINGLE_THREAD_P): Likewise.
2920 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2921 Likewise.
2922
11bf311e 29232006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 2924
11bf311e
UD
2925 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2926 by default rather than 2_3_3.
32c075e1 2927
11bf311e 29282006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 2929
11bf311e
UD
2930 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2931 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2932 atomic_* instead of catomic_* macros.
2933
29342006-10-12 Ulrich Drepper <drepper@redhat.com>
2935
2936 [BZ #3285]
2937 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2938 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2939 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2940 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2941 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2942 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2943 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2944 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2945 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2946 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2947 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2948 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2949 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2950
29512006-10-11 Ulrich Drepper <drepper@redhat.com>
2952
2953 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2954 cancelable syscalls with six parameters.
2955
2956 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2957 operations instead of atomic_*.
32c075e1 2958
11bf311e 29592006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 2960
11bf311e 2961 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 2962
11bf311e 29632006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 2964
11bf311e
UD
2965 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2966 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2967 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2968 New file.
2969 * pthread_attr_setstack.c: Allow overwriting the version number of the
2970 new symbol.
2971 * pthread_attr_setstacksize.c: Likewise.
2972 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2973 it.
2974 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2975 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 2976
457b559e
UD
29772006-09-24 Ulrich Drepper <drepper@redhat.com>
2978
2979 [BZ #3251]
2980 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2981 Patch by Petr Baudis.
2982
0466106e
UD
29832006-09-18 Jakub Jelinek <jakub@redhat.com>
2984
2985 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2986
2987 * tst-cancel2.c (tf): Loop as long as something was written.
2988
bd6d3b7d
UD
29892006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2990
2991 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2992 mutexes wake all mutexes.
2993 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2994 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2995 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2996
30aa5785
UD
29972006-09-12 Ulrich Drepper <drepper@redhat.com>
2998
2999 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3000 to guarantee the thread is always canceled.
3001
2b6a801e
UD
30022006-09-08 Jakub Jelinek <jakub@redhat.com>
3003
3004 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3005 Include stdlib.h.
3006 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3007 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3008 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3009 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3010 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 3011
346e6ad4
UD
30122006-09-08 Ulrich Drepper <drepper@redhat.com>
3013
3014 [BZ #3123]
3015 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3016 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
3017 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3018 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3019 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
3020 * Makefile (tests): Add tst-cond22.
3021 * tst-cond22.c: New file.
3022
b051fc44
UD
30232006-09-05 Ulrich Drepper <drepper@redhat.com>
3024
3025 [BZ #3124]
3026 * descr.h (struct pthread): Add parent_cancelhandling.
3027 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3028 cancelhandling value to child.
3029 * pthread_create.c (start_thread): If parent thread was canceled
3030 reset the SIGCANCEL mask.
3031 * Makefile (tests): Add tst-cancel25.
3032 * tst-cancel25.c: New file.
3033
d052233c 30342006-09-05 Jakub Jelinek <jakub@redhat.com>
b42a214c 3035 Ulrich Drepper <drepper@redhat.com>
d052233c
UD
3036
3037 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3038 counterp if it is already zero.
3039 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3040
cd248c3f 30412006-03-04 Jakub Jelinek <jakub@redhat.com>
b42a214c 3042 Roland McGrath <roland@redhat.com>
cd248c3f
UD
3043
3044 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3045 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3046 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3047 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3048 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3049 lll_robust_mutex_timedlock, lll_mutex_unlock,
3050 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3051 Add _L_*_ symbols around the subsection.
3052 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3053 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3054
30552006-03-03 Jakub Jelinek <jakub@redhat.com>
b42a214c 3056 Roland McGrath <roland@redhat.com>
cd248c3f
UD
3057
3058 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3059 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3060 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3061 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3062 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3063 lll_robust_mutex_timedlock, lll_mutex_unlock,
3064 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3065 Add _L_*_ symbols around the subsection.
3066 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3067 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3068
b80770b2
UD
30692006-08-31 Ulrich Drepper <drepper@redhat.com>
3070
3071 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3072 change because it can disturb too much existing code. If real hard
3073 reader preference is needed we'll introduce another type.
3074 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3075 (pthread_rwlock_timedwrlock): Likewise.
3076 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3077 Likewise.
3078
bee2df0b
UD
30792006-08-30 Ulrich Drepper <drepper@redhat.com>
3080
3081 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3082 reader preference.
3083 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3084 (pthread_rwlock_timedwrlock): Likewise.
3085 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3086 Likewise.
3087
d678ebc1
UD
30882006-08-25 Jakub Jelinek <jakub@redhat.com>
3089
3090 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3091 Only define ifdef SHARED.
3092
ba408f84
UD
30932006-08-23 Ulrich Drepper <drepper@redhat.com>
3094
3095 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3096 (free_stacks): ...here.
3097 (__free_stack_cache): New function.
3098 * pthreadP.h: Declare __free_stack_cache.
3099 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3100 ptr_freeres.
3101 * init.c (pthread_functions): Initialize ptr_freeres.
3102 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3103 New freeres function.
3104
376e973a
UD
31052006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3106
3107 [BZ #3018]
3108 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3109
2b34af01
UD
31102006-08-20 Ulrich Drepper <drepper@redhat.com>
3111
3112 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3113 _XOPEN_REALTIME_THREADS.
3114
89c85f87
UD
31152006-08-15 Jakub Jelinek <jakub@redhat.com>
3116
3117 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3118 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3119 HAVE_CLOCK_GETTIME_VSYSCALL.
3120 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3121
f17efcb4
UD
31222006-08-14 Jakub Jelinek <jakub@redhat.com>
3123
3124 * sysdeps/unix/sysv/linux/bits/posix_opt.h
3125 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3126 * descr.h (struct priority_protection_data): New type.
3127 (struct pthread): Add tpp field.
3128 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3129 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3130 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3131 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3132 TPP mutexes.
3133 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3134 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3135 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3136 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3137 * tpp.c: New file.
3138 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3139 boosted by TPP.
3140 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3141 * pthread_mutexattr_getprioceiling.c
3142 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3143 in the SCHED_FIFO priority range.
3144 * pthread_mutexattr_setprioceiling.c
3145 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3146 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3147 if mutex is not TPP. Ceiling is now in __data.__lock.
3148 * pthread_mutex_setprioceiling.c: Include stdbool.h.
3149 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
3150 is now in __data.__lock. Add locking.
3151 * pthread_create.c (__free_tcb): Free pd->tpp structure.
3152 * Makefile (libpthread-routines): Add tpp.
3153 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3154 * tst-tpp.h: New file.
3155 * tst-mutexpp1.c: New file.
3156 * tst-mutexpp6.c: New file.
3157 * tst-mutexpp10.c: New file.
3158 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3159 * tst-mutex6.c (TEST_FUNCTION): Likewise.
3160
22bb134c
UD
31612006-08-12 Ulrich Drepper <drepper@redhat.com>
3162
3163 [BZ #2843]
3164 * pthread_join.c (pthread_join): Account for self being canceled
3165 when checking for deadlocks.
3166 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
3167 (tf1): Don't print anything after pthread_join returns, this would be
3168 another cancellation point.
3169 (tf2): Likewise.
3170 * tst-join6.c: New file.
3171 * Makefile (tests): Add tst-join6.
3172
f1762c0c
UD
31732006-08-03 Ulrich Drepper <drepper@redhat.com>
3174
9c06eb66
UD
3175 [BZ #2892]
3176 * pthread_setspecific.c (__pthread_setspecific): Check
3177 out-of-range index before checking for unused key.
3178
f1762c0c
UD
3179 * sysdeps/pthread/gai_misc.h: New file.
3180
7bb1b2c9
UD
31812006-08-01 Ulrich Drepper <drepper@redhat.com>
3182
3183 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
3184 file. Don't use sysctl.
3185 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
3186 overwrite the file if this is likely not true.
3187
b06e7e9a
UD
31882006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
3189
3190 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3191 * Makefile (tests): Add tst-getpid3.
3192 * tst-getpid3.c: New file.
3193
b894c2ea
RM
31942006-07-30 Roland McGrath <roland@redhat.com>
3195
3196 * Makefile (libpthread-routines): Add ptw-sigsuspend.
3197
3198 * sysdeps/unix/sysv/linux/i386/not-cancel.h
3199 (pause_not_cancel): New macro.
3200 (nanosleep_not_cancel): New macro.
3201 (sigsuspend_not_cancel): New macro.
3202 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3203 nanosleep_not_cancel macro from <not-cancel.h>.
3204 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3205 macro from <not-cancel.h>.
3206
df47504c
UD
32072006-07-28 Ulrich Drepper <drepper@redhat.com>
3208 Jakub Jelinek <jakub@redhat.com>
3209
3210 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3211 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
3212 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3213 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3214 * pthread_mutex_init.c: Add support for priority inheritance mutex.
3215 * pthread_mutex_lock.c: Likewise.
3216 * pthread_mutex_timedlock.c: Likewise.
3217 * pthread_mutex_trylock.c: Likewise.
3218 * pthread_mutex_unlock.c: Likewise.
3219 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3220 all mutexes.
3221 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3222 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3223 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3224 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3225 pthread-pi-defines.sym.
3226 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3227 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3228 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
3229 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3230 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3231 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3232 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3233 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3234 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
3235 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3236 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3237 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3238 * tst-mutex2.c: Likewise.
3239 * tst-mutex3.c: Likewise.
3240 * tst-mutex4.c: Likewise.
3241 * tst-mutex5.c: Likewise.
3242 * tst-mutex6.c: Likewise.
3243 * tst-mutex7.c: Likewise.
3244 * tst-mutex7a.c: Likewise.
3245 * tst-mutex8.c: Likewise.
3246 * tst-mutex9.c: Likewise.
3247 * tst-robust1.c: Likewise.
3248 * tst-robust7.c: Likewise.
3249 * tst-robust8.c: Likewise.
3250 * tst-mutexpi1.c: New file.
3251 * tst-mutexpi2.c: New file.
3252 * tst-mutexpi3.c: New file.
3253 * tst-mutexpi4.c: New file.
3254 * tst-mutexpi5.c: New file.
3255 * tst-mutexpi6.c: New file.
3256 * tst-mutexpi7.c: New file.
3257 * tst-mutexpi7a.c: New file.
3258 * tst-mutexpi8.c: New file.
3259 * tst-mutexpi9.c: New file.
3260 * tst-robust1.c: New file.
3261 * tst-robust2.c: New file.
3262 * tst-robust3.c: New file.
3263 * tst-robust4.c: New file.
3264 * tst-robust5.c: New file.
3265 * tst-robust6.c: New file.
3266 * tst-robust7.c: New file.
3267 * tst-robust8.c: New file.
3268 * Makefile (tests): Add the new tests.
3269
3270 * pthread_create.c (start_thread): Add some casts to avoid warnings.
3271 * pthread_mutex_destroy.c: Remove unneeded label.
3272
f3be81a9
UD
32732006-07-01 Ulrich Drepper <drepper@redhat.com>
3274
3275 * pthread_mutex_init.c (__pthread_mutex_init): Move some
3276 computations to compile time.
3277
c26ca5e1
UD
32782006-06-04 Ulrich Drepper <drepper@redhat.com>
3279
3280 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3281
6f8a7dff
UD
32822006-05-15 Ulrich Drepper <drepper@redhat.com>
3283
c26ca5e1 3284 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 3285
3d237e42
UD
32862006-05-11 Ulrich Drepper <drepper@redhat.com>
3287
04974d63
UD
3288 * pthread_key_create.c (__pthread_key_create): Do away with
3289 __pthread_keys_lock.
3290
3291 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3292 (__kernel_cpumask_size): Mark as hidden.
3293 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3294
3d237e42
UD
3295 * sem_open.c (__sem_mappings_lock): Mark as hidden.
3296 * semaphoreP.h (__sem_mappings_lock): Likewise.
3297
790fc6e4
UD
32982006-05-10 Ulrich Drepper <drepper@redhat.com>
3299
3300 * pthread_atfork.c: Mark __dso_handle as hidden.
3301
be434a72
UD
33022006-05-09 Ulrich Drepper <drepper@redhat.com>
3303
3304 [BZ #2644]
3305 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3306 the reload problem. Change the one path in pthread_cancel_init
3307 which causes the problem. Force gcc to reload. Simplify callers.
3308 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3309 (_Unwind_GetBSP): Undo last patch.
3310
3142b1ac
UD
33112006-05-07 Ulrich Drepper <drepper@redhat.com>
3312
bf3635d3
UD
3313 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3314 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
3315
3316 [BZ #2644]
3317 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3318 pointers are reloaded after pthread_cancel_init calls.
3319
27488789
UD
33202006-05-01 Ulrich Drepper <drepper@redhat.com>
3321
3322 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3323 __always_inline.
3324
a6375d11
UD
33252006-04-27 Ulrich Drepper <drepper@redhat.com>
3326
3327 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3328 Allocate new object which is passed to timer_sigev_thread so that
3329 the timer can be deleted before the new thread is scheduled.
3330
16a1d952
RM
33312006-04-26 Roland McGrath <roland@redhat.com>
3332
3333 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3334
7960f2a7
UD
33352006-04-08 Ulrich Drepper <drepper@redhat.com>
3336
ab9a9ff8
UD
3337 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3338 suffix for conditional jumps.
3339 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3340 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3341 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3342 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3343 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3344 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3345
7960f2a7
UD
3346 * init.c (sigcancel_handler): Compare with correct PID even if the
3347 thread is in the middle of a fork call.
3348 (sighandler_setxid): Likewise.
3349 Reported by Suzuki K P <suzuki@in.ibm.com> .
3350
2035d91c
UD
33512006-04-07 Jakub Jelinek <jakub@redhat.com>
3352
3353 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3354
0292b0dd
UD
33552006-04-06 Ulrich Drepper <drepper@redhat.com>
3356
3357 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3358 fails [Coverity CID 105].
3359
6738b3c0
UD
33602006-04-05 Ulrich Drepper <drepper@redhat.com>
3361
3362 * sysdeps/pthread/pthread.h: Add nonnull attributes.
3363
359157a5
RM
33642006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
3365
3366 [BZ #2505]
3367 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3368 Define __lll_rel_instr using lwsync.
3369
cd277b2d
UD
33702006-03-27 Ulrich Drepper <drepper@redhat.com>
3371
3372 * allocatestack.c (allocate_stack): Always initialize robust_head.
3373 * descr.h: Define struct robust_list_head.
3374 (struct pthread): Use robust_list_head in robust mutex list definition.
3375 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3376 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3377 (__pthread_initialize_minimal_internal): Register robust_list with
3378 the kernel.
3379 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3380 Declare __set_robust_list_avail.
3381 * pthread_create.c (start_thread): Register robust_list of new thread.
3382 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3383 waiters.
3384 * pthread_mutex_destroy.c: For robust mutexes don't look at the
3385 number of users, it's unreliable.
3386 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3387 set_robust_list syscall is available.
3388 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3389 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3390 Set robust_head.list_op_pending before trying to lock a robust mutex.
3391 * pthread_mutex_timedlock.c: Likewise.
3392 * pthread_mutex_trylock.c: Likewise.
3393 * pthread_mutex_unlock.c: Likewise for unlocking.
3394 * Makefile (tests): Add tst-robust8.
3395 * tst-robust8.c: New file.
3396
facac085
UD
33972006-03-08 Andreas Schwab <schwab@suse.de>
3398
3399 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3400 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3401
7ccbe1a1
RM
34022006-03-05 Roland McGrath <roland@redhat.com>
3403
3404 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3405 and $config_os doesn't match *linux*.
3406
043cee37
RM
34072006-03-05 David S. Miller <davem@sunset.davemloft.net>
3408
3409 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3410 Use __syscall_error.
3411 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3412 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3413 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3414 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3415 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3416 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3417
88bce79e
UD
34182006-03-02 Ulrich Drepper <drepper@redhat.com>
3419
3420 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3421
672ec465
UD
34222006-03-01 Ulrich Drepper <drepper@redhat.com>
3423
3424 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3425 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3426 mutex.
3427 (__lll_robust_timedlock_wait): Likewise.
3428 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3429 (__lll_robust_lock_wait): Likewise.
3430 (__lll_robust_timedlock_wait): Likewise.
3431 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3432 (__lll_robust_lock_wait): Likewise.
3433 (__lll_robust_timedlock_wait): Likewise.
3434
c4a4875d
RM
34352006-03-01 Jakub Jelinek <jakub@redhat.com>
3436
3437 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3438 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3439 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3440 lll_robust_mutex_unlock): Define.
3441 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3442
3192fd8e
RM
34432006-02-28 H.J. Lu <hongjiu.lu@intel.com>
3444
3445 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3446 instead of <clone.S>.
3447
14d44b19
RM
34482006-02-27 Jakub Jelinek <jakub@redhat.com>
3449
3450 * Makefile (libpthread-routines): Add
3451 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3452 and pthread_mutex_[sg]etprioceiling.
3453 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3454 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3455 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3456 pthread_mutex_setprioceiling.
3457 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3458 PTHREAD_PRIO_PROTECT): New enum values.
3459 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3460 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3461 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3462 prototypes.
3463 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3464 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3465 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3466 Define.
3467 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3468 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3469 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3470 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3471 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3472 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3473 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3474 protocol mutexes.
3475 * pthread_mutex_getprioceiling.c: New file.
3476 * pthread_mutex_setprioceiling.c: New file.
3477 * pthread_mutexattr_getprioceiling.c: New file.
3478 * pthread_mutexattr_setprioceiling.c: New file.
3479 * pthread_mutexattr_getprotocol.c: New file.
3480 * pthread_mutexattr_setprotocol.c: New file.
3481
62f6b9b2
RM
34822006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3483
3484 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3485
e0a3ed4f
RM
34862006-02-27 Roland McGrath <roland@redhat.com>
3487
3488 * sysdeps/pthread/Subdirs: List nptl here too.
3489 * configure (libc_add_on_canonical): New variable.
3490
3491 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3492
3493 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3494 self to get main source tree's file.
3495 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3496 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3497 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3498 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3499 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3500 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3501 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3502 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3503 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3504 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3505 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3506 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3507 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3508
3509 * Makefile: Use $(sysdirs) in vpath directive.
3510
3511 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3512 (CPPFLAGS-timer_routines.c): Likewise.
3513
3514 * Makeconfig (includes): Variable removed.
3515
84cfa284
RM
35162006-02-26 Roland McGrath <roland@redhat.com>
3517
3518 * sysdeps/generic/pt-raise.c: Moved to ...
3519 * pt-raise.c: ... here.
3520 * sysdeps/generic/lowlevellock.h: Moved to ...
3521 * lowlevellock.h: ... here.
3522
c5132ca1
RM
35232006-02-23 Roland McGrath <roland@redhat.com>
3524
3525 * descr.h (struct pthread): Add final member `end_padding'.
3526 (PTHREAD_STRUCT_END_PADDING): Use it.
3527
35282006-02-20 Roland McGrath <roland@redhat.com>
3529
3530 * sysdeps/mips: Directory removed, saved in ports repository.
3531 * sysdeps/unix/sysv/linux/mips: Likewise.
3532
a93317a1
UD
35332006-02-18 Ulrich Drepper <drepper@redhat.com>
3534
3535 * tst-robust1.c: Add second mutex to check that the mutex list is
3536 handled correctly.
3537
f1740bc4
UD
35382006-02-17 Jakub Jelinek <jakub@redhat.com>
3539
3540 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3541 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3542 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3543 lll_robust_mutex_unlock): New macros.
3544 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3545 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3546 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3547 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3548 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3549
a7245bf5
UD
35502006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3551
3552 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3553 definitions.
3554 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3555
49bfc1fe
UD
35562006-02-17 Ulrich Drepper <drepper@redhat.com>
3557
3558 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3559 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3560 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3561 (lll_robust_mutex_unlock): Likewise.
3562
56e987ac
UD
35632006-02-13 Jakub Jelinek <jakub@redhat.com>
3564
3565 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3566 Set robust_list.__next rather than robust_list.
3567 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3568 (__pthread_list_t): New typedef.
3569 (pthread_mutex_t): Replace __next and __prev fields with __list.
3570 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3571 (__pthread_list_t): New typedef.
3572 (pthread_mutex_t): Replace __next and __prev fields with __list.
3573 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3574 (__pthread_list_t, __pthread_slist_t): New typedefs.
3575 (pthread_mutex_t): Replace __next and __prev fields with __list.
3576 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3577 (__pthread_list_t, __pthread_slist_t): New typedefs.
3578 (pthread_mutex_t): Replace __next and __prev fields with __list.
3579 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3580 (__pthread_list_t, __pthread_slist_t): New typedefs.
3581 (pthread_mutex_t): Replace __next and __prev fields with __list.
3582 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3583 (__pthread_slist_t): New typedef.
3584 (pthread_mutex_t): Replace __next field with __list.
3585
683040c3
UD
35862006-02-15 Ulrich Drepper <drepper@redhat.com>
3587
25bc77e6 3588 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
3589 PTHREAD_MUTEX_OWNERDEAD.
3590 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3591 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3592 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3593 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3594 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3595 to PTHREAD_MUTEX_INCONSISTENT.
3596 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3597 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3598 * pthread_mutex_trylock.c: Likewise.
3599 * pthread_mutex_timedlock.c: Likewise.
3600 * pthread_mutex_unlock.c: Likewise.
3601 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3602 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3603 lowlevelrobustlock.sym.
3604 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3605 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3606 definitions.
3607 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3608 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3609 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3610 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3611 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3612
bbf209a4
UD
36132006-02-12 Ulrich Drepper <drepper@redhat.com>
3614
b007ce7c
UD
3615 * allocatestack.c (allocate_stack): Initialize robust_list.
3616 * init.c (__pthread_initialize_minimal_internal): Likewise.
3617 * descr.h (struct xid_command): Pretty printing.
3618 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3619 robust_list. Adjust macros.
3620 * pthread_create.c (start_thread): Adjust robust_list handling.
3621 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3622 but the owner for all robust mutex types.
3623 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3624 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 3625 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
3626 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3627
bbf209a4 3628 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
b42a214c 3629 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
bbf209a4 3630
b576fca1
UD
36312006-02-08 Jakub Jelinek <jakub@redhat.com>
3632
3633 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3634 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3635
a6df7387
UD
36362006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3637
3638 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3639 Return status.
3640 (lll_futex_timed_wait): Define.
3641
7c65e900
UD
36422006-01-19 Ulrich Drepper <drepper@redhat.com>
3643
3644 * tst-cancel4.c: Test ppoll.
3645
5f9f21e8
AJ
36462006-01-18 Andreas Jaeger <aj@suse.de>
3647
cf407dfb 3648 [BZ #2167]
5f9f21e8
AJ
3649 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3650 (pthread_mutex_t): Follow changes for other archs. Based on patch
3651 by Jim Gifford <patches@jg555.com>.
3652
251278c6
UD
36532006-01-13 Richard Henderson <rth@redhat.com>
3654
3655 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3656
de59a291
RM
36572006-01-10 Roland McGrath <roland@redhat.com>
3658
3659 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3660 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3661 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3662 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3663 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3664 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3665 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3666 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3667 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 3668 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 3669
931786ee
RM
36702006-01-09 Roland McGrath <roland@redhat.com>
3671
5d42c8c3
RM
3672 * tst-initializers1-c89.c: New file.
3673 * tst-initializers1-c99.c: New file.
3674 * tst-initializers1-gnu89.c: New file.
3675 * tst-initializers1-gnu99.c: New file.
3676 * Makefile (tests): Add them.
3677 (CFLAGS-tst-initializers1-c89.c): New variable.
3678 (CFLAGS-tst-initializers1-c99.c): New variable.
3679 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3680 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3681
931786ee
RM
3682 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3683 Use __extension__ on anonymous union definition.
3684 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3685 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3686 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3687 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 3688 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 3689
8dd18431
RM
36902006-01-08 Jakub Jelinek <jakub@redhat.com>
3691
3692 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3693 Don't give the union a name because it changes the mangled name.
3694 Instead name the struct for __data.
3695 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3696 Likewise.
3697 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3698 Likewise.
3699
ae11e412
UD
37002006-01-09 Jakub Jelinek <jakub@redhat.com>
3701
3702 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3703 stack bias to mc_ftp field.
3704
c6885aa1
UD
37052006-01-07 Ulrich Drepper <drepper@redhat.com>
3706
3707 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 3708 being too clever and reloading the futex value where it shouldn't.
c6885aa1 3709
ae4ad00a
UD
37102006-01-06 Ulrich Drepper <drepper@redhat.com>
3711
3712 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3713 correct type.
3714
ced368f7
UD
37152006-01-06 Jakub Jelinek <jakub@redhat.com>
3716
3717 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3718 Add cfi directives.
3719
d804f5df
UD
37202006-01-06 Ulrich Drepper <drepper@redhat.com>
3721
cbbbb188 3722 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
3723 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3724 rename in tcbhead_t.
3725
d804f5df
UD
3726 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3727 Don't give the union a name because it changes the mangled name.
3728 Instead name the struct for __data.
3729 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3730 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3731 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3732 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3733 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3734 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3735
679d83ba
UD
37362006-01-05 Ulrich Drepper <drepper@redhat.com>
3737
3738 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3739 Return status.
3740 (lll_futex_timed_wait): Define.
3741 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3742 * sysdeps/pthread/aio_misc.h: New file.
3743
06dc5bf3
RM
37442006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3745
3746 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3747
9759bbf1
UD
37482006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3749
3750 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3751 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3752 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3753
db59b28b
UD
37542006-01-04 Ulrich Drepper <drepper@redhat.com>
3755
3756 * tst-cancel24.cc: Use C headers instead of C++ headers.
3757
b01fe5f7
UD
37582006-01-03 Jakub Jelinek <jakub@redhat.com>
3759
3760 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3761 sparc-linux configured glibc.
3762 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3763 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3764 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3765 atomic_compare_and_exchange_val_24_acq instead of
3766 atomic_compare_and_exchange_val_acq.
3767 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3768 instead of atomic_exchange_rel.
3769 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3770 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3771 file.
3772 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3773 file.
3774 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3775 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3776 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3777 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3778 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3779 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3780 New file.
3781 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3782 New file.
3783 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3784 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3785 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3786 file.
3787 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3788 file.
3789 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3790
35c2fd59
UD
37912006-01-03 Ulrich Drepper <drepper@redhat.com>
3792
3793 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3794 mutex initializers.
3795
305bb37e
UD
37962006-01-02 Jakub Jelinek <jakub@redhat.com>
3797
3798 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3799 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3800 THREAD_COPY_POINTER_GUARD): Define.
3801 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3802 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3803
cc792128
UD
38042006-01-01 Ulrich Drepper <drepper@redhat.com>
3805
3806 * version.c: Update copyright year.
3807
db0a00d3
UD
38082005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3809
3810 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3811 .eh_frame section, use cfi_* directives.
3812 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3813
b36205c4
UD
38142005-12-30 Ulrich Drepper <drepper@redhat.com>
3815
3816 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3817 now.
3818
8b4f1598
UD
38192005-12-29 Ulrich Drepper <drepper@redhat.com>
3820
3821 * sysdeps/pthread/sigaction.c: Removed.
3822 * sigaction.c: New file.
3823 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3824
fec5592d
UD
38252005-12-28 Ulrich Drepper <drepper@redhat.com>
3826
3827 * Makefile (tests): Add tst-signal7.
3828 * tst-signal7.c: New file.
3829
db169ed5
RM
38302005-12-27 Roland McGrath <roland@redhat.com>
3831
3832 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3833 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3834 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3835 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3836 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3837 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3838 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3839 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3840 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3841 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3842 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3843
bfffffae
UD
38442005-12-27 Jakub Jelinek <jakub@redhat.com>
3845
3846 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3847 and __prev field to pthread_mutex_t.
3848 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3849 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3850 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3851 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3852 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3853 to pthread_mutex_t.
3854
1bcfb5a5
UD
38552005-12-26 Ulrich Drepper <drepper@redhat.com>
3856
3857 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3858 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3859 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3860 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3861 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3862 and PTHREAD_MUTEXATTR_FLAG_BITS.
3863 * descr.h (struct pthread): Add robust_list field and define
3864 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3865 * pthread_mutexattr_getrobust.c: New file.
3866 * pthread_mutexattr_setrobust.c: New file.
3867 * pthread_mutex_consistent.c: New file.
3868 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3869 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3870 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3871 Adjust pthread_mutex_t initializers.
3872 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3873 field to pthread_mutex_t.
3874 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3875 and __prev field to pthread_mutex_t.
3876 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3877 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3878 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3879 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3880 * pthread_mutexattr_gettype.c: Likewise.
3881 * pthread_mutexattr_setpshared.c: Likewise.
3882 * pthread_mutexattr_settype.c: Likewise.
3883 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3884 Initialize mutex kind according to robust flag.
3885 * pthread_mutex_lock.c: Implement local robust mutex.
3886 * pthread_mutex_timedlock.c: Likewise.
3887 * pthread_mutex_trylock.c: Likewise.
3888 * pthread_mutex_unlock.c: Likewise.
3889 * pthread_create.c (start_thread): Mark robust mutexes which remained
3890 locked as dead.
3891 * tst-robust1.c: New file.
3892 * tst-robust2.c: New file.
3893 * tst-robust3.c: New file.
3894 * tst-robust4.c: New file.
3895 * tst-robust5.c: New file.
3896 * tst-robust6.c: New file.
3897 * tst-robust7.c: New file.
3898 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3899 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3900 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3901 tst-robust5, tst-robust6, and tst-robust7.
3902
3903 * tst-typesizes.c: New file.
3904 * Makefile (tests): Add tst-typesizes.
3905
3906 * tst-once3.c: More debug output.
3907
9333ed0d
UD
39082005-12-24 Ulrich Drepper <drepper@redhat.com>
3909
d4d138a4
UD
3910 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3911 missing after last change.
3912
bfffffae 3913 * version.c: Update copyright year.
9333ed0d 3914
dcc73a8d
UD
39152005-12-23 Ulrich Drepper <drepper@redhat.com>
3916
3917 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3918 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3919 * pthread_mutex_trylock.c: Likewise.
3920 * pthread_mutex_timedlock.c: Likewise.
3921 * pthread_mutex_unlock.c: Likewise.
3922
879f3ca6
RM
39232005-12-22 Roland McGrath <roland@redhat.com>
3924
3925 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3926 so that #include_next's search location is not reset to the -I..
3927 directory where <nptl/...> can be found.
3928
077a0da7
UD
39292005-12-22 Ulrich Drepper <drepper@redhat.com>
3930
3931 [BZ #1913]
3932 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3933 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
3934 * tst-cancel24.cc: New file.
3935 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 3936
8dea90aa
RM
39372005-12-21 Roland McGrath <roland@redhat.com>
3938
3939 * libc-cancellation.c: Use <> rather than "" #includes.
3940 * pt-cleanup.c: Likewise.
3941 * pthread_create.c: Likewise.
3942 * pthread_join.c: Likewise.
3943 * pthread_timedjoin.c: Likewise.
3944 * pthread_tryjoin.c: Likewise.
3945 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3946 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3947 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3948 * unwind.c: Likewise.
3949
8da21f96
UD
39502005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3951
3952 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3953 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3954 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3955 THREAD_COPY_POINTER_GUARD): Define.
3956
00c2b3b9
UD
39572005-12-19 Jakub Jelinek <jakub@redhat.com>
3958
3959 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3960 rather than one.
3961 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3962 THREAD_COPY_POINTER_GUARD): Define.
3963 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3964 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3965 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3966 THREAD_COPY_POINTER_GUARD): Define.
3967 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3968 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3969 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3970 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3971 Use PTR_DEMANGLE for B0 if defined.
3972
827b7087
UD
39732005-12-17 Ulrich Drepper <drepper@redhat.com>
3974
3975 * pthread_create.c (__pthread_create_2_1): Use
3976 THREAD_COPY_POINTER_GUARD if available.
3977 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3978 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3979 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3980 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3981 * sysdeps/x86_64/tls.h: Likewise.
3982
2826ac7e
RM
39832005-12-15 Roland McGrath <roland@redhat.com>
3984
3985 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3986
b6ab06ce
UD
39872005-12-13 Ulrich Drepper <drepper@redhat.com>
3988
3989 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3990 sysdeps/generic.
3991 * errno-loc.c: New file.
3992
f0d1a3b5
RM
39932005-12-12 Roland McGrath <roland@redhat.com>
3994
3995 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3996 adjustments before choosing stack size. Update minimum stack size
3997 calculation to match allocate_stack change.
3998
db13ddbc
UD
39992005-12-12 Ulrich Drepper <drepper@redhat.com>
4000
4001 * allocatestack.c (allocate_stack): Don't demand that there is an
4002 additional full page available on the stack beside guard, TLS, the
4003 minimum stack.
4004
088f460f
UD
40052005-11-24 Ulrich Drepper <drepper@redhat.com>
4006
4007 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4008 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4009
4010 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4011 compiling 32-bit code we must define __cleanup_fct_attribute.
4012
16feadf2
UD
4013005-11-24 Jakub Jelinek <jakub@redhat.com>
4014
4015 [BZ #1920]
4016 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4017 __attribute__ instead of __attribute.
4018 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4019 (__cleanup_fct_attribute): Likewise.
4020
e6e493bb
UD
40212005-11-17 Jakub Jelinek <jakub@redhat.com>
4022
4023 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4024 a write barrier before writing libgcc_s_getcfa.
4025
8e635611
UD
40262005-11-06 Ulrich Drepper <drepper@redhat.com>
4027
4028 * sysdeps/unix/sysv/linux/configure: Removed.
4029
ce33ee7c
UD
40302005-11-05 Ulrich Drepper <drepper@redhat.com>
4031
4032 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4033 optional init_array/fini_array support.
4034
20d511e0
RM
40352005-10-24 Roland McGrath <roland@redhat.com>
4036
4037 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4038 versioned_symbol use.
4039
fe60d146
RM
40402005-10-16 Roland McGrath <roland@redhat.com>
4041
4042 * init.c (__pthread_initialize_minimal_internal): Even when using a
4043 compile-time default stack size, apply the minimum that allocate_stack
4044 will require, and round up to page size.
4045
0faa1cf5
RM
40462005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4047
4048 * Makefile ($(test-modules)): Remove static pattern rule.
4049
f9126cc2 40502005-10-14 Jakub Jelinek <jakub@redhat.com>
b42a214c 4051 Ulrich Drepper <drepper@redhat.com>
f9126cc2
UD
4052
4053 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4054 alignment in callback function.
4055 * Makefile: Add rules to build and run tst-align3.
4056 * tst-align3.c: New file.
4057
015a5d22
RM
40582005-10-03 Jakub Jelinek <jakub@redhat.com>
4059
4060 * allocatestack.c (setxid_signal_thread): Add
4061 INTERNAL_SYSCALL_DECL (err).
4062
b71ce910
UD
40632005-10-02 Jakub Jelinek <jakub@redhat.com>
4064
4065 * allocatestack.c (setxid_signal_thread): Need to use
4066 atomic_compare_and_exchange_bool_acq.
4067
dff9a7a1 40682005-10-01 Ulrich Drepper <drepper@redhat.com>
b42a214c 4069 Jakub Jelinek <jakub@redhat.com>
dff9a7a1
UD
4070
4071 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4072 CANCEL_RESTMASK.
4073 (struct pthread): Move specific_used field to avoid padding.
4074 Add setxid_futex field.
4075 * init.c (sighandler_setxid): Reset setxid flag and release the
4076 setxid futex.
4077 * allocatestack.c (setxid_signal_thread): New function. Broken
4078 out of the bodies of the two loops in __nptl_setxid. For undetached
4079 threads check whether they are exiting and if yes, don't send a signal.
4080 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4081 * pthread_create.c (start_thread): For undetached threads, check
4082 whether setxid bit is set. If yes, wait until signal has been
4083 processed.
4084
4085 * allocatestack.c (STACK_VARIABLES): Initialize them.
4086 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4087
560b4709
UD
40882004-09-02 Jakub Jelinek <jakub@redhat.com>
4089
4090 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4091 waiters, awake all waiters on the associated mutex.
4092
5eac4760
RM
40932005-09-22 Roland McGrath <roland@redhat.com>
4094
4095 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4096 ../sysdeps/x86_64/hp-timing.h).
4097
a3615024
UD
40982005-08-29 Jakub Jelinek <jakub@redhat.com>
4099
4100 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4101 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4102 (lll_futex_wake_unlock): Define.
4103 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4104 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4105 (lll_futex_wake_unlock): Define.
4106 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4107 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4108 (lll_futex_wake_unlock): Define.
4109 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4110 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4111 (lll_futex_wake_unlock): Define.
4112 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4113 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4114 (lll_futex_wake_unlock): Define.
4115 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4116 lll_futex_wake_unlock.
4117 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4118 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4119 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4120 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4121 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4122 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4123
bf017034
UD
41242005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4125
4126 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4127 Fix typo in register name.
4128
fd4af664
UD
41292005-08-23 Ulrich Drepper <drepper@redhat.com>
4130
8558d715
UD
4131 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4132 Use __sigfillset. Document that sigfillset does the right thing wrt
4133 to SIGSETXID.
fd4af664 4134
3fd1bc67
UD
41352005-07-11 Jakub Jelinek <jakub@redhat.com>
4136
44d75caf 4137 [BZ #1102]
3fd1bc67
UD
4138 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4139 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4140 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4141 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4142 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4143 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4144 in the structure.
4145 * Makefile (tests): Add tst-initializers1.
4146 (CFLAGS-tst-initializers1.c): Set.
4147 * tst-initializers1.c: New test.
4148
553185e2
UD
41492005-07-11 Jakub Jelinek <jakub@redhat.com>
4150
4151 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4152 Make sure __flags are located at offset 48 from the start of the
4153 structure.
4154
8df08cb2
RM
41552005-07-02 Roland McGrath <roland@redhat.com>
4156
4157 * Makeconfig: Comment fix.
4158
253eb3a0
UD
41592005-07-05 Jakub Jelinek <jakub@redhat.com>
4160
4161 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4162 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4163 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4164 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4165 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4166 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4167 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4168 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4169 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4170 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4171
bb6e8ca3
UD
41722005-06-25 Jakub Jelinek <jakub@redhat.com>
4173
4174 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4175 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4176 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4177 fields.
4178 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4179 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4180 field. Put in sysinfo field unconditionally.
4181 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4182 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4183 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4184 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4185 fields.
4186 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4187 * pthread_create.c (__pthread_create_2_1): Use
4188 THREAD_COPY_STACK_GUARD macro.
4189 * Makefile: Add rules to build and run tst-stackguard1{,-static}
4190 tests.
4191 * tst-stackguard1.c: New file.
4192 * tst-stackguard1-static.c: New file.
4193
99c7f870
UD
41942005-06-14 Alan Modra <amodra@bigpond.net.au>
4195
4196 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4197 Invoke CGOTSETUP and CGOTRESTORE.
4198 (CGOTSETUP, CGOTRESTORE): Define.
4199
8074c5c5
RM
42002005-05-29 Richard Henderson <rth@redhat.com>
4201
4202 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4203 (tf_write, tf_writev): Use it.
4204 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
4205 the system minimum.
4206
c179df4e
UD
42072005-05-23 Jakub Jelinek <jakub@redhat.com>
4208
4209 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4210 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4211 __librt_*_asynccancel@local.
4212
b0e196a4
UD
42132005-05-17 Alan Modra <amodra@bigpond.net.au>
4214
4215 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4216 all occurrences of JUMPTARGET. Instead append @local to labels.
4217
f7d78e18
UD
42182005-05-20 Jakub Jelinek <jakub@redhat.com>
4219
4220 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4221 size/alignment of struct pthread rather than tcbhead_t.
4222 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4223 Likewise.
4224 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4225 Likewise.
4226 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4227 Likewise.
4228
363dd976
UD
42292005-05-19 Richard Henderson <rth@redhat.com>
4230
4231 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4232 __sync_val_compare_and_swap, not explicit _si variant.
4233 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4234
1ad9da69
UD
42352005-05-03 Ulrich Drepper <drepper@redhat.com>
4236
4237 [BZ #915]
4238 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4239
5085cd1f
UD
42402005-05-03 Jakub Jelinek <jakub@redhat.com>
4241
4242 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4243 .eh_frame section, use cfi_* directives.
4244
ad529081
UD
42452005-04-27 Jakub Jelinek <jakub@redhat.com>
4246
4247 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4248 of "" includes.
4249
dea99685
UD
42502005-04-27 Ulrich Drepper <drepper@redhat.com>
4251
c06aad09 4252 [BZ #1075]
dea99685
UD
4253 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4254 aio_write blocks.
4255
84060bad
RM
42562005-04-27 Roland McGrath <roland@redhat.com>
4257
5e2d8ac8
RM
4258 * Makefile (tests): Remove tst-clock2.
4259
84060bad
RM
4260 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4261 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4262 translating to the kernel clockid_t for our own process/thread clock.
4263
4264 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4265
4a035b9d
RM
42662005-04-15 Jakub Jelinek <jakub@redhat.com>
4267
4268 * old_pthread_cond_init.c: Include <errno.h>.
4269 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4270 process shared or uses clock other than CLOCK_REALTIME.
4271 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4272
edac0e8f
UD
42732005-04-13 David S. Miller <davem@davemloft.net>
4274
4275 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4276 * sysdeps/sparc/sparc64/clone.S: New file.
4277
613d8d52
RM
42782005-04-05 Jakub Jelinek <jakub@redhat.com>
4279
44d75caf 4280 [BZ #1102]
613d8d52
RM
4281 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4282 __inline instead of inline.
4283 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4284
ee618985
UD
42852005-03-31 Jakub Jelinek <jakub@redhat.com>
4286
4287 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4288 functionally equivalent, but shorter instructions.
4289 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4290 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4291 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4292 Likewise.
4293 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4294 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4295 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4296 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4297 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4298 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4299 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4300 Likewise.
4301 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4302 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4303 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4304 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4305 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4306
f850220b
AJ
43072005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
4308
4309 * sysdeps/mips/Makefile: New file.
4310 * sysdeps/mips/nptl-sysdep.S: New file.
4311 * sysdeps/mips/tcb-offsets.sym: New file.
4312 * sysdeps/mips/pthread_spin_lock.S: New file.
4313 * sysdeps/mips/pthread_spin_trylock.S: New file.
4314 * sysdeps/mips/pthreaddef.h: New file.
4315 * sysdeps/mips/tls.h: New file.
4316 * sysdeps/mips/jmpbuf-unwind.h: New file.
4317 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4318 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4319 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4320 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4321 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4322 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4323 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4324 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4325 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4326 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4327
1e6da2b0
UD
43282005-03-23 Ulrich Drepper <drepper@redhat.com>
4329
c06aad09 4330 [BZ #1112]
1e6da2b0
UD
4331 * pthread_create.c (__pthread_create_2_1): Rename syscall error
4332 variable to scerr.
4333
5233d576
RM
43342005-03-10 Jakub Jelinek <jakub@redhat.com>
4335
4336 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4337
3053ff11
RM
43382005-02-25 Roland McGrath <roland@redhat.com>
4339
4340 * alloca_cutoff.c: Correct license text.
4341 * tst-unload.c: Likewise.
4342 * sysdeps/pthread/allocalim.h: Likewise.
4343 * sysdeps/pthread/pt-initfini.c: Likewise.
4344 * sysdeps/pthread/bits/libc-lock.h: Likewise.
4345 * sysdeps/pthread/bits/sigthread.h: Likewise.
4346 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4347 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4348
9cfe5381
RM
43492005-02-16 Roland McGrath <roland@redhat.com>
4350
4351 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4352 Use unsigned int * for ptr_nthreads.
4353
7de00121
RM
43542005-02-14 Alan Modra <amodra@bigpond.net.au>
4355
20d511e0 4356 [BZ #721]
7de00121
RM
4357 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4358 gcc4.
4359
4bae262d
UD
43602005-02-07 Richard Henderson <rth@redhat.com>
4361
613d8d52 4362 [BZ #787]
4bae262d
UD
4363 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4364 argument.
4365
75df54b7
RM
43662004-11-03 Marcus Brinkmann <marcus@gnu.org>
4367
4368 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4369 order of arguments in invocation of atomic_add_zero.
4370
ea9c93cc
UD
43712005-01-26 Jakub Jelinek <jakub@redhat.com>
4372
9cfe5381 4373 [BZ #737]
ea9c93cc
UD
4374 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4375 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4376 at least gotntpoff relocation and addition.
4377 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4378 Likewise.
4379 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4380 Likewise.
4381 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4382 Likewise.
4383
9dcafc55
UD
43842005-01-06 Ulrich Drepper <drepper@redhat.com>
4385
4386 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4387 entry for static tls deallocation fix.
4388 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4389 also contains information whether the memory pointed to is static
4390 TLS or not.
4391 * sysdeps/i386/tls.h: Likewise.
4392 * sysdeps/ia64/tls.h: Likewise.
4393 * sysdeps/powerpc/tls.h: Likewise.
4394 * sysdeps/s390/tls.h: Likewise.
4395 * sysdeps/sh/tls.h: Likewise.
4396 * sysdeps/sparc/tls.h: Likewise.
4397 * sysdeps/x86_64/tls.h: Likewise.
4398
a71c152c
UD
43992004-12-27 Ulrich Drepper <drepper@redhat.com>
4400
4401 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4402
d143c49e
UD
44032004-12-21 Jakub Jelinek <jakub@redhat.com>
4404
4405 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4406 %esp.
4407 * Makefile (tests): Add tst-align2.
4408 * tst-align2.c: New test.
4409 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4410 -mpreferred-stack-boundary=4.
4411
50130ded
RM
44122004-12-18 Roland McGrath <roland@redhat.com>
4413
4414 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4415 New file removed withdrawn for the moment.
4416
cbc53df0
RH
44172004-12-17 Richard Henderson <rth@redhat.com>
4418
4419 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4420 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 4421
fb9d5c73
UD
44222004-12-16 Ulrich Drepper <drepper@redhat.com>
4423
03332aa6
UD
4424 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4425 Increased PTHREAD_STACK_MIN.
4426
fb9d5c73
UD
4427 * tst-context1.c (stacks): Use bigger stack size.
4428
e853ea00
UD
44292004-12-16 Jakub Jelinek <jakub@redhat.com>
4430
4431 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4432 * sysdeps/sparc/tcb-offsets.sym: Add TID.
4433
f23673fc
UD
44342004-12-15 Jakub Jelinek <jakub@redhat.com>
4435
4436 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4437 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4438 * sysdeps/s390/tcb-offsets.sym (TID): Add.
4439
917fbe70
UD
44402004-12-15 Ulrich Drepper <drepper@redhat.com>
4441
4442 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4443
1f9d7c27
UD
44442004-12-14 Ulrich Drepper <drepper@redhat.com>
4445
4446 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4447 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4448
4449 * tst-getpid1.c: If child crashes, report this first. Print which
4450 signal.
4451
bf7c04cd
UD
44522004-12-09 Ulrich Drepper <drepper@redhat.com>
4453
4454 * init.c (__pthread_initialize_minimal_internal): Also unblock
4455 SIGSETXID.
4456
44572004-12-01 Jakub Jelinek <jakub@redhat.com>
4458
4459 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4460 _POSIX_THREAD_CPUTIME): Define to 0.
4461 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4462 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4463 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4464 __timer_signal_thread_tclk): Remove.
4465 (init_module): Remove their initialization.
4466 (thread_cleanup): Remove their cleanup assertions.
4467 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4468 __timer_signal_thread_tclk): Remove.
4469 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 4470 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
4471 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4472
484cc801
UD
44732004-12-07 Jakub Jelinek <jakub@redhat.com>
4474
4475 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4476 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4477
4478 * Makefile (tests): Add tst-getpid2.
4479 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4480 (do_test): Use it. Use __clone2 instead of clone on ia64.
4481 * tst-getpid2.c: New test.
4482
2da9a6a1
UD
44832004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4484
4485 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4486
1ff241b8
UD
44872004-12-04 Ulrich Drepper <drepper@redhat.com>
4488
4489 * Makefile (tests): Add tst-getpid1.
4490 * tst-getpid1.c: New file.
4491 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4492 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4493
3f488b9c
RM
44942004-12-02 Roland McGrath <roland@redhat.com>
4495
4496 * Makefile (libpthread-nonshared): Variable removed.
4497 ($(objpfx)libpthread_nonshared.a): Target removed.
4498 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4499 These are now handled by generic magic from
4500 libpthread-static-only-routines being set.
4501
597ce09c
UD
45022004-11-27 Ulrich Drepper <drepper@redhat.com>
4503
4504 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4505 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4506 _POSIX_THREAD_PRIO_PROTECT): Define.
4507 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4508 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4509 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4510
60e4523a
UD
45112004-11-26 Jakub Jelinek <jakub@redhat.com>
4512
4513 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4514 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4515 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4516 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4517 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4518 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4519 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4520
f1f2cafc
UD
45212004-11-24 Ulrich Drepper <drepper@redhat.com>
4522
bca2d208
UD
4523 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4524
f1f2cafc
UD
4525 * Makefile (libpthread-routines): Add pthread_setschedprio.
4526 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4527 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4528 * pthread_setschedprio.c: New file.
4529
b639d0c9
UD
45302004-11-20 Jakub Jelinek <jakub@redhat.com>
4531
ef2bb413
UD
4532 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4533 * pthread_cancel.c (pthread_create): Likewise.
4534
b639d0c9
UD
4535 * Makefile (libpthread-routines): Add vars.
4536 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4537 * init.c (__default_stacksize, __is_smp): Remove.
4538 * vars.c: New file.
4539 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4540 and define a wrapper macro.
4541 (PTHREAD_STATIC_FN_REQUIRE): Define.
4542 * allocatestack.c (__find_thread_by_id): Undefine.
4543 * pthread_create (__pthread_keys): Remove.
4544 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4545 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4546 PTHREAD_STATIC_FN_REQUIRE.
4547
3defcff3
UD
45482004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4549
4550 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4551 parameter to REGISTER macro.
4552
ec188f92
RM
45532004-11-17 Roland McGrath <roland@redhat.com>
4554
4555 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4556 Make sure SIGCANCEL is blocked as well.
4557
ccd8de9a
UD
45582004-11-10 Jakub Jelinek <jakub@redhat.com>
4559
4560 * sysdeps/pthread/setxid.h: New file.
4561 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4562 (struct xid_command): Add forward decl.
4563 (struct pthread_functions): Change return type of __nptl_setxid hook
4564 to int.
4565 * pthreadP.h (__nptl_setxid): Change return type to int.
4566 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4567 calling thread, return its return value and set errno on failure.
4568 * descr.h (struct xid_command): Change id type to long array.
4569
4570 * Makefile: Add rules to build and test tst-setuid1 and
4571 tst-setuid1-static.
4572 * tst-setuid1.c: New test.
4573 * tst-setuid1-static.c: New test.
4574
ed2ced8a
UD
45752004-11-10 Jakub Jelinek <jakub@redhat.com>
4576
4577 * Makefile (tests): Add tst-exit3.
4578 * tst-exit3.c: New test.
4579
948603ee
UD
45802004-11-09 Ulrich Drepper <drepper@redhat.com>
4581
4582 * Makefile (tests): Add tst-exit2.
4583 * tst-exit2.c: New file.
4584
ba5ffd2a
RM
45852004-11-09 Roland McGrath <roland@redhat.com>
4586
4587 [BZ #530]
4588 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4589 here, before calling clone.
4590 * pthread_create.c (start_thread): Don't do it here.
4591
c4d7bd39
RM
45922004-11-02 Jakub Jelinek <jakub@redhat.com>
4593
4594 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4595
543fb0c8
UD
45962004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4597
4598 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4599 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4600 assembler warning.
4601
a1fbd858
UD
46022004-10-28 Jakub Jelinek <jakub@redhat.com>
4603
4604 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4605 if sched_priority is not between minprio and maxprio.
4606
c2a4357a
UD
46072004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4608
4609 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4610 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4611
4612 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4613 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4614
78d8d211
UD
46152004-10-24 Ulrich Drepper <drepper@redhat.com>
4616
4617 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4618 not-cancelable I/O functions.
4619
dd28590f
UD
46202004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4621
4622 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4623 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4624 make sure 2 is stored in the futex and we looked at the old value.
4625 Fix a few other problems to return the correct value.
4626
f8c97af7
RH
46272004-10-14 Richard Henderson <rth@redhat.com>
4628
4629 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4630 make gcc4 happy.
4631
3feb8efa
UD
46322004-10-06 Jakub Jelinek <jakub@redhat.com>
4633
4634 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4635 of pthread-functions.h and pthreaddef.h.
4636 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4637
4638 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4639 Change __data.__nwaiters from int to unsigned int.
4640
4641 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4642 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4643
4644 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4645 before return type.
4646
4647 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4648 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4649
67060ef5
UD
46502004-10-06 Ulrich Drepper <drepper@redhat.com>
4651
4652 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4653 test fails, remove message queue.
4654 (tf_msgsnd): Likewise.
4655
f38a3086
UD
46562004-10-05 Jakub Jelinek <jakub@redhat.com>
4657
4658 * tst-clock1.c: Change #ifdef to #if defined.
4659 * tst-clock2.c: Likewise.
4660 * tst-cond11.c: Likewise.
4661
2c03b6db
UD
4662 * sysdeps/pthread/timer_create.c (timer_create): Use
4663 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4664 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4665 THREAD_CPUTIME.
4666
6ab5f50d
UD
46672004-10-05 Jakub Jelinek <jakub@redhat.com>
4668
4669 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4670 _POSIX_THREAD_CPUTIME): Define to 0.
4671
e4bb4853
UD
46722004-10-04 Ulrich Drepper <drepper@redhat.com>
4673
4674 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4675 and _POSIX_THREAD_CPUTIME to zero.
4676 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4677 * tst-barrier2.c: Fix testing for POSIX feature.
4678 * tst-clock1.c: Likewise.
4679 * tst-clock2.c: Likewise.
4680 * tst-cond11.c: Likewise.
4681 * tst-cond4.c: Likewise.
4682 * tst-cond6.c: Likewise.
4683 * tst-flock2.c: Likewise.
4684 * tst-mutex4.c: Likewise.
4685 * tst-mutex9.c: Likewise.
4686 * tst-rwlock12.c: Likewise.
4687 * tst-rwlock4.c: Likewise.
4688 * tst-signal1.c: Likewise.
4689 * tst-spin2.c: Likewise.
4690 * sysdeps/pthread/posix-timer.h: Likewise.
4691 * sysdeps/pthread/timer_create.c: Likewise.
4692 * sysdeps/pthread/timer_routines.c: Likewise.
4693
c1b48791
UD
46942004-10-01 Ulrich Drepper <drepper@redhat.com>
4695
927f0673
UD
4696 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4697 (__lll_mutex_timedlock_wait): Address futex correctly.
4698
c1b48791 4699 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 4700 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
4701 make sure 2 is stored in the futex and we looked at the old value.
4702 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4703 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4704 which might very well made the code not working at all before.
7b87aca6 4705 [BZ #417]
c1b48791 4706
e9f4e844
UD
47072004-09-28 Ulrich Drepper <drepper@redhat.com>
4708
4f21c95d
UD
4709 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4710 allow SIGSETXID to be sent.
4711 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4712 for SIGSETXID to be defined.
4713 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4714 SIGSETXID cannot be blocked.
4715
e9f4e844
UD
4716 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4717 Add __extension__ to long long types.
4718 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4719 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4720 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4721 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4722 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4723 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4724 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4725
5f66b766
UD
47262004-09-25 Ulrich Drepper <drepper@redhat.com>
4727
4728 * descr.h (struct pthread): Add stopped_start field.
4729 * sysdeps/pthread/createthread.c (create_thread): Set
4730 start_stopped flag in descriptor for new thread appropriately.
4731 * pthread_create.c (start_thread): Only take lock to be stopped on
4732 startup if stopped_start flag says so.
4733
362038b0
UD
47342004-09-24 Ulrich Drepper <drepper@redhat.com>
4735
3f80a99b
UD
4736 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4737 is created detached and if yes, do not try to free the stack in case
4738 the thread creation failed.
4739 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4740 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4741 case there has been no error. [BZ #405]
4742
362038b0
UD
4743 * pthread_create.c (start_thread): Don't wait for scheduler data
4744 etc to be set at the beginning of the function. The cancellation
4745 infrastructure must have been set up. And enable async
4746 cancellation before potentially going to sleep. [BZ #401]
4747
65f0beb9
UD
47482004-09-20 Ulrich Drepper <drepper@redhat.com>
4749
3c12b91a 4750 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
4751 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4752 for now.
4753 * Makefile: Don't build pthread_set*id code for now.
4754
2edb61e3
UD
47552004-09-19 Ulrich Drepper <drepper@redhat.com>
4756
4757 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4758 internal use.
4759 * allocatestack.c (__nptl_setxid): New function.
4760 * descr.h (struct xid_command): Define type.
4761 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4762 (sighandler_setxid): New function.
4763 (__pthread_initialize_minimal): Register sighandler_setxid for
4764 SIGCANCEL.
4765 * pt-allocrtsig.c: Update comment.
4766 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4767 Declare __nptl_setxid.
4768 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4769 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4770 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4771 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4772 and pthread_setresuid_np.
4773 * pthread_setgid_np.c: New file.
4774 * pthread_setuid_np.c: New file.
4775 * pthread_setegid_np.c: New file.
4776 * pthread_seteuid_np.c: New file.
4777 * pthread_setregid_np.c: New file.
4778 * pthread_setreuid_np.c: New file.
4779 * pthread_setresgid_np.c: New file.
4780 * pthread_setresuid_np.c: New file.
4781 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4782 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4783 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4784 and pthread_setresuid_np.
4785 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4786 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4787 pthread_setregid, and pthread_setresgid.
4788
1ab1fa6f
UD
47892004-09-18 Ulrich Drepper <drepper@redhat.com>
4790
4791 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4792 ENOMEM when out of memory.
4793
ae9e6b36
RM
47942004-09-10 Roland McGrath <roland@redhat.com>
4795
4796 [BZ #379]
4797 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4798 code, since we don't try to use the broken CLONE_STOPPED any more.
4799 * pthread_create.c (start_thread): Likewise.
4800
424bd2f8
RH
48012004-09-15 Richard Henderson <rth@redhat.com>
4802
4803 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4804
17b8a52d
UD
48052004-09-01 David Mosberger <davidm@hpl.hp.com>
4806
4807 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4808 (__libc_unwind_longjmp): Delete macro and declare as function.
4809 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4810 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4811 nptl directory.
4812 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4813 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4814 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4815
ccc63b07
UD
48162004-09-12 Ulrich Drepper <drepper@redhat.com>
4817
4818 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4819 for __USE_XOPEN2K.
4820 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4821 types also for __USE_XOPEN2K.
4822 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4823 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4824 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4825 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4826 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4827 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4828 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4829 [BZ #320]
4830
31f93b3b
UD
48312004-09-08 Ulrich Drepper <drepper@redhat.com>
4832
4833 * sysdeps/pthread/pthread.h
4834 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4835 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4836 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4837 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4838 [BZ #375]
4839
e0329987
UD
48402004-09-07 Ulrich Drepper <drepper@redhat.com>
4841
590b40f7
UD
4842 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4843 PSEUDO to be used with . prefix.
4844
67254a97
UD
4845 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4846 Use atomic_increment instead of atomic_exchange_and_add.
4847 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4848 Likewise.
4849 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4850 Likewise.
4851 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4852 Likewise.
4853
4854 * allocatestack.c (allocate_stack): Use atomic_increment_val
4855 instead of atomic_exchange_and_add.
4856 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4857 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4858 Likewise.
4859 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4860 Likewise.
4861
e0329987
UD
4862 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4863 the initialization function might throw.
4864
42d86dd6 48652005-09-05 Richard Henderson <rth@redhat.com>
e0329987 4866
42d86dd6
RH
4867 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4868 Move definition inside libpthread, libc, librt check. Provide
4869 definition for rtld.
4870
73f7c32c
UD
48712004-09-02 Ulrich Drepper <drepper@redhat.com>
4872
f76c8499
UD
4873 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4874 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4875 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4876 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4877 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4878 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4879 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4880 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4881 * unwind.c: Use it.
4882
73f7c32c
UD
4883 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4884 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4885 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4886 Likewise.
4887 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4888 Decrement __nwaiters. If pthread_cond_destroy has been called and
4889 this is the last waiter, signal pthread_cond_destroy caller and
4890 avoid using the pthread_cond_t structure after unlock.
4891 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4892 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4893 Read clock type from the least significant bits of __nwaiters instead
4894 of __clock.
4895 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4896 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4897
48982004-08-31 Jakub Jelinek <jakub@redhat.com>
4899
4900 [BZ #342]
4901 * Makefile (tests): Add tst-cond20 and tst-cond21.
4902 * tst-cond20.c: New test.
4903 * tst-cond21.c: New test.
4904 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4905 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4906 it unsigned int.
4907 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4908 Likewise.
4909 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4910 (pthread_cond_t): Likewise.
4911 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4912 Likewise.
4913 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4914 Likewise.
4915 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4916 Likewise.
4917 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4918 (cond_nwaiters): New.
4919 (clock_bits): New.
4920 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4921 if there are waiters not signalled yet.
4922 Wait until all already signalled waiters wake up.
4923 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4924 __nwaiters. If pthread_cond_destroy has been called and this is the
4925 last waiter, signal pthread_cond_destroy caller and avoid using
4926 the pthread_cond_t structure after unlock.
4927 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4928 decrement it when leaving. If pthread_cond_destroy has been called
4929 and this is the last waiter, signal pthread_cond_destroy caller.
4930 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4931 Likewise. Read clock type from the least significant bits of
4932 __nwaiters instead of __clock.
4933 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4934 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4935 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4936 clock type just from the last COND_CLOCK_BITS bits of value.
4937 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4938 instead of __clock, just from second bit of condattr's value.
4939
409f7493
UD
49402004-08-30 Jakub Jelinek <jakub@redhat.com>
4941
4942 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4943 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4944 != 64.
4945 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4946
92c6ccd1
RM
49472004-08-15 Roland McGrath <roland@frob.com>
4948
4949 * pthread_atfork.c: Update copyright terms including special exception
4950 for these trivial files, which are statically linked into executables
4951 that use dynamic linking for the significant library code.
4952
4d004cfb
UD
49532004-08-09 Jakub Jelinek <jakub@redhat.com>
4954
4955 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4956 pthread_rwlock_rdlock.
4957 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4958 Decrease __nr_readers_queued after reacquiring lock.
4959 * sysdeps/pthread/pthread_rwlock_timedrdlock
4960 (pthread_rwlock_timedrdlock): Likewise.
4961 Reported by Bob Cook <bobcook47@hotmail.com>.
4962
90595fb6
RM
49632004-08-11 Jakub Jelinek <jakub@redhat.com>
4964
4965 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4966 before pthread_barrier_wait.
4967
fa46f7ab
UD
49682004-08-07 Ulrich Drepper <drepper@redhat.com>
4969
4970 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4971 Remove unnecessary exception handling data.
4972
15ef4b55
UD
49732004-07-23 Jakub Jelinek <jakub@redhat.com>
4974
4975 [BZ #284]
4976 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4977 instead of clockid_t.
4978
4fb907b7
RM
49792004-07-21 Roland McGrath <roland@redhat.com>
4980
4981 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4982
49832004-07-19 Roland McGrath <roland@redhat.com>
4984
4985 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4986
8f73811b
RM
49872004-07-02 Roland McGrath <roland@redhat.com>
4988
4989 * configure: Don't exit.
4990
290639c3
UD
49912004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4992
4993 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4994 (__pthread_cond_timedwait): Check for invalid nanosecond in
4995 timeout value.
4996
8e5aaad9
UD
49972004-07-07 Ulrich Drepper <drepper@redhat.com>
4998
4999 * Makefile: Add rules to build and run tst-fini1.
5000 * tst-fini1.c: New file.
5001 * tst-fini1mod.c: New file.
5002
ce6e047f
UD
50032004-07-05 Ulrich Drepper <drepper@redhat.com>
5004
5005 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5006 if no cancellation support is needed.
5007 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5008 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5009 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5010 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5011 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5012 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5013 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5014 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5015 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5016
5017 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5018 only if not already defined.
5019
9b9ef823
UD
50202004-07-05 Jakub Jelinek <jakub@redhat.com>
5021
2dd18ce2
UD
5022 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5023 constraint "m" instead of "0" for futex.
5024
9b9ef823
UD
5025 * shlib-versions: Add powerpc64-.*-linux.*.
5026
38205402
UD
50272004-07-04 Jakub Jelinek <jakub@redhat.com>
5028
5029 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5030 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5031 for valid tv_nsec.
5032 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5033 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5034 bits.
5035
78a9c837
RM
50362004-06-29 Roland McGrath <roland@redhat.com>
5037
5038 * Banner: NPTL no longer has its own version number.
5039 * Makefile (nptl-version): Variable removed.
5040 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5041 using $(version), the glibc version number.
5042
d3d35527
UD
50432004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5044
5045 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5046 Fix branch offset for a PLT entry.
5047 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5048 Likewise.
5049 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5050 Likewise.
5051 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5052 Likewise.
5053 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5054 Likewise.
5055
346f18ae
UD
50562004-06-28 Jakub Jelinek <jakub@redhat.com>
5057
5058 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5059 unconditionally.
5060
f3a19754
UD
50612004-06-28 Jakub Jelinek <jakub@redhat.com>
5062
5063 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5064 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5065 instead of tv_sec.
5066 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5067 (pthread_rwlock_timedrdlock): Likewise.
5068
539842a4
UD
50692004-06-22 Jakub Jelinek <jakub@redhat.com>
5070
5071 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5072 Set __r7 to val, not mutex.
5073
46f4c578
UD
50742004-06-27 Ulrich Drepper <drepper@redhat.com>
5075
5076 * Makefile: Add rules to build tst-rwlock14.
5077 * tst-rwlock14.c: New file.
5078
50792004-06-24 Boris Hu <boris.hu@intel.com>
5080
5081 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5082 check.
5083 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5084
9898e99c
AJ
50852004-06-19 Andreas Jaeger <aj@suse.de>
5086
5087 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5088 assembler in last patch.
5089
7c3164bc
UD
50902004-06-17 Ulrich Drepper <drepper@redhat.com>
5091
5092 * sysdeps/pthread/pthread_cond_timedwait.c
5093 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5094 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5095 (__pthread_cond_timedwait): Check for invalid nanosecond in
5096 timeout value.
5097 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5098 * tst-cond19.c: New file.
5099 * Makefile: Add rules to build and run tst-cond19.
5100
72e61500
UD
51012004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5102
5103 * tst-context1.c (GUARD_PATTERN): Defined.
5104 (tst_context_t): Define struct containing ucontext_t & guard words.
5105 (ctx): Declare as an array of tst_context_t.
5106 (fct): Verify uc_link & guard words are still valid.
5107 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5108
7c370086
UD
51092004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5110
5111 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5112 Add __data.__futex field, reshuffle __data.__clock.
5113 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5114 (__pthread_cond_signal): Increment __futex at the same time as
5115 __wakeup_seq or __total_seq. Pass address of __futex instead of
5116 address of low 32-bits of __wakeup_seq to futex syscall.
5117 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5118 (__pthread_cond_wait): Likewise. Pass __futex value from before
5119 releasing internal lock to FUTEX_WAIT.
5120 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5121 (__pthread_cond_timedwait): Likewise.
5122 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5123 (FUTEX_CMP_REQUEUE): Define.
5124 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5125 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5126 Pass __futex value from before the unlock and __futex address instead
5127 of address of low 32-bits of __wakeup_seq to futex syscall.
5128 Fallback to FUTEX_WAKE all on any errors.
5129
a9e526e7
RM
51302004-06-08 Jakub Jelinek <jakub@redhat.com>
5131
5132 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5133 comment typo.
5134 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5135 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5136 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5137 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5138 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
5139
f1847a84
RM
51402004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
5141
5142 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5143 Add memory clobber to inline assembly.
5144 (__lll_mutex_trylock): Likewise.
5145 (__lll_mutex_cond_trylock): Likewise.
5146
f7c81e1a
UD
51472004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
5148
5149 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5150 Pass val argument as 6th system call argument in %r7.
5151
75fccede
UD
51522004-05-21 Jakub Jelinek <jakub@redhat.com>
5153
5154 * Makefile (tests): Add tst-cond16.
5155 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5156 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5157 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5158 Add __data.__futex field, reshuffle __data.__clock.
5159 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5160 (__pthread_cond_signal): Increment __futex at the same time as
5161 __wakeup_seq or __total_seq. Pass address of __futex instead of
5162 address of low 32-bits of __wakeup_seq to futex syscall.
5163 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5164 (__pthread_cond_wait): Likewise. Pass __futex value from before
5165 releasing internal lock to FUTEX_WAIT.
5166 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5167 (__pthread_cond_timedwait): Likewise.
5168 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5169 (FUTEX_CMP_REQUEUE): Define.
5170 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5171 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5172 Pass __futex value from before the unlock and __futex address instead
5173 of address of low 32-bits of __wakeup_seq to futex syscall.
5174 Fallback to FUTEX_WAKE all on any errors.
5175 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5176 Define.
5177 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5178 internally. Return non-zero if error, zero if success.
5179 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5180 Add __data.__futex field, reshuffle __data.__clock.
5181 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5182 Define.
5183 (lll_futex_requeue): Add val argument, return 1 unconditionally
5184 for the time being.
5185 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5186 Add __data.__futex field, reshuffle __data.__clock.
5187 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5188 Define.
5189 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5190 internally. Return non-zero if error, zero if success.
5191 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5192 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5193 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5194 Define.
5195 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5196 internally. Return non-zero if error, zero if success.
5197 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5198 Add __data.__futex field, reshuffle __data.__clock.
5199 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5200 Define.
5201 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5202 internally. Return non-zero if error, zero if success.
5203 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5204 Add __data.__futex field, reshuffle __data.__clock.
5205 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5206 Add __data.__futex field, reshuffle __data.__clock.
5207 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5208 Increment __futex at the same time as __wakeup_seq or __total_seq.
5209 Pass address of __futex instead of address of low 32-bits of
5210 __wakeup_seq to futex syscall.
5211 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5212 Pass __futex value from before releasing internal lock
5213 to FUTEX_WAIT.
5214 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5215 Likewise. Avoid unnecessary shadowing of variables.
5216 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5217 Set __futex to 2 * __total_seq. Pass __futex value from before the
5218 unlock and __futex address instead of address of low 32-bits of
5219 __wakeup_seq to futex_requeue macro, adjust for new return value
5220 meaning.
5221 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5222 (__pthread_cond_signal): Increment __futex at the same time as
5223 __wakeup_seq or __total_seq. Pass address of __futex instead of
5224 address of low 32-bits of __wakeup_seq to futex syscall.
5225 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5226 (__pthread_cond_wait): Likewise. Pass __futex value from before
5227 releasing internal lock to FUTEX_WAIT.
5228 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5229 (__pthread_cond_timedwait): Likewise.
5230 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5231 (FUTEX_CMP_REQUEUE): Define.
5232 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5233 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5234 Pass __futex value from before the unlock and __futex address instead
5235 of address of low 32-bits of __wakeup_seq to futex syscall.
5236 Fallback to FUTEX_WAKE all on any errors.
5237
52382004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5239
5240 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5241 Add nop to align the end of critical section.
5242 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5243
fbf86dda
UD
52442004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5245
5246 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5247 Add __broadcast_seq field.
5248 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5249 all waiters as woken with woken_seq and bump broadcast counter.
5250 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5251 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5252 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5253 Comment typo fixes. Avoid returning -ETIMEDOUT.
5254
52552004-06-01 Ulrich Drepper <drepper@redhat.com>
5256
5257 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5258 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5259 Reported by Kaz Kojima.
5260
ffdd5e50
UD
52612004-05-25 Jakub Jelinek <jakub@redhat.com>
5262
5263 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5264
3abc82c8
UD
52652004-05-21 Jakub Jelinek <jakub@redhat.com>
5266
5267 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5268 __broadcast_seq with bc_seq after acquiring internal lock instead of
5269 before it.
5270
893a3511
UD
52712004-05-18 Jakub Jelinek <jakub@redhat.com>
5272
5273 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5274 compilation.
5275 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5276 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5277 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5278 (pthread_cond_t): Add __data.__broadcast_seq field.
5279 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5280 (FRAME_SIZE): Define.
5281 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
5282 Comment typo fixes.
5283 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5284 Define.
5285 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
5286 typo fixes.
5287 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5288 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
5289 fixes.
5290
52912004-05-18 Ulrich Drepper <drepper@redhat.com>
5292
5293 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5294 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5295 Add __broadcast_seq field.
5296 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5297 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5298 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5299 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5300 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5302 all waiters as woken with woken_seq and bump broadcast counter.
5303 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5304 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5305 __broadcast_seq field.
5306 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5307 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5308 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5309 * pthread_cond_init.c: Initialize __broadcast_seq field.
5310 * Makefile (tests): Add tst-cond17 and tst-cond18.
5311 Add .NOTPARALLEL goal.
5312 * tst-cond16.c: New file. From Jakub.
5313 * tst-cond17.c: New file. From Jakub.
5314 * tst-cond18.c: New file. From Jakub.
5315
4123718e
UD
53162004-05-16 Ulrich Drepper <drepper@redhat.com>
5317
5318 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5319 unwind info.
5320
5321 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5322 Parametrize frame size. Correct some unwind info.
5323 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5324
2d7ae210
UD
53252004-05-04 Jakub Jelinek <jakub@redhat.com>
5326
5327 * tst-stack3.c: Note testing functionality beyond POSIX.
5328
50c2b6d7
UD
53292004-05-04 Jakub Jelinek <jakub@redhat.com>
5330
5331 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5332 Change conditional from ifdef to if.
5333
27b02589
UD
53342004-04-23 Jakub Jelinek <jakub@redhat.com>
5335
5336 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5337 SYSDEP_CANCEL_ERROR): Define.
5338 (PSEUDO): Use it.
5339
4bb8fc33
UD
53402004-05-01 Jakub Jelinek <jakub@redhat.com>
5341
5342 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5343
f9a06dc1
UD
53442004-04-20 Jakub Jelinek <jakub@redhat.com>
5345
5346 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5347
d3b52028
UD
53482004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5349
5350 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5351 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5352 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5353 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5354
a5dd0a6c
UD
53552004-04-19 Ulrich Drepper <drepper@redhat.com>
5356
5357 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5358 thread has all signals blocked.
5359
620c3354
AJ
53602004-04-18 Andreas Jaeger <aj@suse.de>
5361
5362 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5363 (SEM_VALUE_MAX): Add missing brace.
5364
1683daeb
UD
53652004-04-17 Jakub Jelinek <jakub@redhat.com>
5366
5367 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5368 in rt subdir.
5369 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5370 * sysdeps/pthread/tst-mqueue8x.c: New test.
5371 * tst-cancel4.c: Update comment about message queues.
5372
5373 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5374 return it_value { 0, 0 }.
5375 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5376 like SIGEV_SIGNAL.
5377 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5378 assertion for SIGEV_NONE.
5379 (thread_attr_compare): Compare all attributes, not just a partial
5380 subset.
5381
53822004-04-17 Jakub Jelinek <jakub@redhat.com>
5383
5384 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5385
f532641d
UD
53862004-04-17 Ulrich Drepper <drepper@redhat.com>
5387
5388 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5389 Just use a plain number.
5390 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5391 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5392 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5393 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5394 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5395 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5396 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5397
7eb7fdda
UD
53982004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5399
53392906
UD
5400 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5401 frame info.
5402 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 5403
d7ba1313
UD
54042004-04-15 Jakub Jelinek <jakub@redhat.com>
5405
5406 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5407 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5408 of calling sigwaitinfo.
5409
5adac0e4
UD
54102004-04-16 Ulrich Drepper <drepper@redhat.com>
5411
5412 * allocatestack.c (allocate_stack): Set reported_guardsize
5413 unconditionally.
5414 * pthread_getattr_np.c (pthread_getattr_np): Use
5415 reported_guardsize instead of guardsize.
5416 * descr.h (struct pthread): Add reported_guardsize field.
5417
f93fa7d4
UD
54182004-04-13 Jakub Jelinek <jakub@redhat.com>
5419
5420 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5421
1b82c6c7
UD
54222004-04-12 Ulrich Drepper <drepper@redhat.com>
5423
5424 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5425
54262004-04-08 Jakub Jelinek <jakub@redhat.com>
5427
5428 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5429 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5430 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5431 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5432 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5433 Define.
5434 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5435 (_POSIX_MESSAGE_PASSING): Define.
5436 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5437 (_POSIX_MESSAGE_PASSING): Define.
5438 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5439 (_POSIX_MESSAGE_PASSING): Define.
5440
e6eb894e
UD
54412004-04-04 Ulrich Drepper <drepper@redhat.com>
5442
5443 * tst-context1.c (fct): Check whether correct stack is used.
5444
1e084487
UD
54452004-04-03 Ulrich Drepper <drepper@redhat.com>
5446
4e73e115
UD
5447 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5448 matching constraints for asm mem parameters.
5449
1e084487
UD
5450 * tst-clock2.c (tf): Don't define unless needed.
5451
feca5e0b
UD
54522004-03-30 H.J. Lu <hongjiu.lu@intel.com>
5453
5454 * Makefile (link-libc-static): Use $(static-gnulib) instead of
5455 $(gnulib).
5456
3fa21fd8
UD
54572004-03-30 Ulrich Drepper <drepper@redhat.com>
5458
5459 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5460 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5461 * pthreadP.h: Declare __nptl_deallocate_tsd.
5462 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5463 Adjust caller.
5464
5465 * Makefile (tests): Add tst-tsd5.
5466 * tst-tsd5.c: New file.
5467
8e32efa6
UD
54682004-03-29 Ulrich Drepper <drepper@redhat.com>
5469
5470 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5471 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5472 is SHLIB_COMPAT check.
5473 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5474 (__pthread_attr_getaffinity_old): Likewise.
5475 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5476 (__pthread_getaffinity_old): Likewise.
5477 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5478 (__pthread_setaffinity_old): Likewise.
5479
eec8b6ca
UD
54802004-03-26 Ulrich Drepper <drepper@redhat.com>
5481
5482 * allocatestack.c (_make_stacks_executable): Call
5483 _dl_make_stack_executable first.
5484
db2f05ba
RM
54852004-03-24 Roland McGrath <roland@redhat.com>
5486
5487 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5488 constraint instead of "0".
5489
6abbc501
UD
54902004-03-24 Ulrich Drepper <drepper@redhat.com>
5491
68dc4dcb
UD
5492 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5493 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5494
6abbc501
UD
5495 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5496 code to avoid warning.
5497
865e14d9
AJ
54982004-03-24 Andreas Jaeger <aj@suse.de>
5499
5500 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5501 (__pthread_attr_setaffinity_old): Remove const.
5502
16b06b70
UD
55032004-03-23 Ulrich Drepper <drepper@redhat.com>
5504
2c0b891a
UD
5505 * sysdeps/unix/sysv/linux/smp.h: New file.
5506 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5507 * init.c: Define __is_smp.
5508 (__pthread_initialize_minimal_internal): Call is_smp_system to
5509 initialize __is_smp.
5510 * pthreadP.h: Declare __is_smp.
5511 Define MAX_ADAPTIVE_COUNT is necessary.
5512 * pthread_mutex_init.c: Add comment regarding __spins field.
5513 * pthread_mutex_lock.c: Implement adaptive mutex type.
5514 * pthread_mutex_timedlock.c: Likewise.
5515 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5516 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5517 Add __spins field.
5518 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5519 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5520 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5521 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5522 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5523 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5524 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5525 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5526 lll_mutex_cond_trylock.
5527 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5528 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5529 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5530 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5531 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5532 Define BUSY_WAIT_NOP.
5533 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5534 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5535
5536 * tst-mutex5.c: Add support for testing adaptive mutexes.
5537 * tst-mutex7.c: Likewise.
5538 * tst-mutex5a.c: New file.
5539 * tst-mutex7a.c: New file.
5540 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5541
565699e4
UD
5542 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5543 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 5544 vgettimeofday call might destroy the content.
565699e4 5545
7fe1586f
UD
5546 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5547 @pause in the loop.
5548
e408880b
UD
5549 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5550 No need to restrict type of ret. Make it int. Add comment.
5551
16b06b70
UD
5552 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5553 Remove unnecessary setne instruction.
5554
61645263
UD
55552004-03-22 Jakub Jelinek <jakub@redhat.com>
5556
5557 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5558 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5559 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5560 If realloc fails, break out of the loop.
5561
e3d4c585
AJ
55622004-03-20 Andreas Jaeger <aj@suse.de>
5563
5564 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5565 (__pthread_setaffinity_old): Fix interface.
5566 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5567 (__pthread_getaffinity_old): Likewise.
5568
5569 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5570 (__pthread_setaffinity_new): Remove duplicate declaration.
5571
3abb1ff7
UD
55722004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5573
5574 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5575 the return value to a safe register.
5576 (CDISABLE): Set the function argument correctly.
5577
07bd2a3f
UD
55782004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5579
5580 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5581 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5582 Rewrite so that only one locked memory operation per round is needed.
5583 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5584 (pthread_barrier_wait): After wakeup, release lock only when the
5585 last thread stopped using the barrier object.
5586 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5587 (__pthread_cond_wait): Don't store mutex address if the current
5588 value is ~0l. Add correct cleanup support and unwind info.
5589 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5590 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5591 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5592 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5593 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5594 Add correct cleanup support and unwind info.
5595 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5596 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5597 information for syscall wrappers.
5598
14c35863
UD
55992004-03-18 Ulrich Drepper <drepper@redhat.com>
5600
5601 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5602 cpusetsize field, remove next.
5603 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5604 parameter for size of the CPU set.
5605 (pthread_setaffinity_np): Likewise.
5606 (pthread_attr_getaffinity_np): Likewise.
5607 (pthread_attr_setaffinity_np): Likewise.
5608 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5609 interface change, keep compatibility code.
5610 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5611 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5612 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5613 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5614 __pthread_getaffinity_np.
5615 * Versions: Add version for changed interfaces.
5616 * tst-attr3.c: Adjust test for interface change.
5617 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5618 increasing buffer sizes.
5619 * pthread_attr_destroy.c: Remove unused list handling.
5620 * pthread_attr_init.c: Likewise.
5621
8e115d80
RM
56222004-03-17 Roland McGrath <roland@redhat.com>
5623
5624 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5625 first argument to clock_getres so we ever enable kernel timers.
5626
e3b22ad3
UD
56272004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5628
5629 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5630
841153fa
RH
56312004-03-12 Richard Henderson <rth@redhat.com>
5632
e3b22ad3
UD
5633 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5634 oldvalue from CENABLE to CDISABLE.
841153fa 5635
932dfea7
UD
56362004-03-12 Ulrich Drepper <drepper@redhat.com>
5637
5638 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5639 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5640 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5641 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5642
9852f6dc
RH
56432004-03-11 Richard Henderson <rth@redhat.com>
5644
5645 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5646 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5647 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5648
43513fb7
UD
56492004-03-11 Jakub Jelinek <jakub@redhat.com>
5650
5651 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5652 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5653 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5654
56552004-03-11 Jakub Jelinek <jakub@redhat.com>
5656
5657 * forward.c (__pthread_cond_broadcast_2_0,
5658 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5659 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5660 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5661
8a3e10e0
UD
56622004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5663
5664 * sysdeps/sh/tcb-offsets.sym: Add PID.
5665 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5666 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5667
6d3a2bec
UD
56682004-03-10 Ulrich Drepper <drepper@redhat.com>
5669
5670 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5671 include <sysdep-cancel.h>, vfork is no cancellation point.
5672 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5673 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5674 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5675
d3a4a571
UD
56762004-03-10 Jakub Jelinek <jakub@redhat.com>
5677
73b4ce64
UD
5678 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5679 libc_hidden_def.
5680 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5681 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5682 Likewise.
5683 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5684 Likewise.
5685 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5686 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5687 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5688 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5689 of DO_CALL_VIA_BREAK. Work around a gas problem.
5690
d682a515
UD
5691 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5692 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5693 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5694 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5695 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5696 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5697
5698 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5699 a local register for saving old PID. Negate PID in parent upon exit.
5700
d3a4a571
UD
5701 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5702 tcb-offsets.h.
5703 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5704 before syscall, set to the old value in the parent afterwards.
5705 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5706 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5707 tcb-offsets.h.
5708 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5709 before syscall, set to the old value in the parent afterwards.
5710 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5711 * sysdeps/s390/tcb-offsets.sym: Add PID.
5712
5713 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5714 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5715 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5716 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5717 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5718 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5719
57202004-03-10 Andreas Schwab <schwab@suse.de>
5721
5722 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5723 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5724 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5725
3f2fb223 57262004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 5727
3f2fb223
UD
5728 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5729 * tst-cancel21.c (do_one_test): Likewise.
5730 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 5731
8b9d6054
UD
57322004-02-09 Jakub Jelinek <jakub@redhat.com>
5733
5734 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5735 if non-zero and set to INT_MIN if zero.
5736 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5737 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5738 (SAVE_PID, RESTORE_PID): Define.
5739 (__vfork): Use it.
5740 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5741 Use relative path to avoid including NPTL i386/vfork.S.
5742 (SAVE_PID, RESTORE_PID): Define.
5743 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5744 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5745 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5746 tst-vfork2x.
5747 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5748 * tst-vfork1.c: New test.
5749 * tst-vfork2.c: New test.
5750 * tst-vfork1x.c: New test.
5751 * tst-vfork2x.c: New test.
5752
02287d05
UD
57532004-03-08 Ulrich Drepper <drepper@redhat.com>
5754
c072ef6d 5755 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 5756 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 5757 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 5758 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 5759
d4acd24b
UD
57602004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5761
5762 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5763
8acb4b81
UD
57642004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5765
5766 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5767 _rtld_global_ro.
5768
4d1a02ef
UD
57692004-03-07 Ulrich Drepper <drepper@redhat.com>
5770
001836c8 5771 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 5772 _rtld_global_ro.
001836c8 5773
4d1a02ef
UD
5774 * tst-once4.c: Remove unnecessary macro definition.
5775
5776 * tst-mutex7.c (do_test): Limit thread stack size.
5777 * tst-once2.c (do_test): Likewise.
5778 * tst-tls3.c (do_test): Likewise.
5779 * tst-tls1.c (do_test): Likewise.
5780 * tst-signal3.c (do_test): Likewise.
5781 * tst-kill6.c (do_test): Likewise.
5782 * tst-key4.c (do_test): Likewise.
5783 * tst-join4.c (do_test): Likewise.
5784 * tst-fork1.c (do_test): Likewise.
5785 * tst-context1.c (do_test): Likewise.
5786 * tst-cond2.c (do_test): Likewise.
5787 * tst-cond10.c (do_test): Likewise.
5788 * tst-clock2.c (do_test): Likewise.
5789 * tst-cancel10.c (do_test): Likewise.
5790 * tst-basic2.c (do_test): Likewise.
5791 * tst-barrier4.c (do_test): Likewise.
5792
aa420660
UD
57932004-03-05 Ulrich Drepper <drepper@redhat.com>
5794
5795 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5796
cff08c81
UD
57972004-03-01 Ulrich Drepper <drepper@redhat.com>
5798
5799 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5800 (__pthread_cond_timedwait): Optimize wakeup test.
5801 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5802 (__pthread_cond_wait): Likewise.
5803 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5804 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5805 Likewise.
5806
b7fe377c
UD
58072004-02-29 Ulrich Drepper <drepper@redhat.com>
5808
5809 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5810 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5811 the atomic instruction needed.
5812 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5813 (__lll_mutex_lock_wait): Likewise.
5814
4c771a3b
UD
58152004-02-28 Ulrich Drepper <drepper@redhat.com>
5816
5817 * Makefile (tests): Add tst-cond14 and tst-cond15.
5818 * tst-cond14.c: New file.
5819 * tst-cond15.c: New file.
5820
a2c33d5a
UD
58212004-02-27 Ulrich Drepper <drepper@redhat.com>
5822
5823 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5824 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5825 needs to be implemented differently to be useful.
5826
261eada2
UD
58272004-02-26 Ulrich Drepper <drepper@redhat.com>
5828
14ffbc83
UD
5829 * pthread_attr_setschedparam.c: Don't test priority against limits
5830 here. Set ATTR_FLAG_SCHED_SET flag.
5831 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5832 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5833 from parent thread to child. If attribute is used and scheduling
5834 parameters are not inherited, copy parameters from attribute or
5835 compute them. Check priority value.
5836 * pthread_getschedparam.c: If the parameters aren't known yet get
5837 them from the kernel.
5838 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5839 ATTR_FLAG_POLICY_SET flag for thread.
5840 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5841 and ATTR_FLAG_POLICY_SET.
5842
5843 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5844
261eada2
UD
5845 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5846 fail if stack address hasn't been set. Just return 0.
5847
701d185c
UD
58482004-02-25 Ulrich Drepper <drepper@redhat.com>
5849
25b8e63c
UD
5850 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5851 libpthread for the files in this list.
5852 (CFLAGS-tst-unload): Removed.
5853 * tst-unload.c (do_test): Don't use complete path for
5854 LIBPHREAD_SO.
5855
701d185c
UD
5856 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5857 tst-_res1mod2.
5858
a8fd5a02
UD
58592004-02-22 Ulrich Drepper <drepper@redhat.com>
5860
5861 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5862 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5863 operation per round is needed.
5864 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5865 (__lll_mutex_lock_wait): Likewise.
5866
dd0b7b19
UD
58672004-02-20 Ulrich Drepper <drepper@redhat.com>
5868
5869 * tst-cancel9.c (cleanup): Don't print to stderr.
5870
5990e1fe
UD
58712004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5872
5873 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5874
33ab3b66
UD
58752004-02-20 Jakub Jelinek <jakub@redhat.com>
5876
1be3130e
UD
5877 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5878 (__syscall_error_handler2): Call CDISABLE.
5879 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5880 (__syscall_error_handler2): Call CDISABLE.
5881
8ba5025a
UD
5882 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5883 Release lock before the loop, don't reacquire it.
8ba5025a 5884
33ab3b66
UD
5885 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5886
11986c68
UD
58872004-02-19 Andreas Schwab <schwab@suse.de>
5888
5889 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5890 Fix last change.
5891
dc391246
UD
58922004-02-18 Ulrich Drepper <drepper@redhat.com>
5893
37c054c7
UD
5894 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5895 (pthread_barrier_wait): After wakeup, release lock only when the
5896 last thread stopped using the barrier object.
5897 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5898 (pthread_barrier_wait): Likewise.
5899 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5900 Likewise.
5901 * Makefile (tests): Add tst-barrier4.
5902 * tst-barrier4.c: New file.
dc391246
UD
5903
5904 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5905 (__pthread_cond_timedwait): Perform timeout test while holding
5906 internal lock to prevent wakeup race.
5907 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5908 * sysdeps/pthread/pthread_cond_timedwait.c
5909 (__pthread_cond_timedwait): Likewise.
5910 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5911 (__pthread_cond_timedwait): Likewise.
5912
4a08113c
UD
59132004-02-18 Jakub Jelinek <jakub@redhat.com>
5914
5915 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5916 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5917 * Makefile (tests): Add tst-rwlock13.
5918 * tst-rwlock13.c: New test.
5919
71b1675e
UD
59202004-02-16 Ulrich Drepper <drepper@redhat.com>
5921
5922 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5923 (__condvar_tw_cleanup): Little optimization.
5924 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5925
cd9fdc72
UD
59262004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5927
5928 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5929 libpthread as "lib" parameter to SHLIB_COMPAT.
5930 (__novmx_siglongjmp): Fix typo in function name.
5931 (__novmx_longjmp): Fix typo in function name.
5932
82038750
UD
59332004-02-13 Ulrich Drepper <drepper@redhat.com>
5934
b078c591
UD
5935 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5936 __builtin_expect.
5937
82038750
UD
5938 * sysdeps/generic/pt-longjmp.c: Moved to...
5939 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5940
e2982bf0
UD
59412004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5942
5943 * Makefile (libpthread-routines): Add pt-cleanup.
5944 * pt-longjmp.c: Removed.
5945 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5946 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5947 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5948 Version longjmp, siglongjmp for GLIBC_2.3.4.
5949 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5950
3730d95c
UD
59512004-02-13 Ulrich Drepper <drepper@redhat.com>
5952
219304ec
UD
5953 * sysdeps/pthread/pthread_cond_timedwait.c
5954 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5955 Reuse code. Add __builtin_expects.
5956
3730d95c
UD
5957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5958 (__pthread_cond_timedwait): Get internal lock in case timeout has
5959 passed before the futex syscall.
5960 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5961
5673ccc1
UD
59622004-01-20 Ulrich Drepper <drepper@redhat.com>
5963
debddf64
UD
5964 * allocatestack.c: Pretty printing.
5965
5673ccc1
UD
5966 * sysdeps/pthread/createthread.c (create_thread): Don't add
5967 CLONE_DETACHED bit if it is not necessary.
5968
6bae8725
UD
59692004-01-16 Ulrich Drepper <drepper@redhat.com>
5970
5971 * pthread_getattr_np.c: Include ldsodefs.h.
5972
ff151400
RH
59732004-01-16 Richard Henderson <rth@redhat.com>
5974
6bae8725
UD
5975 * allocatestack.c: Don't declare __libc_stack_end.
5976 * init.c (__pthread_initialize_minimal_internal): Likewise.
5977 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 5978
ba683832
RH
59792004-01-15 Richard Henderson <rth@redhat.com>
5980
5981 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5982 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5983 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5984 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5985 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5986 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5987 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5988 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5989
630d93a7
UD
59902004-01-14 Ulrich Drepper <drepper@redhat.com>
5991
219304ec 5992 * init.c (pthread_functions): Make array const.
630d93a7 5993
d1fc817e
UD
59942004-01-13 Ulrich Drepper <drepper@redhat.com>
5995
5996 * allocatestack.c (__make_stacks_executable): Change interface.
5997 Check parameters. Pass parameter on to libc counterpart.
5998 * pthreadP.h: Change declaration.
5999
dc927809
RH
60002004-01-13 Richard Henderson <rth@redhat.com>
6001
10677727
UD
6002 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6003 prototype form.
6004 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6005 Likewise.
6006
d1fc817e
UD
6007 * sysdeps/alpha/Makefile: New file.
6008 * sysdeps/alpha/tcb-offsets.sym: New file.
6009 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6010 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 6011
d1fc817e
UD
6012 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6013 on powerpc version.
dc927809 6014
249a3d0c
UD
60152004-01-08 Jakub Jelinek <jakub@redhat.com>
6016
6017 * Makefile (tests): Add tst-backtrace1.
6018 * tst-backtrace1.c: New test.
6019
763c0490
RM
60202003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6021
6022 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6023 register as second parameter to the REGISTER macro.
6024 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6025 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6026 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6027 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6028 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6029 of thread register as second parameter to REGISTER macro in 64 case.
6030
c7baafd5
UD
60312004-01-03 Ulrich Drepper <drepper@redhat.com>
6032
6033 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6034 (CFLAGS-getpid.o): Defined.
6035 (CFLAGS-getpid.os): Defined.
6036
25ac0258
UD
60372003-12-31 Ulrich Drepper <drepper@redhat.com>
6038
6039 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6040 returned for main thread does not overlap with any other VMA.
6041 Patch by Jakub Jelinek.
6042
795985e4
UD
60432003-12-29 Jakub Jelinek <jakub@redhat.com>
6044
6045 * tst-raise1.c: Include stdio.h.
6046
cb5b9388
UD
60472003-12-23 Jakub Jelinek <jakub@redhat.com>
6048
6049 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6050 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6051 If pid is 0, set it to selftid.
6052 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6053 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6054 != 0, return self->tid without doing a syscall.
6055 * descr.h (struct pthread): Move pid field after tid.
6056
6057 * Makefile (tests): Add tst-raise1.
6058 * tst-raise1.c: New file.
6059
432aaf5b
RM
60602003-12-23 Roland McGrath <roland@redhat.com>
6061
6062 * tst-oddstacklimit.c: New file.
6063 * Makefile (tests): Add it.
6064 (tst-oddstacklimit-ENV): New variable.
6065
6066 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6067 value up to page size for __default_stacksize.
6068
33ebea17
UD
60692003-12-21 Ulrich Drepper <drepper@redhat.com>
6070
6071 * Makefile (tests): Add tst-eintr5.
6072 * tst-eintr5.c: New file.
6073
6074 * eintr.c (eintr_source): Prevent sending signal to self.
6075
6076 * tst-eintr2.c (tf1): Improve error message.
6077
bbe35eb5
UD
60782003-12-20 Ulrich Drepper <drepper@redhat.com>
6079
6080 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6081 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
6082 * pthread_cancel.c: Add comment explaining use of PID field.
6083 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6084 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6085 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6086 temporarily to signal the field must not be relied on and updated
6087 by getpid().
6088 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6089 temporarily negative.
6090 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 6091
4efdd8d3
UD
60922003-12-19 Ulrich Drepper <drepper@redhat.com>
6093
6094 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6095 (eintr_source): If ARG != NULL, use pthread_kill.
6096 * tst-eintr1.c: Adjust for this change.
6097 * tst-eintr2.c: Likewise.
6098 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6099 * tst-eintr3.c: New file.
6100 * tst-eintr4.c: New file.
6101
61022003-12-19 Jakub Jelinek <jakub@redhat.com>
6103
6104 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6105 if CANCELSTATE_BITMASK is set.
6106 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6107 Likewise.
6108
6109 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6110 (tests-reverse): Add tst-cancel23.
6111 * tst-cancel22.c: New test.
6112 * tst-cancel23.c: New test.
6113
675620f7
UD
61142003-12-18 Ulrich Drepper <drepper@redhat.com>
6115
6116 * tst-eintr1.c: Better error messages.
6117
6118 * Makefile (tests): Add tst-eintr2.
6119 * tst-eintr2.c: New file.
6120
61212003-12-18 Jakub Jelinek <jakub@redhat.com>
6122
6123 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6124 (CFLAGS-tst-cancelx21.c): Set.
6125 * tst-cancel21.c: New test.
6126 * tst-cancelx21.c: New test.
6127
6128 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6129 comparison operand.
6130 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6131 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6132 * pt-longjmp.c: Include jmpbuf-unwind.h.
6133 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6134 _JMPBUF_UNWINDS. Adjust compared pointers.
6135 * init.c (__pthread_initialize_minimal_internal): Initialize
6136 pd->stackblock_size.
6137 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6138 * sysdeps/alpha/jmpbuf-unwind.h: New file.
6139 * sysdeps/i386/jmpbuf-unwind.h: New file.
6140 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6141 * sysdeps/s390/jmpbuf-unwind.h: New file.
6142 * sysdeps/sh/jmpbuf-unwind.h: New file.
6143 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6144 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 6145 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
6146 (_JMPBUF_CFA_UNWINDS): Remove.
6147 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6148
61492003-12-12 Jakub Jelinek <jakub@redhat.com>
6150
6151 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6152 (CFLAGS-tst-cancelx20.c): Set.
6153 * tst-cancel20.c: New test.
6154 * tst-cancelx20.c: New test.
6155
2d951ab6
UD
61562003-12-17 Ulrich Drepper <drepper@redhat.com>
6157
6158 * init.c (__pthread_initialize_minimal_internal): Don't treat
6159 architectures with separate register stack special here when
6160 computing default stack size.
6161
f8a3a2e7
RM
61622003-12-17 Roland McGrath <roland@redhat.com>
6163
6164 * Makefile (tst-cancelx7-ARGS): New variable.
6165 Reportd by Greg Schafer <gschafer@zip.com.au>.
6166
e796f92f
UD
61672003-12-17 Jakub Jelinek <jakub@redhat.com>
6168
6169 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
6170 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6171 (tst-stack3-ENV): Set.
6172 ($(objpfx)tst-stack3-mem): New.
6173 * tst-stack3.c: New test.
6174
092eb73c
UD
61752003-12-10 David Mosberger <davidm@hpl.hp.com>
6176
6177 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6178 Add unwind directives. Drop unused .regstk directive.
6179 (_fini_EPILOG_BEGINS): Add unwind directives.
6180
ff48874d
UD
61812003-12-11 Ulrich Drepper <drepper@redhat.com>
6182
6183 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6184 Assume parameter is a pointer.
6185 (lll_futex_wake): Likewise.
20945457
UD
6186 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6187 Likewise.
6188 (lll_futex_wake): Likewise.
ff48874d
UD
6189 Reported by Boris Hu.
6190 * sysdeps/unix/sysv/linux/unregister-atfork.c
6191 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6192
6193 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6194
1d9d0b80
UD
61952003-12-10 Ulrich Drepper <drepper@redhat.com>
6196
6197 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6198 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6199 __rtld_lock_initialize for ld.so lock.
6200 Patch in part by Adam Li <adam.li@intel.com>.
6201
c776b3d7
UD
62022003-12-02 David Mosberger <davidm@hpl.hp.com>
6203
6204 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6205 in $(gnulib). Also, remove stale comment.
6206
62072003-11-12 David Mosberger <davidm@hpl.hp.com>
6208
6209 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6210 advantage of new syscall stub and optimize accordingly.
6211
6212 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6213 from SYS_futex, to match expectations of
6214 sysdep.h:DO_INLINE_SYSCALL.
6215 (lll_futex_clobbers): Remove.
6216 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6217 (lll_futex_wake): Likewise.
6218 (lll_futex_requeue): Likewise.
6219 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6220 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6221 Jelinek).
6222 (__lll_mutex_lock): Likewise.
6223 (__lll_mutex_cond_lock): Likewise.
6224 (__lll_mutex_timed_lock): Likewise.
6225 (__lll_mutex_unlock): Likewise.
6226 (__lll_mutex_unlock_force): Likewise.
6227
6228 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6229 comes before the include of <sysdep.h>.
6230 (THREAD_SELF_SYSINFO): New macro.
6231 (THREAD_SYSINFO): Likewise.
6232 (INIT_SYSINFO): New macro.
6233 (TLS_INIT_TP): Call INIT_SYSINFO.
6234
6235 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6236
6237 * sysdeps/pthread/createthread.c (create_thread): Use
6238 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6239 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6240 THREAD_SELF_SYSINFO instead of open code.
6241 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6242 (THREAD_SYSINFO): Likewise.
6243
6244 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6245
6246 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6247
57d20ee7
UD
62482003-12-06 Ulrich Drepper <drepper@redhat.com>
6249
6250 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6251 instead of .init. Patch by David Mosberger.
6252
67aeab2a
AJ
62532003-11-30 Thorsten Kukuk <kukuk@suse.de>
6254
6255 * sysdeps/pthread/configure.in: Remove broken declaration in C
6256 cleanup handling check.
6257
8ca203e6
AJ
62582003-11-30 Andreas Jaeger <aj@suse.de>
6259
6260 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6261 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6262 Likewise.
6263
46bf9de7
UD
62642003-11-27 Jakub Jelinek <jakub@redhat.com>
6265
6266 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6267 * pthread_attr_destroy.c: Include shlib-compat.h.
6268 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6269 is set in iattr->flags.
6270 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6271
1d9b73ab
UD
62722003-11-21 Jakub Jelinek <jakub@redhat.com>
6273
6274 * Makefile (distribute): Add tst-cleanup4aux.c.
6275
6276 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
6277 include.
6278
53f9084e
UD
62792003-11-21 Ulrich Drepper <drepper@redhat.com>
6280
1d9b73ab
UD
6281 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6282 pthread_cond_signal.
6283
e42a990e
UD
6284 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6285 store mutex address if the current value is ~0l.
6286 * sysdeps/pthread/pthread_cond_timedwait.c
6287 (__pthread_cond_timedwait): Likewise.
6288 * sysdeps/pthread/pthread_cond_broadcast.c
6289 (__pthread_cond_broadcast): Don't use requeue for pshared
6290 condvars.
6291
6292 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6293 (__pthread_cond_wait): Don't store mutex address if the current
6294 value is ~0l.
6295 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6296 (__pthread_cond_timedwait): Likewise.
6297 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6298 (__pthread_cond_broadcast): Don't use requeue for pshared
6299 condvars.
6300
6301 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6302 element with ~0l for pshared condvars, with NULL otherwise.
6303
6304 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6305 (__pthread_cond_wait): Don't store mutex address if the current
6306 value is ~0l.
6307 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6308 (__pthread_cond_timedwait): Likewise.
6309 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6310 (__pthread_cond_broadcast): Don't use requeue for pshared
6311 condvars.
6312
bf68b236 6313 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 6314 * tst-cond12.c: New file.
bf68b236 6315 * tst-cond13.c: New file.
53f9084e 6316
9780c971
UD
63172003-11-17 Ulrich Drepper <drepper@redhat.com>
6318
6319 * sysdeps/pthread/configure.in: Make missing forced unwind support
6320 fatal.
6321
74e12fbc
UD
63222003-11-11 Ulrich Drepper <drepper@redhat.com>
6323
6324 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6325
c685b2b0
UD
63262003-11-06 Ulrich Drepper <drepper@redhat.com>
6327
6328 * Makefile: Add magic to clean up correctly.
6329
44e94149
UD
63302003-11-05 Jakub Jelinek <jakub@redhat.com>
6331
6332 * unwind.c (FRAME_LEFT): Define.
6333 (unwind_stop): Handle old style cleanups here.
6334 (__pthread_unwind): Handle old style cleanups only if
6335 !HAVE_FORCED_UNWIND.
6336 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6337 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6338 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6339 ($(objpfx)tst-cleanupx4): Likewise.
6340 * tst-cleanup4.c: New test.
6341 * tst-cleanup4aux.c: New.
6342 * tst-cleanupx4.c: New test.
6343
c28422b5
UD
63442003-11-04 Ulrich Drepper <drepper@redhat.com>
6345
6346 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6347 lll_mutex_*lock macros to skip atomic operations on some archs.
6348
27176677
UD
63492003-11-03 Ulrich Drepper <drepper@redhat.com>
6350
6351 * sysdeps/pthread/tst-timer.c (main): Initialize
6352 sigev2.sigev_value as well.
6353
026395a2
RM
63542003-10-15 Roland McGrath <roland@redhat.com>
6355
6356 * sysdeps/pthread/configure.in: Barf if visibility attribute support
6357 is missing.
6358 * sysdeps/pthread/configure: Regenerated.
6359
fa3cbe3d
UD
63602003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6361
6362 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6363 locking macros. No distinction between normal and mutex locking
6364 anymore.
6365 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6366 Merge bits from lowlevelmutex.S we still need.
6367 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6368 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6369 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6370 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6371 new mutex implementation.
6372 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6373 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6374 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6375 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6376 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6377 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6378 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6379 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6380 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6381 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6382 symbol for entry point to avoid cancellation.
6383
e700a908
UD
63842003-10-07 Jakub Jelinek <jakub@redhat.com>
6385
6386 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6387 changes.
6388 (SAVE_OLDTYPE_0): Fix a typo.
6389
c70a86b6
UD
63902003-10-03 Ulrich Drepper <drepper@redhat.com>
6391
6392 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6393 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
6394
134abcb5
UD
63952003-10-02 Ulrich Drepper <drepper@redhat.com>
6396
6397 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6398 correct offset.
6399
b77ca0e8
UD
64002003-10-02 Jakub Jelinek <jakub@redhat.com>
6401
6402 * Makefile (tests): Add tst-cancel19.
6403 * tst-cancel19.c: New test.
6404
4d961dc7
UD
64052003-10-02 Ulrich Drepper <drepper@redhat.com>
6406
6407 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6408 restoring of the old cancellation type.
6409
1d5b20ad 64102003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 6411
1d5b20ad
UD
6412 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6413
4106a403
RM
64142003-09-27 Wolfram Gloger <wg@malloc.de>
6415
4d961dc7 6416 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 6417
fca9d8e4
RM
64182003-09-24 Roland McGrath <roland@redhat.com>
6419
6420 * allocatestack.c (__make_stacks_executable): Don't ignore return
6421 value from _dl_make_stack_executable.
6422
c9c60884
UD
64232003-09-24 Ulrich Drepper <drepper@redhat.com>
6424
69c9fa04
UD
6425 * allocatestack.c (__make_stacks_executable): Also change
6426 permission of the currently unused stacks.
6427
279f1143
UD
6428 * allocatestack.c (change_stack_perm): Split out from
6429 __make_stacks_executable.
6430 (allocate_stack): If the required permission changed between the time
6431 we started preparing the stack and queueing it, change the permission.
6432 (__make_stacks_executable): Call change_stack_perm.
6433
c9c60884
UD
6434 * Makefile: Build tst-execstack-mod locally.
6435 * tst-execstack-mod.c: New file.
6436
54ee14b3
UD
64372003-09-23 Jakub Jelinek <jakub@redhat.com>
6438
6439 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6440
64412003-09-23 Roland McGrath <roland@redhat.com>
6442
6443 * tst-execstack.c: New file.
6444 * Makefile (tests): Add it.
6445 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6446 (LDFLAGS-tst-execstack): New variable.
6447
6448 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6449 whether to use PROT_EXEC for stack mmap.
6450 (__make_stacks_executable): New function.
6451 * pthreadP.h: Declare it.
6452 * init.c (__pthread_initialize_minimal_internal): Set
6453 GL(dl_make_stack_executable_hook) to that.
6454
365b1602
UD
64552003-09-22 Ulrich Drepper <drepper@redhat.com>
6456
6457 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6458 recommendation from AMD re avoidance of lock prefix.
6459
39358e8b
UD
64602003-09-22 Jakub Jelinek <jakub@redhat.com>
6461
6462 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6463 lll_futex_timed_wait instead of lll_futex_wait.
6464 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6465 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6466 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6467 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6468 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6469 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6470 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6471 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6472 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6473 Completely revamp the locking macros. No distinction between
6474 normal and mutex locking anymore.
6475 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6476 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6477 __lll_lock_timedwait): Fix prototypes.
6478 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6479 __lll_lock_timedwait): Likewise.
6480 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6481 macros, add __builtin_expect.
6482 (lll_mutex_timedlock): Likewise. Fix return value.
6483 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6484 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6485 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6486 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6487 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6488 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6489 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6490 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6491
9d08fbbb
UD
64922003-09-22 Ulrich Drepper <drepper@redhat.com>
6493
c0df57e1
UD
6494 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6495 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6496 operation if possible.
6497
9d08fbbb
UD
6498 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6499 like jumping over the lock prefix.
6500
71451de2
UD
65012003-09-21 Ulrich Drepper <drepper@redhat.com>
6502
6503 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6504 locking macros. No distinction between normal and mutex locking
6505 anymore.
3a226d33 6506 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
6507 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6508 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
6509 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6510 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 6511 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 6512 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 6513 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 6514 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
6515 * Makefile (routines): Remove libc-lowlevelmutex.
6516 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
6517 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6518 for new mutex implementation.
6519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6520 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6521 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6522 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6523 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6524 Likewise.
6525 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6526 Likewise.
6527 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6528 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6529 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6530 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6531 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6532 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6533 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6534 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6535 Likewise.
6536 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6537 Likewise.
6538 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6539 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6540 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6541 Don't use requeue.
6542 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 6543 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 6544
8f31c0ef
UD
65452003-09-20 Ulrich Drepper <drepper@redhat.com>
6546
56a4aa98
UD
6547 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6548 in parameters of asm with output parameters.
6549
8f31c0ef
UD
6550 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6551 type of DECR parameter to int.
6552 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6553
8b8074da
UD
65542003-09-18 Jakub Jelinek <jakub@redhat.com>
6555
6556 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6557 guardsize for each thread.
6558
65af7e61
UD
65592003-09-17 Jakub Jelinek <jakub@redhat.com>
6560
9ba96eda
UD
6561 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6562 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6563 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6564
06f6ca90
UD
6565 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6566 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6567 NULL.
6568 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6569 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6570 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6571 (pthread_getaffinity_np): Add hidden_def.
6572
6573 * Makefile (tests): Add tst-attr3.
6574 * tst-attr3.c: New test.
6575
65af7e61
UD
6576 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6577
3402852c
UD
65782003-09-15 Jakub Jelinek <jakub@redhat.com>
6579
6580 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6581 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6582
a4db3439
UD
65832003-09-17 Jakub Jelinek <jakub@redhat.com>
6584
6585 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6586 * tst-align.c: Include tst-stack-align.h.
6587 (tf, do_test): Use TEST_STACK_ALIGN macro.
6588
65892003-09-17 Ulrich Drepper <drepper@redhat.com>
6590
6591 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6592 variable.
6593
92ce4676
UD
65942003-09-16 Ulrich Drepper <drepper@redhat.com>
6595
6596 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6597 stack-related values for the initial thread.
6598
e07bb02a
UD
65992003-09-15 Jakub Jelinek <jakub@redhat.com>
6600
6601 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6602
d087b5dc
UD
66032003-09-11 Ulrich Drepper <drepper@redhat.com>
6604
6605 * pthread_mutex_lock.c: Minor code rearrangements.
6606
7f08f55a
RM
66072003-09-05 Roland McGrath <roland@redhat.com>
6608
6609 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6610 Instead, include ../nptl_db/db_info.c to do its magic.
6611 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6612 (__pthread_pthread_key_2ndlevel_size): Likewise.
6613 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6614 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6615 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6616 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6617 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6618 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6619 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6620 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6621 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6622 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6623 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6624 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6625 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6626 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6627 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6628 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6629 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6630
806e4a4a
UD
66312003-09-08 Ulrich Drepper <drepper@redhat.com>
6632
6633 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6634 of pthread_t to be compatible with LT.
6635 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6636 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6637 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6638 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6639 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6640 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6641 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6642
17f83e56
UD
66432003-09-04 Ulrich Drepper <drepper@redhat.com>
6644
6645 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6646
58e8ec84
UD
66472003-09-04 Jakub Jelinek <jakub@redhat.com>
6648
6649 * unwind-forcedunwind.c: Move to...
6650 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6651 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6652 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6653 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6654 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6655 * unwind.c: Include jmpbuf-unwind.h.
6656 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6657
abf1cf21
JJ
66582003-09-02 Jakub Jelinek <jakub@redhat.com>
6659
4a244f0d
UD
6660 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6661 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6662 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6663 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6664 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6665 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6666 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6667 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6668 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6669 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6670 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6671 function.
6672 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6673 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6674 * Makefile (tests): Add tst-stack2.
6675 * tst-stack2.c: New test.
6676 * tst-stack1.c: Include limits.h and sys/param.h.
6677 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6678
e29ef647
UD
6679 * pthread_condattr_setpshared.c: Include errno.h.
6680 (pthread_condattr_setpshared): Return EINVAL if pshared
6681 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6682
5777d565
UD
6683 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6684 defined symbol for entry point to avoid cancellation.
6685 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6686 Likewise.
6687 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6688 Likewise.
6689 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6690 Likewise.
6691 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6692 Likewise.
6693 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6694 Likewise.
6695 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6696 __close_nocancel, __read_nocancel, __write_nocancel,
6697 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6698 libpthread.so or librt.so, define to corresponding function
6699 without _nocancel suffix.
6700 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6701 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6702 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6703
abf1cf21
JJ
6704 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6705
8348dcc8
UD
67062003-09-02 Ulrich Drepper <drepper@redhat.com>
6707
6708 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 6709 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
6710
6711 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6712 in subsections has a symbol associated with it.
6713
6714 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6715 defined symbol for entry point to avoid cancellation.
6716 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6717
c874a32e
UD
67182003-09-01 Jakub Jelinek <jakub@redhat.com>
6719
6720 * Makefile (tests): Add tst-tls5.
6721 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6722 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6723 ($(objpfx)tst-tls5): New.
6724 ($(objpfx)tst-tls6.out): Likewise.
6725 (tests): Depend on $(objpfx)tst-tls6.out.
6726 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6727 (do_test): Check pthread_self () return value alignment.
6728 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6729 (tf): Check pthread_self () return value alignment.
6730 * tst-tls5.c: New test.
6731 * tst-tls5.h: New.
6732 * tst-tls5mod.c: New.
6733 * tst-tls5moda.c: New.
6734 * tst-tls5modb.c: New.
6735 * tst-tls5modc.c: New.
6736 * tst-tls5modd.c: New.
6737 * tst-tls5mode.c: New.
6738 * tst-tls5modf.c: New.
6739 * tst-tls6.sh: New test.
6740
c503d3dc
UD
6741 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6742 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6743 * init.c (pthread_functions): Initialize them.
6744 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6745 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6746 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6747 pthread_cond_timedwait@@GLIBC_2.3.2.
6748
48614753
JJ
67492003-09-01 Jakub Jelinek <jakub@redhat.com>
6750
56a1b877
JJ
6751 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6752 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6753 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6754 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6755 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6756 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6757
6758 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6759
48614753
JJ
6760 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6761 _POSIX_THREAD_PRIORITY_SCHEDULING.
6762 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6763
28c97261
UD
67642003-08-31 Ulrich Drepper <drepper@redhat.com>
6765
eef80cf8
UD
6766 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6767 nested function, use static inline function from libio.h.
6768 Code by Richard Henderson.
6769
28c97261
UD
6770 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6771 weak.
6772
cd2fbe58
UD
67732003-08-30 Jakub Jelinek <jakub@redhat.com>
6774
6775 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6776 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6777 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6778 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6779 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6780 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6781 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6782 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6783 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6784 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6785 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6786 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6787 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6788 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6789 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6790 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6791 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6792 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6793 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6794 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6795 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6796 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6797 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6798 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6799 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6800 * sysdeps/sparc/tls.h: New file.
6801 * sysdeps/sparc/tcb-offsets.sym: New file.
6802 * sysdeps/sparc/Makefile: New file.
6803 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6804 * init.c [__sparc__] (__NR_set_tid_address): Define.
6805
feda52c0
UD
68062003-08-29 Jakub Jelinek <jakub@redhat.com>
6807
6808 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6809 _IO_release_lock): Define.
6810
7c868816
JJ
68112003-08-29 Jakub Jelinek <jakuB@redhat.com>
6812
0261d33f 6813 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
6814 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6815
68b9e1ae
UD
68162003-08-27 Ulrich Drepper <drepper@redhat.com>
6817
6818 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6819 (__pthread_cleanup_class): Add missing return types of member
6820 functions.
6821
13b3edfc
UD
68222003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6823
6824 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6825 (lll_mutex_unlock_force): Add memory barrier between store and futex
6826 syscall.
6827
bb606fbe
UD
68282003-08-25 Ulrich Drepper <drepper@redhat.com>
6829
6830 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6831 tempmsg in first loop.
6832
ee4e5a3d
UD
68332003-08-18 Ulrich Drepper <drepper@redhat.com>
6834
6835 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6836 _POSIX_THREAD_PRIORITY_SCHEDULING.
6837 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6838
334fcf2a
UD
68392003-08-07 Jakub Jelinek <jakub@redhat.com>
6840
6841 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6842 (__rtld_lock_default_lock_recursive,
6843 __rtld_lock_default_unlock_recursive): Define.
6844 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6845 __rtld_lock_unlock_recursive): Define using
6846 GL(_dl_rtld_*lock_recursive).
6847 * init.c (__pthread_initialize_minimal_internal): Initialize
6848 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6849 Lock GL(_dl_load_lock) the same number of times as
6850 GL(_dl_load_lock) using non-mt implementation was nested.
6851
6852 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6853 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6854
a30fb2df
UD
68552003-08-06 Jakub Jelinek <jakub@redhat.com>
6856
6857 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6858 PIPE_BUF.
6859
ce0d30a0
JJ
68602003-08-07 Jakub Jelinek <jakub@redhat.com>
6861
6862 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6863
9c988b83
UD
68642003-08-03 Jakub Jelinek <jakub@redhat.com>
6865
6866 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6867 to first syscall error check. Move syscall error check for tkill
6868 into __ASSUME_CLONE_STOPPED #ifdef.
6869
5c5252bd
UD
68702003-08-02 Ulrich Drepper <drepper@redhat.com>
6871
f1205aa7
UD
6872 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6873 is not defined, do explicit synchronization.
6874 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6875 is not defined also unlock pd->lock for non-debugging case in case
6876 it is necessary.
6877 * pthread_create.c (start_thread): Always get and release pd->lock
6878 if __ASSUME_CLONE_STOPPED is not defined.
6879 (start_thread_debug): Removed. Adjust users.
6880 * allocatestack.c (allocate_stack): Always initialize lock if
6881 __ASSUME_CLONE_STOPPED is not defined.
6882 * Makefile (tests): Add tst-sched1.
6883 * tst-sched1.c: New file.
6884
5c5252bd
UD
6885 * sysdeps/pthread/createthread.c (do_clone): Only use
6886 sched_setschduler and pass correct parameters.
6887
973d66e4
UD
68882003-07-31 Jakub Jelinek <jakub@redhat.com>
6889
6890 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6891 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6892 PTHREAD_STACK_MIN in comments.
6893
d347a4ab
UD
68942003-07-31 Jakub Jelinek <jakub@redhat.com>
6895
6896 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6897 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6898 argument.
6899 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6900 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6901 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6902 (__pthread_cleanup_upto): Fix prototype.
6903 (_longjmp_unwind): Adjust caller.
6904 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6905 Change second argument to const struct pointer.
6906 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6907 * tst-sem9.c (main): Likewise.
6908 * unwind.c: Include string.h for strlen prototype.
6909
1b26e9a5
UD
69102003-07-31 Ulrich Drepper <drepper@redhat.com>
6911
6912 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6913 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6914 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6915 Define HAVE_CMOV.
6916 Patch by Nicholas Miell <nmiell@attbi.com>.
6917
adc12574
UD
69182003-07-30 Jakub Jelinek <jakub@redhat.com>
6919
6920 * init.c (__pthread_initialize_minimal_internal): Initialize
6921 GL(dl_init_static_tls).
6922 * pthreadP.h (__pthread_init_static_tls): New prototype.
6923 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6924 New functions.
6925 * Makefile (tests): Add tst-tls4.
6926 (modules-names): Add tst-tls4moda and tst-tls4modb.
6927 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6928 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6929 tst-tls4modb.so.
6930 * tst-tls4.c: New file.
6931 * tst-tls4moda.c: New file.
6932 * tst-tls4modb.c: New file.
6933
a7f6c66e
RM
69342003-06-19 Daniel Jacobowitz <drow@mvista.com>
6935
6936 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6937 before __timer_dealloc.
6938 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6939 Don't call list_unlink.
6940
172ce013
RM
69412003-07-29 Roland McGrath <roland@redhat.com>
6942
6943 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6944
7b787f85
UD
69452003-07-25 Jakub Jelinek <jakub@redhat.com>
6946
6947 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6948 Don't reuse struct aiocb A if it failed.
6949 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6950 not just one byte, as that does not block.
6951
0e9d6240
UD
69522003-07-22 Jakub Jelinek <jakub@redhat.com>
6953
9d79e037
UD
6954 * sysdeps/pthread/unwind-resume.c: New file.
6955 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6956 unwind-resume in csu subdir.
6957 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6958 exceptions.
6959 (librt-sysdep_routines, librt-shared-only-routines): Add
6960 rt-unwind-resume.
6961 * sysdeps/pthread/rt-unwind-resume.c: New file.
6962 * unwind-forcedunwind.c: New file.
6963 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6964 (libpthread-shared-only-routines): Likewise.
6965 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6966 * pthreadP.h (pthread_cancel_init): New prototype.
6967 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6968
6969 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6970 attr argument const struct pthread_attr *.
6971
0e9d6240
UD
6972 * res.c (__res_state): Return __resp.
6973 * descr.h: Include resolv.h.
6974 (struct pthread): Add res field.
6975 * pthread_create.c: Include resolv.h.
6976 (start_thread): Initialize __resp.
6977 * Makefile (tests): Add tst-_res1.
6978 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6979 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6980 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6981 libpthread.
6982 * tst-_res1.c: New file.
6983 * tst-_res1mod1.c: New file.
6984 * tst-_res1mod2.c: New file.
6985
1a379ea0
UD
69862003-07-21 Ulrich Drepper <drepper@redhat.com>
6987
7e939b21
UD
6988 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6989
1a379ea0
UD
6990 * Makefile: Define various *-no-z-defs variables for test DSOs
6991 which has undefined symbols.
6992
ca86a763
UD
69932003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6994
6995 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6996 Retry if the stwcx fails to store once_control.
6997
80f536db
UD
69982003-07-20 Ulrich Drepper <drepper@redhat.com>
6999
7000 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7001 pthread_attr_setaffinity.
7002 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7003 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7004 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7005 * pthread_attr_destroy.c: Free cpuset element if allocated.
7006 * pthread_create.c: Pass iattr as additional parameter to
7007 create_thread.
7008 * sysdeps/pthread/createthread.c: If attribute is provided and
7009 a new thread is created with affinity set or scheduling parameters,
7010 start thread with CLONE_STOPPED.
7011 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7012 pthread_attr_setaffinity.
7013 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7014 cpuset element.
7015
73299943
UD
70162003-07-15 Ulrich Drepper <drepper@redhat.com>
7017
7018 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7019
da35d15e
UD
70202003-07-14 Ulrich Drepper <drepper@redhat.com>
7021
7022 * sysdeps/pthread/configure.in: Require CFI directives also for
7023 ppc and s390.
7024
75540d8a
UD
70252003-07-15 Jakub Jelinek <jakub@redhat.com>
7026
7027 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7028 Add cfi directives.
7029
4a17085f
UD
70302003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7031
7032 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7033 CLEANUP_JMP_BUF.
7034 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7035 registers as variables. Call __pthread_mutex_unlock_usercnt.
7036 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7037 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7038 not self pointer in __writer. Compare with TID to determine
7039 deadlocks.
7040 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7041 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7042 Likewise.
7043 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7044 Likewise.
7045 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7046 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7047 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7048 macros also when compiling librt.
7049
6080ecdf
UD
70502003-07-11 Jakub Jelinek <jakub@redhat.com>
7051
7052 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7053 -fasynchronous-unwind-tables.
7054 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7055 (PSEUDO): Add cfi directives.
7056 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7057 Likewise.
7058 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7059 Likewise.
7060
da0c02ee
UD
70612003-07-08 Jakub Jelinek <jakub@redhat.com>
7062
7063 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7064 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7065 * unwind.c (__pthread_unwind_next): Add hidden_def.
7066 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7067 Likewise.
7068 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7069 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7070 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7071 Likewise.
7072 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7073 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7074 Likewise.
7075 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7076 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7077 __pthread_unregister_cancel and __pthread_unwind_next.
7078
57a5ea02
UD
70792003-07-04 Jakub Jelinek <jakub@redhat.com>
7080
7081 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7082 different symbol for the cancellation syscall wrapper and
7083 non-cancellation syscall wrapper.
7084 (PSEUDO_END): Define.
7085
d810b358
UD
70862003-07-05 Richard Henderson <rth@redhat.com>
7087
7088 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7089 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
7090 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7091 return actual return value from the syscall, not 0.
d810b358 7092
db54f488
UD
70932003-07-07 Ulrich Drepper <drepper@redhat.com>
7094
7095 * descr.h (struct pthread): Add pid field.
7096 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7097 (__reclaim_stacks): Likewise.
7098 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7099 also check for PID of the signal source.
7100 (__pthread_initialize_minimal_internal): Also initialize pid field
7101 of initial thread's descriptor.
7102 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7103 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7104 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7105 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7106 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7107
5e497a41
UD
71082003-07-05 Ulrich Drepper <drepper@redhat.com>
7109
7110 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7111 Fix use of parameter.
7112 (__libc_cleanup_pop): Likewise.
7113
86a0c4fa
UD
71142003-07-04 Ulrich Drepper <drepper@redhat.com>
7115
7116 * init.c (sigcancel_handler): Change parameters to match handler
7117 for SA_SIGACTION. Check signal number and code to recognize
7118 invalid invocations.
7119
bdbecaa3
RM
71202003-07-03 Roland McGrath <roland@redhat.com>
7121
7122 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7123 Apply sizeof (struct pthread) bias to r13 value.
7124
56421b23
UD
71252003-07-03 Ulrich Drepper <drepper@redhat.com>
7126
fbd90f6c
UD
7127 * sysdeps/pthread/configure.in: Require CFI directives.
7128
56421b23
UD
7129 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7130 definition.
7131 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7132 libpthread compilation.
7133 * unwind.c (__pthread_unwind): Add hidden_def.
7134 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7135
ca2b4cd7
UD
71362003-07-01 Ulrich Drepper <drepper@redhat.com>
7137
7138 * libc-cancellation.c (__libc_cleanup_routine): Define.
7139 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7140 (__pthread_cleanup_pop): Define.
7141
f036e569
UD
71422003-07-01 Richard Henderson <rth@redhat.com>
7143
7144 * sysdeps/alpha/elf/pt-initfini.c: New file.
7145 * sysdeps/alpha/pthread_spin_lock.S: New file.
7146 * sysdeps/alpha/pthread_spin_trylock.S: New file.
7147 * sysdeps/alpha/pthreaddef.h: New file.
7148 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7149 * sysdeps/alpha/tls.h: New file.
7150 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7151 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7152 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7153 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7154 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7155 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7156 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7157 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7158 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7159 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7160
3b985826
UD
71612003-07-01 Ulrich Drepper <drepper@redhat.com>
7162
7163 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7164 cleanup support and unwind info.
7165
3a4d1e1e
UD
71662003-06-30 Ulrich Drepper <drepper@redhat.com>
7167
7168 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7169 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
7170 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7171 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
7172 * tst-once3.c: Add cleanup handler and check it is called.
7173 * tst-once4.c: Likewise.
7174 * tst-oncex3.c: New file.
7175 * tst-oncex4.c: New file.
7176 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7177
e479cc8e
UD
71782003-06-29 Ulrich Drepper <drepper@redhat.com>
7179
7180 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7181
7d7ff54c
UD
71822003-06-27 Ulrich Drepper <drepper@redhat.com>
7183
483e95d0
UD
7184 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7185 (tf_msgsnd): Likewise.
7186
7d7ff54c
UD
7187 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7188 premature returns a bit more.
7189
7539c7ec
UD
71902003-06-26 Ulrich Drepper <drepper@redhat.com>
7191
7192 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7193 definition to the front.
7194
7195 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7196 the cleanup functions to make the names unique. Fix dwarf opcode
7197 un unwind table.
7198 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7199 functions to make the names unique. Fix CFA offset for two blocks.
7200
0af6a1d9
UD
72012003-06-25 Ulrich Drepper <drepper@redhat.com>
7202
7203 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7204 missing closing braces.
7205 Patch by Christophe Saout <christophe@saout.de>.
7206
eef4a9f3
RM
72072003-06-24 Roland McGrath <roland@redhat.com>
7208
7209 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7210
4165d44d
UD
72112003-06-24 Ulrich Drepper <drepper@redhat.com>
7212
7f8f7b9d
UD
7213 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7214 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7215
4165d44d
UD
7216 * pthreadP.h: Declare __find_thread_by_id.
7217 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7218 * pthread_clock_gettime.c: Allow using other thread's clock.
7219 * pthread_clock_settime.c: Likewise.
7220 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7221 * Makefile: Add rules to build and run tst-clock2.
7222 * tst-clock2.c: New file.
7223
67b78ef9
UD
72242003-06-23 Ulrich Drepper <drepper@redhat.com>
7225
7226 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7227 to use exception-based cleanup handler.
7228 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7229
7230 * tst-cond8.c (ch): Announce that we are done.
7231
7232 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7233
7234 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7235 Also test aio_suspend with timeout value.
7236
61623643
UD
72372003-06-22 Ulrich Drepper <drepper@redhat.com>
7238
3a4f2043
UD
7239 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7240 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7241 attribute_hidden.
7242
61623643
UD
7243 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7244 (__pthread_mutex_lock_internal): Likewise.
7245 (__pthread_mutex_unlock_internal): Likewise.
7246 (__pthread_mutex_unlock_usercnt): Declare.
7247 * pthread_mutex_destroy.c: Always fail if used in any way.
7248 * pthread_mutex_init.c: Update comment.
7249 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7250 * pthread_mutex_timedlock.c: Adjust __nusers.
7251 * pthread_mutex_trylock.c: Adjust __nusers.
7252 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7253 and public interfaces are wrapper with pass additional parameter.
7254 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7255 parameter zero.
7256 * tst-mutex8.c: New file.
7257 * Makefile (tests): Add tst-mutex8.
7258 * sysdeps/pthread/pthread_cond_timedwait.c: Call
7259 __pthread_mutex_unlock_usercnt.
7260 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7261 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7263 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7264 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7265 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7266 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7267 Add __nusers.
7268 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7269 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7270 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7271 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7272 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7273
7274 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7275 * pthread_mutex_timedlock.c: Likewise.
7276 * pthread_mutex_trylock.c: Adjust __nusers.
7277 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7278 * tst-mutex9.c: New file.
7279 * Makefile (tests): Add tst-mutex9.
7280 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7281 * sysdeps/ia64/tls.h: Likewise.
7282 * sysdeps/powerpc/tls.h: Likewise.
7283 * sysdeps/s390/tls.h: Likewise.
7284 * sysdeps/sh/tls.h: Likewise.
7285 * sysdeps/x86_64/tls.h: Likewise.
7286 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7287 Change type of __owner.
7288 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7289 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7290 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7291 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7292 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7293
9bdabb94
UD
72942003-06-19 Jakub Jelinek <jakub@redhat.com>
7295
7296 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7297 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7298
7299 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7300 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
7301 instead of nr to lll_futex_wake. Only set errno and return -1
7302 if err < 0.
7303
7304 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7305 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7306 return actual return value from the syscall, not 0.
7307
f6c93bd9
UD
73082003-06-18 Ulrich Drepper <drepper@redhat.com>
7309
ca343e73
UD
7310 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7311 find a random value.
7312 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7313 errno==EIDRM.
7314
50441a98
UD
7315 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7316 compat_timer_settime.
7317 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7318 compat_timer_gettime.
7319 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 7320 compat_timer_getoverrun.
50441a98
UD
7321 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7322 compat_timer_delete.
7323
f6c93bd9
UD
7324 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7325 error-checking mutex detect busy mutexes.
7326
047aec8f
UD
73272003-06-17 Ulrich Drepper <drepper@redhat.com>
7328
1d53508d
UD
7329 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7330 Add ax to clobber list.
7331 (lll_mutex_cond_lock): Likewise.
7332 (lll_mutex_unlock): Likewise.
7333 (lll_lock): Likewise.
7334 (lll_unlock): Likewise.
7335
f23b30e2
UD
7336 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7337 * tst-cancel18.c: New file.
7338 * tst-cancelx18.c: New file.
7339
7340 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7341 and tcdrain.
7342
7343 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7344 * tst-cancel17.c: New file.
7345 * tst-cancelx17.c: New file.
7346
7347 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7348 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7349 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7350
047aec8f
UD
7351 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7352
bbde8527
UD
73532003-06-16 Jakub Jelinek <jakub@redhat.com>
7354
7355 * sysdeps/pthread/createthread.c (create_thread): Set
7356 header.multiple_threads unconditionally.
7357 * allocatestack.c (allocate_stack): Likewise.
7358 * descr.h (struct pthread): Add header.multiple_threads
7359 unconditionally.
7360 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7361 Define for librt. #error if neither libpthread, libc nor librt.
7362 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7363 Likewise.
7364 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7365 CDISABLE): Likewise.
7366 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7367 CDISABLE): Likewise.
7368 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7369 CDISABLE): Likewise.
7370 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7371 CDISABLE): Likewise. Access header.multiple_threads outside of
7372 libc and libpthread.
7373 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7374 Likewise.
7375 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7376 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7377
26676450
UD
73782003-06-17 Ulrich Drepper <drepper@redhat.com>
7379
7380 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7381 Also test early cancellation before the thread reaches the cancellation
7382 point.
7383
7384 * Makefile: Compile forward.c with exceptions.
7385
7386 * sysdeps/unix/sysv/linux/sleep.c: New file.
7387
301a6724
UD
73882003-06-16 Ulrich Drepper <drepper@redhat.com>
7389
0e0deb03
UD
7390 * Makefile: Add CFLAGS definition to compile function wrappers
7391 duplicated from libc with exceptions.
7392 * tst-cancel4.c: Also check cancellation handlers.
7393
301a6724
UD
7394 * Makefile: Add rules to build and run tst-cancel16 and
7395 tst-cancelx16. Add missing CFLAGS definitions.
7396 * tst-cancel16.c: New file.
7397 * tst-cancelx16.c: New file.
7398
7a114794
UD
73992003-06-15 Ulrich Drepper <drepper@redhat.com>
7400
452aea84
UD
7401 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7402 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7403 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7404 (DL_SYSINFO_IMPLEMENTATION): Likewise.
7405
7a114794
UD
7406 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7407 (LIBC_CANCEL_RESET): Likewise.
7408 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7409 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7410 librt-cancellation.
7411 (CFLAGS-libcrt-cancellation.c): Define.
7412 * sysdeps/pthread/librt-cancellation.c: New file.
7413 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7414 macros also when compiling librt.
7415 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7416 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7417 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7418 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7419 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7420 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7421 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7422
7423 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7424 compat_timer_create.
7425
8ba1d429
UD
74262003-06-14 Ulrich Drepper <drepper@redhat.com>
7427
cc8fb6f3
UD
7428 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7429
8ba1d429
UD
7430 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7431 __register_atfork.
7432 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7433 Add libc_hidden_def.
7434
d4f100e2
RM
74352003-06-13 Roland McGrath <roland@redhat.com>
7436
7437 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7438 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7439
dd9423a6
UD
74402003-06-11 Ulrich Drepper <drepper@redhat.com>
7441
7442 * allocatestack.c (queue_stack): Always inline.
7443 * ptreadhP.h (__do_cancel): Likewise.
7444
ed24330d
JJ
74452003-06-10 Jakub Jelinek <jakub@redhat.com>
7446
7447 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7448 a typo.
7449
06120d79
UD
74502003-06-10 Ulrich Drepper <drepper@redhat.com>
7451
7452 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7453 (__pthread_cond_signal): Remove incorrect second addition for
7454 cond_lock!=0.
7455
b1720346
UD
74562003-06-09 Ulrich Drepper <drepper@redhat.com>
7457
5b318f85
UD
7458 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7459 (__pthread_cond_signal): Use correct futex pointer in
7460 __lll_mutex_lock_wait call.
7461
b1720346
UD
7462 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7463 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7464
3e36c37d
UD
74652003-06-08 Ulrich Drepper <drepper@redhat.com>
7466
ecf7955d
UD
7467 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7468 cancelable.
ed24330d 7469 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
7470 Likewise.
7471
3e36c37d
UD
7472 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7473 hand-written CFI generation code. Since ENTRY/END also initiated
7474 CFI frames this caused two CFI sets to be generated.
7475
7726edc2
UD
74762003-06-07 Ulrich Drepper <drepper@redhat.com>
7477
7478 * cleanup_routine.c: New file.
7479 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7480 * sysdeps/pthread/pthread.h: Add support for fully exception-based
7481 cleanup handling.
7482 * Makefile (libpthread-routines): Add cleanup_routine.
7483 Add more CFLAGS variables to compile with exceptions. Add comments
7484 why which file needs unwind tables.
7485 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7486 tests.
7487 * tst-cancelx1.c: New file.
7488 * tst-cancelx2.c: New file.
7489 * tst-cancelx3.c: New file.
7490 * tst-cancelx4.c: New file.
7491 * tst-cancelx5.c: New file.
7492 * tst-cancelx6.c: New file.
7493 * tst-cancelx7.c: New file.
7494 * tst-cancelx8.c: New file.
7495 * tst-cancelx9.c: New file.
7496 * tst-cancelx10.c: New file.
7497 * tst-cancelx11.c: New file.
7498 * tst-cancelx12.c: New file.
7499 * tst-cancelx13.c: New file.
7500 * tst-cancelx14.c: New file.
7501 * tst-cancelx15.c: New file.
7502 * tst-cleanupx0.c: New file.
7503 * tst-cleanupx0.expect: New file.
7504 * tst-cleanupx1.c: New file.
7505 * tst-cleanupx2.c: New file.
7506 * tst-cleanupx3.c: New file.
7507
7508 * tst-cleanup0.c: Make standard compliant.
7509 * tst-cleanup1.c: Likewise.
7510
7511 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7512 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7513 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7514 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7515 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7516 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7517 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7518 CLEANUP_JMP_BUF.
7519 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7520 * tst-cancel12.c: New file.
7521 * tst-cancel13.c: New file.
7522 * tst-cancel14.c: New file.
7523 * tst-cancel15.c: New file.
7524 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7525 and tst-cancel15.
7526
7527 * tst-cancel1.c: Add some comments.
7528
7529 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7530 timeout correctly.
7531
7a8a8e21
UD
75322003-06-06 Ulrich Drepper <drepper@redhat.com>
7533
7534 * Makefile (CFLAGS-pthread_cancel.c): Define.
7535
4ad0bbf4
UD
75362003-06-05 Ulrich Drepper <drepper@redhat.com>
7537
7538 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7539 Change type of __writer element to int.
7540 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7541 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7542 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7543 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7544 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7545 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7546 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7547 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7548 Compare with TID to determine deadlocks.
7549 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7550 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7551 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7552 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7553 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7554 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7555 Likewise.
7556 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7557 Likewise.
7558 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7559 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7560 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7561 Likewise.
7562 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7563 Likewise.
7564 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7565 * Makefile (tests): Add tst-rwlock12.
7566 * tst-rwlock12.c: New file.
7567
332faa96
JJ
75682003-06-05 Jakub Jelinek <jakub@redhat.com>
7569
7570 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7571 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7572 Remove bogus hidden_proto.
7573 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7574 Likewise.
7575 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7576 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7577 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7578 ___lll_mutex_timedlock): Likewise.
7579
29d9e2fd
UD
75802003-06-04 Ulrich Drepper <drepper@redhat.com>
7581
7582 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7583 (__pthread_cond_signal): Add some code to eventually handle
7584 cond_lock!=0.
7585
6f1acb30
UD
75862003-06-01 Ulrich Drepper <drepper@redhat.com>
7587
7588 * Makefile (tests): Add tst-exec4.
7589 (tst-exec4-ARGS): Define.
7590 * tst-exec4.c: New file.
7591
49b65043
UD
75922003-05-31 Ulrich Drepper <drepper@redhat.com>
7593
31195be2
UD
7594 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7595 Also fail if tv_nsec < 0.
7596 (__lll_timedwait_tid): Likewise.
7597 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7598 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7599 Likewise.
7600 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7601 Likewise.
7602 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7603 Likewise.
7604 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7605 Likewise.
80b54217
UD
7606 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7607 Likewise.
7608 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7609 Likewise.
31195be2 7610
dcfc8224
UD
7611 * Makefile (tests): Add tst-sem8 and tst-sem9.
7612 * tst-sem8.c: New file.
7613 * tst-sem9.c: New file.
7614 * sem_open.c: Fix creation of in_use record if the file exists but
7615 no internal record.
7616
49b65043
UD
7617 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7618 definitions.
7619
7620 * sysdeps/pthread/timer_create.c (timer_create): In case
7621 evp==NULL, assign timer ID to sival_ptr.
7622
7623 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7624 struct pthread_unwind_buf *.
7625 (struct pthread): Likewise for cleanup_jmp_buf element.
7626
7627 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7628 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7629 * unwind.c (__pthread_unwind_next): Likewise.
7630
50794a45
UD
76312003-05-30 Ulrich Drepper <drepper@redhat.com>
7632
5d4f57bd
UD
7633 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7634 (lll_futex_timed_wait): Use int for futex value parameter.
7635 (lll_futex_wake): Likewise.
7636 (lll_futex_requeue): Likewise.
7637
7638 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7639 Replace one memory operation with one register operation.
7640
7641 * tst-join4.c (do_test): Fix error message.
7642
7ab7ea33
UD
7643 * tst-rwlock6.c (do_test): Use correct format specifier.
7644
7645 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7646 (__lll_mutex_lock_wait): Replace one memory operation with one
7647 register operation.
7648 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7649 (__lll_mutex_lock_wait): Likewise.
7650
50794a45
UD
7651 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7652 (__lll_mutex_cond_lock): Add one to value parameter of
7653 __lll_lock_wait to reflect reality in the futex syscall.
7654 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7655 (lll_mutex_cond_lock): Likewise.
7656
5a70784e
JJ
76572003-05-30 Jakub Jelinek <jakub@redhat.com>
7658
7659 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7660 New function.
7661 (lll_mutex_cond_lock): Define.
7662
e7c5ac68
UD
76632003-05-29 Ulrich Drepper <drepper@redhat.com>
7664
586d1748
UD
7665 * Makefile (tests): Add tst-signal6.
7666 * tst-signal6.c: New file.
7667
b8ba4a27
UD
7668 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7669 (__lll_mutex_unlock_force): New function
7670 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7671
65d46efe
UD
7672 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7673 (__lll_mutex_unlock_force): New function.
7674 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7675
7676 * tst-rwlock7.c (do_test): Use correct format specifier.
7677
e7c5ac68
UD
7678 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7679 Find break parameter in correct asm argument.
7680
284bdc42
UD
76812003-05-27 Jakub Jelinek <jakub@redhat.com>
7682
7683 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7684 Remove out4.
7685 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7686 error occured.
7687 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7688 Add __mutex.
7689 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7690 lll_futex_requeue, lll_mutex_unlock_force): Define.
7691
e7c5ac68
UD
76922003-05-30 Jakub Jelinek <jakub@redhat.com>
7693
7694 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7695 (pthread_cond_t): Add __mutex.
7696 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7697 lll_futex_requeue, lll_mutex_unlock_force): Define.
7698
ea2630c6
UD
76992003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7700
7701 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7702 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 7703 Add __mutex field.
ea2630c6
UD
7704 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7705 Define.
7706 (lll_futex_wait, lll_futex_wake): Define.
7707 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7708 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7709 FUTEX_REQUEUE instead of FUTEX_WAIT.
7710 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7711 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7712 mutex which was used in condvar structure. Call
7713 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7714 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7715
7716 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7717 include tcb-offsets.h. Read wakeup value in locked region.
7718 Use the value of gbr register as THREAD_ID.
7719 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7720 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7721 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7722
7723 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7724 macros.
7725
5a77f150
UD
77262003-05-28 Ulrich Drepper <drepper@redhat.com>
7727
7728 * sysdeps/pthread/pthread_cond_broadcast.c
7729 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7730
7661d9f7
UD
77312003-05-26 Ulrich Drepper <drepper@redhat.com>
7732
7733 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7734 typo in register name.
7735 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7736 correctly. Actually use requeue. Little optimization.
7737 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7738 mutex address early. Handle cancellation state as 32-bit value.
7739 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7740 Remove unnecessary label.
7741
69431c9a
UD
77422003-05-25 Ulrich Drepper <drepper@redhat.com>
7743
7744 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7745 instead of FUTEX_WAIT.
7746 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7747 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7748 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7749 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7750 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7751 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7752 used in condvar structure. Call __pthread_mutex_cond_lock instead
7753 of __pthread_mutex_lock_internal.
7754 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7755 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7756 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7757 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7758 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7759 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7760 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7761 Add pthread_mutex_cond_lock.
7762 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7763 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7764 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7765 lll_mutex_cond_lock.
7766 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7767 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 7768 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 7769 Add __mutex field.
248a3490 7770 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
7771 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7772
7773 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7774 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7775
7776 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7777 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7778 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7779 macro don't define aliases.
7780
7781 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7782 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7783 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7784 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7785 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7786 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7787 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7788 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7789 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7790
fddfebbd
UD
77912003-05-17 Ulrich Drepper <drepper@redhat.com>
7792
7793 * sem_open.c: Fix one endless loop. Implement correct semantics
7794 wrt opening the same semaphore more then once.
7795 * sem_close.c: Adjust for sem_open change.
7796 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7797 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7798 * Makefile (tests): Add tst-sem7.
7799 * tst-sem7.c: New file.
7800
1eefffb0
RM
78012003-05-16 Roland McGrath <roland@redhat.com>
7802
7803 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7804 uninitialized variable braino.
7805
6e66dc78
UD
78062003-05-16 Ulrich Drepper <drepper@redhat.com>
7807
23ae6451
UD
7808 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7809 test for syscall availability.
7810
7811 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7812 __no_posix_timers to -1 if the syscalls don't exist.
7813
7ac5b8e2
UD
7814 * pthread_join.c (pthread_join): Set tid field of the joined
7815 thread to -1. This isn't necessary but helps to recognize some
7816 error conditions with almost no cost.
7817
7818 * allocatestack.c (FREE_P): Also negative values indicate an
7819 unused stack.
7820
6e66dc78
UD
7821 * unwind.c: Include <unistd.h>.
7822
855dba3c
UD
78232003-05-14 Ulrich Drepper <drepper@redhat.com>
7824
7825 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7826
81f3ac4c
UD
78272003-05-14 Jakub Jelinek <jakub@redhat.com>
7828
7829 * Makefile (crti-objs, crtn-objs): New variables.
7830 (omit-deps, extra-objs): Add crtn.
7831 ($(objpfx)libpthread.so): Depend on both crti and crtn
7832 and links to them in multidir.
7833 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7834
7158eae4
UD
78352003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7836
7837 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7838 (lll_mutex_unlock): Use atomic_exchange_rel.
7839
edf205d5
UD
78402003-05-11 Ulrich Drepper <drepper@redhat.com>
7841
7842 * cond-perf.c (cons): Add missing locking around setting of alldone.
7843
a3f979a7
UD
78442003-05-10 Ulrich Drepper <drepper@redhat.com>
7845
7846 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7847 related macros.
7848 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7849
880867a4
UD
78502003-05-09 Ulrich Drepper <drepper@redhat.com>
7851
949ec764
UD
7852 * tst-sem6.c: New file.
7853 * Makefile (tests): Add tst-sem6.
7854
7855 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7856 Use atomic_exchange_rel instead of atomic_exchange.
7857 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7858 Likewise.
7859
7860 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7861 code for lll_futex_wait and lll_futex_wake in static apps. Use
7862 vsyscall is possible.
7863
7864 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7865 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7866 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7867 pthread_setaffinity_np.
7868 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7869 and pthread_setaffinity_np.
7870 * Makefile (libpthread-routines): Add pthread_getaffinity and
7871 pthread_setaffinity.
7872
880867a4
UD
7873 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7874 use it in case mmap to allocate the stack fails.
7875 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7876 ARCH_MAP_FLAGS here.
7877 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7878 ARCH_RETRY_MMAP.
7879
92d83c72
UD
78802003-05-08 Ulrich Drepper <drepper@redhat.com>
7881
7882 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7883 handler implementation. It is now lockless in fork().
7884 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7885 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7886 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7887 declare the __fork_*_lists.
7888 (struct fork_handler): Include pointers to all three functions.
7889 Add next, refcntr and need_signal elements.
7890 (__fork_handlers): New declaration.
7891 (__register_atfork_malloc): Remove declaration.
7892 (HAVE_register_atfork_malloc): Remove definition.
7893 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7894 __pthread_child_handler variable.
7895 (__libc_pthread_init): Use __register_atfork instead of explicitly
7896 adding to the list.
7897 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7898 and lll_futex_wake.
7899 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7900
7901 * unwind.c (unwind_cleanup): Print error message and then abort. This
7902 function must never be reached.
7903
7904 * cond-perf.c: New file.
7905
be4d8038
UD
79062003-05-05 Ulrich Drepper <drepper@redhat.com>
7907
7908 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7909
c6696b79
RM
79102003-05-04 Roland McGrath <roland@redhat.com>
7911
7912 * Makefile ($(objpfx)../libc.so): New target.
7913
7da168bf
UD
79142003-05-02 Ulrich Drepper <drepper@redhat.com>
7915
7916 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7917 (pthread_condattr_t): Size is only an int, don't use long for
7918 alignment.
7919 (pthread_mutexattr_t): Likewise.
7da168bf
UD
7920 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7921 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7922 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7923
9a7178d6
UD
79242003-05-01 Ulrich Drepper <drepper@redhat.com>
7925
7926 * sysdeps/i386/tls.h: Define THREAD_ID.
7927 * sysdeps/ia64/tls.h: Likewise.
7928 * sysdeps/powerpc/tls.h: Likewise.
7929 * sysdeps/s390/tls.h: Likewise.
7930 * sysdeps/sh/tls.h: Likewise.
7931 * sysdeps/x86_64/tls.h: Likewise.
7932 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7933 record ownership.
7934 * pthread_mutex_timedlock.c: Likewise.
7935 * pthread_mutex_trylock.c: Likewise.
7936 * pthread_mutex_unlock.c: Likewise.
7937 * pthread_rwlock_trywrlock.c: Likewise.
7938 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7939 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7940 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7941 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7942
7943 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7944 flag.
7945
a234e27d
UD
79462003-04-29 Jakub Jelinek <jakub@redhat.com>
7947
7948 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7949 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7950 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7951 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7952 Make __align long long instead of long.
7953 (pthread_rwlock_t): Formatting.
7954 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7955 (pthread_rwlock_t): Formatting.
7956 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7957 (pthread_cond_t): Make __align long long instead of long.
7958 (pthread_rwlock_t): Move __flags field to the same position as in
7959 linuxthreads.
7960
f025c136
UD
79612003-04-30 Ulrich Drepper <drepper@redhat.com>
7962
7963 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7964 * tst-rwlock7.c (do_test): Likewise.
7965
7531ab9e
RM
79662003-04-26 Roland McGrath <roland@redhat.com>
7967
7968 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7969
299601a1
UD
79702003-04-22 Jakub Jelinek <jakub@redhat.com>
7971
299601a1
UD
7972 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7973 sizeof (struct pthread).
7974 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 7975 1 struct pthread.
299601a1
UD
7976 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7977 to 0.
7978 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7979 struct pthread.
7980 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7981 to 32-bit bytes.
7982 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7983 tcbp.
7984 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7985 unneccessarily.
7986 (NO_TLS_OFFSET): Define.
299601a1
UD
7987 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7988 add TLS_TCB_SIZE unnecessarily.
299601a1 7989
950094f8
RM
79902003-04-22 Roland McGrath <roland@redhat.com>
7991
7992 * Makeconfig (shared-thread-library): Reverse link order to work
7993 around linker bug.
7994
dc2f6455
UD
79952003-04-22 Ulrich Drepper <drepper@redhat.com>
7996
7997 * semaphore.h: Fix typo in comment.
7998
e7608d77
UD
79992003-04-21 Ulrich Drepper <drepper@redhat.com>
8000
6a87ee19
UD
8001 * sysdeps/pthread/sigfillset.c: New file.
8002
e7608d77
UD
8003 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8004 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8005 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8006 * sysdeps/pthread/sigaction.c: Likewise.
8007 * sysdeps/pthread/sigprocmask.c: New file.
8008 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8009 __SIGRTMIN+1.
8010 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8011 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8012 in this case.
8013
0b3df49e
UD
80142003-04-19 Ulrich Drepper <drepper@redhat.com>
8015
58a7a325
UD
8016 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8017 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8018
0b3df49e
UD
8019 * sysdeps/unix/sysv/linux/unregister-atfork.c
8020 (__unregister_atfork): Don't free memory not allocated dynamically.
8021
8022 * semaphore.h: Remove __THROW marker from cancellation points.
8023 * nptl/sysdeps/pthread/pthread.h: Likewise.
8024
7d74651e
UD
80252003-04-18 Ulrich Drepper <drepper@redhat.com>
8026
76a67697
UD
8027 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8028 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
8029 __THROW.
8030
dd9d6538
JJ
80312003-04-16 Jakub Jelinek <jakub@redhat.com>
8032
8033 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8034
4ab6f47c
RM
80352003-04-15 Roland McGrath <roland@redhat.com>
8036
8037 * forward.c (__pthread_unwind): Tweak to avoid warning.
8038
162434a6
UD
80392003-04-15 Ulrich Drepper <drepper@redhat.com>
8040
8041 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8042
35909161
UD
80432003-04-14 Ulrich Drepper <drepper@redhat.com>
8044
18ddd3aa 8045 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
8046 overflow CFA advance instructions.
8047 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8048
18a8e730
UD
80492003-04-14 Jakub Jelinek <jakub@redhat.com>
8050
bd4f43b4
UD
8051 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8052 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8053 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8054 defined.
8055
18a8e730
UD
8056 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8057 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8058 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8059 DW_CFA_advance_loc for .Laddl-.Lsubl.
8060
08c765fa
UD
80612003-04-13 Ulrich Drepper <drepper@redhat.com>
8062
18a8e730
UD
8063 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8064 position-independent unwind data for static libraries.
8065 Add missing unwind info. Add comments.
8066
ad2be852
UD
8067 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8068 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8069 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
8070 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8071
177d1ad3
UD
80722003-04-12 Ulrich Drepper <drepper@redhat.com>
8073
08c765fa
UD
8074 * Makefile: Make sure all cancellation points are compiled with
8075 exception and asynchronous unwind tables.
8076
177d1ad3
UD
8077 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8078 which mishandles loading of global object addresses in PIC.
8079 (THREAD_SETMEM_NC): Likewise.
8080
09d65ff3
UD
80812003-04-11 Ulrich Drepper <drepper@redhat.com>
8082
8083 * pthread.h: Define new data structure for cleanup buffer. Declare
8084 new cleanup handler interfaces.
8085 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8086 (struct pthread): Add cleanup_jmp_buf pointer. Define
8087 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8088 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8089 it. Declare old cleanup handler installation functions.
8090 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8091 handling.
8092 * cleanup_defer.c: Likewise.
8093 * cleanup_compat.c: New file. Old cleanup code.
8094 * cleanup_def_compat.c: New file. Old cleanup code.
8095 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8096 if own thread descriptor.
8097 * unwind.c: New file.
8098 * forward.c: Add __pthread_unwind.
8099 * init.c (pthread_functions): Add __pthread_unwind.
8100 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8101 Add ptr___pthread_unwind.
8102 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8103 and unwind function.
8104 * Makefile (libpthread-routines): Add cleanup_compat,
8105 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8106 table generation if necessary.
8107 * version.c: Record whether unwind support is compiled in.
8108 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8109 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8110 handler interfaces.
8111 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8112 complication to generate unwind information for syscall wrappers.
68107ec0 8113 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
8114 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8115 __cleanup_fct_attribute.
8116
8117 * Makefile: Add rules to build and run tst-cleanup0.
8118 * tst-cleanup0.c: New file.
8119 * tst-cleanup0.expect: New file.
8120
8121 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8122 caller. Optimize to avoid often unecessary local variable.
8123
0dc44b51
RM
81242003-04-11 Roland McGrath <roland@redhat.com>
8125
8126 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8127 sets variable `multidir'; include that.
8128 (generated): Add it.
8129 ($(objpfx)$(multidir)/crti.o): New target.
8130 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8131
84a80719
UD
81322003-04-11 Ulrich Drepper <drepper@redhat.com>
8133
8134 * tst-attr2.c (do_test): Add cast to avoid warning.
8135 * tst-mutex4.c (do_test): Likewise.
8136
88ff4759
UD
81372003-04-10 Ulrich Drepper <drepper@redhat.com>
8138
8139 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8140 in child.
8141
b2041097
UD
81422003-04-09 Ulrich Drepper <drepper@redhat.com>
8143
8144 * Makefile (tests): Add tst-detach1.
8145 * tst-detach1.c: New file.
8146
f9657e88
UD
81472003-04-08 Ulrich Drepper <drepper@redhat.com>
8148
9afe4964
UD
8149 * sysdeps/pthread/pthread.h: Remove duplicate
8150 pthread_cleanup_{push,pop} definitions.
8151
f9657e88
UD
8152 * tst-barrier2.c: Eliminate warnings.
8153 * tst-cancel4.c: Likewise.
8154 * tst-cond4.c: Likewise.
8155 * tst-cond6.c: Likewise.
8156 * tst-detach1.c: Likewise.
8157 * tst-rwlock4.c: Likewise.
8158 * tst-rwlock6.c: Likewise.
8159 * tst-rwlock7.c: Likewise.
8160 * tst-sem3.c: Likewise.
8161 * tst-spin2.c: Likewise.
8162 * tst-umask1.c: Likewise.
8163
69b35e86
UD
81642003-04-07 Ulrich Drepper <drepper@redhat.com>
8165
8166 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8167
c70ad7d7
UD
81682003-04-06 Ulrich Drepper <drepper@redhat.com>
8169
8170 * descr.h (struct pthread): Move cancelhandling member to the front.
8171
54e0138f
UD
81722003-04-05 Ulrich Drepper <drepper@redhat.com>
8173
8174 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8175 malloc_parent, and malloc_child statically.
8176 (__register_atfork_malloc): New function.
8177 (free_mem): Don't free any of the malloc_* variables on the list.
8178 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8179 Define HAVE_register_atfork_malloc.
8180
b22d701b
UD
81812003-04-04 Ulrich Drepper <drepper@redhat.com>
8182
8183 * sysdeps/pthread/createthread.c (create_thread): Add some more
8184 comments explaining when to set multiple_threads and when not.
8185
8186 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8187 THREAD_ATOMIC_BIT_SET if not already defined.
8188 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8189 THREAD_ATOMIC_BIT_SET:
8190 * sysdeps/x86_64/tls.h: Likewise.
8191 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8192 THREAD_ATOMIC_CMPXCHG_VAL.
8193 (_pthread_cleanup_pop_restore): Likewise.
8194 * cancellation.c (__pthread_enable_asynccancel): Likewise.
8195 (__pthread_enable_asynccancel_2): Likewise.
8196 (__pthread_disable_asynccancel): Likewise.
8197 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8198 (__libc_disable_asynccancel): Likewise.
8199 * init.c (sigcancel_handler): Likewise.
8200 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8201 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8202
86246935
UD
82032003-04-03 Ulrich Drepper <drepper@redhat.com>
8204
8205 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8206 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8207 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8208 * Makefile (tests): Add tst-cancel11.
8209 * tst-cancel11.c: New file.
8210
6b4686a5
UD
82112003-04-01 Ulrich Drepper <drepper@redhat.com>
8212
8213 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8214 round, not the first. Use specific_used flag instead of local
8215 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
8216 (__free_tcb): Don't call deallocate_tsd here.
8217 (start_thread): Call deallocate_tsd here.
8218 * pthread_setspecific.c: Set specific_used flag really only when
8219 needed.
0d73a73b 8220 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 8221 * tst-tsd3.c: New file.
0d73a73b 8222 * tst-tsd4.c: New file.
6b4686a5 8223
42b2395d
UD
82242003-03-31 Ulrich Drepper <drepper@redhat.com>
8225
211d90c5
UD
8226 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8227 Use atomic_exchange_and_add instead of __lll_add.
8228 (__lll_mutex_timedlock): Likewise.
8229 Patch by Ian Wienand.
8230
82312003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8232
8233 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8234 (SINGLE_THREAD_P): Fix typo.
8235 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8236
82372003-03-31 Ulrich Drepper <drepper@redhat.com>
8238
8239 * Makefile (tests): Add tst-align.
8240 * tst-align.c: New file.
8241 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 8242
42b2395d
UD
8243 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8244 function correctly.
8245
211d90c5
UD
8246 * tst-tsd2.c: Add casts to avoid warnings.
8247
163b180f
UD
82482003-03-30 Ulrich Drepper <drepper@redhat.com>
8249
8250 * descr.h (struct pthread): Move most often used elements to the front.
8251
ea473bad
UD
82522003-03-29 Ulrich Drepper <drepper@redhat.com>
8253
8254 * Makefile (libpthread-routines): Add pthread_atfork.
8255 (libpthread-static-only-routines): Add pthread_atfork.
8256
dd731d53
UD
82572003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8258
8259 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8260 of TLS_DTV_AT_TP.
8261 (INSTALL_DTV): Add parens.
8262 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8263 Use passed descr instead of THREAD_SELF.
8264 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8265 (__lll_mutex_timedlock_wait): Correct expected value after
8266 spurious wakeup.
8267 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8268 Release lock before waking up the waiters.
8269 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8270 criteria. Reorderstruct passed to cleanup handler. Fix
8271 handling of cancellation and failung pthread_mutex_unlock call.
8272 Use __pthread_enable_asynccancel_2 instead of
8273 __pthread_enable_asynccancel.
8274 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8275 Return result of lock re-get if it fails.
8276 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8277 for __pthread_cleanup_push.
8278 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8279 completely broken rwlock implementation.
8280 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8281 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8282 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8283 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8284 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8285 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
8286 versioned_symbol macro.
8287 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8288 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8289
c75d02f0
UD
82902003-03-27 Ulrich Drepper <drepper@redhat.com>
8291
5f5004df
UD
8292 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8293 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
8294 and __helper_tid.
8295 (struct timer): Remove th and bar field.
8296 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8297 debugging code. Create only one helper thread.
8298 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8299 helper thread.
8300 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8301 Renamed. Define statically. Use thread info from siginfo.
8302 (__helper_once): New variable.
8303 (__helper_tid): New variable.
8304 (__reset_helper_control): New function.
8305 (__start_helper_thread): New function.
8306
18d009ca
UD
8307 * pthread_create.c (start_thread): Don't use setjmp inside
8308 __builtin_expect to work around gcc bug.
8309
c75d02f0
UD
8310 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8311 timer_delete syscall fails, but not with ENOSYS, set
8312 __no_posix_timers.
8313
8314 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8315 (timer_settime): Fix typo.
28cf3058
UD
8316 * sysdeps/unix/sysv/linux/timer_getoverr.c
8317 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 8318
049ac259
JJ
83192003-03-27 Jakub Jelinek <jakub@redhat.com>
8320
8321 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8322 offset of cleanupbuf.__prev.
8323
f93d39dd
JJ
83242003-03-26 Jakub Jelinek <jakub@redhat.com>
8325
8326 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8327 of included file.
8328
f064e4c5
UD
83292003-03-26 Ulrich Drepper <drepper@redhat.com>
8330
8331 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8332 NULL provide default definition to syscall.
8333
83e886a3
RM
83342003-03-25 Roland McGrath <roland@redhat.com>
8335
8336 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8337 (timer_id2ptr): Fix typo.
8338
09402f5b
UD
83392003-03-25 Ulrich Drepper <drepper@redhat.com>
8340
8341 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8342 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8343 * sysdeps/ia64/pthreaddef.h: Likewise.
8344 * sysdeps/powerpc/pthreaddef.h: Likewise.
8345 * sysdeps/s390/pthreaddef.h: Likewise.
8346 * sysdeps/sh/pthreaddef.h: Likewise.
8347 * sysdeps/x86_64/pthreaddef.h: Likewise.
8348 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8349 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8350 being changed.
8351 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8352 SIGTIMER is not unblocked.
8353 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8354 RT signal taken.
8355 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8356 be send.
8357 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8358 pass pointer through as ID.
8359 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8360 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8361 * sysdeps/unix/sysv/linux/timer_create.c: New file.
8362 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8363 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8364 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8365 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8366 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8367 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8368 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8369 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8370 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8371 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8372 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8373 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8374 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8375 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8376 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8377 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8378 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8379 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8380 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8381 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8382 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8383 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8384 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8385 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8386 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8387 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8388 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8389 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8390 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8391 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8392
8393 * pthreadP.h: Remove FRAME_LEFT definition.
8394 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8395 already left frame. Programs which have this problem are not POSIX
8396 compliant.
8397 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8398
5e826ab5
UD
83992003-03-24 Ulrich Drepper <drepper@redhat.com>
8400
8401 * sysdeps/pthread/tst-timer.c: Check return values of the
8402 functions we test.
8403
b910f788
RM
84042003-03-23 Roland McGrath <roland@redhat.com>
8405
3045a1fe
RM
8406 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8407 * tst-tls3mod.c: Likewise.
8408 * tst-tls1.c: Likewise.
8409 * tst-tls2.c: Likewise.
8410
85047fe3
RM
8411 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8412 undefined behavior.
8413
b910f788
RM
8414 * tst-join5.c (tf1, tf2): Add a cast.
8415
8416 * Makeconfig (includes): Append -I$(..)nptl to this variable.
8417
8418 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8419 Don't test anything.
8420 * tst-cond4.c: Likewise.
8421 * tst-cond6.c: Likewise.
8422 * tst-flock2.c: Likewise.
8423 * tst-mutex4.c: Likewise.
8424 * tst-rwlock4.c: Likewise.
8425 * tst-signal1.c: Likewise.
8426 * tst-spin2.c: Likewise.
8427 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8428
8429 * tst-mutex4.c: Use test-skeleton.c.
8430 * tst-spin2.c: Likewise.
8431 * tst-sysconf.c: Likewise.
8432 * tst-barrier2.c: Likewise.
8433 * tst-cond4.c: Likewise.
8434 * tst-cond6.c: Likewise.
8435 * tst-rwlock4.c: Likewise.
8436 * tst-unload.c: Likewise.
8437 * tst-flock2.c (do_test): Use return instead of exit.
8438
4baa087a
RM
84392003-03-22 Jakub Jelinek <jakub@redhat.com>
8440
8441 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8442
5a3ab2fc
UD
84432003-03-21 Ulrich Drepper <drepper@redhat.com>
8444
9f07eae2
UD
8445 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8446 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8447 instead of __lll_compare_and_swap.
8448 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8449 Likewise.
8450 Removed definition if __lll_compare_and_swap.
8451
5a3ab2fc
UD
8452 * cancellation.c: Adjust for new form of compare&exchange macros.
8453 * cleanup_defer.c: Likewise.
8454 * init.c: Likewise.
8455 * libc-cancellation.c: Likewise.
8456 * old_pthread_cond_broadcast.c: Likewise.
8457 * old_pthread_cond_signal.c: Likewise.
8458 * old_pthread_cond_timedwait.c: Likewise.
8459 * old_pthread_cond_wait.c: Likewise.
8460 * pthread_cancel.c: Likewise.
8461 * pthread_create.c: Likewise.
8462 * pthread_detach.c: Likewise.
8463 * pthread_join.c: Likewise.
8464 * pthread_key_delete.c: Likewise.
8465 * pthread_setcancelstate.c: Likewise.
8466 * pthread_setcanceltype.c: Likewise.
8467 * pthread_timedjoin.c: Likewise.
8468 * pthread_tryjoin.c: Likewise.
8469 * sysdeps/pthread/createthread.c: Likewise.
8470
b1aea098
UD
84712003-03-20 Ulrich Drepper <drepper@redhat.com>
8472
8473 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 8474 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
8475 definitions. Replace uses with calls to atomic_* functions.
8476 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8477 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8478 __lll_test_and_set calls with atomic_exchange_and_add and
8479 atomic_exchange calls respectively.
8480 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8481 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8482 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8483 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8484 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8485 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8486 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8487
8488 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8489 returns the old value.
8490
100a7100
RM
84912003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
8492
8493 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8494 int for variable OLDVAL and correct inline assembler contraint.
8495 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8496 type int for variable OLD.
8497
8498 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8499 only for s390-32.
8500 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8501 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8502 instead of multiple_threads field in the TCB.
8503
95767b36
UD
85042003-03-19 Ulrich Drepper <drepper@redhat.com>
8505
4009bf40
UD
8506 * sysdeps/i386/i686/bits/atomic.h: Removed.
8507 * sysdeps/i386/i586/bits/atomic.h: Removed.
8508 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
8509 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
8510 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
8511 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
8512 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
8513 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
8514 * atomic.h: Removed. Moved to glibc.
8515
560a784f
UD
8516 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8517 support for clock selection.
8518
95767b36
UD
8519 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8520 signalling waiters.
8521
043ad426
RM
85222003-03-18 Roland McGrath <roland@redhat.com>
8523
94659495
RM
8524 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8525 Add __lll_rel_instr first. Add memory clobber.
8526 (lll_mutex_unlock): Use __lll_test_and_set.
8527 From Paul Mackerras <paulus@samba.org>.
8528
8529 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8530 unconditionally.
8531 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8532 (SINGLE_THREAD_P): Add `header.' prefix.
8533 From Paul Mackerras <paulus@samba.org>.
8534
043ad426
RM
8535 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8536 pthread_timedjoin_np to ...
8537 (libpthread: GLIBC_2.3.3): ... here.
8538 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8539
8540 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8541 Avoid shadowing VAL variable.
8542
8543 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8544 New macro.
8545
86a9ee5e
UD
85462003-03-18 Ulrich Drepper <drepper@redhat.com>
8547
ac9e0aa1
UD
8548 * Makefile (tests): Add tst-cond11.
8549 * tst-cond11.c: New file.
8550
a14b373c
UD
8551 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8552 struct passed to cleanup handler to eliminate one more
8553 instruction.
8554 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8555
24a49f38
UD
8556 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8557 (pthrad_cond_t): Replace __unused field with __clock.
8558
8559 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8560 waken all waiters in cleanup handler.
8561 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8562 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8563
86a9ee5e
UD
8564 * pthread_condattr_getclock.c: New file.
8565 * pthread_condattr_setclock.c: New file.
8566 * sysdeps/pthread/pthread.h: Declare these new functions.
8567 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8568 * Makefile (libpthread-routines): Add the new functions.
8569 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8570 Renamed field to value. Document use of the bits.
8571 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8572 change.
8573 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 8574 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
8575 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8576 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8577 Add __clock field.
8578 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8579 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8580 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8581 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8582 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8583 Implement clock selection.
8584 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8585 * pthread-errnos.sym: Add ENOSYS.
8586 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8587 _POSIX_CLOCK_SELECTION.
8588 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8589
8590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8591 invalid .size directive.
8592
98054a05
RM
85932003-03-17 Roland McGrath <roland@redhat.com>
8594
8595 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8596 Formatting tweaks.
8597
001bea71
UD
85982003-03-17 Ulrich Drepper <drepper@redhat.com>
8599
4773086e
UD
8600 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8601 Use __lll_add instead of spelling it out. Use protected symbol names.
8602 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8603 Use __lll_add.
8604 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8605 Renamed from lll_compare_and_swap. Use new name where necessary.
8606 (__lll_add): Defined.
8607 (__lll_dec_if_positive): Defined.
8608 (__lll_test_and_set): Defined.
8609 * sysdeps/ia64/pthread_spin_init.c: Removed.
8610 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8611 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8612 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8613 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8614 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8615 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8616 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
8617 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8618 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8619 __sync_lock_release_si.
8620 Patch by Jakub Jelinek.
8621
8622 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8623 Fix timeout handling.
8624 (__lll_timedwait_tid): Likewise.
8625 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8626 Patch by Jakub Jelinek.
8627
8628 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8629
de4471dd
RM
86302003-03-17 Roland McGrath <roland@redhat.com>
8631
8632 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8633 * sysdeps/pthread/pthread_spin_init.c: New file.
8634 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8635 * sysdeps/powerpc/Makefile: New file.
8636 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8637 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8638 * sysdeps/powerpc/pthreaddef.h: New file.
8639 * sysdeps/powerpc/tcb-offsets.sym: New file.
8640 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8641 * sysdeps/powerpc/tls.h: New file.
8642 * sysdeps/powerpc/bits/atomic.h: New file.
8643 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8644 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8645 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 8646
de4471dd
RM
8647 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8648 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8649 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8650 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8651 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8652 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8653 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8654 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8655 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8656 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8657 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8658 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8659 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8660 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8661 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8662
8663 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8664 not gettimeofday.
8665 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8666 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8667 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8668 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8669 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8670
5778033f
UD
86712003-03-17 Ulrich Drepper <drepper@redhat.com>
8672
8673 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8674 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8675 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8676 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8677 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8678
796038f8
RM
86792003-03-16 Roland McGrath <roland@redhat.com>
8680
8681 * tst-fork4.c: Include <string.h>.
8682 * tst-signal2.c: Likewise.
8683 * tst-mutex5.c (do_test): exit -> return.
8684 * tst-mutex2.c: Include <stdlib.h>.
8685
51d0678c
UD
86862003-03-16 Ulrich Drepper <drepper@redhat.com>
8687
5778033f
UD
8688 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8689 (__lll_mutex_timedlock_wait): Correct expected value after
8690 spurious wakeup. Otherwise we would never wait again.
8691
b6e2f87a
UD
8692 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8693 zone versus inline asm stupidity. Use correct instructions.
8694
51d0678c
UD
8695 * tst-rwlock6.c: Add some more status output.
8696
8112cc70
RM
86972003-03-15 Roland McGrath <roland@redhat.com>
8698
8699 * sysdeps/pthread/configure.in: New file.
8700 * sysdeps/pthread/configure: New file (generated).
8701
49773c19
UD
87022003-03-15 Ulrich Drepper <drepper@redhat.com>
8703
8704 * allocatestack.c (allocate_stack): Store the exact stack size of
8705 user allocated stacks.
8706
eec0ca9f
JJ
87072003-03-15 Jakub Jelinek <jakub@redhat.com>
8708
8709 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8710 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8711 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8712 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8713 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8714 Use `header.' prefix.
8715 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8716
a87731e2
UD
87172003-03-15 Ulrich Drepper <drepper@redhat.com>
8718
8719 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8720 __builtin_frame_address, use stack pointer.
8721
8722 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8723 instead of __builtin_frame_pointer.
8724
e22a221d
UD
87252003-03-14 Ulrich Drepper <drepper@redhat.com>
8726
92ed3daf
UD
8727 * tst-basic1.c (do_test): Add cast to avoid warning.
8728 * tst-basic2.c (do_test): Likewise.
8729
9b89567d
UD
8730 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8731 amount of stack correction.
8732
e22a221d
UD
8733 * tst-fork4.c: Use test-skeleton.c.
8734
2e49caba
RM
87352003-03-14 Roland McGrath <roland@redhat.com>
8736
8737 * init.c: Fix typo "#eli" for "#else".
8738
415ef7d8
RM
87392003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8740
8741 * allocatestack.c (__stack_user): Use hidden_data_def.
8742 * pthread_create.c (__pthread_keys): Likewise.
8743
8744 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8745
52287505
RM
87462003-03-14 Roland McGrath <roland@redhat.com>
8747
415ef7d8
RM
8748 * tst-fork4.c: New file.
8749 * Makefile (tests): Add it.
8750
52287505
RM
8751 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8752 we always define the padding space.
8753 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8754 stopped supporting its own extensions fully.
8755 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8756 struct also called `header', so `header.multiple_threads' is the field
8757 name to use on all machines.
8758 * allocatestack.c (allocate_stack): Use `header.' prefix.
8759 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8760 * pthread_create.c (__pthread_create_2_1): Likewise.
8761 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8762 (THREAD_SELF): Likewise.
8763 * sysdeps/x86_64/tls.h: Likewise.
8764 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8765 (SINGLE_THREAD_P): Likewise.
8766 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8767 (SINGLE_THREAD_P): Likewise.
8768 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8769 (SINGLE_THREAD_P): Likewise.
8770
8771 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8772 value directly.
8773
c44bf9aa
UD
87742003-03-14 Ulrich Drepper <drepper@redhat.com>
8775
e22a221d
UD
8776 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8777 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8778
0eb18281
UD
8779 * pthread_create.c (start_thread): setjmp is expected to return 0.
8780
c44bf9aa
UD
8781 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8782 (THREAD_GETMEM_NC): Likewise.
8783
564cd8b6
UD
87842003-03-13 Ulrich Drepper <drepper@redhat.com>
8785
8786 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8787 and the size of the stack which must be allocated is a multiple,
8788 allocate one more page.
8789 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8790 MULTI_PAGE_ALIASING.
8791
6461e577
RM
87922003-03-13 Roland McGrath <roland@redhat.com>
8793
8794 * pthread_create.c (start_thread): Set EXITING_BIT after the
8795 event-reporting (and destructors), not before.
8796
b5ec5617
UD
87972003-03-13 Jakub Jelinek <jakub@redhat.com>
8798
6461e577
RM
8799 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8800 lll_futex_wake): Declare register variables as long int instead of
8801 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8802 Make syscall arguments clobbered by the syscall.
8803 (lll_futex_wait): Define using lll_futex_timed_wait.
8804
8805 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8806 to void *.
8807
8808 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8809 PPID if [! NDEBUG].
8810
8811 * allocatestack.c (nptl_ncreated): Only declare if
8812 COLORING_INCREMENT != 0.
8813
8814 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8815 (__libc_enable_asynccancel_2): Remove prototype.
8816
b5ec5617
UD
8817 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8818 ctid to match kernel.
8819
d0369fb8
UD
88202003-03-12 Ulrich Drepper <drepper@redhat.com>
8821
7588880f
UD
8822 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8823 libc_multiple_threads.
8824 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8825 __libc_multiple_threads to...
8826 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8827
8828 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8829 versioning.
8830 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8831 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8832
8833 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8834 (__pthread_once_internal): Define.
8835
8836 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8837 macros instead of .symver directly.
8838 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8839 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8840
d0369fb8
UD
8841 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8842 * sysdeps/x86_64/tcb-offsets.sym: New file.
8843 * sysdeps/x86_64/Makefile: New file.
8844
8845 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8846 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8847 to access own pthread_t in TCB.
8848 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8849 Likewise.
8850 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8851 Likewise.
8852 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8853
0bb2ac85
RM
88542003-03-12 Roland McGrath <roland@redhat.com>
8855
8856 * pthread-errnos.sym: New file.
8857 * Makefile (gen-as-const-headers): New variable, list that file.
8858 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8859 header <pthread-errnos.h> instead of defining errno values here.
8860 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8861 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8862 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8863 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8864 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8865 Likewise.
8866 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8867 Likewise.
8868 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8869 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8870 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8871 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8872 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8873 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8874 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8875 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8876 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8877 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8878 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8879 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8880 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8881 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8882 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8883 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8884 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8885 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8886 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8887 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8888 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8889 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8890 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8891 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8892 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8893 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8894 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8895
8896 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8897 CLONE_CHILD_SETTID worked.
8898
35e148cb
UD
88992003-03-12 Ulrich Drepper <drepper@redhat.com>
8900
d0369fb8
UD
8901 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8902 file.
8903 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8904 file.
8905
8906 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8907 (pthread_cond_t): Add padding.
8908
da49194d
UD
8909 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8910 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8911 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8912
35e148cb
UD
8913 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8914 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8915 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8916 (__pthread_rwlock_timedrdlock): Likewise.
8917 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8918 (__pthread_rwlock_wrlock): Likewise.
8919 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8920 (__pthread_rwlock_rdlock): Likewise.
8921
8922 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8923
8924 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8925 result of lock re-get if it fails.
8926
3e976b96
UD
89272003-03-11 Ulrich Drepper <drepper@redhat.com>
8928
5a03acfe
UD
8929 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8930 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8931 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8932 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8933 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8934 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8935 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8936 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8937 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8938 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8939
8940 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8941 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8942
8943 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8944 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8945 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8946 (create_thread): Likewise.
8947 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8948 * init.c (__pthread_initialize_minimal_internal): Initialize
8949 __libc_multiple_threads_ptr if necessary.
8950 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8951 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8952 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8953 __libc_multiple_threads.
8954 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8955 necessary.
8956
8957 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8958 (THREAD_SETMEM_NC): Likewise.
8959
8960 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8961 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8962 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8963 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8964
8965 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8966 Eliminate one entire instruction.
8967
32a589b1
UD
8968 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8969 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8970 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8971 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8972 instead of __pthread_enable_asynccancel.
8973 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8974 (__pthread_cond_wait): Likewise.
8975 * sysdeps/pthread/pthread_cond_timedwait.c
8976 (__pthread_cond_timedwait): Likewise.
8977 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8978
3e976b96
UD
8979 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8980 (__condvar_cleanup): Wake up all waiters in case we got signaled
8981 after being woken up but before disabling asynchronous
8982 cancellation.
8983 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8984 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8985 (__condvar_cleanup): Likewise.
8986
8987 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8988 Make it an error if architecture has no #if case. Add x86-64.
8989
8990 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8991 pt-initfini.s generation.
8992
8993 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8994 (TLS_INIT_TP): Fix typo.
8995
6c477888
UD
89962003-03-11 Jakub Jelinek <jakub@redhat.com>
8997
8998 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8999 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9000
9001 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9002 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9003 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9004 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9005 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9006 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9007 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9008 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9009
ea694823
UD
90102003-03-11 Ulrich Drepper <drepper@redhat.com>
9011
6c477888
UD
9012 * sysdeps/pthread/pthread_cond_timedwait.c
9013 (__pthread_cond_timedwait): Return the result of the final
9014 locking. If it succeeds, the regular function return value.
9015
9016 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9017 Return result of the final locking.
9018 * version.c (__nptl_main): Work around problems with the strange
9019 INTERNAL_SYSCALL macro on ppc32.
9020 * init.c (__pthread_initialize_minimal_internal): Unblock
9021 SIGCANCEL in case the parent blocked it.
9022 Reported by Paul Mackerras <paulus@samba.org>.
9023
ea694823
UD
9024 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9025 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9026 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9027
b33e6163
RM
90282003-03-11 Jakub Jelinek <jakub@redhat.com>
9029
9030 * sysdeps/pthread/pthread_cond_timedwait.c
9031 (__pthread_cond_timedwait): Unlock and fail if
9032 __pthread_mutex_unlock_internal failed.
9033
9034 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9035 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9036 Use ARCH_CLONE.
9037 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9038 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9039 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9040 ALLOCATE_STACK): New macros.
9041 (TLS_TPADJ): New macro.
9042 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9043 (allocate_stack): Handle TLS_DTV_AT_TP and
9044 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9045 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9046 Don't set PD->self.
9047 * init.c [__ia64__] (__NR_set_tid_address): Define.
9048
9049 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9050 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9051 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9052 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9053 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9054 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9055 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9056 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9057 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9058 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9059 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9060 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9061 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9062 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9063 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9064 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9065 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9066 * sysdeps/ia64/bits/atomic.h: New file.
9067 * sysdeps/ia64/Makefile: New file.
9068 * sysdeps/ia64/pthread_spin_init.c: New file.
9069 * sysdeps/ia64/pthread_spin_lock.c: New file.
9070 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9071 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9072 * sysdeps/ia64/pthreaddef.h: New file.
9073 * sysdeps/ia64/tcb-offsets.sym: New file.
9074 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9075 * sysdeps/ia64/tls.h: New file.
9076
9077 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9078 to syscall instead of no arguments.
9079
2b30b2e5
UD
90802003-03-10 Ulrich Drepper <drepper@redhat.com>
9081
db5f2fc9
UD
9082 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9083 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9084 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9085 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9086
9087 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9088 unused code.
9089
6a4263e3
UD
9090 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9091
3de7c2a9
UD
9092 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9093 lowlevelbarrier.sym.
9094 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9095 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9096 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 9097 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 9098
2a544d82
UD
9099 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9100 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9101 (__lll_mutex_timedlock_wait): Likewise.
9102 (lll_mutex_lock): Adjust asm for that.
9103 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9104 (lll_lock): Adjust asm for operand order change.
9105 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9106 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9107
ec06436c
UD
9108 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9109 Reverse order of parameters.
9110 (__lll_timedwait_tid): Remove regparms attribute.
9111 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9112 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9113
3273832c
UD
9114 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9115 (__lll_timedwait_tid): Remove one unnecessary instruction.
9116
51f32ab8
UD
9117 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9118 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9119 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9120 lowlevelmutex.S.
9121
9122 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9123 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9124 for NOT_IN_libc.
9125 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9126 lowlevellock.S.
9127
fad48d9e
UD
9128 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9129 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9130 for libc.so.
9131 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9132 define LOCK here (if UP is not defined). The actual code is in
9133 lowlevelmutex.S.
9134
9356d063
UD
9135 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9136 LOCK is already defined. Don't define lll_unlock_wake_cb and
9137 __lll_timedwait_tid for libc.so.
9138 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9139 define LOCK here (if UP is not defined). The actual code is in
9140 lowlevellock.S.
9141
ebf0cbc5 9142 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
9143 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9144 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9145 instead of lowlevelsem.h.
9146 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9147 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9148 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 9149
c915e5ad
UD
9150 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9151 lowlevelrwlock.sym.
9152 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9153 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 9154 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 9155
4c3c2e8a
UD
9156 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9157 register loading.
9158 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9159 last changed. D'oh.
9160
2b30b2e5
UD
9161 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9162
9163 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9164 of __libc_locking_needed.
9165 (lll_trylock): Initialize %eax to zero.
9166
2b30b2e5
UD
9167 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9168 pthread_cond_t definition.
9169
e48f9638
RM
91702003-03-10 Roland McGrath <roland@redhat.com>
9171
9172 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9173 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9174 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9175 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9176 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9177
9178 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9179 Instead of setting PD->multiple_threads, set globals
9180 __pthread_multiple_threads and __libc_multiple_threads.
9181 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9182 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9183 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9184
9185 * descr.h (struct pthread): Conditionalize first member on
9186 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
9187 containing an anonymous tcbhead_t. Move `list' member out.
9188 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9189 * allocatestack.c: Remove use of `header.data.' prefix.
9190 * pthread_create.c: Likewise.
9191 * init.c (__pthread_initialize_minimal_internal): Likewise.
9192 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9193 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9194 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9195 * sysdeps/x86_64/tls.h: Likewise.
9196 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9197 (SINGLE_THREAD_P): Likewise.
9198 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9199 (SINGLE_THREAD_P): Likewise.
9200 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9201 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9202
c37cae9e
UD
92032003-03-09 Ulrich Drepper <drepper@redhat.com>
9204
d38c777e
RM
9205 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9206
7b44a5e0 9207 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 9208 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 9209
c2e5e085
UD
9210 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9211 leftovers from the ia32 code.
9212
9213 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9214 memory load.
9215 (clear_once_control): Don't load %esi.
9216
9217 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9218 handling.
9219
9220 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9221
cd4b2a55
UD
9222 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9223 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9224
c37cae9e
UD
9225 * Makefile (tests): Add tst-cond10.
9226 * tst-cond10.c: New file.
9227
d130a341
UD
92282003-03-08 Ulrich Drepper <drepper@redhat.com>
9229
ccf1d573
UD
9230 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9231 * tst-signal3.c (do_test): Likewise.
9232 * tst-sem5.c (do_test): Likewise.
9233 * tst-kill6.c (do_test): Likewise.
9234 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9235
9236 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9237 of inc/dec.
9238 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9239 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9240 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9241 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9242 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9243 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9244 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9245 Likewise.
9246 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9247 Likewise.
9248 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9251 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9252 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9253 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9254 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9255 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9256
d130a341
UD
9257 * allocatestack.c (allocate_stack): If mprotect() fails free the
9258 TLS memory.
9259
bc6389ad
UD
92602003-03-07 Ulrich Drepper <drepper@redhat.com>
9261
41d4d223
UD
9262 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9263
9264 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9265 lll_wake_tid. This was used only to work around kernel limits in
9266 the early days.
9267 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9268 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9269 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9270 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9271
bc6389ad
UD
9272 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9273 (__pthread_initialize_minimal_internal): Change initialization of
9274 __static_tls_align_m1 appropriately.
9275 * pthreadP.h (__static_tls_align_m1): Renamed from
9276 __static_tls_align.
9277 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9278 instead of __static_tls_align-1.
9279
cc775edf
UD
92802003-03-04 Ulrich Drepper <drepper@redhat.com>
9281
0de28d5c 9282 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 9283
518b5308
UD
9284 * pthread_create.c: Define __pthread_keys using nocommon
9285 attribute, not by placing it explicitly in bss.
9286 Remove DEFINE_DEALLOC definition. Not needed anymore.
9287
9288 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9289 Use it in mmap call to allocate stacks.
9290
9291 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9292
cc775edf
UD
9293 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9294 result of the thread function.
9295
4f6f0a8f
UD
92962003-03-03 Ulrich Drepper <drepper@redhat.com>
9297
f04a2721
UD
9298 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
9299 version is just fine.
9300
4f6f0a8f
UD
9301 * sysdeps/unix/sysv/linux/libc_pthread_init.c
9302 (__pthread_child_handler): Renamed from pthread_child_handler,
9303 exported, and marked hidden. Change all users.
9304 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9305 free __pthread_child_handler from child list.
9306
7ce5c164
UD
93072003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
9308
9309 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9310
9311 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9312 Fix handling of cancellation and failing pthread_mutex_unlock call.
9313 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9314 (__pthread_cond_wait): Likewise.
9315
9316 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9317 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9318 lll_futex_timed_wait call.
9319 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9320 (pthread_rwlock_timedwrlock): Likewise.
9321
9322 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9323 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9324 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9325
9326 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9327 check of lll_futex_wake return value.
9328
ea6a015b
RM
93292003-03-03 Roland McGrath <roland@redhat.com>
9330
9331 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9332
9333 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9334 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9335 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9336
4adacf57
UD
93372003-03-02 Ulrich Drepper <drepper@redhat.com>
9338
1be3d664
UD
9339 * sysdeps/pthread/timer_create.c (timer_create): Return correct
9340 error for CPU clocks.
9341
885bafa1
UD
9342 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9343 _POSIX_MONOTONIC_CLOCK.
9344 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9345
4adacf57
UD
9346 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9347 recent kernels.
9348
86bfff4d
UD
93492003-03-01 Ulrich Drepper <drepper@redhat.com>
9350
9351 * descr.h (struct pthread): Move cleanup field to the front.
9352
d1149385
RM
93532003-03-01 Roland McGrath <roland@redhat.com>
9354
9355 * sem_open.c (sem_open): Braino fix.
9356
bd8bb78b
UD
93572003-03-01 Ulrich Drepper <drepper@redhat.com>
9358
748bec08
UD
9359 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9360 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9361 __pthread_cleanup_pop functionality.
9362 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9363
bd8bb78b
UD
9364 * descr.h (struct pthread): Move tid field to the front now that
9365 it is often used.
9366
9367 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9368 (__lll_mutex_timedlock_wait): Remove.
9369 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9370 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9371 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9372 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9373 (lll_unlock_wake_cb): Don't save and restore %esi.
9374 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9375 %esi.
9376 (__lll_timedwait_tid): Add alignment.
9377 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9378 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9379 %esi.
9380 (__lll_timedwait_tid): Removed.
9381 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9382 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9383 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9384 (pthread_barrier_wait): Don't save, load, and restore %esi for
9385 last thread.
9386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9387 (__pthread_cond_signal): Don't save, load, and restore %esi.
9388 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9389 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9390 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9391 Don't save, load, and restore %esi.
9392
d2637c70
UD
93932003-02-27 Ulrich Drepper <drepper@redhat.com>
9394
567fb22a
UD
9395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9396 Release lock before waking up the waiters.
9397
427f5fa1
UD
9398 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9399
a2d83cfb
UD
9400 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9401 (reader_thread): Likewise.
9402
d2637c70
UD
9403 * sysdeps/pthread/pthread_rwlock_unlock.c
9404 (__pthread_rwlock_unlock): Release internal lock early. Don't try
9405 to wake up readers if there are none.
9406
9407 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9408 Release internal lock before wake threads.
9409
b1531183
UD
94102003-02-26 Ulrich Drepper <drepper@redhat.com>
9411
dbf6131c
UD
9412 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9413 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
9414 predefined.
9415 * tst-rwlock9.c: Likewise.
9416 * tst-rwlock10.c: New file.
9417 * tst-rwlock11.c: New file.
9418
695799fe
UD
9419 * Makefile (tests): Add tst-dlsym1.
9420 * tst-dlsym1.c: New file.
9421
b1531183
UD
9422 * init.c (__pthread_initialize_minimal_internal): Set
9423 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9424 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9425
3724f268
UD
94262003-02-24 Ulrich Drepper <drepper@redhat.com>
9427
3857ca78
UD
9428 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9429
80d80779
UD
9430 * tst-cond2.c: Fix sychronization with child.
9431
86371308
UD
9432 * tst-rwlock8.c (reader_thread): Remove unused variable.
9433
ffeb4481
UD
9434 * Makefile: Add rules to build and run tst-tls3.
9435 * tst-tls3.c: New file.
9436 * tst-tls3mod.c: New file.
9437
3724f268
UD
9438 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9439 * tst-rwlock8.c: New file.
9440 * tst-rwlock9.c: New file.
9441 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9442 complete broken rwlock implementation.
9443 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9444 Likewise.
9445 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9446 Likewise.
9447 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9448 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
9449 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9450 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9451 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9452 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9453 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 9454
8915cc40
RM
94552003-02-23 Roland McGrath <roland@redhat.com>
9456
9457 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9458
fd1a0d0c
UD
94592003-02-23 Ulrich Drepper <drepper@redhat.com>
9460
ecf28959
UD
9461 * Makefile (tests): Add tst-context1.
9462 * tst-context1.c: New file.
9463
5e47b76b
UD
9464 * Makefile (tests): Add tst-tls1 and tst-tls2.
9465 * tst-tls1.c: New file.
9466 * tst-tls2.c: New file.
9467
5a6bbb41
UD
9468 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9469 for failed cmpxchg.
9470
fd1a0d0c
UD
9471 * pthread_create.c (start_thread): Set EXITING_BIT early.
9472
9473 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9474 (THREAD_GETMEM_NC): Likewise.
9475
757f9fcb
UD
94762003-02-22 Ulrich Drepper <drepper@redhat.com>
9477
b1b8e747
UD
9478 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9479 off 3 more bytes by using offset-less instructions when possible.
9480
c780aa21 9481 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
9482
9483 * eintr.c (eintr_source): Add unnecessary return but the compiler
9484 insists.
9485
9486 * tst-kill3.c: Include <unistd.h>.
9487
5148559c
RM
94882003-02-21 Roland McGrath <roland@redhat.com>
9489
9490 * pthread_create.c (start_thread): Call __libc_thread_freeres.
9491
ab2d98e3
UD
94922003-02-21 Ulrich Drepper <drepper@redhat.com>
9493
71028edd
UD
9494 * Makefile (tests): Add tst-eintr1.
9495 (distribute): Add eintr.c.
9496 * tst-eintr1.c: New file.
9497 * eintr.c: New file.
9498
e814f748
UD
9499 * pthread_cancel.c (pthread_cancel): Use tkill directly.
9500
9501 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9502 Disallow sending SIGCANCEL.
9503
ab2d98e3 9504 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 9505 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
9506 * tst-kill1.c: New file.
9507 * tst-kill2.c: New file.
9508 * tst-kill3.c: New file.
9509 * tst-kill5.c: New file.
9c03686d 9510 * tst-kill6.c: New file.
e814f748
UD
9511 * tst-basic7.c: Renamed to...
9512 * tst-kill4.c: ...this.
ab2d98e3 9513
59fed0e2
RM
95142003-02-21 Roland McGrath <roland@redhat.com>
9515
9516 * Makefile (install-lib-ldscripts): New variable.
9517
49dc759f
UD
95182003-02-21 Ulrich Drepper <drepper@redhat.com>
9519
8c2e9a29
UD
9520 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9521 * pthread_cancel.c: Use INVALID_TD_P.
9522 * pthread_detach.c: Likewise.
9523 * pthread_getschedparam.c: Likewise.
9524 * pthread_setschedparam.c: Likewise.
9525 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9526 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9527 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9528 * pthread_timedjoin.c: Likewise.
9529
9530 * tst-basic7.c: Include <signal.h>.
9531
49dc759f
UD
9532 * pthread_join.c (pthread_join): Limited checking for invalid
9533 descriptors.
9534 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9535
df5803bf
UD
95362003-02-20 Ulrich Drepper <drepper@redhat.com>
9537
c5acd3d7
UD
9538 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9539 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
9540 * Makefile (tests): Add tst-key4.
9541 * tst-key4.c: New file.
9542
729924a0
UD
95432003-02-18 Ulrich Drepper <drepper@redhat.com>
9544
2f7dc594
UD
9545 * Makefile (tests): Add tst-basic7.
9546 * tst-basic7.c: New file.
9547
ba25bb0f
UD
9548 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9549 Add some more __builtin_expect.
9550
12fd3c5f 9551 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 9552
5430d926
UD
95532003-02-17 Ulrich Drepper <drepper@redhat.com>
9554
b0db7fbe
UD
9555 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9556 _POSIX_THREAD_PRIORITY_SCHEDULING.
9557 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9558 _XOPEN_REALTIME_THREADS.
9559 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9560
9561 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9562 kernel returns EINVAL for PID <= 0, work around it.
9563
ecfda9bd
UD
9564 * Makefile (tests): Add tst-signal5.
9565 * tst-signal5.c: New file.
9566
7d78ab99
UD
9567 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9568 and LOGIN_NAME_MAX.
9569
371a2972
UD
9570 * tst-cancel1.c (tf): Block all signals.
9571
5430d926
UD
9572 * Makefile (tests): Add tst-basic6.
9573 * tst-basic6.c: New file.
9574
9575 * tst-basic1.c: Add test for process ID.
9576
9577 * Makefile (tests): Add tst-cancel10.
9578 * tst-cancel10.c: New file.
9579
9580 * Makefile (tests): Add tst-signal4.
9581 * tst-signal4.c: New file.
9582
9583 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9584 __sigismember instead of sigismember. Add __builtin_expect.
9585
1564916a
UD
95862003-02-16 Ulrich Drepper <drepper@redhat.com>
9587
179ff175
UD
9588 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9589 pthread_setcancelstate, and pthread_rwlock_setpshared.
9590
e4335f9a
UD
9591 * tst-cancel7.c (do_test): Make sure the pid file exists before
9592 canceling the thread.
9593
0a37669a
UD
9594 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9595 pthread_rwlock_timedrdlock tests.
9596 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9597 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9598 Check for invalid tv_nsec field.
9599 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9600 Likewise.
9601
9602 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9603 recursive mutex of overflow.
9604
9605 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9606
e4335f9a 9607 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
9608 going into an endless loop.
9609 * Makefile (tests): Add tst-cancel9.
9610 * tst-cancel9.c: New file.
9611
9612 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9613
b270b548
UD
96142003-02-15 Ulrich Drepper <drepper@redhat.com>
9615
1c82b97f
UD
9616 * tst-mutex5.c (do_test): Add more timedlock tests.
9617
b2f05465 9618 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
9619 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9620
e798b60f
UD
9621 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9622 use INLINE_SYSCALL. Error number is returned, not -1.
9623
90491dc4
UD
9624 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9625 and __deallocate_stack with internal_function.
9626 * pthread_create.c: Adjust definitions appropriately.
9627 * allocatestack.c: Likewise.
9628
9629 * pthread_join.c: Add one more __builtin_expect.
9630 * pthread_timedjoin.c: Likewise.
9631
9632 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9633 not data of sequence number does not match.
9634 Add one __builtin_expect.
9635
c6247c9d
UD
9636 * Makefile (tests): Add tst-clock1.
9637 * tst-clock1.c: New file.
9638
b270b548
UD
9639 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9640 negative arguments.
9641 * Makefile (tests): Add tst-basic5.
9642 * tst-basic5.c: New file.
9643
700bf7af
UD
96442003-02-14 Ulrich Drepper <drepper@redhat.com>
9645
757de559
UD
9646 * Makefile (tests): Add tst-basic4.
9647 * tst-basic4.c: New file.
9648
47202270
UD
9649 * pthreadP.h: Add declaraction for __nptl_nthreads.
9650 * pthread_create.c: Define __nptl_nthreads
9651 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 9652 after thread is done. If then zero, call exit(0).
47202270
UD
9653 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9654 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9655 * init.c (pthread_functions): Initialize ptr_nthreads.
9656 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9657 (__reclaim_stacks): Decrement __nptl_nthreads.
9658 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9659 Define.
9660 * Makefile (tests): Add tst-basic3.
9661 * tst-basic3.c: New file.
9662
e320ef46
UD
9663 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9664 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9665 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9666 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9667 if asynchronous canceling is enabled.
9668 * pthread_join.c (pthread_join): When recognizing circular joins,
9669 take into account the other thread might be already canceled.
9670 * Makefile (tests): Add tst-join5.
9671 * tst-join5.c: New file.
9672
700bf7af
UD
9673 * Makefile (tests): Add tst-join4.
9674 * tst-join4.c: New file.
9675
96762003-02-13 Ulrich Drepper <drepper@redhat.com>
9677
9678 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9679
dac0f772
UD
96802003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9681
9682 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9683 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9684 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9685 warning.
9686 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9687 to avoid warning.
9688 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9689 error if lll_futex_wake failed.
9690
e8cda341
UD
96912003-02-13 Ulrich Drepper <drepper@redhat.com>
9692
a7720b5e
UD
9693 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9694 handling of cancellation and failung pthread_mutex_unlock call.
9695 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9696 * Makefile (tests): Add tst-cond8 and tst-cond9.
9697 * tst-cond8.c: New file.
9698 * tst-cond9.c: New file.
9699
a1ea4c06
UD
9700 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9701
9702 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9703 non-standard initializers with __USE_GNU.
9704
e8cda341
UD
9705 * Makefile (tests): Add tst-cleanup3.
9706 * tst-cleanup3.c: New file.
9707
2067577c
UD
97082003-02-12 Ulrich Drepper <drepper@redhat.com>
9709
89e78a95
UD
9710 * Makefile (tests): Add tst-attr1 and tst-attr2.
9711 * tst-attr1.c: New file.
9712 * tst-attr2.c: New file.
9713
dfdd294a
UD
9714 * Makefile: Add rules to build and run tst-atfork2 test.
9715 * tst-atfork2.c: New file.
9716 * tst-atfork2mod.c: New file.
9717
9718 * sysdeps/unix/sysv/linux/unregister-atfork.c
9719 (__unregister_atfork): Free the memory allocated for the handlers
9720 after removing them from the lists.
9721
9722 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9723 cleanup function.
9724
9725 * tst-atfork1.c (do_test): Wait for the child we forked.
9726 Report error in child.
9727
9728 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9729
2067577c
UD
9730 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9731
2a8a8a84
UD
97322003-02-10 Ulrich Drepper <drepper@redhat.com>
9733
d9dd121e
UD
9734 * Makefile (tests): Add tst-cancel8.
9735 * tst-cancel8.c: New file.
9736
2a8a8a84
UD
9737 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9738 clearing of control variable.
defd1870 9739 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 9740 * tst-once3.c: New file.
defd1870 9741 * tst-once4.c: New file.
2a8a8a84 9742
a54e8d33
UD
97432003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9744
9745 * sysdeps/sh/Makefile: New file.
9746 * sysdeps/sh/bits/atomic.h: New file.
9747 * sysdeps/sh/pthread_spin_init.c: New file.
9748 * sysdeps/sh/pthread_spin_lock.c: New file.
9749 * sysdeps/sh/pthread_spin_trylock.S: New file.
9750 * sysdeps/sh/pthread_spin_unlock.S: New file.
9751 * sysdeps/sh/pthreaddef.h: New file.
9752 * sysdeps/sh/tcb-offsets.sym: New file.
9753 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9754 * sysdeps/sh/tls.h: New file.
9755 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9756 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9757 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9758 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9759 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9760 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9761 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9762 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9763 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9764 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9765 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9766 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9767 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9768 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9769 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9770 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9771 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9772 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9773 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9774 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9775 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9776 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9777 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9778 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9779 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9780 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9781 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9782 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9783 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9784 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9785
696e556e
UD
97862003-02-08 Ulrich Drepper <drepper@redhat.com>
9787
9788 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9789 according to POSIX.
9790
9791 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9792
fef710d6
UD
97932003-02-07 Ulrich Drepper <drepper@redhat.com>
9794
c6180643
UD
9795 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9796 (TLS_GET_FS): New #define.
9797 (TLS_SET_FS): New #define.
9798 Correct value of __NR_set_thread_area.
9799
fef710d6
UD
9800 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9801
11090a99
UD
98022003-02-06 Ulrich Drepper <drepper@redhat.com>
9803
65c68990
UD
9804 * Makefile (tests): Add tst-popen1.
9805 * tst-popen1.c: New file.
9806
11090a99
UD
9807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9808 but inactive generalization.
9809 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9811 Minor optimization, remove one instruction.
9812 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9813
a88c9263
UD
98142003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9815
9816 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9817
98182003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9819
9820 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9821 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9822 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9823 * sysdeps/pthread/pthread_cond_signal.c: New file.
9824 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9825 * sysdeps/pthread/pthread_cond_wait.c: New file.
9826 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9827 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9828 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9829 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9830 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9831 * sysdeps/s390/Makefile: New file.
9832 * sysdeps/s390/bits/atomic.h: New file.
9833 * sysdeps/s390/pthread_spin_init.c: New file.
9834 * sysdeps/s390/pthread_spin_lock.c: New file.
9835 * sysdeps/s390/pthread_spin_trylock.c: New file.
9836 * sysdeps/s390/pthread_spin_unlock.c: New file.
9837 * sysdeps/s390/pthreaddef.h: New file.
9838 * sysdeps/s390/tcb-offsets.sym: New file.
9839 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9840 * sysdeps/s390/tls.h: New file.
9841 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9842 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9843 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9844 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9845 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9846 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9847 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9848 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9849 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9850 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9851 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9852 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9853 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9854 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9855 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9856 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9857 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9858 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9859 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9860 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9861 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9862 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9863 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9864
6f1cff95
UD
98652003-02-04 Ulrich Drepper <drepper@redhat.com>
9866
ec609a8e
UD
9867 * atomic.h: Add a couple more default implementations.
9868 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
9869 __arch_compare_and_exchange_32_acq in return value definition. It
9870 always exists.
9871 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 9872 Add missing atomic_ prefixes.
e3ec8904 9873
6f1cff95
UD
9874 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9875 thread library is available, use correct value to mark initialized
9876 once variable.
9877
4f088329
UD
98782003-02-03 Ulrich Drepper <drepper@redhat.com>
9879
6f1cff95
UD
9880 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9881 __sysconf to determine pagesize.
9882
3e4fc359 9883 * pthread_create.c: Include <atomic.h>.
4f088329
UD
9884 * allocatestack.c (allocate_stack): Implement coloring of the
9885 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9886 size minus one. Adjust users.
3e4fc359 9887 * sysdeps/i386/i686/Makefile: New file.
4f088329 9888
2f42e8be
UD
98892003-02-02 Ulrich Drepper <drepper@redhat.com>
9890
4301f7e2
UD
9891 * allocatestack.c: Improve comment throughout the file.
9892
2f42e8be 9893 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 9894 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
9895 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9896 (__lll_lock_wait): Likewise.
9897 (lll_unlock_wake_cb): Removed.
9898
4a7d6545
UD
98992003-01-31 Ulrich Drepper <drepper@redhat.com>
9900
9901 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9902 _POSIX_THREAD_PRIORITY_SCHEDULING.
9903
886d5973
UD
99042003-01-30 Jakub Jelinek <jakub@redhat.com>
9905
9906 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9907 Fix return type of ptr___pthread_getspecific.
9908
e474ca78
UD
99092003-01-29 Ulrich Drepper <drepper@redhat.com>
9910
9911 * Makefile (tests): Add tst-umask1.
9912 (tst-umask1-ARGS): Define.
9913 * tst-umask1.c: New file.
9914
e6ebd2e4
UD
99152003-01-28 Ulrich Drepper <drepper@redhat.com>
9916
6cf26f41
UD
9917 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9918 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9919 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9920 pthread_rwlock_unlock.
9921 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9922 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9923 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9924 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9925 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9926 New file.
9927 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9928 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9929 New file.
9930 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9931 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9932 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9933 New file.
9934 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9935 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9936 New file.
9937 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9938 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9939 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9940 New file.
9941 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9942 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9943 New file.
9944 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9945
1d087a7e
UD
9946 * Makefile (libpthread-routines): Remove lowlevelcond and
9947 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9948 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9949 and pthread_cond_broadcast.
4a99d160
UD
9950 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9951 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9952 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9953 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9954 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9955 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9956 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9957 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9958 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9959 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9960 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9961 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9962 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9963 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9964 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9965 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9966 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9967 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9968 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9969 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9970 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9971 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9972 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9973 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9974 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9975 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9976 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9977 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9978 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9979 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9980 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 9981
e6ebd2e4
UD
9982 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9983 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9984 of the code is moved to ...
9985 * sysdeps/pthread/createthread.c: ...here. New file.
9986
a15698cb
UD
99872003-01-27 Ulrich Drepper <drepper@redhat.com>
9988
0566b130
UD
9989 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9990 (__new_sem_post): Clear %eax before returning.
9991 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9992
e6fb8846
UD
9993 * Makefile (tests): Add tst-cleanup2.
9994 * tst-cleanup2.c: New file.
9995
a15698cb
UD
9996 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9997 Interpret first parameter correctly.
9998
8824b0a1
UD
99992003-01-17 Ulrich Drepper <drepper@redhat.com>
10000
10001 * Makefile (headers): Add bits/semaphore.h.
10002
850dcfca
UD
100032003-01-16 Jakub Jelinek <jakub@redhat.com>
10004
10005 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10006 if not SHARED.
10007
574b892e
UD
100082003-01-14 Ulrich Drepper <drepper@redhat.com>
10009
a8d87c92
UD
10010 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10011 must be used and mapping failed.
10012 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10013
574b892e
UD
10014 * Makefile (CFLAGS-pthread_self.os): Define this, not
10015 CFLAGS-pthread_self.c.
10016
fb48047a
UD
100172003-01-13 Ulrich Drepper <drepper@redhat.com>
10018
47805511
UD
10019 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10020 lll_unlock_wake_cb.
10021
fb48047a
UD
10022 * Makefile (libpthread-routines): Add version. Add rules to build
10023 version.os and banner.h.
10024 * version.c: New file.
10025
115bb61d
UD
100262003-01-13 Jakub Jelinek <jakub@redhat.com>
10027
10028 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10029 the alias unconditional.
10030 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10031
100322003-01-13 Ulrich Drepper <drepper@redhat.com>
10033
10034 * Makefile (CFLAGS-pthread_self.c): New definition.
10035
6aca81bb
UD
100362003-01-06 Jakub Jelinek <jakub@redhat.com>
10037
10038 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10039 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10040 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10041 * init.c (__pthread_initialize_minimal_internal): Likewise.
10042
e9c7764e
UD
100432003-01-07 Jakub Jelinek <jakub@redhat.com>
10044
b5facfda
UD
10045 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10046
e9c7764e
UD
10047 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10048 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10049 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10050 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10051 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10052 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10053
bef1e42f
UD
100542003-01-06 Jakub Jelinek <jakub@redhat.com>
10055
10056 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10057 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10058 * tst-cancel-wrappers.sh: Remove all exceptions.
10059
bbd17455
UD
100602003-01-05 Ulrich Drepper <drepper@redhat.com>
10061
a73ab6df
UD
10062 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10063 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10064
bbd17455
UD
10065 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10066 Use __libc_pthread_functions array if SHARED.
10067
10068 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10069 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10070
10071 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10072 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10073 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10074 __libc_ptf_call instead of __libc_maybe_call.
10075 (PTF): New #define.
10076 (__libc_cleanup_region_start): Wrap function name with PTF call.
10077 (__libc_cleanup_region_end): Likewise.
10078 (__libc_cleanup_end): Likewise.
10079
10080 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10081 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10082 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10083 * pthreadP.h: Add prototypes.
10084
10085 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10086 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10087 __pthread_rwlock_unlock aliases.
10088 * pthreadP.h: Add prototypes for new aliases.
10089
10090 * pthreadP.h (struct pthead_functions): Moved to...
10091 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10092 * init.c (pthread_functions): Add initializers for new elements.
10093
10094 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10095 __pthread_cleanup_pop_restore aliases.
10096 * pthreadP.h: Add prototypes.
10097
10098 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10099 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10100 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10101 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10102 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10103 * pthreadP.h: Adjust prototypes and callers.
10104
d27a78be
UD
101052003-01-04 Ulrich Drepper <drepper@redhat.com>
10106
b74121ae
UD
10107 * Makefile (tests): Add tst-cancel7.
10108 (tst-cancel7-ARGS): New variable.
bbd17455 10109 * tst-cancel7.c: New file.
b74121ae 10110
29bc410c
UD
10111 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10112 around gcc defficiencies.
10113 * old_pthread_cond_signal.c: Likewise.
10114 * old_pthread_cond_timedwait.c: Likewise.
10115 * old_pthread_cond_wait.c: Likewise.
10116
d27a78be
UD
10117 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10118
733f25e6
UD
101192003-01-03 Ulrich Drepper <drepper@redhat.com>
10120
7edb2ae3
UD
10121 * Makefile (tests): Add tst-cond7.
10122 * tst-cond7.c: New file.
10123
b1151300
UD
10124 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10125 (condvar_cleanup): Get condvar address from the right place.
10126
733f25e6
UD
10127 * atomic.h: Correct definitions of atomic_full_barrier,
10128 atomic_read_barrier, atomic_write_barrier.
10129
10130 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10131 race-free.
10132 * old_pthread_cond_signal.c: Likewise.
10133 * old_pthread_cond_timedwait.c: Likewise.
10134 * old_pthread_cond_wait.c: Likewise.
10135
686b7223
UD
101362003-01-03 Jakub Jelinek <jakub@redhat.com>
10137
10138 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10139
0e07706e
UD
101402003-01-03 Ulrich Drepper <drepper@redhat.com>
10141
997256dd
UD
10142 * pthreadP.h (pthread_cond_2_0_t): New type.
10143 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10144 Use new type for the 2.0 condvar function prototypes.
10145 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10146 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10147 parameter.
10148 * old_pthread_cond_destroy.c: Likewise.
10149 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
10150 * old_pthread_cond_signal.c: Likewise.
10151 * old_pthread_cond_timedwait.c: Likewise.
10152 * old_pthread_cond_wait.c: Likewise.
10153
842d2817
UD
10154 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10155 (__pthread_cond_wait): Don't save cancellation mode and seq value
10156 in same location.
10157
0e07706e
UD
10158 * herrno.c (__h_errno_location): Don't define as weak.
10159
bf293afe
UD
101602003-01-02 Jakub Jelinek <jakub@redhat.com>
10161
10162 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10163 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10164 and pthread_cond_wait.
10165 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10166 Renamed to...
10167 (__pthread_cond_broadcast_2_0): ... this.
10168 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10169 Renamed to...
10170 (__pthread_cond_destroy_2_0): ... this.
10171 * old_pthread_cond_init.c (__old_pthread_cond_init):
10172 Renamed to...
10173 (__pthread_cond_init_2_0): ... this.
10174 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10175 Renamed to...
10176 (__pthread_cond_signal_2_0): ... this.
10177 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10178 Renamed to...
10179 (__pthread_cond_wait_2_0): ... this.
10180 * pthread_cond_destroy.c: Include shlib-compat.h.
10181 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10182 * pthread_cond_init.c: Include shlib-compat.h.
10183 (pthread_cond_init): Change strong_alias into versioned_symbol.
10184 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10185 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10186 fields.
10187 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10188 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10189 __pthread_cond_wait_2_0): New prototypes.
10190 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10191 __old_pthread_cond_init, __old_pthread_cond_signal,
10192 __old_pthread_cond_wait): Removed.
10193 * init.c: Include shlib-compat.h.
10194 (pthread_functions): Guard ptr___pthread_attr_init_2_0
10195 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10196 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10197 ptr___pthread_cond_*_2_0 fields.
10198 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10199 pthread_cond_*@GLIBC_2.0 compatibility symbols.
10200
10201 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10202 LIBC_SIGACTION was not yet defined.
10203 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10204 [!defined LIBC_SIGACTION] (__sigaction): New function and
10205 libc_hidden_weak.
10206 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10207 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10208
102092003-01-02 Jakub Jelinek <jakub@redhat.com>
10210
10211 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10212
05df18c3
UD
102132003-01-02 Ulrich Drepper <drepper@redhat.com>
10214
10215 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10216 New, larger type definition.
10217 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10218 implementation.
10219 * Versions [libpthread]: Add definitions for new pthread_cond_*
10220 interfaces for version GLIBC_2.3.2.
10221 * pthread_cond_init.c: Update initialization for new type definition.
10222 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10223 pthread_cond_timedwait, pthread_cond_signal, and
10224 pthread_cond_broadcast. Add old_pthread_cond_init,
10225 old_pthread_cond_destroy, old_pthread_cond_wait,
10226 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10227 old_pthread_cond_broadcast.
10228 * old_pthread_cond_broadcast.c: New file.
10229 * old_pthread_cond_destroy.c: New file.
10230 * old_pthread_cond_init.c: New file.
10231 * old_pthread_cond_signal.c: New file.
10232 * old_pthread_cond_timedwait.c: New file.
10233 * old_pthread_cond_wait.c: New file.
10234 * pthreadP.h: Add prototypes for the compatibility interfaces.
10235
10236 * pthread_cond_destroy.c: Don't include <errno.h>.
10237
fd8979e4
UD
102382003-01-01 Ulrich Drepper <drepper@redhat.com>
10239
10240 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10241 unnecessary zero offset when addressing MUTEX.
10242
6d6ee629
UD
102432002-12-31 Ulrich Drepper <drepper@redhat.com>
10244
10245 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10246 __register_atfork.
10247 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10248 for __register_atfork.
10249
a4baf360
UD
102502002-12-31 Jakub Jelinek <jakub@redhat.com>
10251
10252 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10253 instead of ASSEMBLER test macro.
10254
10255 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10256 __libc_current_sigrtmax): Add libc_hidden_def.
10257
10258 * sysdeps/pthread/list.h: Remove assert.h include.
10259
e9395a94
UD
102602002-12-31 Ulrich Drepper <drepper@redhat.com>
10261
10262 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10263 __pthread_initialize_minimal_internal not
10264 __pthread_initialize_minimal.
10265
89d6e444
UD
102662002-12-30 Ulrich Drepper <drepper@redhat.com>
10267
416d2de6
UD
10268 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10269 __pthread_initialize_minimal as hidden.
10270
89d6e444
UD
10271 * init.c (__pthread_initialize_minimal_internal): Don't mark as
10272 constructor.
10273
102742002-12-31 Jakub Jelinek <jakub@redhat.com>
10275
10276 * Makefile ($(inst_libdir)/libpthread.so): Depend on
10277 $(common-objpfx)format.lds, include that into the output script.
10278 Fix comment.
10279 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10280
8cac677c
UD
102812002-12-28 Andreas Jaeger <aj@suse.de>
10282
10283 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10284 nsec resolution changes.
10285 (xstat64_conv): Likewise.
10286 (xstat32_conv): Likewise.
10287 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10288 struct kernel_stat.
10289 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10290 structs stat and stat64.
10291 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 10292 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 10293
49e9f864
UD
102942002-12-30 Jakub Jelinek <jakub@redhat.com>
10295
10296 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
10297 argument.
10298 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10299 (pthread_exit): Use strong_alias to avoid warnings.
10300 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10301 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10302 ptr___pthread_attr_init_2_*.
10303 * init.c (pthread_functions): Adjust.
10304
bab09b26
UD
103052002-12-29 Ulrich Drepper <drepper@redhat.com>
10306
598d7a42
UD
10307 * forward.c: Make all functions available by default again. It
10308 caused too much trouble.
10309
bab09b26
UD
10310 * pt-siglongjmp.c: Removed.
10311
3b7ed871
UD
103122002-12-28 Jakub Jelinek <jakub@redhat.com>
10313
10314 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10315 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10316 * sysdeps/i386/Makefile: New file.
10317 * sysdeps/i386/tcb-offsets.sym: New file.
10318 * sysdeps/pthread/tcb-offsets.h: New file.
10319 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10320 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10321
10322 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10323 __register_atfork...
10324 (GLIBC_2.3.2): ...here.
10325
103262002-12-28 Ulrich Drepper <drepper@redhat.com>
10327
10328 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10329 pthread_attr_setstackaddr with __attribute_deprecated__.
10330
270d9d47
UD
103312002-12-27 Jakub Jelinek <jakub@redhat.com>
10332
10333 * pt-system.c (system): Remove cancellation handling.
10334 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10335 cancellation routines.
10336
131fd126
UD
103372002-12-28 Ulrich Drepper <drepper@redhat.com>
10338
afb2e954
UD
10339 * descr.h: Include <dl-sysdep.h>.
10340 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
10341 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10342 (MULTIPLE_THREADS_OFFSET): Adjust offset.
10343 (SYSINFO_OFFSEET): Likewise.
10344
103452002-12-27 Jakub Jelinek <jakub@redhat.com>
10346
10347 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10348 Define.
10349 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10350 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10351 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10352 (USE_DL_SYSINFO): Undef.
10353
103542002-12-22 Jakub Jelinek <jakub@redhat.com>
10355
10356 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10357 $(common-objpfx)libc.so.
10358 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10359 it is bigger than pipe buffer size even on arches with bigger
10360 page size.
10361 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10362
a218c9cf
UD
103632002-12-25 Ulrich Drepper <drepper@redhat.com>
10364
10365 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10366 correct errno access for case that USE___THREAD is not defined.
10367
015a2dc9
UD
103682002-12-24 Ulrich Drepper <drepper@redhat.com>
10369
10370 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10371 Patch by Marijn Ros <marijn@mad.scientist.com>.
10372
5220f9ac
RM
103732002-12-22 Roland McGrath <roland@redhat.com>
10374
10375 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10376
1561bf63
UD
103772002-12-20 Ulrich Drepper <drepper@redhat.com>
10378
10379 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10380
3325198e
UD
103812002-12-19 Ulrich Drepper <drepper@redhat.com>
10382
057c823f
UD
10383 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10384 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10385 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10386
097eca29
UD
10387 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10388 of int $0x80.
10389 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10390 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10391 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10392 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10393 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10394 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10395 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10396 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10397
10398 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10399 sysenter.
10400 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10401
10402 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10403
5f5843e3
UD
10404 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10405 in new TCB.
10406 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10407 that sysinfo is properly initialized.
10408 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10409 to 1 only for ld.so.
10410
3325198e
UD
10411 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10412 RTLD_CORRECT_DYNAMIC_WEAK.
10413
74e8f2dc
UD
104142002-12-19 Jakub Jelinek <jakub@redhat.com>
10415
10416 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10417 Use return 0 as 6th argument to FORWARD4.
10418 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10419
df45b31e
UD
104202002-12-18 Ulrich Drepper <drepper@redhat.com>
10421
10422 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10423 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10424 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10425 (INIT_SYSINFO): New #define.
10426 (TLS_TP_INIT): Use INIT_SYSINFO.
10427 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10428 At test to make sure SYSINFO_OFFSET value is correct.
10429 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10430
3d539579
UD
104312002-12-18 Jakub Jelinek <jakub@redhat.com>
10432
10433 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10434 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10435 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10436 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10437 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10438 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10439 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10440
d7913e0e
UD
104412002-12-18 Ulrich Drepper <drepper@redhat.com>
10442
f051627f
UD
10443 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10444 macro instead of using int $0x80 directly.
10445
d7913e0e
UD
10446 * sysdeps/pthread/bits/stdio-lock.h: New file.
10447 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10448 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10449 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10450 * Makefile (routines): Add libc-lowlevelmutex.
10451
10452 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10453 __i686.get_pc_thunk.dx.
10454
f077a4a9
UD
104552002-12-17 Jakub Jelinek <jakub@redhat.com>
10456
10457 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10458 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10459 ($(objpfx)tst-cancel-wrappers.out): New rule.
10460 * tst-cancel-wrappers.sh: New test.
10461 * tst-locale1.c: Include signal.h.
10462 (uselocale): Test static linking of __libc_current_sigrt*.
10463
104642002-12-17 Ulrich Drepper <drepper@redhat.com>
10465
10466 * Makefile (tests): Add tst-cancel6.
10467 * tst-cancel6.c: New file
10468
bd499a3b
UD
104692002-12-17 Jakub Jelinek <jakub@redhat.com>
10470
10471 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10472 Define meaningfully for assembler as well.
10473 * pthreadP.h (struct pthread_functions): Remove
10474 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
10475 and ptr_pthread_attr_init_2_1 fields.
10476 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10477 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10478 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10479 (FORWARD3): Define using FORWARD4.
10480 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10481 versions.
10482 * pt-system.c: Remove duplicate stdlib.h include.
10483
0a1063f4
UD
104842002-12-16 Ulrich Drepper <drepper@redhat.com>
10485
87d60668
UD
10486 * sem_init.c: Define sem_init@GLIBC_2.0.
10487 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10488 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10489
0a1063f4
UD
10490 * flockfile.c: Moved to...
10491 * sysdeps/pthread/flockfile.c: ...here. New file.
10492 * funlockfile.c: Moved to...
10493 * sysdeps/pthread/funlockfile.c: ...here. New file.
10494 * ftrylockfile.c: Moved to...
10495 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
10496
9634cf9d
UD
104972002-12-16 Jakub Jelinek <jakub@redhat.com>
10498
10499 * libc-cancellation.c: Guard both function with
10500 #if !defined NOT_IN_libc.
10501 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10502 automatically provided pthread wrappers.
10503 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10504 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10505 nor in libpthread.
10506 * pt-open.c: Removed.
10507 * pt-fcntl.c: Removed.
10508 * pt-fsync.c: Removed.
10509 * pt-lseek.c: Removed.
10510 * pt-msgrcv.c: Removed.
10511 * pt-msgsnd.c: Removed.
10512 * pt-msync.c: Removed.
10513 * pt-nanosleep.c: Removed.
10514 * pt-open64.c: Removed.
10515 * pt-pause.c: Removed.
10516 * pt-pread.c: Removed.
10517 * pt-pread64.c: Removed.
10518 * pt-pwrite.c: Removed.
10519 * pt-pwrite64.c: Removed.
10520 * pt-read.c: Removed.
10521 * pt-recv.c: Removed.
10522 * pt-recvfrom.c: Removed.
10523 * pt-recvmsg.c: Removed.
10524 * pt-send.c: Removed.
10525 * pt-sendto.c: Removed.
10526 * pt-sigtimedwait.c: Removed.
10527 * pt-sigwait.c: Removed.
10528 * pt-wait.c: Removed.
10529 * pt-waitpid.c: Removed.
10530 * pt-write.c: Removed.
10531 * pt-accept.c: Removed.
10532 * pt-close.c: Removed.
10533 * pt-connect.c: Removed.
10534 * pt-lseek64.c: Removed.
10535 * pt-sendmsg.c: Removed.
10536 * pt-tcdrain.c: Removed.
10537
6ee8d334
UD
105382002-12-15 Ulrich Drepper <drepper@redhat.com>
10539
81fa9371
UD
10540 * init.c (__pthread_initialize_minimal_internal): Renamed from
10541 __pthread_initialize_minimal. Make old name an alias. This
10542 converts a normal relocation into a relative relocation.
10543
f3015aa5
UD
10544 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10545
4cbc1950
UD
10546 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10547 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10548 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10549 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10550 pt-sigwaitinfo, pt-waitid, and pt-writev.
10551 * pt-creat.c: Removed.
10552 * pt-poll.c: Removed.
10553 * pt-pselect.c: Removed.
10554 * pt-readv.c: Removed.
10555 * pt-select.c: Removed.
10556 * pt-sigpause.c: Removed.
10557 * pt-sigsuspend.c: Removed.
10558 * pt-sigwaitinfo.c: Removed.
10559 * pt-waitid.c: Removed.
10560 * pt-writev.c: Removed.
10561
8454830b
UD
10562 * init.c (pthread_functions): New variable.
10563 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10564 (or NULL) to __libc_pthread_init.
10565 * forward.c: Rewrite to use __libc:pthread_functions array to get
10566 function addresses.
10567 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10568 prototype.
10569 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10570 Take new parameter. Copy content of variable pointed to by it
10571 to __libc_pthread_init.
10572
10573 * pthreadP.h (struct pthread_functions): New type.
10574 (__libc_pthread_init): Declare.
10575
10576 * pthread_attr_destroy.c: Add namespace protected alias.
10577 * pthread_attr_getdetachstate.c: Likewise.
10578 * pthread_attr_getinheritsched.c: Likewise.
10579 * pthread_attr_getschedparam.c: Likewise.
10580 * pthread_attr_getschedpolicy.c: Likewise.
10581 * pthread_attr_getscope.c: Likewise.
10582 * pthread_attr_setdetachstate.c: Likewise.
10583 * pthread_attr_setinheritsched.c: Likewise.
10584 * pthread_attr_setschedparam.c: Likewise.
10585 * pthread_attr_setschedpolicy.c: Likewise.
10586 * pthread_attr_setscope.c: Likewise.
10587 * pthread_cond_broadcast.c: Likewise.
10588 * pthread_cond_destroy.c: Likewise.
10589 * pthread_cond_init.c: Likewise.
10590 * pthread_cond_signal.c: Likewise.
10591 * pthread_cond_wait.c: Likewise.
10592 * pthread_condattr_destroy.c: Likewise.
10593 * pthread_condattr_init.c: Likewise.
10594 * pthread_equal.c: Likewise.
10595 * pthread_exit.c: Likewise.
10596 * pthread_getschedparam.c: Likewise.
10597 * pthread_self.c: Likewise.
10598 * pthread_setcancelstate.c: Likewise.
10599 * pthread_setschedparam.c: Likewise.
10600 * pthread_mutex_destroy.c: Likewise.
10601 * pthread_mutex_init.c: Likewise.
10602 * pthreadP.h: Add prototypes for the aliases.
10603
0d5f4929
UD
10604 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10605 multiple_threads member in correct TCB to 1.
10606
6ee8d334
UD
10607 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10608 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10609 member of thread decriptor, otherwise return unconditionally 1.
10610
2fb6444d
UD
106112002-12-14 Ulrich Drepper <drepper@redhat.com>
10612
10613 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10614 regular Linux version. Remove file.
10615 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10616 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10617 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10618 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10619 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10620 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10621 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10622 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10623 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10624 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10625 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10626 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10627 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10628 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10629 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10630 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10631 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10632 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10633 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10634 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10635 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10636 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10637 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10638 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10639 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10640 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10641 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10642 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10643 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10644 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10645
86b2dc40
UD
106462002-12-14 Jakub Jelinek <jakub@redhat.com>
10647
10648 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10649 * sysdeps/unix/sysv/linux/open.c: Removed.
10650 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10651 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10652 * sysdeps/unix/sysv/linux/msync.c: Removed.
10653 * sysdeps/unix/sysv/linux/read.c: Removed.
10654 * sysdeps/unix/sysv/linux/close.c: Removed.
10655 * sysdeps/unix/sysv/linux/creat.c: Removed.
10656 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10657 * sysdeps/unix/sysv/linux/pause.c: Removed.
10658 * sysdeps/unix/sysv/linux/select.c: Removed.
10659 * sysdeps/unix/sysv/linux/write.c: Removed.
10660
9d263d72
UD
106612002-12-14 Ulrich Drepper <drepper@redhat.com>
10662
10663 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10664 element in TCB to see whether locking is needed.
10665
10666 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10667 MULTIPLE_THREADS_OFFSET value is correct.
10668
10669 * sysdeps/unix/sysv/linux/close.c: New file.
10670 * sysdeps/unix/sysv/linux/connect.S: New file.
10671 * sysdeps/unix/sysv/linux/creat.c: New file.
10672 * sysdeps/unix/sysv/linux/fsync.c: New file.
10673 * sysdeps/unix/sysv/linux/llseek.c: New file.
10674 * sysdeps/unix/sysv/linux/lseek.c: New file.
10675 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10676 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10677 * sysdeps/unix/sysv/linux/msync.c: New file.
10678 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10679 * sysdeps/unix/sysv/linux/open.c: New file.
10680 * sysdeps/unix/sysv/linux/open64.c: New file.
10681 * sysdeps/unix/sysv/linux/pause.c: New file.
10682 * sysdeps/unix/sysv/linux/poll.c: New file.
10683 * sysdeps/unix/sysv/linux/pread.c: New file.
10684 * sysdeps/unix/sysv/linux/pread64.c: New file.
10685 * sysdeps/unix/sysv/linux/pselect.c: New file.
10686 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10687 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10688 * sysdeps/unix/sysv/linux/readv.c: New file.
10689 * sysdeps/unix/sysv/linux/recv.S: New file.
10690 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10691 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10692 * sysdeps/unix/sysv/linux/select.c: New file.
10693 * sysdeps/unix/sysv/linux/send.S: New file.
10694 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10695 * sysdeps/unix/sysv/linux/sendto.S: New file.
10696 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10697 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10698 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10699 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10700 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10701 * sysdeps/unix/sysv/linux/system.c: New file.
10702 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10703 * sysdeps/unix/sysv/linux/wait.c: New file.
10704 * sysdeps/unix/sysv/linux/waitid.c: New file.
10705 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10706 * sysdeps/unix/sysv/linux/writev.c: New file.
10707 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10708
10709 * pt-readv.c: Fix comment.
10710
107112002-12-14 Jakub Jelinek <jakub@redhat.com>
10712
10713 * tst-cleanup1.c: Include stdlib.h.
10714
10715 * tst-cancel5.c: New test.
10716 * Makefile (tests): Add tst-cancel5.
10717 (tst-cancel5): Link against libc.so libpthread.so in that order.
10718
9ae0909b
UD
107192002-12-13 Ulrich Drepper <drepper@redhat.com>
10720
b7bdd9c4
UD
10721 * forward.c (test_loaded): Prevent recursive calls.
10722
9ae0909b
UD
10723 * Makefile (routines): Add libc-cancellation.
10724 * libc-cancellation.c: New file.
10725 * descr.h (struct pthread): Add multiple_threads field.
10726 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10727 new thread descriptor to 1.
10728 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10729 Initialize multiple_thread field after successful thread creation.
10730 * cancellation.c (__do_cancel): Move to pthreadP.h.
10731 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10732 (__pthread_disable_asynccancel): Add internal_function attribute.
10733 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10734 * pthread_setcancelstate.c: Likewise.
10735 * pthread_setcanceltype.c: Likewise.
10736 * pthread_exit.c: Likewise.
10737 * pthreadP.h (CANCELLATION_P): Likewise.
10738 (__do_cancel): Define as static inline.
10739 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10740 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10741 declarations.
10742 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10743 fields. Define MULTIPLE_THREADS_OFFSET.
10744 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10745 declaration.
10746 * sysdeps/unix/sysv/linux/accept.S: New file.
10747 * sysdeps/unix/sysv/linux/read.c: New file.
10748 * sysdeps/unix/sysv/linux/write.c: New file.
10749 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10750 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10751 initialization of __libc_locking_needed.
10752 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10753 __libc_locking_needed, use multiple_threads field in TCB.
10754 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10755
22f20674
UD
107562002-12-12 Ulrich Drepper <drepper@redhat.com>
10757
2ad2e1e7
UD
10758 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10759 version.
10760 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10761
22f20674
UD
10762 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10763 access to __libc_locking_needed for PIC.
10764
aa80bf86
UD
107652002-12-12 Jakub Jelinek <jakub@redhat.com>
10766
10767 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10768 declare for libc.so.
10769 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10770 expression.
10771 (__libc_lock_lock): Put into statement expression.
10772 (__libc_lock_unlock): Remove trailing semicolon.
10773 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10774
24021373
RM
107752002-12-12 Roland McGrath <roland@redhat.com>
10776
10777 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10778 "m" constraint to refer to __libc_locking_needed. Declare it here.
10779
14e7aece
UD
107802002-12-12 Ulrich Drepper <drepper@redhat.com>
10781
10782 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10783 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10784 Initialize __libc_locking_needed.
10785 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10786 instead of __register_pthread_fork_handler.
10787 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10788 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10789 fork-gen with libc_pthread_init.
10790 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10791 of __register_pthread_fork_handler.
10792 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10793 of __register_pthread_fork_handler.
10794 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10795 __libc_locking_needed to determine whether lock prefix can be avoided.
10796 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10797
85631c8e
UD
107982002-12-11 Ulrich Drepper <drepper@redhat.com>
10799
da63009e
UD
10800 * Makefile (tests): Add tst-cleanup1.
10801 * tst-cleanup1.c: New file.
10802 * cancellation.c (__cleanup_thread): Removed.
10803 (__do_cancel): Remove call to __cleanup_thread.
10804 * pthreadP.h: Remove __cleanup_thread prorotype.
10805
000160a2
UD
10806 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10807 Remember function and argument even if cancellation handler
10808 function is not available.
10809 (__libc_cleanup_region_end): Execute registered function directly if
10810 pthread functions are not available.
10811 (__libc_cleanup_end): Likewise.
10812
85631c8e
UD
10813 * init.c (__pthread_initialize_minimal): Fix initialization in
10814 static lib by preventing gcc from being too clever.
10815
dce8f2b6
UD
108162002-12-10 Ulrich Drepper <drepper@redhat.com>
10817
34a075be
UD
10818 * init.c (__pthread_initialize_minimal): Remove unneccesary
10819 sigaddset call.
10820
dce8f2b6
UD
10821 * Makefile (tests): We can run tst-locale2 now.
10822
e5e45b53
UD
108232002-12-09 Ulrich Drepper <drepper@redhat.com>
10824
10825 * Versions: Remove duplicated sigwait entry.
10826
bdb04f92
UD
108272002-12-08 Ulrich Drepper <drepper@redhat.com>
10828
1e506629
UD
10829 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10830 inside libpthread.
10831
a3957dd5
UD
10832 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10833
bdb04f92
UD
10834 * pthreadP.h: Declare __pthread_enable_asynccancel and
10835 __pthread_disable_asynccancel.
10836 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10837 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10838 * cancellation.c (__pthread_enable_asynccancel): New function.
10839 (__pthread_disable_asynccancel): New function.
10840 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10841 * pt-close.c: Likewise.
10842 * pt-connect.c: Likewise.
10843 * pt-creat.c: Likewise.
10844 * pt-fcntl.c: Likewise.
10845 * pt-fsync.c: Likewise.
10846 * pt-lseek.c: Likewise.
10847 * pt-lseek64.c: Likewise.
10848 * pt-msgrcv.c: Likewise.
10849 * pt-msgsnd.c: Likewise.
10850 * pt-msync.c: Likewise.
10851 * pt-nanosleep.c: Likewise.
10852 * pt-open.c: Likewise.
10853 * pt-open64.c: Likewise.
10854 * pt-pause.c: Likewise.
10855 * pt-poll.c: Likewise.
10856 * pt-pread.c: Likewise.
10857 * pt-pread64.c: Likewise.
10858 * pt-pselect.c: Likewise.
10859 * pt-pwrite.c: Likewise.
10860 * pt-pwrite64.c: Likewise.
10861 * pt-read.c: Likewise.
10862 * pt-readv.c: Likewise.
10863 * pt-recv.c: Likewise.
10864 * pt-recvfrom.c: Likewise.
10865 * pt-recvmsg.c: Likewise.
10866 * pt-select.c: Likewise.
10867 * pt-send.c: Likewise.
10868 * pt-sendmsg.c: Likewise.
10869 * pt-sendto.c: Likewise.
10870 * pt-sigpause.c: Likewise.
10871 * pt-sigsuspend.c: Likewise.
10872 * pt-sigtimedwait.c: Likewise.
10873 * pt-sigwait.c: Likewise.
10874 * pt-sigwaitinfo.c: Likewise.
10875 * pt-system.c: Likewise.
10876 * pt-tcdrain.c: Likewise.
10877 * pt-wait.c: Likewise.
10878 * pt-waitid.c: Likewise.
10879 * pt-waitpid.c: Likewise.
10880 * pt-write.c: Likewise.
10881 * pt-writev.c: Likewise.
a3957dd5
UD
10882 * pthread_join.c: Likewise.
10883 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
10884
10885 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10886 (__xpg_sigpause): New function.
10887 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10888
6ccb3834
UD
108892002-12-07 Ulrich Drepper <drepper@redhat.com>
10890
09efc3ba
UD
10891 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10892
10893 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10894 _GI_pthread_cleanup_pop to pthreadP.h.
10895
10896 * ftrylockfile.c: Use _IO_lock_trylock instead of
10897 pthread_mutex_trylock.
10898
10899 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10900 (CANCEL_RESET): Likewise.
10901 (__pthread_setcanceltype_): Declare.
10902 (__pthread_mutex_lock_internal): Declare.
10903 (__pthread_mutex_unlock_internal): Declare.
10904 (__pthread_once_internal): Declare.
10905 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10906 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10907
10908 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10909 and pthread_mutex_unlock.
10910 * pthread_cond_wait.c: Likewise.
10911 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10912 * pthread_mutex_unlock.c: Likewise.
10913
10914 * pthread_setcanceltype.c: Add additional alias
10915 __pthread_setcanceltype.
10916
10917 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10918 * sem_open.c (sem_open): Likewise.
10919 Use __libc_open, __libc_write, and __libc_close instead of
10920 open, write, and close respectively.
10921
10922 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10923 Rewrite as statement expression since it must return a value.
10924
10925 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10926 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10927 __pthread_kill.
10928
10929 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10930 alias __pthread_once_internal.
10931
6ccb3834
UD
10932 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10933
d3c9f895
UD
109342002-12-06 Ulrich Drepper <drepper@redhat.com>
10935
4614167a
UD
10936 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10937 * tst-stdio1.c: New file.
10938 * tst-stdio2.c: New file.
10939
a4548cea
UD
10940 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10941
d3c9f895
UD
10942 * Makefile (tests): Comment out tst-locale2 for now.
10943 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10944
10945 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10946 -D_IO_MTSAFE_IO.
10947 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10948 Use _IO_lock_init instead of explicit assignment.
10949
10950 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10951 Define __libc_lock_* and __libc_lock_recursive macros with
10952 lowlevellock macros, not pthread mutexes.
10953
10954 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10955 of pthread_mutex_lock.
10956 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10957 instead of pthread_mutex_unlock.
10958
fde89ad0
RM
109592002-12-06 Roland McGrath <roland@redhat.com>
10960
10961 * allocatestack.c (__stack_user): Use uninitialized defn.
10962 * init.c (__pthread_initialize_minimal): Initialize it here.
10963
11767d47
RM
109642002-12-05 Roland McGrath <roland@redhat.com>
10965
fde89ad0
RM
10966 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10967 string.
10968 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10969
11767d47
RM
10970 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10971 missing & here too.
10972
440d8bc2
UD
109732002-12-05 Ulrich Drepper <drepper@redhat.com>
10974
10975 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10976 lowlevellock.
10977 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10978 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10979 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10980 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10981 for __libc_lock_* macros.
10982 * Makefile (routines): Add libc-lowlevellock.
10983
109842002-10-09 Roland McGrath <roland@redhat.com>
10985
10986 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10987 Under [__PIC__], call the function via the pointer fetched for
10988 comparison rather than a call by name that uses the PLT.
10989 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10990 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10991 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10992 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10993 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10994
d5ed0118
RM
109952002-12-04 Roland McGrath <roland@redhat.com>
10996
10997 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10998
10999 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11000 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11001
11002 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11003
eaa4099f
UD
110042002-12-04 Ulrich Drepper <drepper@redhat.com>
11005
11006 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11007 a completely opaque, non-integer type.
11008 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11009
33b5d0cc
UD
110102002-12-05 Jakub Jelinek <jakub@redhat.com>
11011
11012 * sysdeps/i386/tls.h: Include stdlib.h.
11013 * sysdeps/x86_64/tls.h: Likewise.
11014
7a5cdb30
UD
110152002-12-04 Ulrich Drepper <drepper@redhat.com>
11016
c4a6d859
UD
11017 * Makefile (tests): Add tst-locale2.
11018 (tests-static): Likewise.
11019 * tst-locale2.c: New file.
11020
7a5cdb30
UD
11021 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11022 volatile and add memory clobbers to lock operations.
11023
d82d5d12
UD
110242002-12-03 Ulrich Drepper <drepper@redhat.com>
11025
69cae3cf
UD
11026 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11027 * sysdeps/i386/i486/bits/atomic.h: New file.
11028 * sysdeps/i386/i586/bits/atomic.h: New file.
11029 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11030 include i486 version.
11031 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11032 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 11033 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 11034
e4044c01
UD
11035 * allocatestack.c (get_cached_stack): Don't crash if we first
11036 found a stack with a larger size then needed.
11037 Reported by Hui Huang <hui.huang@sun.com>.
11038
d82d5d12
UD
11039 * Makefile (tests): Add tst-sysconf.
11040 * tst-sysconf.c: New file.
11041
11042 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11043 PTHREAD_THREADS_MAX.
11044
fa9a4ff0
RM
110452002-12-02 Roland McGrath <roland@redhat.com>
11046
11047 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11048 Declare using hidden_proto instead of attribute_hidden, so there are
11049 non-.hidden static symbols for gdb to find.
11050 (__pthread_keys): Likewise.
11051 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11052 * allocatestack.c (__stack_user): Likewise.
11053 * pthread_create.c (__pthread_keys): Likewise.
11054 (__nptl_threads_events, __nptl_last_event): Make these static instead
11055 of hidden.
11056 * pthread_key_create.c (__pthread_pthread_keys_max,
11057 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11058
91949a33
UD
110592002-12-02 Ulrich Drepper <drepper@redhat.com>
11060
c22b52fa
UD
11061 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11062 statically.
11063 * tst-locale1.c: New file.
11064
beb6aa41
UD
11065 * pthread_cond_timedwait.c: Include <stdlib.h>.
11066
91949a33
UD
11067 * Makefile (tests): Add tst-fork2 and tst-fork3.
11068 * tst-fork2.c: New file.
11069 * tst-fork3.c: New file.
11070
654dff90
UD
110712002-11-28 Ulrich Drepper <drepper@redhat.com>
11072
cb0e76b4
UD
11073 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11074
11075 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11076 require it to 200112L.
11077
11078 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11079 instruction only if HAVE_CMOV is defined.
11080 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11081
975aa229
UD
11082 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11083
654dff90
UD
11084 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11085
11086 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11087
11088 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11089
a3931336
UD
110902002-11-27 Ulrich Drepper <drepper@redhat.com>
11091
c10c099c
UD
11092 * sysdeps/x86_64/bits/atomic.h: New file.
11093
11094 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11095 16-bit operations.
11096
dca99d27
UD
11097 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11098 possible since gettid cannot fail.
11099
f78deea6
UD
11100 * sysdeps/x86_64/pthreaddef.h: New file.
11101
11102 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11103
11104 * sysdeps/x86_64/pthread_spin_init.c: New file.
11105 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11106 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11107 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11108
11109 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11110 Add missing lock prefix. Minute optimization.
11111
11112 * tst-spin2.c (main): Also check successful trylock call.
11113
11114 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11115 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11116
11117 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11118 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11119
11120 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11121 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11122 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
11123
11124 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11125 value in case of an error.
11126
a3931336
UD
11127 * sysdeps/x86_64/tls.h: New file.
11128
76a50749
UD
111292002-11-26 Ulrich Drepper <drepper@redhat.com>
11130
117c452c
UD
11131 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11132 takes the array member name and the index as parameters.
11133 (THREAD_SETMEM_NC): Likewise.
11134 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11135 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11136 interfaces.
11137
11138 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11139 to decide which code to use.
11140 (THREAD_SETMEM_NC): Likewise.
11141
76a50749
UD
11142 * allocatestack.c (queue_stack): Don't remove stack from list here.
11143 Do it in the caller. Correct condition to prematurely terminate
11144 loop to free stacks.
11145 (__deallocate_stack): Remove stack from list here.
11146
111472002-11-26 Ulrich Drepper <drepper@redhat.com>
11148
11149 * Makefile (tests): Add tst-stack1.
11150 * tst-stack1.c: New file.
11151
11152 * allocatestack.c (allocate_stack): Initialize the TCB on a user
11153 provided stack.
11154
11155 * pthread_attr_getstack.c: Return bottom of the thread area.
11156
111572002-11-25 Ulrich Drepper <drepper@redhat.com>
11158
11159 * Makefile (libpthread-routines): Add pt-allocrtsig and
11160 pthread_kill_other_threads.
11161 * pt-allocrtsig.c: New file.
11162 * pthread_kill_other_threads.c: New file.
11163 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11164 all three functions.
11165 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11166 allocrtsig.
11167 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11168 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11169 and __libc_allocate_rtsig_private.
11170 * Versions (libpthread): Export pthread_kill_other_threads_np,
11171 __libc_current_sigrtmin, and __libc_current_sigrtmax.
11172
111732002-11-24 Ulrich Drepper <drepper@redhat.com>
11174
11175 * allocatestack.c (allocate_stack): stackaddr in attribute points to
11176 the end of the stack. Adjust computations.
11177 When mprotect call fails dequeue stack and free it.
11178 * pthread_attr_setstack.c: Store top of the stack in stackaddr
11179 attribute.
11180 * pthread_getattr_np.c: Likewise.
11181
11182 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11183 surprises.
11184
111852002-11-23 Ulrich Drepper <drepper@redhat.com>
11186
11187 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11188 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11189
111902002-11-22 Ulrich Drepper <drepper@redhat.com>
11191
11192 * pthread_getspecific.c: Optimize access to first 2nd-level array.
11193 * pthread_setspecific.c: Likewise.
11194
111952002-11-21 Ulrich Drepper <drepper@redhat.com>
11196
11197 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11198 definitions. Get them from the official place.
11199 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11200
11201 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11202 Use new CLONE_ flags in clone() calls.
11203
11204 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11205 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11206
11207 * Versions: Add pthread_* functions for libc.
11208 * forward.c: New file.
11209
11210 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11211 errno-loc.
11212 * herrno.c: New file.
11213 * res.c: New file.
11214
11215 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11216 sem_trywait, and sem_timedwait. Add herrno and res.
11217 * sem_init.c: Don't initialize lock and waiters members.
11218 * sem_open.c: Likewise.
11219 * sem_post.c: Removed.
11220 * sem_wait.c: Removed.
11221 * sem_trywait.c: Removed.
11222 * sem_timedwait.c: Removed.
11223 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11224 Includes full implementations of sem_post, sem_wait, sem_trywait,
11225 and sem_timedwait.
11226 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11227 for new implementation.
11228 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11229 and waiters fields.
11230
11231 * tst-sem3.c: Improve error message.
11232 * tst-signal3.c: Likewise.
11233
11234 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11235 to tell the kernel about the termination futex and to initialize tid
11236 member. Don't initialize main_thread.
11237 * descr.h (struct pthread): Remove main_thread member.
11238 * cancelllation.c (__do_cancel): Remove code handling main thread.
11239 The main thread is not special anymore.
11240
11241 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11242 size of the stacks to stack_cache_actsize.
11243
11244 * pt-readv.c: Add missing "defined".
11245 * pt-sigwait.c: Likewise.
11246 * pt-writev.c: Likewise.
11247
112482002-11-09 Ulrich Drepper <drepper@redhat.com>
11249
11250 * Versions: Export __connect from libpthread.
11251 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11252
11253 * Makefile (libpthread-routines): Add pt-raise.
11254 * sysdeps/unix/sysv/linux/raise.c: New file.
11255 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11256 * sysdeps/generic/pt-raise.c: New file.
11257
11258 * pthread_cond_init.c: Initialize all data elements of the condvar
11259 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11260
11261 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11262 * pthread_create.c: Likewise.
11263
11264 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11265 * tst-key1.c: New file.
11266 * tst-key2.c: New file.
11267 * tst-key3.c: New file.
11268
11269 * Versions: Export pthread_detach for version GLIBC_2.0.
11270 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11271
112722002-11-08 Ulrich Drepper <drepper@redhat.com>
11273
11274 * pthread_key_create.c: Terminate search after an unused key was found.
11275 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11276
11277 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11278 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11279
112802002-10-10 Ulrich Drepper <drepper@redhat.com>
11281
11282 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11283 dynamic lookup for errno in PIC.
11284
11285 * allocatestack.c (get_cached_stack): Rearrange code slightly to
11286 release the stack lock as soon as possible.
11287 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11288 the static TLS block.
11289 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11290
11291 * cancellation.c: Renamed from cancelation.c.
11292 * Makefile: Adjust accordingly.
11293 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11294 * cleanup_defer.c: Use CANCELLATION_P.
11295 * pthread_testcancel.c: Likewise.
11296 * descr.h: Fix spelling in comments.
11297 * init.c: Likewise.
11298 * pthread_getattr_np.c: Likewise.
11299 * pthread_getschedparam.c: Likewise.
11300 * pthread_setschedparam.c: Likewise.
11301 * Versions: Likewise.
11302
11303 * pt-pselect.c: New file.
11304 * Makefile (libpthread-routines): Add pt-pselect.
11305 * Versions: Add pselect.
11306
11307 * tst-cancel4.c: New file.
11308 * Makefile (tests): Add tst-cancel4.
11309
113102002-10-09 Ulrich Drepper <drepper@redhat.com>
11311
11312 * pthread_mutex_lock.c: Always record lock ownership.
11313 * pthread_mutex_timedlock.c: Likewise.
11314 * pthread_mutex_trylock.c: Likewise.
11315
11316 * pt-readv.c: New file.
11317 * pt-writev.c: New file.
11318 * pt-creat.c: New file.
11319 * pt-msgrcv.c: New file.
11320 * pt-msgsnd.c: New file.
11321 * pt-poll.c: New file.
11322 * pt-select.c: New file.
11323 * pt-sigpause.c: New file.
11324 * pt-sigsuspend.c: New file.
11325 * pt-sigwait.c: New file.
11326 * pt-sigwaitinfo.c: New file.
11327 * pt-waitid.c: New file.
11328 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11329 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11330 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11331 * Versions: Add all the new functions.
11332
11333 * tst-exit1.c: New file.
11334 * Makefile (tests): Add tst-exit1.
11335
11336 * sem_timedwait.c: Minor optimization for more optimal fastpath.
11337
113382002-10-08 Ulrich Drepper <drepper@redhat.com>
11339
11340 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11341
11342 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11343 call. pthread_join is an official cancellation point.
11344 * pthread_timedjoin.c: Likewise.
11345
11346 * pthread_cond_wait.c: Revert order in which internal lock are dropped
11347 and the condvar's mutex are retrieved.
11348 * pthread_cond_timedwait.c: Likewise.
11349 Reported by dice@saros.East.Sun.COM.
11350
113512002-10-07 Ulrich Drepper <drepper@redhat.com>
11352
11353 * pthreadP.h: Cut out all type definitions and move them...
11354 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
11355 * pthreadP.h: Include <internaltypes.h>.
11356
11357 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11358 performance tweaks.
11359
11360 * sem_trywait.c: Shuffle #includes around to get right order.
11361 * sem_timedwait.c: Likewise.
11362 * sem_post.c: Likewise.
11363 * sem_wait.c: Likewise.
11364
11365 * nptl 0.3 released.
11366
11367 * Makefile (tests): Add tst-signal3.
11368 * tst-signal3.c: New file.
11369
113702002-10-05 Ulrich Drepper <drepper@redhat.com>
11371
11372 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11373 the asms modify the sem object.
11374 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11375
11376 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11377 the actual members.
11378 * pthreadP.h (struct sem): New type. Actual semaphore type.
11379 * semaphoreP.h: Include pthreadP.h.
11380 * sem_getvalue.c: Adjust to sem_t change.
11381 * sem_init.c: Likewise.
11382 * sem_open.c: Likewise.
11383 * sem_post.c: Likewise.
11384 * sem_timedwait.c: Likewise.
11385 * sem_trywait.c: Likewise.
11386 * sem_wait.c: Likewise.
11387
113882002-10-04 Ulrich Drepper <drepper@redhat.com>
11389
11390 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11391 * tst-basic2.c: New file.
11392 * tst-exec1.c: New file.
11393 * tst-exec2.c: New file.
11394 * tst-exec3.c: New file.
11395
11396 * tst-fork1.c: Remove extra */.
11397
11398 * nptl 0.2 released. The API for IA-32 is complete.