]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Simplify malloc code
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
3ce1f295
UD
12011-09-10 Ulrich Drepper <drepper@gmail.com>
2
d063d164
UD
3 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
4 !USE___THREAD.
5 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
11 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
12 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
13 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
14 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
15 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
16 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
17
3ce1f295
UD
18 * tst-tls1.c: Support for __thread is now mandatory.
19 * tst-tls2.c: Likewise.
20 * tst-tls3.c: Likewise.
21 * tst-tls3mod.c: Likewise.
22 * tst-tls4.c: Likewise.
23 * tst-tls4moda.c: Likewise.
24 * tst-tls4modb.c: Likewise.
25 * tst-tls5.h: Likewise.
26
1e4bd093
L
272011-09-08 Ulrich Drepper <drepper@gmail.com>
28
29 [BZ #12403]
30 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
31 (pthread_rwlock_timedwrlock): Use correct macro in test.
32 Patch by H.J. Lu <hongjiu.lu@intel.com>.
33
a0e1f41b
UD
342011-09-06 Ulrich Drepper <drepper@gmail.com>
35
36 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
37 use gettimeofday vsyscall, just call gettimeofday.
9e5c9dcd
UD
38 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
39 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
40 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
41 Likewise.
42 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
43 Likewise.
44 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
45 Simplify __vdso_clock_gettime use.
a0e1f41b 46
39c4451c
DM
472011-09-05 David S. Miller <davem@davemloft.net>
48
49 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
50 New function.
51 (sem_timedwait): Call it to force an exception region around
52 the async cancel enable and the futex operation.
53 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
54 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
55 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
56 (__new_sem_wait): Call it to force an exception region around
57 the async cancel enable and the futex operation.
58 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
59 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
60
523df511
AS
612011-08-31 Andreas Schwab <schwab@redhat.com>
62
63 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
64 thread is woken up.
65
e315850c
DM
662011-08-20 David S. Miller <davem@davemloft.net>
67
68 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
69
5744c68d
RM
702011-08-14 Roland McGrath <roland@hack.frob.com>
71
72 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
73 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
74
a724d1b9
AS
752011-08-08 Andreas Schwab <schwab@redhat.com>
76
77 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
78 stack.
79 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
80 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
81
7a03a9c8
UD
822011-07-22 Ulrich Drepper <drepper@gmail.com>
83
84 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
85 barrier.
86 (__gcc_personality_v0): Likewise.
87 (_Unwind_ForcedUnwind): Likewise.
88 (_Unwind_GetCFA): Likewise.
89
4b3d3e28
RM
902011-07-14 Roland McGrath <roland@hack.frob.com>
91
92 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
93 UINTMAX_C.
94
6f8326ca
UD
952011-06-30 Ulrich Drepper <drepper@gmail.com>
96
97 * nptl-init.c (__nptl_set_robust): New function.
98 (pthread_functions): Add reference.
99 * npthreadP.h: Declare __nptl_set_robust.
100 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
101 ptr_set_robust member.
102 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
103 child if threads are used.
104
c71ca1f8
AJ
1052011-06-14 Andreas Jaeger <aj@suse.de>
106
107 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
108
5bdcc103
UD
1092011-05-11 Ulrich Drepper <drepper@gmail.com>
110
111 [BZ #386]
112 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
113
e6c61494
UD
1142011-04-10 Ulrich Drepper <drepper@gmail.com>
115
116 [BZ #12650]
117 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
118 clearing memory.
119 Patch partly by Robert Rex <robert.rex@exasol.com>.
120
c5be0f71
RM
1212011-01-19 Roland McGrath <roland@redhat.com>
122
123 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
124 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
125 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
126 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
127 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
128 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
129
1f20b93a
AS
1302011-01-16 Andreas Schwab <schwab@linux-m68k.org>
131
132 * Makefile (test-extras): Add tst-cleanup4aux.
133
70181fdd
UD
1342011-01-14 Ulrich Drepper <drepper@gmail.com>
135
136 [BZ #10563]
137 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
138 (__SETXID_2): Likewise.
139 (__SETXID_3): Likewise.
140
451f001b
UD
1412011-01-13 Ulrich Drepper <drepper@gmail.com>
142
143 [BZ #10484]
144 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
a85b5cb4 145 * alloca_cutoff.c: Add libc_hidden_def.
451f001b 146
f9068148
L
1472010-10-13 H.J. Lu <hongjiu.lu@intel.com>
148
149 [BZ #12113]
150 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
151 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
152 of "struct pthread".
153
c3758fee
AS
1542010-09-21 Andreas Schwab <schwab@redhat.com>
155
156 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
157 [!__EXCEPTIONS]: Mangle local variable not_first_call.
158 (pthread_cleanup_push_defer_np): Likewise.
159
4ac42e19
UD
1602010-09-03 Ulrich Drepper <drepper@redhat.com>
161
162 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
163 small.
164
022f6b89
DG
1652010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
166 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
167
168 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
169 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
170
f8392f40
L
1712010-08-12 H.J. Lu <hongjiu.lu@intel.com>
172
93f17abf 173 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
f8392f40 174
bebff237
AM
1752010-05-01 Alan Modra <amodra@gmail.com>
176
177 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
178 (PSEUDO): Use correct cr save. Don't use wrong parm save area
179 to save temps. Correct cfi for possible later frame manipulation.
180 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
181 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
182 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
183 (DOCARGS_6, UNDOCARGS_6): Likewise.
184 (CENABLE, CDISABLE): Add nops for non-shared calls.
185
e8ee8bdf
AS
1862010-07-06 Andreas Schwab <schwab@redhat.com>
187
188 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
189 Fix type mismatch.
190
03e87550
UD
1912010-07-03 Ulrich Drepper <drepper@redhat.com>
192
193 * tst-abstime.c (do_test): Some more cleanups
194
145569dc
UD
1952010-07-02 Ulrich Drepper <drepper@redhat.com>
196
197 * tst-abstime.c: Correct testing and add test for sem_timedwait.
198
2983d85e
AS
1992010-07-01 Andreas Schwab <schwab@redhat.com>
200 Ulrich Drepper <drepper@redhat.com>
201
202 * Makefile (tests): Add tst-abstime.
203 * tst-abstime.c: New file.
204 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
205 (__lll_timedlock_wait): Check for timestamp before the Epoch.
206 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
207 (__lll_timedlock_wait): Likewise.
208 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
209 (__lll_robust_timedlock_wait): Likewise.
210 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
211 (__pthread_cond_timedwait): Likewise.
212 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
213 (pthread_rwlock_timedrdlock): Likewise.
214 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
215 (pthread_rwlock_timedwrlock): Likewise.
216 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
217 Likewise.
218
72b6e8c8
UD
2192010-07-01 Ulrich Drepper <drepper@redhat.com>
220
221 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
222
4bc93b30
TY
2232010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
224
225 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
226 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
227
86a4c67f
UD
2282010-04-09 Ulrich Drepper <drepper@redhat.com>
229
230 [BZ #11390]
231 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
232 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
233 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
234 pthread_setname.
235 * Makefile (libpthread-routines): Add pthread_getname and
236 pthread_setname.
237 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
238
f571a994
RM
2392010-04-05 Thomas Schwinge <thomas@schwinge.name>
240
241 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
242 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
243 * sysdeps/pthread/Makefile: Remove csu section and rt section's
244 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
245
7749bf5f
LM
2462010-03-23 Luis Machado <luisgpm@br.ibm.com>
247
248 * pthread_cond_timedwait.c: Add check for
249 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
250 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
251 INTERNAL_SYSCALL.
252
1d78f299
UD
2532010-03-09 Ulrich Drepper <drepper@redhat.com>
254
255 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
256 and the call fails wake eventually waiting setxid threads. Don't free
257 stack here if we try starting a thread.
258 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
259 if the clone call failed.
260
058e9ba9
AS
2612010-03-08 Andreas Schwab <schwab@redhat.com>
262
263 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
264 * allocatestack.c (get_cached_stack): Set setxid_futex.
265 (allocate_stack): Likewise.
266
66f1b8ee
UD
2672010-03-05 Andreas Schwab <schwab@redhat.com>
268 Ulrich Drepper <drepper@redhat.com>
269
270 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
271 it is creating a thread or it is just being created.
272 * pthread_create.c (start_thread): Wake setxid thread if it is
273 waiting.
274 (__pthread_create_2_1): Initialize setxid_futex.
275 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
276 is waiting.
277
893549c5
MS
2782010-01-15 Ulrich Drepper <drepper@redhat.com>
279
280 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
281 Fix unwind info.
282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
283
2842010-01-15 Michal Schmidt <mschmidt@redhat.com>
285
286 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
287 Fix pthread_cond_timedwait with requeue-PI.
288 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
289 Fix pthread_cond_wait with requeue-PI.
290
402cd987
UD
2912010-01-14 Ulrich Drepper <drepper@redhat.com>
292
78ee2185
UD
293 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
294 and pthread_mutexattr_setrobust for GLIBC_2.12.
402cd987 295 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
78ee2185
UD
296 * pthread_mutexattr_getrobust.c: Define alias
297 pthread_mutexattr_getrobust.
298 * pthread_mutexattr_setrobust.c: Define alias
299 pthread_mutexattr_setrobust.
402cd987 300
d3c7e686
UD
3012010-01-12 Ulrich Drepper <drepper@redhat.com>
302
303 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
304
f095bb72
UD
3052010-01-08 Ulrich Drepper <drepper@redhat.com>
306
307 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
308
d34bd80f
TS
3092009-12-18 Thomas Schwinge <thomas@codesourcery.com>
310
311 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
312 call __gmon_start__.
313 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
314
f01c2359
UD
3152009-12-17 Ulrich Drepper <drepper@redhat.com>
316
317 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
318 using memset.
319
75956694
DG
3202009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
321
322 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
323 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
324 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
325 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
326 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
327 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
328 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
329 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
330
9554ebf2
UD
3312009-12-12 Ulrich Drepper <drepper@redhat.com>
332
333 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
334 Don't update nwaiters after invalid timeout is recognized.
335
ebb92a49
TS
3362009-11-27 Thomas Schwinge <thomas@codesourcery.com>
337
338 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
339 __gmon_start__.
340
b55ec98c
AS
3412009-11-27 Andreas Schwab <schwab@redhat.com>
342
343 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
344 THREAD_SELF->cancelhandling after returning from futex call.
345
80b3a4ea
UD
3462009-11-24 Ulrich Drepper <drepper@redhat.com>
347
348 * tst-sem13.c: New file.
349 * Makefile (tests): Add tst-sem13.
350
57a299fe
RM
3512009-11-22 Roland McGrath <roland@redhat.com>
352
353 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
354 instead of recapitulating its contents.
355
dfedb126
UD
3562009-11-18 Ulrich Drepper <drepper@redhat.com>
357
358 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
359 optimizations and cleanups.
360
dd7106b3
DG
3612009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
362
363 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
364 Remove redundant code. Fix cfi offsets.
365 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
366 Fix cfi offsets.
367
f8c10bb4
UD
3682009-11-17 Ulrich Drepper <drepper@redhat.com>
369
62616842
UD
370 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
371 reduce size of unwind info.
372
f8c10bb4
UD
373 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
374 cfi directives.
375 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
376 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
377
13f6812f
AS
3782009-11-03 Andreas Schwab <schwab@linux-m68k.org>
379
380 [BZ #4457]
381 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
382 LIBGCC_S_SO.
383 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
384
25db0f6c
DJ
3852009-10-30 Ulrich Drepper <drepper@redhat.com>
386
9c04f7c1
UD
387 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
388
25db0f6c
DJ
389 [BZ #3270]
390 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
391 steps to avoid races with creation and terminations.
392 * nptl-init.c (sighandler_setxid): Adjust.
393 Patch by Daniel Jacobowitz.
394
3d60eb17
AS
3952009-09-07 Andreas Schwab <schwab@redhat.com>
396
397 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
398
38eb6136
SP
3992009-09-02 Suzuki K P <suzuki@in.ibm.com>
400 Joseph Myers <joseph@codesourcery.com>
401
402 [BZ #7094]
403 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
404 Initialize the sigev_notify field for newly created timer to make sure
01034d75 405 the timer gets deleted from the active timer's list upon timer_delete.
38eb6136 406
7812c65b
AS
4072009-08-27 Andrew Stubbs <ams@codesourcery.com>
408
409 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
410 Correct a logic error.
411
84088310
UD
4122009-08-25 Ulrich Drepper <drepper@redhat.com>
413
414 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
415 of the field in local variables.
416 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
417 variable and don't unconditionally clear it.
418
b42a214c
UD
4192009-08-24 Ulrich Drepper <drepper@redhat.com>
420
421 * pthread_create.c (start_thread): Hint to the kernel that memory for
422 the stack can be reused. We do not mark all the memory. The part
423 still in use and some reserve are kept.
424
2d094b73
UD
4252009-08-23 Ulrich Drepper <drepper@redhat.com>
426
427 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
428
ae0d5450
UD
4292009-08-11 Ulrich Drepper <drepper@redhat.com>
430
431 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
432 directives.
433
1bc2b97e
UD
4342009-08-10 Ulrich Drepper <drepper@redhat.com>
435
436 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
437 directives.
438 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
439
ec492239
AS
4402009-08-10 Andreas Schwab <schwab@redhat.com>
441
442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
443 (__pthread_cond_signal): Don't clobber register used for syscall
444 number.
445
49eea97b
UD
4462009-08-08 Ulrich Drepper <drepper@redhat.com>
447
efa0569d
UD
448 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
449 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
450
49eea97b
UD
451 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
452 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
453 register.
454
9083bcc5
UD
4552009-08-07 Ulrich Drepper <drepper@redhat.com>
456
457 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
458 enabled by the special *_asynccancel functions.
459 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
460 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
461
462 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
463
421665c4
UD
4642009-08-04 Ulrich Drepper <drepper@redhat.com>
465
466 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
467 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
468 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
469 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
470 since we can assume the special __*_{en,dis}able_asynccancel
471 functions.
472 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
473 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
474 and PTHREAD_CANCELED.
475
bd03a1af
UD
4762009-07-31 Ulrich Drepper <drepper@redhat.com>
477
478 * descr.h: Better definition of *_BITMASK macros for cancellation.
479
b48a267b
UD
4802009-07-29 Ulrich Drepper <drepper@redhat.com>
481
586fa886
UD
482 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
483
b48a267b 484 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
586fa886
UD
485 dynamic linker might have to save.
486 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
487 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
488 printing.
489
b48a267b
UD
490 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
491
b0948ffd
UD
4922009-07-28 Ulrich Drepper <drepper@redhat.com>
493
494 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
495 New function.
496 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
497 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
498 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
499 requeue_pi for robust mutexes.
500 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
501 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
502 Don't only skip __pthread_mutex_cond_lock. Call instead
503 __pthread_mutex_cond_lock_adjust.
504 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
505
506 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
507 optimization of PI mutex handling.
508
e73e694e
UD
5092009-07-27 Ulrich Drepper <drepper@redhat.com>
510
511 [BZ #10418]
512 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
513 instead of of _acq variants of cmpxchg.
514
f1adf1f4
UD
5152009-07-23 Ulrich Drepper <drepper@redhat.com>
516
01b597da
UD
517 * sysdeps/x86_64/configure.in: New file.
518
f1adf1f4
UD
519 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
520 path when not using absolute timeout futex.
521
c3db953c
UD
5222009-07-20 Ulrich Drepper <drepper@redhat.com>
523
524 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
525 optimizations of last changes.
526 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
527
515a8908
UD
5282009-07-19 Ulrich Drepper <drepper@redhat.com>
529
42e69bcf
UD
530 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
531 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
532 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
533 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
534 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
535 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
536 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
537 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
538
515a8908
UD
539 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
540 (__pthread_cond_timedwait): Make more robust.
541
30b1954a
UD
5422009-07-18 Ulrich Drepper <drepper@redhat.com>
543
e2dca2fe
UD
544 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
545 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
546 directly use absolute timeout.
547
3d77b268
UD
548 * tst-sem5.c (do_test): Add test for premature timeout.
549 * Makefile: Linu tst-sem5 with librt.
550
d979611e
UD
551 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
552 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
553 directly use absolute timeout.
32c6c342
UD
554 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
555 (pthread_rwlock_timedrdlock): Likewise.
d979611e 556
f8b6cd21
UD
557 * tst-cond11.c (run_test): Add test to check that the timeout is
558 long enough.
559
e88726b4
UD
560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
561 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
562 directly use absolute timeout.
563
30b1954a
UD
564 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
565 (__pthread_cond_wait): Convert to using exception handler instead of
566 registered unwind buffer.
92618c95
UD
567 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
568 (__pthread_cond_timedwait): Likewise.
30b1954a 569
d52c96e7
UD
5702009-07-17 Ulrich Drepper <drepper@redhat.com>
571
f351f2b7
UD
572 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
573 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
574 use absolute timeout.
575
0adae468
UD
576 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
577 handling of uncontested semaphore.
578
d52c96e7
UD
579 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
580 (__condvar_cleanup): Rewrite to use cfi directives instead of
581 hand-coded unwind tables.
63601ccd
UD
582 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
583 Likewise.
c3c2f3cf 584 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
aee2665a
UD
585 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
586 Likewise.
d52c96e7 587
bfdb73e1
UD
5882009-06-12 Ulrich Drepper <drepper@redhat.com>
589
590 * Makefile (libpthread-routines): Add pthread_sigqueue.
591 * Versions: Add pthread_sigqueue for GLIBC_2.11.
592 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
593 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
594
1828530f
BK
5952009-06-11 Ulrich Drepper <drepper@redhat.com>
596
597 [BZ #10262]
598 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
599 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
600 cannot be assumed.
601 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
602
a5b8b56d
UD
6032009-05-16 Ulrich Drepper <drepper@redhat.com>
604
e20c4ef0
UD
605 * libc-cancellation.c: Move __libc_cleanup_routine to...
606 * libc-cleanup.c: ...here. New file.
607 * Makefile (routines): Add libc-cleanup.
608
cba0ca79
UD
609 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
610 test.
611 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
612 * sysdeps/pthread/librt-cancellation.c: Likewise.
613
a5b8b56d
UD
614 [BZ #9924]
615 * nptl-init.c: Renamed from init.c.
616 * Makefile: Change all occurences of init.c to nptl-init.c.
617
1a7f254b
UD
6182009-05-15 Ulrich Drepper <drepper@redhat.com>
619
9437b427
UD
620 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
621 to test when deciding on the delay.
622 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
623 * pthread_cancel.c: Close race between deciding on sending a signal
624 and setting the CANCELING_BIT bit.
625
1a7f254b
UD
626 * cancellation.c (__pthread_disable_asynccancel): Don't return if
627 thread is canceled.
628 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
629
d5c157a9
UD
6302009-04-27 Ulrich Drepper <drepper@redhat.com>
631
632 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
633 is available.
634 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
635 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
636 * sysdeps/i386/tls.h: Likewise.
637 (tcbhead_t): Add __private_tm member.
638
f521be31
UD
6392009-04-26 Ulrich Drepper <drepper@redhat.com>
640
5efe8650
UD
641 * sem_open.c (sem_open): Rewrite initialization of initsem to
642 avoid warnings.
643
f521be31
UD
644 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
645 Avoid warning by using may_alias attribute on ptrhack.
646
d301a6e1
UD
6472009-04-22 Ulrich Drepper <drepper@redhat.com>
648
5497de87 649 [BZ #10090]
d301a6e1
UD
650 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
651 Check policy and priority for validity.
652 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
653
71a5bd3e
UD
6542009-03-15 Ulrich Drepper <drepper@redhat.com>
655
656 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
657 (__pthread_cond_timedwait): Change to use cfi directives instead of
658 hand-coded unwind sections.
659
30991b8b
UD
6602009-03-10 Ulrich Drepper <drepper@redhat.com>
661
662 * init.c (nptl_freeres): Compile only for SHARED.
663
9920a6b8
JJ
6642009-03-09 Jakub Jelinek <jakub@redhat.com>
665
666 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
667 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
668 FUTEX_BITSET_MATCH_ANY.
669
e965d514
RM
6702009-02-27 Roland McGrath <roland@redhat.com>
671
672 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
673 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
674
6cbe890a
UD
6752009-02-26 Ulrich Drepper <drepper@redhat.com>
676
677 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
678 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
679 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
680 200112L to 200809L.
681
77db439e
UD
6822009-02-25 Ulrich Drepper <drepper@redhat.com>
683
684 * sysdeps/pthread/pthread.h: The robust mutex functions are in
685 POSIX 2008.
686
5be0a688
UD
6872009-02-24 Ulrich Drepper <drepper@redhat.com>
688
689 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
690 Unify name of include protector macro.
691
4c869eb6
UD
6922009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
693
694 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
695 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
696
cca50323
UD
6972009-01-29 Ulrich Drepper <drepper@redhat.com>
698
7f901dd7
UD
699 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
700 pointer variables.
701
cca50323
UD
702 * allocatestack.c (__free_stacks): Renamed from free_stacks.
703 (__free_stack_cache): Removed. Change callers to call __free_stacks.
704 * init.c (nptl_freeres): New function.
705 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
706 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
707 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
708 variable.
709 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
710 load DSO. Assign last.
711 (__unwind_freeres): New function.
712
713 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
714 for better debugging. No need to use stack_list_add here.
715
a7bd183f
UD
7162009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
717
718 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
719 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
720 instead of computing relative timeout.
721 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
722 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
723
563ee1cb
UD
7242009-01-25 Ulrich Drepper <drepper@redhat.com>
725
726 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
727
f25c7b08
UD
7282009-01-08 Ulrich Drepper <drepper@redhat.com>
729
730 * sysdeps/pthread/list.h (list_add): Initialize new element first.
731 (list_add_tail): Removed.
732
40de0fe3
JJ
7332009-01-07 Ulrich Drepper <drepper@redhat.com>
734
735 * (in_flight_stack): New variable.
736 (stack_list_del): New function. Use instead of list_del.
737 (stack_list_add): New function. Use instead of list_add when adding to
738 stack_cache and stack_used lists.
739 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
740 when the fork call interrupted another thread.
741
3c612057
UD
7422009-01-04 Ulrich Drepper <drepper@redhat.com>
743
744 * init.c (__pthread_initialize_minimal_internal): Optimize test
745 FUTEX_CLOCK_REALTIME a bit.
746
19834b42
UD
7472009-01-03 Ulrich Drepper <drepper@redhat.com>
748
749 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
750 only passing five parameters to FUTEX_WAIT_BITSET call.
751
752 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a9fa090b 753 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
19834b42
UD
754 instead of computing relative timeout.
755
7dd650d7
UD
7562009-01-02 Ulrich Drepper <drepper@redhat.com>
757
cbd8aeb8
UD
758 * init.c (__pthread_initialize_minimal_internal): Check for
759 FUTEX_CLOCK_REALTIME flag.
760 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
a9fa090b 761 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
cbd8aeb8
UD
762 relative timeout.
763
7dd650d7
UD
764 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
765 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
766 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
767 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
768 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
769 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
770
217d45cd
UD
7712008-12-09 Ulrich Drepper <drepper@redhat.com>
772
773 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
774 loop body instead of ; to avoid gcc warnings.
775 (pthread_cleanup_pop_restore_np): Likewise.
776 Patch by Caolán McNamara <caolanm@redhat.com>.
777
6de79a49
UD
7782008-12-09 Jakub Jelinek <jakub@redhat.com>
779
780 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
781 fast path here, for robust/PI/PP mutexes call
782 __pthread_mutex_lock_full. Don't use switch, instead use a series
783 of ifs according to their probability.
784 (__pthread_mutex_lock_full): New function.
785 * pthread_mutex_unlock.c: Include assert.h.
786 (__pthread_mutex_unlock_usercnt): Handle only the
787 fast path here, for robust/PI/PP mutexes call
788 __pthread_mutex_unlock_full. Don't use switch, instead use a series
789 of ifs according to their probability.
790 (__pthread_mutex_unlock_full): New function.
791 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
792 (__pthread_mutex_lock_full): Define.
793
71bb2639
UD
7942008-12-08 Ulrich Drepper <drepper@redhat.com>
795
796 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
797 implementation. Add necessary padding and.
798 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
799 words.
800
247626f3
UD
8012008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
802
803 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
804 and FUTEX_WAKE_BITSET.
805
da5ac135
UD
8062008-12-02 Ulrich Drepper <drepper@redhat.com>
807
808 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
809 and FUTEX_WAKE_BITSET.
810 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
811 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
812 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
813 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
814
c0439b95
RM
8152008-11-25 Roland McGrath <roland@redhat.com>
816
817 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
818 Subdirectories moved to ports repository as
819 sysdeps/.../nptl subdirectories.
820
0e54a725
UD
8212008-11-12 Jakub Jelinek <jakub@redhat.com>
822
823 [BZ #7008]
824 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
825 of old value.
826 * pthread_cond_init.c (__pthread_cond_init): Fix
827 cond->__data.__nwaiters initialization.
828 * Makefile (tests): Add tst-cond23.
829 * tst-cond23.c: New test.
830
4b23f9bd
JJ
8312008-11-07 Jakub Jelinek <jakub@redhat.com>
832
833 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
834 arguments.
835 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
836 arguments.
837
efac1fce
UD
8382008-11-01 Ulrich Drepper <drepper@redhat.com>
839
840 [BZ #6955]
841 * pthread_mutex_lock.c: Add support for private PI mutexes.
842 * pthread_mutex_timedlock.c: Likewise.
843 * pthread_mutex_trylock.c: Likewise.
844 * pthread_mutex_unlock.c: Likewise.
845 Patch mostly by Ben Jackson <ben@ben.com>.
846
bf837fa3
UD
8472008-10-31 Ulrich Drepper <drepper@redhat.com>
848
849 [BZ #6843]
850 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
851 Increase stack size for helper thread.
852
208bc836
UD
8532008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
854
855 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
856 assembly with a clobber list for access registers a0 and a1.
857
17f8b4a9
UD
8582008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
859
860 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
861 to force runp->refcntr to be read from memory.
862
2458c748
AJ
8632008-09-08 Richard Guenther <rguenther@suse.de>
864
865 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
866 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
867 lll_timedlock, lll_robust_timedlock, lll_unlock,
868 lll_robust_unlock): Promote private to int.
869
965805e8
UD
8702008-08-15 Ulrich Drepper <drepper@redhat.com>
871
872 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
873 ARCH_RETRY_MMAP definitions.
874 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
875 Define MAP_STACK when not defined.
876 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
877 handling of ARCH_RETRY_MMAP.
878
bd7f4857
UD
8792008-07-30 Ulrich Drepper <drepper@redhat.com>
880
881 * tst-align2.c (f): Print message that f is reached.
882
619cc2f6
UD
8832008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
884
885 [BZ #6740]
886 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
887 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
888
8ccf22f9
UD
8892008-07-25 Ulrich Drepper <drepper@redhat.com>
890
891 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
892 SOCK_CLOEXEC if possible.
893
8942008-05-29 Ulrich Drepper <drepper@redhat.com>
895
896 * Makefile (tests): Add tst-rwlock2a.
897 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
898 * tst-rwlock2a.c: New file.
899
5a337776
UD
9002008-06-12 Ulrich Drepper <drepper@redhat.com>
901
902 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
903
e4d6e7f5
UD
9042008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
905
906 * sysdeps/pthread/pthread.h: Fix typo in comment.
907
d6296e88
UD
9082008-05-28 Ulrich Drepper <drepper@redhat.com>
909
910 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
911 of CPU set to the kernel.
912
62605cbf
UD
9132008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
914
915 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
916 cfi directives.
917 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
918 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
919 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
920 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
921 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
922 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
923
9242008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
925
926 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
927 cfi directives.
928 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
929 Likewise.
930 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
931 Likewise.
932 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
933 Likewise.
934
4b2c85c0
UD
9352008-05-26 Ulrich Drepper <drepper@redhat.com>
936
937 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
938
b72f5692 9392008-05-20 Jakub Jelinek <jakub@redhat.com>
4b2c85c0
UD
940
941 David S. Miller <davem@davemloft.net>
3b15b590 942
b72f5692 943 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3b15b590 944
cdffaaa6
UD
9452008-05-10 Ulrich Drepper <drepper@redhat.com>
946
947 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
948 __pshared correctly.
949 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
950 Likewise.
951 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
952 Likewise.
953 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
954 Likewise.
955 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
956 Likewise.
957 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
958
2313c48f
JJ
9592008-04-14 David S. Miller <davem@davemloft.net>
960
961 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
962 (__old_sem_wait): Fix argument to lll_futex_wait().
963
2f611ada
UD
9642007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
965
966 * pthread_create.c: Require pthread_mutex_trylock and
967 pthread_key_delete for libgcc.
968
d24be489
JJ
9692008-04-08 Jakub Jelinek <jakub@redhat.com>
970
971 [BZ #6020]
972 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
973 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
974 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
975
f96853be
UD
9762008-03-27 Ulrich Drepper <drepper@redhat.com>
977
8ccf22f9 978 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
f96853be
UD
979 <linux/limits.h> has defined it.
980 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
981 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
982 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
983 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
984
354b7527
JJ
9852008-03-18 Jakub Jelinek <jakub@redhat.com>
986
987 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
988 of ASSEMBLER.
989 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
990 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
991
702ae329
UD
9922008-03-14 Ulrich Drepper <drepper@redhat.com>
993
994 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
995 HAVE_DL_DISCOVER_OSVERSION.
996 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
997 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
998
443db178
UD
9992008-03-07 Ulrich Drepper <drepper@redhat.com>
1000
1001 [BZ #5778]
1002 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1003 _POSIX_CHOWN_RESTRICTED value to zero.
1004
67fbfa5c
RM
10052008-01-31 Roland McGrath <roland@redhat.com>
1006
1007 * Makefile (omit-deps): Variable removed.
1008
dd3113da
UD
10092008-01-30 Ulrich Drepper <drepper@redhat.com>
1010
1011 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1012 unnecessary addr32 prefix.
1013
16cd816f
RM
10142008-01-29 Roland McGrath <roland@redhat.com>
1015
1016 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1017
b4b166af
UD
10182008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1019
1020 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1021
10222008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1023
1024 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1025 a scratch register.
1026 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1027 (__lll_lock_wait_private): Fix typo.
1028 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1029 (pthread_barrier_wait): Likewise. Adjust XADD use.
1030 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1031 Adjust XADD use.
1032 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1033 (pthread_rwlock_timedrdlock): Return correct return value.
1034 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
16cd816f 1035 (pthread_rwlock_timedwrlock): Likewise.
b4b166af 1036
eaf95a26
UD
10372008-01-15 Ulrich Drepper <drepper@redhat.com>
1038
1039 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1040 thread returns the program exits with an error code.
1041
ab355d9a
UD
10422008-01-10 Ulrich Drepper <drepper@redhat.com>
1043
1044 * pthread-errnos.sym: Add EOVERFLOW.
1045 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1046 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1047 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1048 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1049
b8cca206
UD
10502007-12-14 Ulrich Drepper <drepper@redhat.com>
1051
1052 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1053 parameter. Passed it as permission to mmap.
1054 * allocatestack.c (allocate_stack): Pass prot as second parameter
1055 to ARCH_RETRY_MMAP.
1056
189dce4f
UD
10572007-12-12 Ulrich Drepper <drepper@redhat.com>
1058
3eb0e1c6
UD
1059 * tst-basic7.c: Allocate memory for the stack.
1060
189dce4f
UD
1061 [BZ #5465]
1062 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1063 (__pthread_cond_timedwait): Don't use VDSO.
58d11795 1064 Patch by Michal Januszewski.
189dce4f 1065
26e21e75
UD
10662007-12-07 Ulrich Drepper <drepper@redhat.com>
1067
1068 [BZ #5455]
1069 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1070 Allow label before pthread_cleanup_pop.
1071 (pthread_cleanup_pop_restore_np): Likewise.
1072
191ec77f
UD
10732007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1074
1075 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1076 Store 2 before returning ETIMEDOUT.
1077
c012be6f
UD
10782007-11-23 Ulrich Drepper <drepper@redhat.com>
1079
1080 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1081 Store 2 before returning ETIMEDOUT.
1082 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1083 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1084 (__lll_lock_wait_private): Optimize.
1085 (__lll_lock_wait): Likewise.
1086
77f1e09a
UD
10872007-11-20 Jakub Jelinek <jakub@redhat.com>
1088
1089 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1090 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1091 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1092
0f7e0ee5
UD
10932007-11-08 Ulrich Drepper <drepper@redhat.com>
1094
cbed6a60
UD
1095 [BZ #5240]
1096 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1097 If we time out, try one last time to lock the futex to avoid
1098 losing a wakeup signal.
1099 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1100 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1101
0f7e0ee5
UD
1102 [BZ #5245]
1103 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1104 if necessary.
1105
f6ed654c
UD
11062007-11-07 Ulrich Drepper <drepper@redhat.com>
1107
1108 [BZ #5245]
1109 * allocatestack.c (allocate_stack): Change ENOMEM error in case
1110 mmap failed to EAGAIN.
1111 * Makefile (tests): Add tst-basic7.
1112 * tst-basic7.c: New file.
1113
b92e3780
UD
11142007-11-05 Ulrich Drepper <drepper@redhat.com>
1115
1116 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1117 Use __linkin_atfork.
1118
94a749f6
UD
11192007-11-03 Mike Frysinger <vapier@gentoo.org>
1120
1121 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1122 missing line continuations.
1123 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1124 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
1125
f160a450
UD
11262007-10-28 Ulrich Drepper <drepper@redhat.com>
1127
1128 [BZ #5220]
1129 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1130 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1131 (struct timer): Add next element.
1132 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1133 enqueue timer structure into __active_timer_sigev_thread list.
1134 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1135 remove timer struct from __active_timer_sigev_thread.
1136 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1137 Before using timer structure make sure it is still on the
1138 __active_timer_sigev_thread list. Keep lock until done.
1139 Define __active_timer_sigev_thread and
1140 __active_timer_sigev_thread_lock.
1141
94833f11
UD
11422007-10-27 Ulrich Drepper <drepper@redhat.com>
1143
1144 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1145 Redefine thread_atfork for use of ATFORK_MEM.
1146 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1147 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1148 function.
1149 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1150 Use atomic operation when removing first element of list.
1151
96c06e08
JJ
11522007-10-17 Jakub Jelinek <jakub@redhat.com>
1153
1154 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1155 routine instead of an alias to __new_sem_post.
1156
e807818b
JJ
11572007-10-15 Jakub Jelinek <jakub@redhat.com>
1158
1159 * init.c (__pthread_initialize_minimal): Initialize word to appease
1160 valgrind.
1161
59d430c6
UD
11622007-10-10 Jakub Jelinek <jakub@redhat.com>
1163
1164 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1165 libc.so just clear NAME.
1166 (__libc_rwlock_fini): Nop inside of libc.so.
1167 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1168 all zeros.
1169
221d9d8e
UD
11702007-09-02 Ulrich Drepper <drepper@redhat.com>
1171
1172 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1173 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1174 unlocking failed.
1175 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1176
2a01ce56
UD
11772007-08-21 Ulrich Drepper <drepper@redhat.com>
1178
1179 [BZ #4938]
1180 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1181 reclaimed stack if necessary.
1182 * Makefile (tests): Add tst-tsd6.
1183 * tst-tsd6.c: New file.
1184
c273641b
JJ
11852007-08-21 Jakub Jelinek <jakub@redhat.com>
1186
1187 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1188 Add private argument.
1189
fb84593c
UD
11902007-08-20 Ulrich Drepper <drepper@redhat.com>
1191
1192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1193 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1194
3e8d1eab
JJ
11952007-08-16 Jakub Jelinek <jakub@redhat.com>
1196
1197 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1198 (__lll_robust_timedlock): Pass private as last argument to
1199 __lll_robust_timedlock_wait.
1200 (__lll_unlock): Fix a pasto.
1201
e4720b0e
JJ
12022007-08-15 Jakub Jelinek <jakub@redhat.com>
1203
1204 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1205 sparc_old_sem): New structs.
1206 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1207 (__sem_wait_cleanup): New function.
1208 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1209 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1210 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1211 lll_futex_wait.
1212 (__old_sem_wait): New function.
1213 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1214 nptl/sysdeps/unix/sysv/linux/sparc version.
1215 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1216 Likewise.
1217 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1218 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1219 (__new_sem_trywait): Use sparc_old_sem structure.
1220 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1221 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
1222 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1223 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1224 lll_futex_timed_wait.
1225 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1226 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1227 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1228 lll_futex_wake.
1229 (__old_sem_post): New function.
1230 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1231 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1232 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1233 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1234 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1235 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1236
d13f4a43
UD
12372007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1238
1239 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1240 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1241 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1242 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1243 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1244 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1245 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1246 Use FUTEX_WAKE_OP.
1247 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1248 kernel-features.h and tcb-offsets.h.
1249 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1250 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1251 process private.
1252 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1253 tcb-offsets.h.
1254 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1255 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1256 process private.
1257 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1258 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1259 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1260 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1261 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1262 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1263 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1264
702a9414
JJ
12652007-08-14 Jakub Jelinek <jakub@redhat.com>
1266
467d1345
JJ
1267 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1268 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1269 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1270 lll_futex_timed_wait.
1271
702a9414
JJ
1272 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1273 __lll_robust_unlock): Rewrite as macros instead of inline functions.
1274 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1275 __lll_robust_unlock, __lll_wait_tid): Likewise.
1276
22502ea2
UD
12772007-08-13 Jakub Jelinek <jakub@redhat.com>
1278
1279 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1280 Fix a pasto.
1281 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1282 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1283 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1284 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1285 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1286 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1287 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1288 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1289 kernel-features.h.
1290 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1291 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1292 process private. Switch DW_CFA_advance_loc1 and some
1293 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1294 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1295 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1296 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1297 process private. Switch DW_CFA_advance_loc{1,2} and some
1298 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1299 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1300 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1301 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1302 Likewise.
1303 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1304 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1305 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1306 Likewise.
1307 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1308 (__pthread_cond_broadcast): Compare %r8 instead of
1309 dep_mutex-cond_*(%rdi) with $-1.
1310 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1311 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1312 of oring.
1313
4baf59ad
UD
13142007-08-13 Ulrich Drepper <drepper@redhat.com>
1315
1316 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1317
9c6f6953
UD
13182007-08-13 Jakub Jelinek <jakub@redhat.com>
1319
1320 * allocatestack.c: Include kernel-features.h.
1321 * pthread_create.c: Likewise.
1322 * pthread_mutex_init.c: Likewise.
1323 * init.c: Likewise.
1324 * pthread_cond_timedwait.c: Likewise.
1325 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1326 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1327 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1328 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1329 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1330 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1331 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1332 Likewise.
1333 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1334 Likewise.
1335 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1336 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1337 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1338 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1339
974a1f0f
UD
13402007-08-12 Jakub Jelinek <jakub@redhat.com>
1341
1342 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1343 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1344 byte elements. One of them is the new __shared element.
1345 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1346 adjust names of other padding elements.
1347 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1348 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1349 byte elements. One of them is the new __shared element.
1350 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1351 adjust names of other padding elements.
1352 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1353 Renamed __pad1 element to __shared, adjust names of other padding
1354 elements.
1355 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1356 (pthread_rwlock_t): Likewise.
1357 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1358 typo.
1359
13602007-08-09 Anton Blanchard <anton@samba.org>
1361
1362 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1363
f47e2626
UD
13642007-08-12 Ulrich Drepper <drepper@redhat.com>
1365
1366 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1367 <kernel-features.h>.
1368 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1369
5bd8a249
UD
13702007-08-11 Ulrich Drepper <drepper@redhat.com>
1371
1372 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1373 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1374 dealing with robust mutexes.
1375 * pthread_mutex_timedlock.c: Likewise.
1376 * pthread_mutex_trylock.c: Likewise.
1377 * pthread_mutex_unlock.c: Likewise.
1378 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1379
13802007-08-06 Jakub Jelinek <jakub@redhat.com>
1381
1382 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1383 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1384 (PTHREAD_MUTEX_PSHARED): Define.
1385 * pthread_mutex_init.c (__pthread_mutex_init): Set
1386 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1387 mutexes.
1388 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1389 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1390 as second argument to lll_lock.
1391 (LLL_MUTEX_TRYLOCK): Take mutex as argument
1392 instead of its __data.__lock field.
1393 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1394 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1395 to lll_robust_lock.
1396 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1397 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1398 instead of mutex->__data.__kind directly, pass
1399 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1400 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1401 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1402 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1403 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1404 to lll_timedlock, lll_robust_timedlock, lll_unlock and
1405 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
1406 of mutex->__data.__kind directly.
1407 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1408 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1409 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
1410 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1411 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1412 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1413 and lll_futex_wake.
1414 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1415 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1416 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1417 directly.
1418 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1419 Take mutex as argument instead of its __data.__lock field, pass
1420 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1421 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1422 __data.__lock field.
1423 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1424 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1425 to lll_robust_cond_lock.
1426 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1427 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1428 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
1429 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1430 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1431 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1432 lll_futex_wait.
1433 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1434 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1435 lll_futex_wake.
1436 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1437 pshared variable, pass it to lll_lock, lll_unlock,
1438 lll_futex_timedwait and lll_futex_wake.
1439 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1440 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1441 and lll_futex_wake.
1442 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1443 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1444 macro.
1445 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1446 lll_futex_wake_unlock): Likewise.
1447 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1448 Likewise.
1449 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1450 lll_futex_wake_unlock): Likewise.
1451 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1452 Likewise.
1453 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1454 lll_futex_wake_unlock): Likewise.
1455 (lll_futex_wake): Fix a typo.
1456 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1457 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1458 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1459 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1460 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1461 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1462 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1463 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1464 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1465 (__pthread_cond_timedwait): Likewise.
1466 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1467 (__condvar_cleanup, __pthread_cond_wait): Likewise.
1468
0470fa46
JJ
14692007-08-05 Jakub Jelinek <jakub@redhat.com>
1470
1471 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1472 Don't use CGOTSETUP and CGOTRESTORE macros.
1473 (CGOTSETUP, CGOTRESTORE): Remove.
1474 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1475 @local symbol.
1476
64f6281c
UD
14772007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1478
1479 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1480 definitions for private futexes.
1481 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1482 kernel-features.h and lowlevellock.h. Use private futexes if
1483 they are available.
1484 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1485 (__lll_mutex_lock_wait): Rename to
1486 (__lll_lock_wait): ... this. Don't compile in for libc.so.
1487 (__lll_mutex_timedlock_wait): Rename to ...
1488 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
1489 Don't compile in for libc.so.
1490 (__lll_mutex_unlock_wake): Rename to ...
1491 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
1492 (__lll_timedwait_tid): Use __NR_gettimeofday.
1493 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1494 the header from assembler. Renamed all lll_mutex_* resp.
1495 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1496 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1497 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1498 Define.
1499 (__lll_lock_wait_private): Add prototype.
1500 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1501 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1502 __lll_unlock_wake): Likewise.
1503 (lll_lock): Add private argument. Call __lll_lock_wait_private
1504 if private is constant LLL_PRIVATE.
1505 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1506 lll_timedlock, lll_robust_timedlock): Add private argument.
1507 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1508 if private is constant LLL_PRIVATE.
1509 (lll_robust_unlock, lll_robust_dead): Add private argument.
1510 (lll_lock_t): Remove.
1511 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1512 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1513 lll_cond_wake, lll_cond_broadcast): Remove.
1514 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1515 kernel-features.h and lowlevellock.h.
1516 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1517 (LOAD_FUTEX_WAIT): Define.
1518 (__lll_robust_mutex_lock_wait): Rename to ...
1519 (__lll_robust_lock_wait): ... this. Add private argument.
1520 Use LOAD_FUTEX_WAIT macro.
1521 (__lll_robust_mutex_timedlock_wait): Rename to ...
1522 (__lll_robust_timedlock_wait): ... this. Add private argument.
1523 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1524 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1525 lowlevellock.h.
1526 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1527 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1528 __lll_mutex_{lock,unlock}_*.
1529 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1530 lowlevellock.h and pthread-errnos.h.
1531 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1532 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1533 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1534 __lll_mutex_{lock,unlock}_*.
1535 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1536 lowlevellock.h and pthread-errnos.h.
1537 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1538 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1539 __lll_mutex_{lock,unlock}_*.
1540 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1541 lowlevellock.h.
1542 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1543 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1544 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1545 (__condvar_tw_cleanup): Likewise.
1546 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1547 lowlevellock.h.
1548 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1549 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1550 __lll_mutex_{lock,unlock}_*.
1551 ( __condvar_w_cleanup): Likewise.
1552 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1553 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1554 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1555 lowlevellock.h.
1556 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1557 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1558 __lll_mutex_{lock,unlock}_*.
1559 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1560 lowlevellock.h.
1561 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1562 FUTEX_PRIVATE_FLAG): Remove.
1563 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1564 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1565 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1566 lowlevellock.h.
1567 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1568 FUTEX_PRIVATE_FLAG): Remove.
1569 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1570 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1571 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1572 lowlevellock.h.
1573 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1574 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1575 __lll_mutex_{lock,unlock}_*.
1576 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1577 lowlevellock.h.
1578 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1579 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1580 __lll_mutex_{lock,unlock}_*.
1581 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1582 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1583 (__new_sem_post): Use standard initial exec code sequences.
1584 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1585 lowlevellock.h.
1586 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1587 FUTEX_PRIVATE_FLAG): Remove.
1588 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1589 exec code sequences.
1590 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1591 (__new_sem_trywait): Use standard initial exec code sequences.
1592 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1593 (__new_sem_wait): Use standard initial exec code sequences.
1594
e51deae7
UD
15952007-07-31 Anton Blanchard <anton@samba.org>
1596
1597 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1598 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1599 atomic_full_barrier.
1600
16012007-07-31 Jakub Jelinek <jakub@redhat.com>
1602
1603 * allocatestack.c (stack_cache_lock): Change type to int.
1604 (get_cached_stack, allocate_stack, __deallocate_stack,
1605 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1606 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1607 as second argument to lll_lock and lll_unlock macros on
1608 stack_cache_lock.
1609 * pthread_create.c (__find_in_stack_list): Likewise.
1610 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1611 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1612 as second argument.
1613 * descr.h (struct pthread): Change lock and setxid_futex field
1614 type to int.
1615 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1616 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1617 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1618 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1619 Likewise.
1620 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1621 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1622 * pthreadP.h (__attr_list_lock): Change type to int.
1623 * pthread_attr_init.c (__attr_list_lock): Likewise.
1624 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1625 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1626 lll_{,un}lock.
1627 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1628 also for lll_futex_{wake,wait}.
1629 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1630 a pointer to const.
1631 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1632 LLL_SHARED as second argument to lll_{,un}lock.
1633 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1634 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1635 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1636 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1637 Likewise.
1638 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1639 as second argument to lll_{,un}lock macros on pd->lock.
1640 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1641 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1642 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1643 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1644 Likewise.
1645 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1646 Likewise.
1647 * pthread_once.c (once_lock): Change type to int.
1648 (__pthread_once): Pass LLL_PRIVATE as second argument to
1649 lll_{,un}lock macros on once_lock.
1650 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1651 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1652 rwlock->__data.__shared as second argument to them and similarly
1653 for lll_futex_w*.
1654 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1655 Likewise.
1656 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1657 Likewise.
1658 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1659 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1660 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1661 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1662 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1663 to lll_{,un}lock macros on __sem_mappings_lock.
1664 * sem_open.c (check_add_mapping): Likewise.
1665 (__sem_mappings_lock): Change type to int.
1666 * semaphoreP.h (__sem_mappings_lock): Likewise.
1667 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1668 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1669 instead of lll_*mutex_*, pass LLL_SHARED as last
1670 argument.
1671 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1672 pass LLL_SHARED as last argument.
1673 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1674 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1675 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1676 pass LLL_SHARED as last argument.
1677 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1678 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1679 LLL_SHARED as last argument.
1680 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1681 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1682 Similarly.
1683 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1684 __libc_lock_lock_recursive, __libc_lock_unlock,
1685 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1686 argument to lll_{,un}lock.
1687 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1688 _IO_lock_unlock): Likewise.
1689 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1690 compound literal.
1691 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1692 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1693 __fork_lock.
1694 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1695 free_mem): Likewise.
1696 (__fork_lock): Change type to int.
1697 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1698 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1699 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1700 lll_futex_wake.
1701 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1702 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1703 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1704 New function.
1705 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1706 pass it through to lll_futex_*wait, only compile in when
1707 IS_IN_libpthread.
1708 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1709 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1710 argument and pass it through to lll_futex_*wait.
1711 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1712 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1713 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1714 inline functions to __lll_* resp. __lll_robust_*.
1715 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1716 (lll_mutex_dead): Add private argument.
1717 (__lll_lock_wait_private): New prototype.
1718 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1719 __lll_robust_lock_timedwait): Add private argument to prototypes.
1720 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1721 call __lll_lock_wait_private, otherwise pass private to
1722 __lll_lock_wait.
1723 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1724 __lll_robust_timedlock): Add private argument, pass it to
1725 __lll_*wait functions.
1726 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1727 call __lll_unlock_wake_private, otherwise pass private to
1728 __lll_unlock_wake.
1729 (__lll_robust_unlock): Add private argument, pass it to
1730 __lll_robust_unlock_wake.
1731 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1732 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1733 argument, pass it through to __lll_* inline function.
1734 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1735 (lll_lock_t): Remove.
1736 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1737 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1738 lll_cond_wake, lll_cond_broadcast): Remove.
1739 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1740 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1741 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1742 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1743 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1744 the header from assembler. Renamed all lll_mutex_* resp.
1745 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1746 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1747 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1748 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1749 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1750 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1751 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1752 Remove prototype.
1753 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1754 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1755 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1756 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1757 MULTIPLE_THREADS_OFFSET as another asm operand.
1758 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1759 MULTIPLE_THREADS_OFFSET as last asm operand, call
1760 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1761 otherwise pass private as another argument to __lll_lock_wait.
1762 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1763 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1764 private as another argument to __lll_*lock_wait call.
1765 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1766 MULTIPLE_THREADS_OFFSET as another asm operand, call
1767 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1768 otherwise pass private as another argument to __lll_unlock_wake.
1769 (lll_robust_unlock): Add private argument, pass private as another
1770 argument to __lll_unlock_wake.
1771 (lll_robust_dead): Add private argument, use __lll_private_flag
1772 macro.
1773 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1774 LLL_MUTEX_LOCK_INITIALIZER.
1775 (lll_lock_t): Remove.
1776 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1777 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1778 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1779 lll_cond_wake, lll_cond_broadcast): Remove.
1780 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1781 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1782 2007-05-2{3,9} changes.
1783 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1784 kernel-features.h and lowlevellock.h.
1785 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1786 (LOAD_FUTEX_WAIT): Rewritten.
1787 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1788 define.
1789 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1790 (__lll_mutex_lock_wait): Rename to ...
1791 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1792 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1793 (__lll_mutex_timedlock_wait): Rename to ...
1794 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1795 contains private argument. Don't compile in for libc.so.
1796 (__lll_mutex_unlock_wake): Rename to ...
1797 (__lll_unlock_wake): ... this. %ecx contains private argument.
1798 Don't compile in for libc.so.
1799 (__lll_timedwait_tid): Use __NR_gettimeofday.
1800 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1801 kernel-features.h and lowlevellock.h.
1802 (LOAD_FUTEX_WAIT): Define.
1803 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1804 define.
1805 (__lll_robust_mutex_lock_wait): Rename to ...
1806 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1807 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1808 macro.
1809 (__lll_robust_mutex_timedlock_wait): Rename to ...
1810 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1811 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1812 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1813 lowlevellock.h.
1814 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1815 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1816 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1817 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1818 to __lll_lock_wait in %edx.
1819 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1820 Include lowlevellock.h and pthread-errnos.h.
1821 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1822 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1823 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1824 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1825 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1826 __lll_unlock_wake.
1827 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1828 Include lowlevellock.h and pthread-errnos.h.
1829 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1830 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1831 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1832 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1833 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1834 __lll_unlock_wake.
1835 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1836 Include lowlevellock.h.
1837 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1838 Don't define.
1839 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1840 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1841 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1842 __lll_unlock_wake. Use __NR_gettimeofday.
1843 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1844 Include lowlevellock.h.
1845 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1846 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1847 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1848 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1849 and __lll_unlock_wake.
1850 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1851 Include lowlevellock.h.
1852 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1853 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1854 MUTEX(%ebx) address in %edx rather than %ecx to
1855 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1856 and __lll_unlock_wake. Move return value from %ecx to %edx
1857 register.
1858 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1859 Include lowlevellock.h.
1860 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1861 Don't define.
1862 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1863 MUTEX(%ebp) address in %edx rather than %ecx to
1864 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1865 and __lll_unlock_wake. Move return value from %ecx to %edx
1866 register. Use __NR_gettimeofday.
1867 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1868 Include lowlevellock.h.
1869 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1870 Don't define.
1871 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1872 MUTEX(%ebp) address in %edx rather than %ecx to
1873 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1874 and __lll_unlock_wake. Move return value from %ecx to %edx
1875 register. Use __NR_gettimeofday.
1876 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1877 Include lowlevellock.h.
1878 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1879 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1880 MUTEX(%edi) address in %edx rather than %ecx to
1881 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1882 and __lll_unlock_wake.
1883 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1884 Include lowlevellock.h.
1885 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1886 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1887 MUTEX(%ebx) address in %edx rather than %ecx to
1888 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1889 and __lll_unlock_wake. Move return value from %ecx to %edx
1890 register.
1891 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1892 lowlevellock.h.
1893 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1894 define.
1895 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1896 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1897 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1898 lowlevellock.h.
1899 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1900 (sem_timedwait): Use __NR_gettimeofday.
1901 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1902 lowlevellock.h.
1903 (LOCK): Don't define.
1904 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1905 lowlevellock.h.
1906 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1907 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1908 are waiters.
1909 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1910 2007-05-2{3,9} changes.
1911 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1912 kernel-features.h and lowlevellock.h.
1913 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1914 (LOAD_FUTEX_WAIT): Rewritten.
1915 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1916 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1917 (__lll_mutex_lock_wait): Rename to ...
1918 (__lll_lock_wait): ... this. %esi is now private argument.
1919 Don't compile in for libc.so.
1920 (__lll_mutex_timedlock_wait): Rename to ...
1921 (__lll_timedlock_wait): ... this. %esi contains private argument.
1922 Don't compile in for libc.so.
1923 (__lll_mutex_unlock_wake): Rename to ...
1924 (__lll_unlock_wake): ... this. %esi contains private argument.
1925 Don't compile in for libc.so.
1926 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1927 kernel-features.h and lowlevellock.h.
1928 (LOAD_FUTEX_WAIT): Define.
1929 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1930 (__lll_robust_mutex_lock_wait): Rename to ...
1931 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1932 Use LOAD_FUTEX_WAIT macro.
1933 (__lll_robust_mutex_timedlock_wait): Rename to ...
1934 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1935 private, use LOAD_FUTEX_WAIT macro.
1936 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1937 lowlevellock.h.
1938 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1939 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1940 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1941 __lll_lock_wait and __lll_unlock_wake.
1942 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1943 Include lowlevellock.h and pthread-errnos.h.
1944 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1945 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1946 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1947 pass LLL_SHARED in %esi to both __lll_lock_wait and
1948 __lll_unlock_wake.
1949 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1950 Include lowlevellock.h and pthread-errnos.h.
1951 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1952 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1953 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1954 pass LLL_SHARED in %esi to both __lll_lock_wait and
1955 __lll_unlock_wake.
1956 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1957 Include lowlevellock.h.
1958 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1959 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1960 pass LLL_SHARED in %esi to both __lll_lock_wait and
1961 __lll_unlock_wake.
1962 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1963 Include lowlevellock.h.
1964 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1965 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1966 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1967 and __lll_unlock_wake.
1968 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1969 Include lowlevellock.h.
1970 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1971 Don't define.
1972 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1973 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1974 and __lll_unlock_wake.
1975 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1976 Include lowlevellock.h.
1977 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1978 Don't define.
1979 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1980 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1981 and __lll_unlock_wake.
1982 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1983 Include lowlevellock.h.
1984 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1985 Don't define.
1986 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1987 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1988 and __lll_unlock_wake.
1989 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1990 Include lowlevellock.h.
1991 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1992 Don't define.
1993 (__pthread_rwlock_unlock): 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_wrlock.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 %ecx to both __lll_lock_wait
2002 and __lll_unlock_wake.
2003 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2004 lowlevellock.h.
2005 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2006 define.
2007 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2008 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2009 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2010 lowlevellock.h.
2011 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2012 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2013 lowlevellock.h.
2014 (LOCK): Don't define.
2015 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2016 lowlevellock.h.
2017 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2018 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2019 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2020 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2021 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2022 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2023 (__lll_lock_wait_private): New function.
2024 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2025 it to lll_futex_*wait. Don't compile in for libc.so.
2026 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2027 Remove.
2028 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2029 (struct sparc_pthread_barrier): Remove.
2030 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2031 struct sparc_pthread_barrier. Pass
2032 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2033 and lll_futex_wait macros.
2034 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2035 Remove.
2036 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2037 Include sparc pthread_barrier_wait.c instead of generic one.
2038
6f59d56e
UD
20392007-07-30 Jakub Jelinek <jakub@redhat.com>
2040
1475e201
UD
2041 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2042
6f59d56e
UD
2043 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2044 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2045 %ecx.
2046 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2047 (pthread_rwlock_timedwrlock): Likewise.
2048 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2049 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2050
558f0300
JJ
20512007-07-31 Jakub Jelinek <jakub@redhat.com>
2052
2053 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2054
cedb4109
UD
20552007-07-26 Jakub Jelinek <jakub@redhat.com>
2056
2057 * tst-locale2.c (useless): Add return statement.
2058
085a4412
UD
20592007-07-24 Jakub Jelinek <jakub@redhat.com>
2060
2061 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2062 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2063 * pthread_create.c (start_thread): Likewise.
2064 * init.c (sighandler_setxid): Likewise.
2065 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2066 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2067 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2068 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2069 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2070 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2071 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2072 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2073 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2074 Likewise.
2075 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2076 Likewise.
2077 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2078 Likewise.
2079 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2080 __rtld_notify): Likewise.
2081 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2082 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2083 __pthread_once): Likewise.
2084 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2085 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2086 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2087 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2088 (lll_futex_wait): Add private argument, define as wrapper around
2089 lll_futex_timed_wait.
2090 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2091 use __lll_private_flag macro.
2092 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2093 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2094 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2095 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2096 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2097 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2098 (lll_futex_wait): Add private argument, define as wrapper around
2099 lll_futex_timed_wait.
2100 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2101 use __lll_private_flag macro.
2102 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2103 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2104 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2105 Define.
2106 (lll_futex_timed_wait, lll_futex_wake): Use it.
2107 (lll_private_futex_wait, lll_private_futex_timed_wait,
2108 lll_private_futex_wake): Removed.
2109 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2110 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2111 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2112 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2113 (lll_futex_wait): Add private argument, define as wrapper around
2114 lll_futex_timed_wait.
2115 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2116 use __lll_private_flag macro.
2117 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2118 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2119 to lll_futex_*.
2120 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2121 (lll_private_futex_wait, lll_private_futex_timed_wait,
2122 lll_private_futex_wake): Removed.
2123 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2124 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2125 (lll_private_futex_wait, lll_private_futex_timed_wait,
2126 lll_private_futex_wake): Removed.
2127 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2128 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2129 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2130 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2131 (lll_futex_wait): Add private argument, define as wrapper around
2132 lll_futex_timed_wait.
2133 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2134 use __lll_private_flag macro.
2135 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2136 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2137 to lll_futex_*.
2138 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2139 Define.
2140 (lll_futex_timed_wait, lll_futex_wake): Use it.
2141 (lll_private_futex_wait, lll_private_futex_timed_wait,
2142 lll_private_futex_wake): Removed.
2143
ef0af159
JJ
21442007-07-27 Jakub Jelinek <jakub@redhat.com>
2145
2146 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2147 of the structure for sparc32.
2148
21492007-07-26 Aurelien Jarno <aurelien@aurel32.net>
2150
2151 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2152
eb4f5909
UD
21532007-07-23 Ulrich Drepper <drepper@redhat.com>
2154
2155 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2156 code used when private futexes are assumed.
2157 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2158 Likewise.
2159
b5f13526
UD
21602007-07-23 Jakub Jelinek <jakub@redhat.com>
2161
2162 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2163 (__lll_private_flag): Define.
2164 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2165 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2166 __lll_private_flag.
2167 (lll_private_futex_wait, lll_private_futex_timedwait,
2168 lll_private_futex_wake): Define as wrapper around non-_private
2169 macros.
2170 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2171 (__lll_private_flag): Define.
2172 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2173 (lll_private_futex_wait, lll_private_futex_timedwait,
2174 lll_private_futex_wake): Define as wrapper around non-_private
2175 macros.
2176
eb7721f2
UD
21772007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
2178
2179 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2180 parameter to lll_futex_wait call.
2181 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2182
2183 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2184 Replace lll_futex_wait with lll_private_futex_wait.
2185 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2186 Add LLL_SHARED parameter to lll_futex_wake().
2187
2188 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2189 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2190 lll_private_futex_wake.
2191 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2192 bit from private parm before syscall.
2193 (lll_futex_timed_wait): Likewise.
2194 (lll_futex_wake): Likewise.
2195 (lll_futex_wake_unlock): Likewise.
2196 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2197 (lll_robust_mutex_unlock): Likewise.
2198 (lll_mutex_unlock_force): Likewise.
2199 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2200
defc45f2
UD
22012007-07-23 Ulrich Drepper <drepper@redhat.com>
2202
2203 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2204 compilation when unconditionally using private futexes.
2205 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2206 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2207 Likewise.
2208 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2209 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2210
087722b8
UD
22112007-07-17 Jakub Jelinek <jakub@redhat.com>
2212
2213 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2214 Define.
2215
765c6b0c
UD
22162007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2217
2218 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2219 kernel-features.h.
2220
7d9d8bd1
RM
22212007-05-16 Roland McGrath <roland@redhat.com>
2222
2223 * init.c (__nptl_initial_report_events): New variable.
2224 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2225 to that.
2226
a4915df2
UD
22272007-06-22 Jakub Jelinek <jakub@redhat.com>
2228
2229 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2230 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2231
e4eb675d
UD
22322007-06-19 Ulrich Drepper <drepper@redhat.com>
2233
2234 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2235 implementation.
2236
ae1ad3ae
UD
22372007-06-18 Ulrich Drepper <drepper@redhat.com>
2238
2239 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2240 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2241 * pthread_mutex_timedlock.c: Likewise.
2242 * pthread_mutex_trylock.c: Likewise.
2243 * pthread_mutex_unlock.c: Likewise.
2244
89074592
UD
22452007-06-17 Andreas Schwab <schwab@suse.de>
2246
2247 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2248 sections.
2249
d4201cc4
UD
22502007-06-17 Ulrich Drepper <drepper@redhat.com>
2251
2252 * allocatestack.c (allocate_stack): Make code compile if
2253 __ASSUME_PRIVATE_FUTEX is set.
2254
339dbf0e
UD
22552007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2256
2257 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2258 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2259 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2260 (__pthread_rwlock_wrlock): Likewise.
2261 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2262 (pthread_rwlock_timedrdlock): Likewise.
2263 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2264 (pthread_rwlock_timedwrlock): Likewise.
2265 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2266 (__pthread_rwlock_unlock): Likewise.
2267
22682007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2269
2270 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2271 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2272 Split __flags into __flags, __shared, __pad1 and __pad2.
2273 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
b42a214c 2274 futexes if they are available.
339dbf0e 2275 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
b42a214c 2276 in libc-lowlevellock.S allow using private futexes.
339dbf0e
UD
2277 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2278 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
2279 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
2280 to call lll_futex_timed_wait. Add lll_private_futex_wait,
2281 lll_private_futex_timed_wait and lll_private_futex_wake.
2282 (lll_robust_mutex_unlock): Fix typo.
2283 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
b42a214c 2284 field in futex command setup.
339dbf0e
UD
2285 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2286 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2287 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2288 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
b42a214c 2289 if they are available. Remove clear_once_control.
339dbf0e
UD
2290 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2291 futexes if they are available.
2292 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2293 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2294 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2295 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2296 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2297 Wake only when there are waiters.
2298 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2299 support. Indicate that there are waiters. Remove unnecessary
b42a214c 2300 extra cancellation test.
339dbf0e
UD
2301 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2302 left-over duplication of __sem_wait_cleanup.
2303
26f56c1c
UD
23042007-06-07 Ulrich Drepper <drepper@redhat.com>
2305
2306 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2307 parameter to lll_futex_wait, lll_futex_timed_wait, and
2308 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
2309 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2310 lll_private_futex_wake.
2311 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2312 * allocatestack.c: Adjust use of lll_futex_* macros.
2313 * init.c: Likewise.
2314 * lowlevellock.h: Likewise.
2315 * pthread_barrier_wait.c: Likewise.
2316 * pthread_cond_broadcast.c: Likewise.
2317 * pthread_cond_destroy.c: Likewise.
2318 * pthread_cond_signal.c: Likewise.
2319 * pthread_cond_timedwait.c: Likewise.
2320 * pthread_cond_wait.c: Likewise.
2321 * pthread_create.c: Likewise.
2322 * pthread_mutex_lock.c: Likewise.
2323 * pthread_mutex_setprioceiling.c: Likewise.
2324 * pthread_mutex_timedlock.c: Likewise.
2325 * pthread_mutex_unlock.c: Likewise.
2326 * pthread_rwlock_timedrdlock.c: Likewise.
2327 * pthread_rwlock_timedwrlock.c: Likewise.
2328 * pthread_rwlock_unlock.c: Likewise.
2329 * sysdeps/alpha/tls.h: Likewise.
2330 * sysdeps/i386/tls.h: Likewise.
2331 * sysdeps/ia64/tls.h: Likewise.
2332 * sysdeps/powerpc/tls.h: Likewise.
2333 * sysdeps/pthread/aio_misc.h: Likewise.
2334 * sysdeps/pthread/gai_misc.h: Likewise.
2335 * sysdeps/s390/tls.h: Likewise.
2336 * sysdeps/sh/tls.h: Likewise.
2337 * sysdeps/sparc/tls.h: Likewise.
2338 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2339 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2340 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2341 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2342 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2343 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2344 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2345 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2346 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2347 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2348 Likewise.
2349 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2350 * sysdeps/x86_64/tls.h: Likewise.
2351
ee5d5755
UD
23522007-05-29 Ulrich Drepper <drepper@redhat.com>
2353
b03b0c29
UD
2354 * pthread_getattr_np.c: No need to install a cancellation handler,
2355 this is no cancellation point.
2356 * pthread_getschedparam.c: Likewise.
2357 * pthread_setschedparam.c: Likewise.
2358 * pthread_setschedprio.c: Likewise.
2359 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2360 lll_unlock_wake_cb.
2361 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2362 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2363 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2364 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2365 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2366 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2367 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2368 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2369 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2370 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2371 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2372 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 2373
0154658d
UD
2374 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2375 whether there are more than one thread makes no sense here since
2376 we only call the slow path if the locks are taken.
2377 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2378
ee5d5755
UD
2379 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2380 COND_NWAITERS_SHIFT.
2381 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2382 COND_CLOCK_BITS.
2383 * pthread_cond_init.c: Likewise.
2384 * pthread_cond_timedwait.c: Likewise.
2385 * pthread_cond_wait.c: Likewise.
2386 * pthread_condattr_getclock.c: Likewise.
2387 * pthread_condattr_setclock.c: Likewise.
2388 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2389 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2390 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2391 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2392 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2393
991fa82b
UD
23942007-05-28 Jakub Jelinek <jakub@redhat.com>
2395
40f57573
UD
2396 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2397 unistd.h.
2398
991fa82b
UD
2399 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2400 insn suffix.
2401 (THREAD_GSCOPE_GET_FLAG): Remove.
2402 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2403 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2404 changes.
2405 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2406 (THREAD_GSCOPE_GET_FLAG): Remove.
2407 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2408 instead of THREAD_GSCOPE_GET_FLAG.
2409 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
2410 it.
2411 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2412 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2413 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2414 THREAD_GSCOPE_WAIT): Define.
2415 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2416 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2417 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2418 THREAD_GSCOPE_WAIT): Define.
2419 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2420 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2421 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2422 THREAD_GSCOPE_WAIT): Define.
2423 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2424 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2425 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2426 THREAD_GSCOPE_WAIT): Define.
2427
24282007-05-24 Richard Henderson <rth@redhat.com>
2429
2430 * descr.h (struct pthread): Add header.gscope_flag.
2431 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2432 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2433 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2434 THREAD_GSCOPE_WAIT): Define.
2435
e59660bc
UD
24362007-05-27 Ulrich Drepper <drepper@redhat.com>
2437
2438 * init.c: Make it compile with older kernel headers.
2439
2440 * tst-initializers1.c: Show through exit code which test failed.
2441
2442 * pthread_rwlock_init.c: Also initialize __shared field.
2443 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2444 element in rwlock structure into four byte elements. One of them is
2445 the new __shared element.
2446 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2447 Likewise.
cd0dbd89 2448 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
2449 __shared, adjust names of other padding elements.
2450 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2451 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2452 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2453 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2454 FUTEX_PRIVATE_FLAG.
2455 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2456 futex to use private operations if possible.
2457 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2458 Likewise.
2459 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2460 Likewise.
2461 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2462 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
2463 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2464 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2465 Likewise.
2466 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2467 Likewise.
2468 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2469 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 2470
d8ff3792
UD
24712007-05-26 Ulrich Drepper <drepper@redhat.com>
2472
546346b6
UD
2473 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2474 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2475 * pthread_rwlock_timedrdlock.c: Likewise.
2476 * pthread_rwlock_tryrdlock.c: Likewise.
2477
a2dd3360
UD
2478 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2479 optimization.
2480
6df7ffad
UD
2481 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2482 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2483 duplication of __sem_wait_cleanup.
2484
2485 * allocatestack.c: Revert last change.
2486 * init.c: Likewise.
2487 * sysdeps/i386/tls.h: Likewise.
2488 * sysdeps/x86_64/tls.h: Likewise.
2489 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2490 header structure.
2491 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2492
d8ff3792
UD
2493 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2494 Add private field.
2495 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2496 * pthread_barrier_init.c: Set private flag if pshared and private
2497 futexes are supported.
2498 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2499 private field in futex command setup.
2500 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2501
3d2dd6ca
UD
25022007-05-25 Ulrich Drepper <drepper@redhat.com>
2503
42e6c665
UD
2504 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2505 support.
2506 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2507 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2508 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2509 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2510 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2511
3d2dd6ca
UD
2512 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2513 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2514 fields in the structure.
2515 (__old_sem_init): New function.
2516 * sem_open.c: Initialize all fields of the structure.
2517 * sem_getvalue.c: Adjust for renamed element.
2518 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2519 (gen-as-const-headers): Add structsem.sym.
2520 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2521 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2522 struct new_sem. Add struct old_sem.
2523 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2524 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2525 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2526 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2527 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2528 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2529 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2530 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2531 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2532 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2533 * tst-sem10.c: New file.
2534 * tst-sem11.c: New file.
2535 * tst-sem12.c: New file.
2536 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2537 of struct sem.
2538
20a4d722
JJ
25392007-05-25 Ulrich Drepper <drepper@redhat.com>
2540 Jakub Jelinek <jakub@redhat.com>
2541
2542 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2543 Move __pthread_enable_asynccancel right before futex syscall.
2544 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2545 Likewise.
2546
25472007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
2548
2549 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2550 THREAD_COPY_PRIVATE_FUTEX): Define.
2551 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2552 THREAD_COPY_PRIVATE_FUTEX): Define.
2553 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2554 * init.c (__pthread_initialize_minimal_internal): Use
2555 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
2556
2557 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2558 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2559 THREAD_GSCOPE_FLAG_WAIT): Define.
2560 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2561 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2562 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2563 PTR_DEMANGLE.
2564 (THREAD_GSCOPE_GET_FLAG): Define.
2565 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2566 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2567 instead of ->header.gscope_flag directly.
2568
5a8075b1
UD
25692007-05-23 Ulrich Drepper <drepper@redhat.com>
2570
2571 * init.c (__pthread_initialize_minimal_internal): Check whether
2572 private futexes are available.
2573 * allocatestack.c (allocate_stack): Copy private_futex field from
2574 current thread into the new stack.
2575 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2576 futexes if they are available.
2577 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2578 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2579 in libc-lowlevellock.S allow using private futexes.
2580 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2581 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2582 FUTEX_PRIVATE_FLAG.
2583 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2584 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2585 if they are available.
2586 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2587 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2588 * sysdeps/i386/tcb-offsets.sym: Likewise.
2589 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2590 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2591
6d59823c
UD
25922007-05-21 Ulrich Drepper <drepper@redhat.com>
2593
2594 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2595 Remove ptr_wait_lookup_done again.
2596 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2597 (__pthread_initialize_minimal_internal): Initialize
2598 _dl_wait_lookup_done pointer in _rtld_global directly.
2599 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2600 Remove code to code _dl_wait_lookup_done.
2601 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2602 encrypted for now.
2603
2c9718f3
JJ
26042007-05-21 Jakub Jelinek <jakub@redhat.com>
2605
2606 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2607 pthread_mutex_init failed with ENOTSUP.
2608
df94b641
UD
26092007-05-19 Ulrich Drepper <drepper@redhat.com>
2610
2611 * allocatestack.c (__wait_lookup_done): New function.
2612 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2613 Add ptr_wait_lookup_done.
2614 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2615 * pthreadP.h: Declare __wait_lookup_done.
2616 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2617 Define macros to implement reference handling of global scope.
2618 * sysdeps/x86_64/tls.h: Likewise.
2619 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2620 Initialize GL(dl_wait_lookup_done).
2621
bec51a30
UD
26222007-05-17 Ulrich Drepper <drepper@redhat.com>
2623
113ad5fc
UD
2624 [BZ #4512]
2625 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2626 is detected.
2627 * pthread_mutex_timedlock.c: Likewise.
2628 * pthread_mutex_trylock.c: Likewise.
2629 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2630
2631 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2632 * tst-robust9.c: New file.
2633 * tst-robustpi9.c: New file.
2634
bec51a30
UD
2635 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2636 unnecessary extra cancellation test.
2637
83d87915
UD
26382007-05-14 Ulrich Drepper <drepper@redhat.com>
2639
83d87915
UD
2640 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2641 extra cancellation test.
2642 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2643
3771196d
UD
26442007-05-10 Ulrich Drepper <drepper@redhat.com>
2645
341c566f
UD
2646 * descr.h (struct pthread): Rearrange members to fill hole in
2647 64-bit layout.
2648
3771196d
UD
2649 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2650 (__pthread_setaffinity_new): If syscall was successful and
2651 RESET_VGETCPU_CACHE is defined, use it before returning.
2652 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2653
7d29b542
JJ
26542007-05-10 Jakub Jelinek <jakub@redhat.com>
2655
2656 [BZ #4455]
2657 * tst-align2.c: Include stackinfo.h.
2658 * tst-getpid1.c: Likewise.
2659
16105fe0
UD
26602007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2661
29c113f0
UD
2662 [BZ #4455]
2663 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2664 * tst-getpid1.c (do_test): Likewise.
2665
16105fe0
UD
2666 [BZ #4456]
2667 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2668 (allocate_stack): Likewise.
2669
6780bc44
UD
26702007-05-07 Ulrich Drepper <drepper@redhat.com>
2671
2672 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2673 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2674 (__lll_robust_timedlock_wait): Likewise.
2675 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2676
aa75f64c
UD
26772007-05-06 Mike Frysinger <vapier@gentoo.org>
2678
15eca720 2679 [BZ #4465]
aa75f64c
UD
2680 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2681 * tst-cancel4.c (tf_fdatasync): New test.
2682
f672076e
UD
26832007-04-27 Ulrich Drepper <drepper@redhat.com>
2684
1bb5f5a1
UD
2685 [BZ #4392]
2686 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2687 check mutexes like normal mutexes.
2688
f672076e
UD
2689 [BZ #4306]
2690 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2691 Initialize the whole sigevent structure to appease valgrind.
2692
bce20b9a
UD
26932007-04-25 Ulrich Drepper <drepper@redhat.com>
2694
2695 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2696 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2697
0c786eac
UD
26982007-04-06 Ulrich Drepper <drepper@redhat.com>
2699
2700 * tst-locale1.c: Avoid warnings.
2701 * tst-locale2.c: Likewise.
2702
e1f0c5bc
UD
27032007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2704
2705 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2706 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2707
965cba04
UD
27082007-03-16 Jakub Jelinek <jakub@redhat.com>
2709
2710 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2711 __extern_always_inline where appropriate.
2712 * sysdeps/pthread/pthread.h: Likewise.
2713
a5ea509b
RH
27142007-03-13 Richard Henderson <rth@redhat.com>
2715
2716 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2717 separate cfi regions for the two subsections.
2718
00a1430e
UD
27192007-02-25 Ulrich Drepper <drepper@redhat.com>
2720
2721 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2722 new thread, don't just decrement it.
2723 Patch by Suzuki K P <suzuki@in.ibm.com>.
2724
63a2f305
UD
27252007-02-21 Ulrich Drepper <drepper@redhat.com>
2726
2727 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2728 PTHFCT_CALL definition.
2729
2484468b
UD
27302007-02-18 Ulrich Drepper <drepper@redhat.com>
2731
2732 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2733 available, don't use it.
2734
5ed61e0f
UD
27352007-02-09 Jakub Jelinek <jakub@redhat.com>
2736
2737 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2738 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2739 call into the kernel to delay.
2740
10ccaa5c
UD
27412007-01-18 Ulrich Drepper <drepper@redhat.com>
2742
f8a17855
UD
2743 * tst-initializers1.c: We want to test the initializers as seen
2744 outside of libc, so undefined _LIBC.
2745
10ccaa5c
UD
2746 * pthread_join.c (cleanup): Avoid warning.
2747
ea1533e0
UD
27482007-01-17 Ulrich Drepper <drepper@redhat.com>
2749
1476bce6
UD
2750 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2751 (__lll_timedwait_tid): Add unwind info.
2752
ea1533e0
UD
2753 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2754 function table, mangle the pointers.
2755 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2756 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2757 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2758 demangle pointers before use.
2759 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2760 demangle pointer.
2761 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2762 * sysdeps/pthread/setxid.h: Likewise.
2763
8980796b
UD
27642007-01-12 Ulrich Drepper <drepper@redhat.com>
2765
2766 * tst-rwlock7.c: Show some more information in case of correct
2767 behavior.
2768
a1d87b5d
UD
27692007-01-11 Ulrich Drepper <drepper@redhat.com>
2770
2771 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2772 (lll_futex_timed_wait): Undo part of last change, don't negate
2773 return value.
2774
11bf311e 27752007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 2776
11bf311e
UD
2777 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2778 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 2779
11bf311e 27802006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 2781
11bf311e 2782 * shlib-versions: Fix sparc64 linux target specification.
a744da90 2783
11bf311e 27842007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 2785
11bf311e
UD
2786 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2787 Adjust include path for pthread_barrier_wait.c move.
fc242bef 2788
11bf311e 27892006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 2790
11bf311e
UD
2791 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2792 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 2793
11bf311e
UD
27942006-12-06 Jakub Jelinek <jakub@redhat.com>
2795
2796 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2797 6 argument cancellable syscalls.
2798 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2799 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2800 6 argument cancellable syscalls.
2801 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 2802
66f17705
UD
28032006-12-09 Ulrich Drepper <drepper@redhat.com>
2804
2805 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2806 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2807
11bf311e
UD
28082006-10-30 Jakub Jelinek <jakub@redhat.com>
2809
2810 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2811 __sync_lock_release instead of __sync_lock_release_si.
2812
536e40e2
UD
28132006-10-29 Jakub Jelinek <jakub@redhat.com>
2814
2815 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2816 Define.
2817 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2818 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2819 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2820 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2821 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2822 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2823 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2824 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2825 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2826 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2827 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2828
11bf311e
UD
28292006-10-27 Ulrich Drepper <drepper@redhat.com>
2830
2831 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2832 * pthread_barrier_wait.c: ...here.
2833 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2834 * pthread_cond_broadcast.c: ...here.
2835 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2836 * pthread_cond_signal.c: ...here.
2837 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2838 * pthread_cond_timedwait.c: ...here.
2839 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2840 * pthread_cond_wait.c: ...here.
2841 * sysdeps/pthread/pthread_once.c: Move to...
2842 * pthread_once.c: ...here.
2843 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2844 * pthread_rwlock_rdlock.c: ...here.
2845 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2846 * pthread_rwlock_timedrdlock.c: ...here.
2847 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2848 * pthread_rwlock_timedwrlock.c: ...here.
2849 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2850 * pthread_rwlock_unlock.c: ...here.
2851 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2852 * pthread_rwlock_wrlock.c: ...here.
2853 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2854 * pthread_spin_destroy.c: ...here.
2855 * sysdeps/pthread/pthread_spin_init.c: Move to...
2856 * pthread_spin_init.c: ...here.
2857 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2858 * pthread_spin_unlock.c: ...here.
2859 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2860 * pthread_getcpuclockid.c: ...here.
2861
2862 * init.c: USE_TLS support is now always enabled.
2863 * tst-tls5.h: Likewise.
2864 * sysdeps/alpha/tls.h: Likewise.
2865 * sysdeps/i386/tls.h: Likewise.
2866 * sysdeps/ia64/tls.h: Likewise.
2867 * sysdeps/powerpc/tls.h: Likewise.
2868 * sysdeps/s390/tls.h: Likewise.
2869 * sysdeps/sh/tls.h: Likewise.
2870 * sysdeps/sparc/tls.h: Likewise.
2871 * sysdeps/x86_64/tls.h: Likewise.
2872
006a8f6f 28732006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
2874
2875 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2876 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2877 failed.
2878
2879 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2880 Define to THREAD_SELF->header.multiple_threads.
2881 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2882 Likewise.
2883 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2884 Likewise.
2885 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2886 (SINGLE_THREAD_P): Likewise.
2887 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2888 (SINGLE_THREAD_P): Likewise.
2889 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2890 (SINGLE_THREAD_P): Likewise.
2891 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2892 (SINGLE_THREAD_P): Likewise.
2893 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2894 Likewise.
2895 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2896 (SINGLE_THREAD_P): Likewise.
2897 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2898 (SINGLE_THREAD_P): Likewise.
2899 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2900 Likewise.
2901
11bf311e 29022006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 2903
11bf311e
UD
2904 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2905 by default rather than 2_3_3.
32c075e1 2906
11bf311e 29072006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 2908
11bf311e
UD
2909 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2910 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2911 atomic_* instead of catomic_* macros.
2912
29132006-10-12 Ulrich Drepper <drepper@redhat.com>
2914
2915 [BZ #3285]
2916 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2917 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2918 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2919 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2920 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2921 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2922 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2923 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2924 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2925 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2926 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2927 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2928 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2929
29302006-10-11 Ulrich Drepper <drepper@redhat.com>
2931
2932 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2933 cancelable syscalls with six parameters.
2934
2935 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2936 operations instead of atomic_*.
32c075e1 2937
11bf311e 29382006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 2939
11bf311e 2940 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 2941
11bf311e 29422006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 2943
11bf311e
UD
2944 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2945 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2946 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2947 New file.
2948 * pthread_attr_setstack.c: Allow overwriting the version number of the
2949 new symbol.
2950 * pthread_attr_setstacksize.c: Likewise.
2951 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2952 it.
2953 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2954 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 2955
457b559e
UD
29562006-09-24 Ulrich Drepper <drepper@redhat.com>
2957
2958 [BZ #3251]
2959 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2960 Patch by Petr Baudis.
2961
0466106e
UD
29622006-09-18 Jakub Jelinek <jakub@redhat.com>
2963
2964 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2965
2966 * tst-cancel2.c (tf): Loop as long as something was written.
2967
bd6d3b7d
UD
29682006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2969
2970 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2971 mutexes wake all mutexes.
2972 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2973 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2974 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2975
30aa5785
UD
29762006-09-12 Ulrich Drepper <drepper@redhat.com>
2977
2978 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2979 to guarantee the thread is always canceled.
2980
2b6a801e
UD
29812006-09-08 Jakub Jelinek <jakub@redhat.com>
2982
2983 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2984 Include stdlib.h.
2985 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2986 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2987 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2988 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2989 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 2990
346e6ad4
UD
29912006-09-08 Ulrich Drepper <drepper@redhat.com>
2992
2993 [BZ #3123]
2994 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2995 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
2996 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2997 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2998 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
2999 * Makefile (tests): Add tst-cond22.
3000 * tst-cond22.c: New file.
3001
b051fc44
UD
30022006-09-05 Ulrich Drepper <drepper@redhat.com>
3003
3004 [BZ #3124]
3005 * descr.h (struct pthread): Add parent_cancelhandling.
3006 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3007 cancelhandling value to child.
3008 * pthread_create.c (start_thread): If parent thread was canceled
3009 reset the SIGCANCEL mask.
3010 * Makefile (tests): Add tst-cancel25.
3011 * tst-cancel25.c: New file.
3012
d052233c 30132006-09-05 Jakub Jelinek <jakub@redhat.com>
b42a214c 3014 Ulrich Drepper <drepper@redhat.com>
d052233c
UD
3015
3016 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3017 counterp if it is already zero.
3018 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3019
cd248c3f 30202006-03-04 Jakub Jelinek <jakub@redhat.com>
b42a214c 3021 Roland McGrath <roland@redhat.com>
cd248c3f
UD
3022
3023 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3024 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3025 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3026 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3027 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3028 lll_robust_mutex_timedlock, lll_mutex_unlock,
3029 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3030 Add _L_*_ symbols around the subsection.
3031 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3032 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3033
30342006-03-03 Jakub Jelinek <jakub@redhat.com>
b42a214c 3035 Roland McGrath <roland@redhat.com>
cd248c3f
UD
3036
3037 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3038 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3039 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3040 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3041 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3042 lll_robust_mutex_timedlock, lll_mutex_unlock,
3043 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3044 Add _L_*_ symbols around the subsection.
3045 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3046 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3047
b80770b2
UD
30482006-08-31 Ulrich Drepper <drepper@redhat.com>
3049
3050 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3051 change because it can disturb too much existing code. If real hard
3052 reader preference is needed we'll introduce another type.
3053 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3054 (pthread_rwlock_timedwrlock): Likewise.
3055 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3056 Likewise.
3057
bee2df0b
UD
30582006-08-30 Ulrich Drepper <drepper@redhat.com>
3059
3060 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3061 reader preference.
3062 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3063 (pthread_rwlock_timedwrlock): Likewise.
3064 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3065 Likewise.
3066
d678ebc1
UD
30672006-08-25 Jakub Jelinek <jakub@redhat.com>
3068
3069 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3070 Only define ifdef SHARED.
3071
ba408f84
UD
30722006-08-23 Ulrich Drepper <drepper@redhat.com>
3073
3074 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3075 (free_stacks): ...here.
3076 (__free_stack_cache): New function.
3077 * pthreadP.h: Declare __free_stack_cache.
3078 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3079 ptr_freeres.
3080 * init.c (pthread_functions): Initialize ptr_freeres.
3081 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3082 New freeres function.
3083
376e973a
UD
30842006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3085
3086 [BZ #3018]
3087 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3088
2b34af01
UD
30892006-08-20 Ulrich Drepper <drepper@redhat.com>
3090
3091 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3092 _XOPEN_REALTIME_THREADS.
3093
89c85f87
UD
30942006-08-15 Jakub Jelinek <jakub@redhat.com>
3095
3096 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3097 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3098 HAVE_CLOCK_GETTIME_VSYSCALL.
3099 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3100
f17efcb4
UD
31012006-08-14 Jakub Jelinek <jakub@redhat.com>
3102
3103 * sysdeps/unix/sysv/linux/bits/posix_opt.h
3104 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3105 * descr.h (struct priority_protection_data): New type.
3106 (struct pthread): Add tpp field.
3107 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3108 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3109 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3110 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3111 TPP mutexes.
3112 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3113 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3114 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3115 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3116 * tpp.c: New file.
3117 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3118 boosted by TPP.
3119 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3120 * pthread_mutexattr_getprioceiling.c
3121 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3122 in the SCHED_FIFO priority range.
3123 * pthread_mutexattr_setprioceiling.c
3124 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3125 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3126 if mutex is not TPP. Ceiling is now in __data.__lock.
3127 * pthread_mutex_setprioceiling.c: Include stdbool.h.
3128 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
3129 is now in __data.__lock. Add locking.
3130 * pthread_create.c (__free_tcb): Free pd->tpp structure.
3131 * Makefile (libpthread-routines): Add tpp.
3132 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3133 * tst-tpp.h: New file.
3134 * tst-mutexpp1.c: New file.
3135 * tst-mutexpp6.c: New file.
3136 * tst-mutexpp10.c: New file.
3137 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3138 * tst-mutex6.c (TEST_FUNCTION): Likewise.
3139
22bb134c
UD
31402006-08-12 Ulrich Drepper <drepper@redhat.com>
3141
3142 [BZ #2843]
3143 * pthread_join.c (pthread_join): Account for self being canceled
3144 when checking for deadlocks.
3145 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
3146 (tf1): Don't print anything after pthread_join returns, this would be
3147 another cancellation point.
3148 (tf2): Likewise.
3149 * tst-join6.c: New file.
3150 * Makefile (tests): Add tst-join6.
3151
f1762c0c
UD
31522006-08-03 Ulrich Drepper <drepper@redhat.com>
3153
9c06eb66
UD
3154 [BZ #2892]
3155 * pthread_setspecific.c (__pthread_setspecific): Check
3156 out-of-range index before checking for unused key.
3157
f1762c0c
UD
3158 * sysdeps/pthread/gai_misc.h: New file.
3159
7bb1b2c9
UD
31602006-08-01 Ulrich Drepper <drepper@redhat.com>
3161
3162 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
3163 file. Don't use sysctl.
3164 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
3165 overwrite the file if this is likely not true.
3166
b06e7e9a
UD
31672006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
3168
3169 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3170 * Makefile (tests): Add tst-getpid3.
3171 * tst-getpid3.c: New file.
3172
b894c2ea
RM
31732006-07-30 Roland McGrath <roland@redhat.com>
3174
3175 * Makefile (libpthread-routines): Add ptw-sigsuspend.
3176
3177 * sysdeps/unix/sysv/linux/i386/not-cancel.h
3178 (pause_not_cancel): New macro.
3179 (nanosleep_not_cancel): New macro.
3180 (sigsuspend_not_cancel): New macro.
3181 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3182 nanosleep_not_cancel macro from <not-cancel.h>.
3183 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3184 macro from <not-cancel.h>.
3185
df47504c
UD
31862006-07-28 Ulrich Drepper <drepper@redhat.com>
3187 Jakub Jelinek <jakub@redhat.com>
3188
3189 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3190 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
3191 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3192 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3193 * pthread_mutex_init.c: Add support for priority inheritance mutex.
3194 * pthread_mutex_lock.c: Likewise.
3195 * pthread_mutex_timedlock.c: Likewise.
3196 * pthread_mutex_trylock.c: Likewise.
3197 * pthread_mutex_unlock.c: Likewise.
3198 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3199 all mutexes.
3200 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3201 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3202 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3203 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3204 pthread-pi-defines.sym.
3205 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3206 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3207 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
3208 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3209 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3210 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3211 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3212 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3213 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
3214 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3215 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3216 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3217 * tst-mutex2.c: Likewise.
3218 * tst-mutex3.c: Likewise.
3219 * tst-mutex4.c: Likewise.
3220 * tst-mutex5.c: Likewise.
3221 * tst-mutex6.c: Likewise.
3222 * tst-mutex7.c: Likewise.
3223 * tst-mutex7a.c: Likewise.
3224 * tst-mutex8.c: Likewise.
3225 * tst-mutex9.c: Likewise.
3226 * tst-robust1.c: Likewise.
3227 * tst-robust7.c: Likewise.
3228 * tst-robust8.c: Likewise.
3229 * tst-mutexpi1.c: New file.
3230 * tst-mutexpi2.c: New file.
3231 * tst-mutexpi3.c: New file.
3232 * tst-mutexpi4.c: New file.
3233 * tst-mutexpi5.c: New file.
3234 * tst-mutexpi6.c: New file.
3235 * tst-mutexpi7.c: New file.
3236 * tst-mutexpi7a.c: New file.
3237 * tst-mutexpi8.c: New file.
3238 * tst-mutexpi9.c: New file.
3239 * tst-robust1.c: New file.
3240 * tst-robust2.c: New file.
3241 * tst-robust3.c: New file.
3242 * tst-robust4.c: New file.
3243 * tst-robust5.c: New file.
3244 * tst-robust6.c: New file.
3245 * tst-robust7.c: New file.
3246 * tst-robust8.c: New file.
3247 * Makefile (tests): Add the new tests.
3248
3249 * pthread_create.c (start_thread): Add some casts to avoid warnings.
3250 * pthread_mutex_destroy.c: Remove unneeded label.
3251
f3be81a9
UD
32522006-07-01 Ulrich Drepper <drepper@redhat.com>
3253
3254 * pthread_mutex_init.c (__pthread_mutex_init): Move some
3255 computations to compile time.
3256
c26ca5e1
UD
32572006-06-04 Ulrich Drepper <drepper@redhat.com>
3258
3259 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3260
6f8a7dff
UD
32612006-05-15 Ulrich Drepper <drepper@redhat.com>
3262
c26ca5e1 3263 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 3264
3d237e42
UD
32652006-05-11 Ulrich Drepper <drepper@redhat.com>
3266
04974d63
UD
3267 * pthread_key_create.c (__pthread_key_create): Do away with
3268 __pthread_keys_lock.
3269
3270 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3271 (__kernel_cpumask_size): Mark as hidden.
3272 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3273
3d237e42
UD
3274 * sem_open.c (__sem_mappings_lock): Mark as hidden.
3275 * semaphoreP.h (__sem_mappings_lock): Likewise.
3276
790fc6e4
UD
32772006-05-10 Ulrich Drepper <drepper@redhat.com>
3278
3279 * pthread_atfork.c: Mark __dso_handle as hidden.
3280
be434a72
UD
32812006-05-09 Ulrich Drepper <drepper@redhat.com>
3282
3283 [BZ #2644]
3284 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3285 the reload problem. Change the one path in pthread_cancel_init
3286 which causes the problem. Force gcc to reload. Simplify callers.
3287 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3288 (_Unwind_GetBSP): Undo last patch.
3289
3142b1ac
UD
32902006-05-07 Ulrich Drepper <drepper@redhat.com>
3291
bf3635d3
UD
3292 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3293 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
3294
3295 [BZ #2644]
3296 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3297 pointers are reloaded after pthread_cancel_init calls.
3298
27488789
UD
32992006-05-01 Ulrich Drepper <drepper@redhat.com>
3300
3301 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3302 __always_inline.
3303
a6375d11
UD
33042006-04-27 Ulrich Drepper <drepper@redhat.com>
3305
3306 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3307 Allocate new object which is passed to timer_sigev_thread so that
3308 the timer can be deleted before the new thread is scheduled.
3309
16a1d952
RM
33102006-04-26 Roland McGrath <roland@redhat.com>
3311
3312 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3313
7960f2a7
UD
33142006-04-08 Ulrich Drepper <drepper@redhat.com>
3315
ab9a9ff8
UD
3316 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3317 suffix for conditional jumps.
3318 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3319 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3320 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3321 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3322 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3323 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3324
7960f2a7
UD
3325 * init.c (sigcancel_handler): Compare with correct PID even if the
3326 thread is in the middle of a fork call.
3327 (sighandler_setxid): Likewise.
3328 Reported by Suzuki K P <suzuki@in.ibm.com> .
3329
2035d91c
UD
33302006-04-07 Jakub Jelinek <jakub@redhat.com>
3331
3332 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3333
0292b0dd
UD
33342006-04-06 Ulrich Drepper <drepper@redhat.com>
3335
3336 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3337 fails [Coverity CID 105].
3338
6738b3c0
UD
33392006-04-05 Ulrich Drepper <drepper@redhat.com>
3340
3341 * sysdeps/pthread/pthread.h: Add nonnull attributes.
3342
359157a5
RM
33432006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
3344
3345 [BZ #2505]
3346 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3347 Define __lll_rel_instr using lwsync.
3348
cd277b2d
UD
33492006-03-27 Ulrich Drepper <drepper@redhat.com>
3350
3351 * allocatestack.c (allocate_stack): Always initialize robust_head.
3352 * descr.h: Define struct robust_list_head.
3353 (struct pthread): Use robust_list_head in robust mutex list definition.
3354 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3355 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3356 (__pthread_initialize_minimal_internal): Register robust_list with
3357 the kernel.
3358 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3359 Declare __set_robust_list_avail.
3360 * pthread_create.c (start_thread): Register robust_list of new thread.
3361 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3362 waiters.
3363 * pthread_mutex_destroy.c: For robust mutexes don't look at the
3364 number of users, it's unreliable.
3365 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3366 set_robust_list syscall is available.
3367 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3368 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3369 Set robust_head.list_op_pending before trying to lock a robust mutex.
3370 * pthread_mutex_timedlock.c: Likewise.
3371 * pthread_mutex_trylock.c: Likewise.
3372 * pthread_mutex_unlock.c: Likewise for unlocking.
3373 * Makefile (tests): Add tst-robust8.
3374 * tst-robust8.c: New file.
3375
facac085
UD
33762006-03-08 Andreas Schwab <schwab@suse.de>
3377
3378 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3379 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3380
7ccbe1a1
RM
33812006-03-05 Roland McGrath <roland@redhat.com>
3382
3383 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3384 and $config_os doesn't match *linux*.
3385
043cee37
RM
33862006-03-05 David S. Miller <davem@sunset.davemloft.net>
3387
3388 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3389 Use __syscall_error.
3390 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3391 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3392 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3393 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3394 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3395 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3396
88bce79e
UD
33972006-03-02 Ulrich Drepper <drepper@redhat.com>
3398
3399 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3400
672ec465
UD
34012006-03-01 Ulrich Drepper <drepper@redhat.com>
3402
3403 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3404 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3405 mutex.
3406 (__lll_robust_timedlock_wait): Likewise.
3407 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3408 (__lll_robust_lock_wait): Likewise.
3409 (__lll_robust_timedlock_wait): Likewise.
3410 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3411 (__lll_robust_lock_wait): Likewise.
3412 (__lll_robust_timedlock_wait): Likewise.
3413
c4a4875d
RM
34142006-03-01 Jakub Jelinek <jakub@redhat.com>
3415
3416 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3417 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3418 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3419 lll_robust_mutex_unlock): Define.
3420 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3421
3192fd8e
RM
34222006-02-28 H.J. Lu <hongjiu.lu@intel.com>
3423
3424 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3425 instead of <clone.S>.
3426
14d44b19
RM
34272006-02-27 Jakub Jelinek <jakub@redhat.com>
3428
3429 * Makefile (libpthread-routines): Add
3430 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3431 and pthread_mutex_[sg]etprioceiling.
3432 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3433 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3434 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3435 pthread_mutex_setprioceiling.
3436 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3437 PTHREAD_PRIO_PROTECT): New enum values.
3438 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3439 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3440 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3441 prototypes.
3442 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3443 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3444 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3445 Define.
3446 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3447 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3448 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3449 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3450 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3451 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3452 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3453 protocol mutexes.
3454 * pthread_mutex_getprioceiling.c: New file.
3455 * pthread_mutex_setprioceiling.c: New file.
3456 * pthread_mutexattr_getprioceiling.c: New file.
3457 * pthread_mutexattr_setprioceiling.c: New file.
3458 * pthread_mutexattr_getprotocol.c: New file.
3459 * pthread_mutexattr_setprotocol.c: New file.
3460
62f6b9b2
RM
34612006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3462
3463 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3464
e0a3ed4f
RM
34652006-02-27 Roland McGrath <roland@redhat.com>
3466
3467 * sysdeps/pthread/Subdirs: List nptl here too.
3468 * configure (libc_add_on_canonical): New variable.
3469
3470 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3471
3472 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3473 self to get main source tree's file.
3474 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3475 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3476 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3477 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3478 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3479 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3480 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3481 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3482 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3483 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3484 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3485 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3486 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3487
3488 * Makefile: Use $(sysdirs) in vpath directive.
3489
3490 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3491 (CPPFLAGS-timer_routines.c): Likewise.
3492
3493 * Makeconfig (includes): Variable removed.
3494
84cfa284
RM
34952006-02-26 Roland McGrath <roland@redhat.com>
3496
3497 * sysdeps/generic/pt-raise.c: Moved to ...
3498 * pt-raise.c: ... here.
3499 * sysdeps/generic/lowlevellock.h: Moved to ...
3500 * lowlevellock.h: ... here.
3501
c5132ca1
RM
35022006-02-23 Roland McGrath <roland@redhat.com>
3503
3504 * descr.h (struct pthread): Add final member `end_padding'.
3505 (PTHREAD_STRUCT_END_PADDING): Use it.
3506
35072006-02-20 Roland McGrath <roland@redhat.com>
3508
3509 * sysdeps/mips: Directory removed, saved in ports repository.
3510 * sysdeps/unix/sysv/linux/mips: Likewise.
3511
a93317a1
UD
35122006-02-18 Ulrich Drepper <drepper@redhat.com>
3513
3514 * tst-robust1.c: Add second mutex to check that the mutex list is
3515 handled correctly.
3516
f1740bc4
UD
35172006-02-17 Jakub Jelinek <jakub@redhat.com>
3518
3519 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3520 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3521 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3522 lll_robust_mutex_unlock): New macros.
3523 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3524 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3525 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3526 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3527 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3528
a7245bf5
UD
35292006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3530
3531 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3532 definitions.
3533 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3534
49bfc1fe
UD
35352006-02-17 Ulrich Drepper <drepper@redhat.com>
3536
3537 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3538 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3539 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3540 (lll_robust_mutex_unlock): Likewise.
3541
56e987ac
UD
35422006-02-13 Jakub Jelinek <jakub@redhat.com>
3543
3544 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3545 Set robust_list.__next rather than robust_list.
3546 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3547 (__pthread_list_t): New typedef.
3548 (pthread_mutex_t): Replace __next and __prev fields with __list.
3549 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3550 (__pthread_list_t): New typedef.
3551 (pthread_mutex_t): Replace __next and __prev fields with __list.
3552 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3553 (__pthread_list_t, __pthread_slist_t): New typedefs.
3554 (pthread_mutex_t): Replace __next and __prev fields with __list.
3555 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3556 (__pthread_list_t, __pthread_slist_t): New typedefs.
3557 (pthread_mutex_t): Replace __next and __prev fields with __list.
3558 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3559 (__pthread_list_t, __pthread_slist_t): New typedefs.
3560 (pthread_mutex_t): Replace __next and __prev fields with __list.
3561 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3562 (__pthread_slist_t): New typedef.
3563 (pthread_mutex_t): Replace __next field with __list.
3564
683040c3
UD
35652006-02-15 Ulrich Drepper <drepper@redhat.com>
3566
25bc77e6 3567 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
3568 PTHREAD_MUTEX_OWNERDEAD.
3569 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3570 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3571 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3572 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3573 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3574 to PTHREAD_MUTEX_INCONSISTENT.
3575 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3576 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3577 * pthread_mutex_trylock.c: Likewise.
3578 * pthread_mutex_timedlock.c: Likewise.
3579 * pthread_mutex_unlock.c: Likewise.
3580 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3581 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3582 lowlevelrobustlock.sym.
3583 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3584 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3585 definitions.
3586 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3587 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3588 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3589 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3590 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3591
bbf209a4
UD
35922006-02-12 Ulrich Drepper <drepper@redhat.com>
3593
b007ce7c
UD
3594 * allocatestack.c (allocate_stack): Initialize robust_list.
3595 * init.c (__pthread_initialize_minimal_internal): Likewise.
3596 * descr.h (struct xid_command): Pretty printing.
3597 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3598 robust_list. Adjust macros.
3599 * pthread_create.c (start_thread): Adjust robust_list handling.
3600 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3601 but the owner for all robust mutex types.
3602 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3603 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 3604 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
3605 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3606
bbf209a4 3607 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
b42a214c 3608 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
bbf209a4 3609
b576fca1
UD
36102006-02-08 Jakub Jelinek <jakub@redhat.com>
3611
3612 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3613 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3614
a6df7387
UD
36152006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3616
3617 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3618 Return status.
3619 (lll_futex_timed_wait): Define.
3620
7c65e900
UD
36212006-01-19 Ulrich Drepper <drepper@redhat.com>
3622
3623 * tst-cancel4.c: Test ppoll.
3624
5f9f21e8
AJ
36252006-01-18 Andreas Jaeger <aj@suse.de>
3626
cf407dfb 3627 [BZ #2167]
5f9f21e8
AJ
3628 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3629 (pthread_mutex_t): Follow changes for other archs. Based on patch
3630 by Jim Gifford <patches@jg555.com>.
3631
251278c6
UD
36322006-01-13 Richard Henderson <rth@redhat.com>
3633
3634 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3635
de59a291
RM
36362006-01-10 Roland McGrath <roland@redhat.com>
3637
3638 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3639 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3640 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3641 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3642 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3643 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3644 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3645 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3646 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 3647 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 3648
931786ee
RM
36492006-01-09 Roland McGrath <roland@redhat.com>
3650
5d42c8c3
RM
3651 * tst-initializers1-c89.c: New file.
3652 * tst-initializers1-c99.c: New file.
3653 * tst-initializers1-gnu89.c: New file.
3654 * tst-initializers1-gnu99.c: New file.
3655 * Makefile (tests): Add them.
3656 (CFLAGS-tst-initializers1-c89.c): New variable.
3657 (CFLAGS-tst-initializers1-c99.c): New variable.
3658 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3659 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3660
931786ee
RM
3661 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3662 Use __extension__ on anonymous union definition.
3663 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3664 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3665 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3666 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 3667 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 3668
8dd18431
RM
36692006-01-08 Jakub Jelinek <jakub@redhat.com>
3670
3671 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3672 Don't give the union a name because it changes the mangled name.
3673 Instead name the struct for __data.
3674 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3675 Likewise.
3676 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3677 Likewise.
3678
ae11e412
UD
36792006-01-09 Jakub Jelinek <jakub@redhat.com>
3680
3681 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3682 stack bias to mc_ftp field.
3683
c6885aa1
UD
36842006-01-07 Ulrich Drepper <drepper@redhat.com>
3685
3686 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 3687 being too clever and reloading the futex value where it shouldn't.
c6885aa1 3688
ae4ad00a
UD
36892006-01-06 Ulrich Drepper <drepper@redhat.com>
3690
3691 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3692 correct type.
3693
ced368f7
UD
36942006-01-06 Jakub Jelinek <jakub@redhat.com>
3695
3696 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3697 Add cfi directives.
3698
d804f5df
UD
36992006-01-06 Ulrich Drepper <drepper@redhat.com>
3700
cbbbb188 3701 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
3702 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3703 rename in tcbhead_t.
3704
d804f5df
UD
3705 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3706 Don't give the union a name because it changes the mangled name.
3707 Instead name the struct for __data.
3708 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3709 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3710 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3711 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3712 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3713 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3714
679d83ba
UD
37152006-01-05 Ulrich Drepper <drepper@redhat.com>
3716
3717 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3718 Return status.
3719 (lll_futex_timed_wait): Define.
3720 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3721 * sysdeps/pthread/aio_misc.h: New file.
3722
06dc5bf3
RM
37232006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3724
3725 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3726
9759bbf1
UD
37272006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3728
3729 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3730 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3731 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3732
db59b28b
UD
37332006-01-04 Ulrich Drepper <drepper@redhat.com>
3734
3735 * tst-cancel24.cc: Use C headers instead of C++ headers.
3736
b01fe5f7
UD
37372006-01-03 Jakub Jelinek <jakub@redhat.com>
3738
3739 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3740 sparc-linux configured glibc.
3741 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3742 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3743 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3744 atomic_compare_and_exchange_val_24_acq instead of
3745 atomic_compare_and_exchange_val_acq.
3746 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3747 instead of atomic_exchange_rel.
3748 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3749 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3750 file.
3751 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3752 file.
3753 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3754 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3755 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3756 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3757 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3758 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3759 New file.
3760 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3761 New file.
3762 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3763 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3764 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3765 file.
3766 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3767 file.
3768 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3769
35c2fd59
UD
37702006-01-03 Ulrich Drepper <drepper@redhat.com>
3771
3772 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3773 mutex initializers.
3774
305bb37e
UD
37752006-01-02 Jakub Jelinek <jakub@redhat.com>
3776
3777 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3778 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3779 THREAD_COPY_POINTER_GUARD): Define.
3780 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3781 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3782
cc792128
UD
37832006-01-01 Ulrich Drepper <drepper@redhat.com>
3784
3785 * version.c: Update copyright year.
3786
db0a00d3
UD
37872005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3788
3789 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3790 .eh_frame section, use cfi_* directives.
3791 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3792
b36205c4
UD
37932005-12-30 Ulrich Drepper <drepper@redhat.com>
3794
3795 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3796 now.
3797
8b4f1598
UD
37982005-12-29 Ulrich Drepper <drepper@redhat.com>
3799
3800 * sysdeps/pthread/sigaction.c: Removed.
3801 * sigaction.c: New file.
3802 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3803
fec5592d
UD
38042005-12-28 Ulrich Drepper <drepper@redhat.com>
3805
3806 * Makefile (tests): Add tst-signal7.
3807 * tst-signal7.c: New file.
3808
db169ed5
RM
38092005-12-27 Roland McGrath <roland@redhat.com>
3810
3811 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3812 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3813 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3814 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3815 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3816 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3817 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3818 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3819 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3820 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3821 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3822
bfffffae
UD
38232005-12-27 Jakub Jelinek <jakub@redhat.com>
3824
3825 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3826 and __prev field to pthread_mutex_t.
3827 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3828 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3829 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3830 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3831 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3832 to pthread_mutex_t.
3833
1bcfb5a5
UD
38342005-12-26 Ulrich Drepper <drepper@redhat.com>
3835
3836 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3837 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3838 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3839 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3840 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3841 and PTHREAD_MUTEXATTR_FLAG_BITS.
3842 * descr.h (struct pthread): Add robust_list field and define
3843 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3844 * pthread_mutexattr_getrobust.c: New file.
3845 * pthread_mutexattr_setrobust.c: New file.
3846 * pthread_mutex_consistent.c: New file.
3847 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3848 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3849 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3850 Adjust pthread_mutex_t initializers.
3851 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3852 field to pthread_mutex_t.
3853 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3854 and __prev field to pthread_mutex_t.
3855 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3856 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3857 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3858 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3859 * pthread_mutexattr_gettype.c: Likewise.
3860 * pthread_mutexattr_setpshared.c: Likewise.
3861 * pthread_mutexattr_settype.c: Likewise.
3862 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3863 Initialize mutex kind according to robust flag.
3864 * pthread_mutex_lock.c: Implement local robust mutex.
3865 * pthread_mutex_timedlock.c: Likewise.
3866 * pthread_mutex_trylock.c: Likewise.
3867 * pthread_mutex_unlock.c: Likewise.
3868 * pthread_create.c (start_thread): Mark robust mutexes which remained
3869 locked as dead.
3870 * tst-robust1.c: New file.
3871 * tst-robust2.c: New file.
3872 * tst-robust3.c: New file.
3873 * tst-robust4.c: New file.
3874 * tst-robust5.c: New file.
3875 * tst-robust6.c: New file.
3876 * tst-robust7.c: New file.
3877 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3878 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3879 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3880 tst-robust5, tst-robust6, and tst-robust7.
3881
3882 * tst-typesizes.c: New file.
3883 * Makefile (tests): Add tst-typesizes.
3884
3885 * tst-once3.c: More debug output.
3886
9333ed0d
UD
38872005-12-24 Ulrich Drepper <drepper@redhat.com>
3888
d4d138a4
UD
3889 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3890 missing after last change.
3891
bfffffae 3892 * version.c: Update copyright year.
9333ed0d 3893
dcc73a8d
UD
38942005-12-23 Ulrich Drepper <drepper@redhat.com>
3895
3896 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3897 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3898 * pthread_mutex_trylock.c: Likewise.
3899 * pthread_mutex_timedlock.c: Likewise.
3900 * pthread_mutex_unlock.c: Likewise.
3901
879f3ca6
RM
39022005-12-22 Roland McGrath <roland@redhat.com>
3903
3904 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3905 so that #include_next's search location is not reset to the -I..
3906 directory where <nptl/...> can be found.
3907
077a0da7
UD
39082005-12-22 Ulrich Drepper <drepper@redhat.com>
3909
3910 [BZ #1913]
3911 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3912 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
3913 * tst-cancel24.cc: New file.
3914 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 3915
8dea90aa
RM
39162005-12-21 Roland McGrath <roland@redhat.com>
3917
3918 * libc-cancellation.c: Use <> rather than "" #includes.
3919 * pt-cleanup.c: Likewise.
3920 * pthread_create.c: Likewise.
3921 * pthread_join.c: Likewise.
3922 * pthread_timedjoin.c: Likewise.
3923 * pthread_tryjoin.c: Likewise.
3924 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3925 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3926 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3927 * unwind.c: Likewise.
3928
8da21f96
UD
39292005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3930
3931 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3932 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3933 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3934 THREAD_COPY_POINTER_GUARD): Define.
3935
00c2b3b9
UD
39362005-12-19 Jakub Jelinek <jakub@redhat.com>
3937
3938 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3939 rather than one.
3940 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3941 THREAD_COPY_POINTER_GUARD): Define.
3942 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3943 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3944 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3945 THREAD_COPY_POINTER_GUARD): Define.
3946 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3947 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3948 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3949 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3950 Use PTR_DEMANGLE for B0 if defined.
3951
827b7087
UD
39522005-12-17 Ulrich Drepper <drepper@redhat.com>
3953
3954 * pthread_create.c (__pthread_create_2_1): Use
3955 THREAD_COPY_POINTER_GUARD if available.
3956 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3957 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3958 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3959 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3960 * sysdeps/x86_64/tls.h: Likewise.
3961
2826ac7e
RM
39622005-12-15 Roland McGrath <roland@redhat.com>
3963
3964 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3965
b6ab06ce
UD
39662005-12-13 Ulrich Drepper <drepper@redhat.com>
3967
3968 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3969 sysdeps/generic.
3970 * errno-loc.c: New file.
3971
f0d1a3b5
RM
39722005-12-12 Roland McGrath <roland@redhat.com>
3973
3974 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3975 adjustments before choosing stack size. Update minimum stack size
3976 calculation to match allocate_stack change.
3977
db13ddbc
UD
39782005-12-12 Ulrich Drepper <drepper@redhat.com>
3979
3980 * allocatestack.c (allocate_stack): Don't demand that there is an
3981 additional full page available on the stack beside guard, TLS, the
3982 minimum stack.
3983
088f460f
UD
39842005-11-24 Ulrich Drepper <drepper@redhat.com>
3985
3986 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3987 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3988
3989 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3990 compiling 32-bit code we must define __cleanup_fct_attribute.
3991
16feadf2
UD
3992005-11-24 Jakub Jelinek <jakub@redhat.com>
3993
3994 [BZ #1920]
3995 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3996 __attribute__ instead of __attribute.
3997 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3998 (__cleanup_fct_attribute): Likewise.
3999
e6e493bb
UD
40002005-11-17 Jakub Jelinek <jakub@redhat.com>
4001
4002 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4003 a write barrier before writing libgcc_s_getcfa.
4004
8e635611
UD
40052005-11-06 Ulrich Drepper <drepper@redhat.com>
4006
4007 * sysdeps/unix/sysv/linux/configure: Removed.
4008
ce33ee7c
UD
40092005-11-05 Ulrich Drepper <drepper@redhat.com>
4010
4011 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4012 optional init_array/fini_array support.
4013
20d511e0
RM
40142005-10-24 Roland McGrath <roland@redhat.com>
4015
4016 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4017 versioned_symbol use.
4018
fe60d146
RM
40192005-10-16 Roland McGrath <roland@redhat.com>
4020
4021 * init.c (__pthread_initialize_minimal_internal): Even when using a
4022 compile-time default stack size, apply the minimum that allocate_stack
4023 will require, and round up to page size.
4024
0faa1cf5
RM
40252005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4026
4027 * Makefile ($(test-modules)): Remove static pattern rule.
4028
f9126cc2 40292005-10-14 Jakub Jelinek <jakub@redhat.com>
b42a214c 4030 Ulrich Drepper <drepper@redhat.com>
f9126cc2
UD
4031
4032 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4033 alignment in callback function.
4034 * Makefile: Add rules to build and run tst-align3.
4035 * tst-align3.c: New file.
4036
015a5d22
RM
40372005-10-03 Jakub Jelinek <jakub@redhat.com>
4038
4039 * allocatestack.c (setxid_signal_thread): Add
4040 INTERNAL_SYSCALL_DECL (err).
4041
b71ce910
UD
40422005-10-02 Jakub Jelinek <jakub@redhat.com>
4043
4044 * allocatestack.c (setxid_signal_thread): Need to use
4045 atomic_compare_and_exchange_bool_acq.
4046
dff9a7a1 40472005-10-01 Ulrich Drepper <drepper@redhat.com>
b42a214c 4048 Jakub Jelinek <jakub@redhat.com>
dff9a7a1
UD
4049
4050 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4051 CANCEL_RESTMASK.
4052 (struct pthread): Move specific_used field to avoid padding.
4053 Add setxid_futex field.
4054 * init.c (sighandler_setxid): Reset setxid flag and release the
4055 setxid futex.
4056 * allocatestack.c (setxid_signal_thread): New function. Broken
4057 out of the bodies of the two loops in __nptl_setxid. For undetached
4058 threads check whether they are exiting and if yes, don't send a signal.
4059 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4060 * pthread_create.c (start_thread): For undetached threads, check
4061 whether setxid bit is set. If yes, wait until signal has been
4062 processed.
4063
4064 * allocatestack.c (STACK_VARIABLES): Initialize them.
4065 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4066
560b4709
UD
40672004-09-02 Jakub Jelinek <jakub@redhat.com>
4068
4069 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4070 waiters, awake all waiters on the associated mutex.
4071
5eac4760
RM
40722005-09-22 Roland McGrath <roland@redhat.com>
4073
4074 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4075 ../sysdeps/x86_64/hp-timing.h).
4076
a3615024
UD
40772005-08-29 Jakub Jelinek <jakub@redhat.com>
4078
4079 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4080 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4081 (lll_futex_wake_unlock): Define.
4082 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4083 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4084 (lll_futex_wake_unlock): Define.
4085 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4086 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4087 (lll_futex_wake_unlock): Define.
4088 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4089 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4090 (lll_futex_wake_unlock): Define.
4091 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4092 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4093 (lll_futex_wake_unlock): Define.
4094 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4095 lll_futex_wake_unlock.
4096 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4097 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4098 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4099 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4100 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4101 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4102
bf017034
UD
41032005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4104
4105 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4106 Fix typo in register name.
4107
fd4af664
UD
41082005-08-23 Ulrich Drepper <drepper@redhat.com>
4109
8558d715
UD
4110 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4111 Use __sigfillset. Document that sigfillset does the right thing wrt
4112 to SIGSETXID.
fd4af664 4113
3fd1bc67
UD
41142005-07-11 Jakub Jelinek <jakub@redhat.com>
4115
44d75caf 4116 [BZ #1102]
3fd1bc67
UD
4117 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4118 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4119 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4120 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4121 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4122 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4123 in the structure.
4124 * Makefile (tests): Add tst-initializers1.
4125 (CFLAGS-tst-initializers1.c): Set.
4126 * tst-initializers1.c: New test.
4127
553185e2
UD
41282005-07-11 Jakub Jelinek <jakub@redhat.com>
4129
4130 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4131 Make sure __flags are located at offset 48 from the start of the
4132 structure.
4133
8df08cb2
RM
41342005-07-02 Roland McGrath <roland@redhat.com>
4135
4136 * Makeconfig: Comment fix.
4137
253eb3a0
UD
41382005-07-05 Jakub Jelinek <jakub@redhat.com>
4139
4140 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4141 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4142 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4143 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4144 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4145 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4146 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4147 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4148 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4149 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4150
bb6e8ca3
UD
41512005-06-25 Jakub Jelinek <jakub@redhat.com>
4152
4153 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4154 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4155 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4156 fields.
4157 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4158 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4159 field. Put in sysinfo field unconditionally.
4160 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4161 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4162 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4163 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4164 fields.
4165 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4166 * pthread_create.c (__pthread_create_2_1): Use
4167 THREAD_COPY_STACK_GUARD macro.
4168 * Makefile: Add rules to build and run tst-stackguard1{,-static}
4169 tests.
4170 * tst-stackguard1.c: New file.
4171 * tst-stackguard1-static.c: New file.
4172
99c7f870
UD
41732005-06-14 Alan Modra <amodra@bigpond.net.au>
4174
4175 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4176 Invoke CGOTSETUP and CGOTRESTORE.
4177 (CGOTSETUP, CGOTRESTORE): Define.
4178
8074c5c5
RM
41792005-05-29 Richard Henderson <rth@redhat.com>
4180
4181 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4182 (tf_write, tf_writev): Use it.
4183 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
4184 the system minimum.
4185
c179df4e
UD
41862005-05-23 Jakub Jelinek <jakub@redhat.com>
4187
4188 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4189 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4190 __librt_*_asynccancel@local.
4191
b0e196a4
UD
41922005-05-17 Alan Modra <amodra@bigpond.net.au>
4193
4194 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4195 all occurrences of JUMPTARGET. Instead append @local to labels.
4196
f7d78e18
UD
41972005-05-20 Jakub Jelinek <jakub@redhat.com>
4198
4199 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4200 size/alignment of struct pthread rather than tcbhead_t.
4201 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4202 Likewise.
4203 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4204 Likewise.
4205 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4206 Likewise.
4207
363dd976
UD
42082005-05-19 Richard Henderson <rth@redhat.com>
4209
4210 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4211 __sync_val_compare_and_swap, not explicit _si variant.
4212 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4213
1ad9da69
UD
42142005-05-03 Ulrich Drepper <drepper@redhat.com>
4215
4216 [BZ #915]
4217 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4218
5085cd1f
UD
42192005-05-03 Jakub Jelinek <jakub@redhat.com>
4220
4221 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4222 .eh_frame section, use cfi_* directives.
4223
ad529081
UD
42242005-04-27 Jakub Jelinek <jakub@redhat.com>
4225
4226 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4227 of "" includes.
4228
dea99685
UD
42292005-04-27 Ulrich Drepper <drepper@redhat.com>
4230
c06aad09 4231 [BZ #1075]
dea99685
UD
4232 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4233 aio_write blocks.
4234
84060bad
RM
42352005-04-27 Roland McGrath <roland@redhat.com>
4236
5e2d8ac8
RM
4237 * Makefile (tests): Remove tst-clock2.
4238
84060bad
RM
4239 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4240 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4241 translating to the kernel clockid_t for our own process/thread clock.
4242
4243 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4244
4a035b9d
RM
42452005-04-15 Jakub Jelinek <jakub@redhat.com>
4246
4247 * old_pthread_cond_init.c: Include <errno.h>.
4248 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4249 process shared or uses clock other than CLOCK_REALTIME.
4250 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4251
edac0e8f
UD
42522005-04-13 David S. Miller <davem@davemloft.net>
4253
4254 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4255 * sysdeps/sparc/sparc64/clone.S: New file.
4256
613d8d52
RM
42572005-04-05 Jakub Jelinek <jakub@redhat.com>
4258
44d75caf 4259 [BZ #1102]
613d8d52
RM
4260 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4261 __inline instead of inline.
4262 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4263
ee618985
UD
42642005-03-31 Jakub Jelinek <jakub@redhat.com>
4265
4266 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4267 functionally equivalent, but shorter instructions.
4268 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4269 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4270 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4271 Likewise.
4272 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4273 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4274 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4275 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4276 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4277 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4278 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4279 Likewise.
4280 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4281 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4282 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4283 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4284 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4285
f850220b
AJ
42862005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
4287
4288 * sysdeps/mips/Makefile: New file.
4289 * sysdeps/mips/nptl-sysdep.S: New file.
4290 * sysdeps/mips/tcb-offsets.sym: New file.
4291 * sysdeps/mips/pthread_spin_lock.S: New file.
4292 * sysdeps/mips/pthread_spin_trylock.S: New file.
4293 * sysdeps/mips/pthreaddef.h: New file.
4294 * sysdeps/mips/tls.h: New file.
4295 * sysdeps/mips/jmpbuf-unwind.h: New file.
4296 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4297 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4298 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4299 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4300 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4301 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4302 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4303 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4304 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4305 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4306
1e6da2b0
UD
43072005-03-23 Ulrich Drepper <drepper@redhat.com>
4308
c06aad09 4309 [BZ #1112]
1e6da2b0
UD
4310 * pthread_create.c (__pthread_create_2_1): Rename syscall error
4311 variable to scerr.
4312
5233d576
RM
43132005-03-10 Jakub Jelinek <jakub@redhat.com>
4314
4315 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4316
3053ff11
RM
43172005-02-25 Roland McGrath <roland@redhat.com>
4318
4319 * alloca_cutoff.c: Correct license text.
4320 * tst-unload.c: Likewise.
4321 * sysdeps/pthread/allocalim.h: Likewise.
4322 * sysdeps/pthread/pt-initfini.c: Likewise.
4323 * sysdeps/pthread/bits/libc-lock.h: Likewise.
4324 * sysdeps/pthread/bits/sigthread.h: Likewise.
4325 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4326 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4327
9cfe5381
RM
43282005-02-16 Roland McGrath <roland@redhat.com>
4329
4330 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4331 Use unsigned int * for ptr_nthreads.
4332
7de00121
RM
43332005-02-14 Alan Modra <amodra@bigpond.net.au>
4334
20d511e0 4335 [BZ #721]
7de00121
RM
4336 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4337 gcc4.
4338
4bae262d
UD
43392005-02-07 Richard Henderson <rth@redhat.com>
4340
613d8d52 4341 [BZ #787]
4bae262d
UD
4342 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4343 argument.
4344
75df54b7
RM
43452004-11-03 Marcus Brinkmann <marcus@gnu.org>
4346
4347 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4348 order of arguments in invocation of atomic_add_zero.
4349
ea9c93cc
UD
43502005-01-26 Jakub Jelinek <jakub@redhat.com>
4351
9cfe5381 4352 [BZ #737]
ea9c93cc
UD
4353 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4354 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4355 at least gotntpoff relocation and addition.
4356 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4357 Likewise.
4358 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4359 Likewise.
4360 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4361 Likewise.
4362
9dcafc55
UD
43632005-01-06 Ulrich Drepper <drepper@redhat.com>
4364
4365 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4366 entry for static tls deallocation fix.
4367 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4368 also contains information whether the memory pointed to is static
4369 TLS or not.
4370 * sysdeps/i386/tls.h: Likewise.
4371 * sysdeps/ia64/tls.h: Likewise.
4372 * sysdeps/powerpc/tls.h: Likewise.
4373 * sysdeps/s390/tls.h: Likewise.
4374 * sysdeps/sh/tls.h: Likewise.
4375 * sysdeps/sparc/tls.h: Likewise.
4376 * sysdeps/x86_64/tls.h: Likewise.
4377
a71c152c
UD
43782004-12-27 Ulrich Drepper <drepper@redhat.com>
4379
4380 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4381
d143c49e
UD
43822004-12-21 Jakub Jelinek <jakub@redhat.com>
4383
4384 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4385 %esp.
4386 * Makefile (tests): Add tst-align2.
4387 * tst-align2.c: New test.
4388 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4389 -mpreferred-stack-boundary=4.
4390
50130ded
RM
43912004-12-18 Roland McGrath <roland@redhat.com>
4392
4393 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4394 New file removed withdrawn for the moment.
4395
cbc53df0
RH
43962004-12-17 Richard Henderson <rth@redhat.com>
4397
4398 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4399 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 4400
fb9d5c73
UD
44012004-12-16 Ulrich Drepper <drepper@redhat.com>
4402
03332aa6
UD
4403 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4404 Increased PTHREAD_STACK_MIN.
4405
fb9d5c73
UD
4406 * tst-context1.c (stacks): Use bigger stack size.
4407
e853ea00
UD
44082004-12-16 Jakub Jelinek <jakub@redhat.com>
4409
4410 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4411 * sysdeps/sparc/tcb-offsets.sym: Add TID.
4412
f23673fc
UD
44132004-12-15 Jakub Jelinek <jakub@redhat.com>
4414
4415 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4416 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4417 * sysdeps/s390/tcb-offsets.sym (TID): Add.
4418
917fbe70
UD
44192004-12-15 Ulrich Drepper <drepper@redhat.com>
4420
4421 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4422
1f9d7c27
UD
44232004-12-14 Ulrich Drepper <drepper@redhat.com>
4424
4425 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4426 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4427
4428 * tst-getpid1.c: If child crashes, report this first. Print which
4429 signal.
4430
bf7c04cd
UD
44312004-12-09 Ulrich Drepper <drepper@redhat.com>
4432
4433 * init.c (__pthread_initialize_minimal_internal): Also unblock
4434 SIGSETXID.
4435
44362004-12-01 Jakub Jelinek <jakub@redhat.com>
4437
4438 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4439 _POSIX_THREAD_CPUTIME): Define to 0.
4440 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4441 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4442 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4443 __timer_signal_thread_tclk): Remove.
4444 (init_module): Remove their initialization.
4445 (thread_cleanup): Remove their cleanup assertions.
4446 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4447 __timer_signal_thread_tclk): Remove.
4448 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 4449 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
4450 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4451
484cc801
UD
44522004-12-07 Jakub Jelinek <jakub@redhat.com>
4453
4454 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4455 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4456
4457 * Makefile (tests): Add tst-getpid2.
4458 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4459 (do_test): Use it. Use __clone2 instead of clone on ia64.
4460 * tst-getpid2.c: New test.
4461
2da9a6a1
UD
44622004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4463
4464 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4465
1ff241b8
UD
44662004-12-04 Ulrich Drepper <drepper@redhat.com>
4467
4468 * Makefile (tests): Add tst-getpid1.
4469 * tst-getpid1.c: New file.
4470 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4471 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4472
3f488b9c
RM
44732004-12-02 Roland McGrath <roland@redhat.com>
4474
4475 * Makefile (libpthread-nonshared): Variable removed.
4476 ($(objpfx)libpthread_nonshared.a): Target removed.
4477 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4478 These are now handled by generic magic from
4479 libpthread-static-only-routines being set.
4480
597ce09c
UD
44812004-11-27 Ulrich Drepper <drepper@redhat.com>
4482
4483 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4484 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4485 _POSIX_THREAD_PRIO_PROTECT): Define.
4486 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4487 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4488 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4489
60e4523a
UD
44902004-11-26 Jakub Jelinek <jakub@redhat.com>
4491
4492 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4493 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4494 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4495 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4496 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4497 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4498 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4499
f1f2cafc
UD
45002004-11-24 Ulrich Drepper <drepper@redhat.com>
4501
bca2d208
UD
4502 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4503
f1f2cafc
UD
4504 * Makefile (libpthread-routines): Add pthread_setschedprio.
4505 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4506 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4507 * pthread_setschedprio.c: New file.
4508
b639d0c9
UD
45092004-11-20 Jakub Jelinek <jakub@redhat.com>
4510
ef2bb413
UD
4511 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4512 * pthread_cancel.c (pthread_create): Likewise.
4513
b639d0c9
UD
4514 * Makefile (libpthread-routines): Add vars.
4515 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4516 * init.c (__default_stacksize, __is_smp): Remove.
4517 * vars.c: New file.
4518 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4519 and define a wrapper macro.
4520 (PTHREAD_STATIC_FN_REQUIRE): Define.
4521 * allocatestack.c (__find_thread_by_id): Undefine.
4522 * pthread_create (__pthread_keys): Remove.
4523 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4524 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4525 PTHREAD_STATIC_FN_REQUIRE.
4526
3defcff3
UD
45272004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4528
4529 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4530 parameter to REGISTER macro.
4531
ec188f92
RM
45322004-11-17 Roland McGrath <roland@redhat.com>
4533
4534 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4535 Make sure SIGCANCEL is blocked as well.
4536
ccd8de9a
UD
45372004-11-10 Jakub Jelinek <jakub@redhat.com>
4538
4539 * sysdeps/pthread/setxid.h: New file.
4540 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4541 (struct xid_command): Add forward decl.
4542 (struct pthread_functions): Change return type of __nptl_setxid hook
4543 to int.
4544 * pthreadP.h (__nptl_setxid): Change return type to int.
4545 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4546 calling thread, return its return value and set errno on failure.
4547 * descr.h (struct xid_command): Change id type to long array.
4548
4549 * Makefile: Add rules to build and test tst-setuid1 and
4550 tst-setuid1-static.
4551 * tst-setuid1.c: New test.
4552 * tst-setuid1-static.c: New test.
4553
ed2ced8a
UD
45542004-11-10 Jakub Jelinek <jakub@redhat.com>
4555
4556 * Makefile (tests): Add tst-exit3.
4557 * tst-exit3.c: New test.
4558
948603ee
UD
45592004-11-09 Ulrich Drepper <drepper@redhat.com>
4560
4561 * Makefile (tests): Add tst-exit2.
4562 * tst-exit2.c: New file.
4563
ba5ffd2a
RM
45642004-11-09 Roland McGrath <roland@redhat.com>
4565
4566 [BZ #530]
4567 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4568 here, before calling clone.
4569 * pthread_create.c (start_thread): Don't do it here.
4570
c4d7bd39
RM
45712004-11-02 Jakub Jelinek <jakub@redhat.com>
4572
4573 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4574
543fb0c8
UD
45752004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4576
4577 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4578 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4579 assembler warning.
4580
a1fbd858
UD
45812004-10-28 Jakub Jelinek <jakub@redhat.com>
4582
4583 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4584 if sched_priority is not between minprio and maxprio.
4585
c2a4357a
UD
45862004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4587
4588 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4589 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4590
4591 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4592 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4593
78d8d211
UD
45942004-10-24 Ulrich Drepper <drepper@redhat.com>
4595
4596 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4597 not-cancelable I/O functions.
4598
dd28590f
UD
45992004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4600
4601 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4602 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4603 make sure 2 is stored in the futex and we looked at the old value.
4604 Fix a few other problems to return the correct value.
4605
f8c97af7
RH
46062004-10-14 Richard Henderson <rth@redhat.com>
4607
4608 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4609 make gcc4 happy.
4610
3feb8efa
UD
46112004-10-06 Jakub Jelinek <jakub@redhat.com>
4612
4613 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4614 of pthread-functions.h and pthreaddef.h.
4615 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4616
4617 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4618 Change __data.__nwaiters from int to unsigned int.
4619
4620 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4621 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4622
4623 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4624 before return type.
4625
4626 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4627 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4628
67060ef5
UD
46292004-10-06 Ulrich Drepper <drepper@redhat.com>
4630
4631 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4632 test fails, remove message queue.
4633 (tf_msgsnd): Likewise.
4634
f38a3086
UD
46352004-10-05 Jakub Jelinek <jakub@redhat.com>
4636
4637 * tst-clock1.c: Change #ifdef to #if defined.
4638 * tst-clock2.c: Likewise.
4639 * tst-cond11.c: Likewise.
4640
2c03b6db
UD
4641 * sysdeps/pthread/timer_create.c (timer_create): Use
4642 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4643 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4644 THREAD_CPUTIME.
4645
6ab5f50d
UD
46462004-10-05 Jakub Jelinek <jakub@redhat.com>
4647
4648 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4649 _POSIX_THREAD_CPUTIME): Define to 0.
4650
e4bb4853
UD
46512004-10-04 Ulrich Drepper <drepper@redhat.com>
4652
4653 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4654 and _POSIX_THREAD_CPUTIME to zero.
4655 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4656 * tst-barrier2.c: Fix testing for POSIX feature.
4657 * tst-clock1.c: Likewise.
4658 * tst-clock2.c: Likewise.
4659 * tst-cond11.c: Likewise.
4660 * tst-cond4.c: Likewise.
4661 * tst-cond6.c: Likewise.
4662 * tst-flock2.c: Likewise.
4663 * tst-mutex4.c: Likewise.
4664 * tst-mutex9.c: Likewise.
4665 * tst-rwlock12.c: Likewise.
4666 * tst-rwlock4.c: Likewise.
4667 * tst-signal1.c: Likewise.
4668 * tst-spin2.c: Likewise.
4669 * sysdeps/pthread/posix-timer.h: Likewise.
4670 * sysdeps/pthread/timer_create.c: Likewise.
4671 * sysdeps/pthread/timer_routines.c: Likewise.
4672
c1b48791
UD
46732004-10-01 Ulrich Drepper <drepper@redhat.com>
4674
927f0673
UD
4675 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4676 (__lll_mutex_timedlock_wait): Address futex correctly.
4677
c1b48791 4678 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 4679 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
4680 make sure 2 is stored in the futex and we looked at the old value.
4681 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4682 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4683 which might very well made the code not working at all before.
7b87aca6 4684 [BZ #417]
c1b48791 4685
e9f4e844
UD
46862004-09-28 Ulrich Drepper <drepper@redhat.com>
4687
4f21c95d
UD
4688 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4689 allow SIGSETXID to be sent.
4690 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4691 for SIGSETXID to be defined.
4692 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4693 SIGSETXID cannot be blocked.
4694
e9f4e844
UD
4695 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4696 Add __extension__ to long long types.
4697 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4698 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4699 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4700 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4701 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4702 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4703 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4704
5f66b766
UD
47052004-09-25 Ulrich Drepper <drepper@redhat.com>
4706
4707 * descr.h (struct pthread): Add stopped_start field.
4708 * sysdeps/pthread/createthread.c (create_thread): Set
4709 start_stopped flag in descriptor for new thread appropriately.
4710 * pthread_create.c (start_thread): Only take lock to be stopped on
4711 startup if stopped_start flag says so.
4712
362038b0
UD
47132004-09-24 Ulrich Drepper <drepper@redhat.com>
4714
3f80a99b
UD
4715 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4716 is created detached and if yes, do not try to free the stack in case
4717 the thread creation failed.
4718 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4719 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4720 case there has been no error. [BZ #405]
4721
362038b0
UD
4722 * pthread_create.c (start_thread): Don't wait for scheduler data
4723 etc to be set at the beginning of the function. The cancellation
4724 infrastructure must have been set up. And enable async
4725 cancellation before potentially going to sleep. [BZ #401]
4726
65f0beb9
UD
47272004-09-20 Ulrich Drepper <drepper@redhat.com>
4728
3c12b91a 4729 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
4730 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4731 for now.
4732 * Makefile: Don't build pthread_set*id code for now.
4733
2edb61e3
UD
47342004-09-19 Ulrich Drepper <drepper@redhat.com>
4735
4736 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4737 internal use.
4738 * allocatestack.c (__nptl_setxid): New function.
4739 * descr.h (struct xid_command): Define type.
4740 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4741 (sighandler_setxid): New function.
4742 (__pthread_initialize_minimal): Register sighandler_setxid for
4743 SIGCANCEL.
4744 * pt-allocrtsig.c: Update comment.
4745 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4746 Declare __nptl_setxid.
4747 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4748 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4749 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4750 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4751 and pthread_setresuid_np.
4752 * pthread_setgid_np.c: New file.
4753 * pthread_setuid_np.c: New file.
4754 * pthread_setegid_np.c: New file.
4755 * pthread_seteuid_np.c: New file.
4756 * pthread_setregid_np.c: New file.
4757 * pthread_setreuid_np.c: New file.
4758 * pthread_setresgid_np.c: New file.
4759 * pthread_setresuid_np.c: New file.
4760 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4761 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4762 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4763 and pthread_setresuid_np.
4764 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4765 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4766 pthread_setregid, and pthread_setresgid.
4767
1ab1fa6f
UD
47682004-09-18 Ulrich Drepper <drepper@redhat.com>
4769
4770 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4771 ENOMEM when out of memory.
4772
ae9e6b36
RM
47732004-09-10 Roland McGrath <roland@redhat.com>
4774
4775 [BZ #379]
4776 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4777 code, since we don't try to use the broken CLONE_STOPPED any more.
4778 * pthread_create.c (start_thread): Likewise.
4779
424bd2f8
RH
47802004-09-15 Richard Henderson <rth@redhat.com>
4781
4782 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4783
17b8a52d
UD
47842004-09-01 David Mosberger <davidm@hpl.hp.com>
4785
4786 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4787 (__libc_unwind_longjmp): Delete macro and declare as function.
4788 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4789 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4790 nptl directory.
4791 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4792 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4793 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4794
ccc63b07
UD
47952004-09-12 Ulrich Drepper <drepper@redhat.com>
4796
4797 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4798 for __USE_XOPEN2K.
4799 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4800 types also for __USE_XOPEN2K.
4801 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4802 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4803 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4804 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4805 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4806 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4807 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4808 [BZ #320]
4809
31f93b3b
UD
48102004-09-08 Ulrich Drepper <drepper@redhat.com>
4811
4812 * sysdeps/pthread/pthread.h
4813 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4814 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4815 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4816 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4817 [BZ #375]
4818
e0329987
UD
48192004-09-07 Ulrich Drepper <drepper@redhat.com>
4820
590b40f7
UD
4821 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4822 PSEUDO to be used with . prefix.
4823
67254a97
UD
4824 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4825 Use atomic_increment instead of atomic_exchange_and_add.
4826 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4827 Likewise.
4828 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4829 Likewise.
4830 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4831 Likewise.
4832
4833 * allocatestack.c (allocate_stack): Use atomic_increment_val
4834 instead of atomic_exchange_and_add.
4835 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4836 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4837 Likewise.
4838 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4839 Likewise.
4840
e0329987
UD
4841 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4842 the initialization function might throw.
4843
42d86dd6 48442005-09-05 Richard Henderson <rth@redhat.com>
e0329987 4845
42d86dd6
RH
4846 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4847 Move definition inside libpthread, libc, librt check. Provide
4848 definition for rtld.
4849
73f7c32c
UD
48502004-09-02 Ulrich Drepper <drepper@redhat.com>
4851
f76c8499
UD
4852 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4853 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4854 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4855 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4856 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4857 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4858 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4859 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4860 * unwind.c: Use it.
4861
73f7c32c
UD
4862 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4863 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4864 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4865 Likewise.
4866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4867 Decrement __nwaiters. If pthread_cond_destroy has been called and
4868 this is the last waiter, signal pthread_cond_destroy caller and
4869 avoid using the pthread_cond_t structure after unlock.
4870 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4871 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4872 Read clock type from the least significant bits of __nwaiters instead
4873 of __clock.
4874 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4875 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4876
48772004-08-31 Jakub Jelinek <jakub@redhat.com>
4878
4879 [BZ #342]
4880 * Makefile (tests): Add tst-cond20 and tst-cond21.
4881 * tst-cond20.c: New test.
4882 * tst-cond21.c: New test.
4883 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4884 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4885 it unsigned int.
4886 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4887 Likewise.
4888 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4889 (pthread_cond_t): Likewise.
4890 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4891 Likewise.
4892 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4893 Likewise.
4894 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4895 Likewise.
4896 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4897 (cond_nwaiters): New.
4898 (clock_bits): New.
4899 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4900 if there are waiters not signalled yet.
4901 Wait until all already signalled waiters wake up.
4902 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4903 __nwaiters. If pthread_cond_destroy has been called and this is the
4904 last waiter, signal pthread_cond_destroy caller and avoid using
4905 the pthread_cond_t structure after unlock.
4906 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4907 decrement it when leaving. If pthread_cond_destroy has been called
4908 and this is the last waiter, signal pthread_cond_destroy caller.
4909 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4910 Likewise. Read clock type from the least significant bits of
4911 __nwaiters instead of __clock.
4912 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4913 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4914 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4915 clock type just from the last COND_CLOCK_BITS bits of value.
4916 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4917 instead of __clock, just from second bit of condattr's value.
4918
409f7493
UD
49192004-08-30 Jakub Jelinek <jakub@redhat.com>
4920
4921 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4922 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4923 != 64.
4924 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4925
92c6ccd1
RM
49262004-08-15 Roland McGrath <roland@frob.com>
4927
4928 * pthread_atfork.c: Update copyright terms including special exception
4929 for these trivial files, which are statically linked into executables
4930 that use dynamic linking for the significant library code.
4931
4d004cfb
UD
49322004-08-09 Jakub Jelinek <jakub@redhat.com>
4933
4934 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4935 pthread_rwlock_rdlock.
4936 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4937 Decrease __nr_readers_queued after reacquiring lock.
4938 * sysdeps/pthread/pthread_rwlock_timedrdlock
4939 (pthread_rwlock_timedrdlock): Likewise.
4940 Reported by Bob Cook <bobcook47@hotmail.com>.
4941
90595fb6
RM
49422004-08-11 Jakub Jelinek <jakub@redhat.com>
4943
4944 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4945 before pthread_barrier_wait.
4946
fa46f7ab
UD
49472004-08-07 Ulrich Drepper <drepper@redhat.com>
4948
4949 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4950 Remove unnecessary exception handling data.
4951
15ef4b55
UD
49522004-07-23 Jakub Jelinek <jakub@redhat.com>
4953
4954 [BZ #284]
4955 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4956 instead of clockid_t.
4957
4fb907b7
RM
49582004-07-21 Roland McGrath <roland@redhat.com>
4959
4960 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4961
49622004-07-19 Roland McGrath <roland@redhat.com>
4963
4964 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4965
8f73811b
RM
49662004-07-02 Roland McGrath <roland@redhat.com>
4967
4968 * configure: Don't exit.
4969
290639c3
UD
49702004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4971
4972 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4973 (__pthread_cond_timedwait): Check for invalid nanosecond in
4974 timeout value.
4975
8e5aaad9
UD
49762004-07-07 Ulrich Drepper <drepper@redhat.com>
4977
4978 * Makefile: Add rules to build and run tst-fini1.
4979 * tst-fini1.c: New file.
4980 * tst-fini1mod.c: New file.
4981
ce6e047f
UD
49822004-07-05 Ulrich Drepper <drepper@redhat.com>
4983
4984 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4985 if no cancellation support is needed.
4986 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4987 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4988 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4989 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4990 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4991 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4992 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4993 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4994 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4995
4996 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4997 only if not already defined.
4998
9b9ef823
UD
49992004-07-05 Jakub Jelinek <jakub@redhat.com>
5000
2dd18ce2
UD
5001 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5002 constraint "m" instead of "0" for futex.
5003
9b9ef823
UD
5004 * shlib-versions: Add powerpc64-.*-linux.*.
5005
38205402
UD
50062004-07-04 Jakub Jelinek <jakub@redhat.com>
5007
5008 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5009 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5010 for valid tv_nsec.
5011 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5012 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5013 bits.
5014
78a9c837
RM
50152004-06-29 Roland McGrath <roland@redhat.com>
5016
5017 * Banner: NPTL no longer has its own version number.
5018 * Makefile (nptl-version): Variable removed.
5019 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5020 using $(version), the glibc version number.
5021
d3d35527
UD
50222004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5023
5024 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5025 Fix branch offset for a PLT entry.
5026 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5027 Likewise.
5028 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5029 Likewise.
5030 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5031 Likewise.
5032 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5033 Likewise.
5034
346f18ae
UD
50352004-06-28 Jakub Jelinek <jakub@redhat.com>
5036
5037 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5038 unconditionally.
5039
f3a19754
UD
50402004-06-28 Jakub Jelinek <jakub@redhat.com>
5041
5042 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5043 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5044 instead of tv_sec.
5045 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5046 (pthread_rwlock_timedrdlock): Likewise.
5047
539842a4
UD
50482004-06-22 Jakub Jelinek <jakub@redhat.com>
5049
5050 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5051 Set __r7 to val, not mutex.
5052
46f4c578
UD
50532004-06-27 Ulrich Drepper <drepper@redhat.com>
5054
5055 * Makefile: Add rules to build tst-rwlock14.
5056 * tst-rwlock14.c: New file.
5057
50582004-06-24 Boris Hu <boris.hu@intel.com>
5059
5060 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5061 check.
5062 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5063
9898e99c
AJ
50642004-06-19 Andreas Jaeger <aj@suse.de>
5065
5066 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5067 assembler in last patch.
5068
7c3164bc
UD
50692004-06-17 Ulrich Drepper <drepper@redhat.com>
5070
5071 * sysdeps/pthread/pthread_cond_timedwait.c
5072 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5073 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5074 (__pthread_cond_timedwait): Check for invalid nanosecond in
5075 timeout value.
5076 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5077 * tst-cond19.c: New file.
5078 * Makefile: Add rules to build and run tst-cond19.
5079
72e61500
UD
50802004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5081
5082 * tst-context1.c (GUARD_PATTERN): Defined.
5083 (tst_context_t): Define struct containing ucontext_t & guard words.
5084 (ctx): Declare as an array of tst_context_t.
5085 (fct): Verify uc_link & guard words are still valid.
5086 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5087
7c370086
UD
50882004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5089
5090 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5091 Add __data.__futex field, reshuffle __data.__clock.
5092 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5093 (__pthread_cond_signal): Increment __futex at the same time as
5094 __wakeup_seq or __total_seq. Pass address of __futex instead of
5095 address of low 32-bits of __wakeup_seq to futex syscall.
5096 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5097 (__pthread_cond_wait): Likewise. Pass __futex value from before
5098 releasing internal lock to FUTEX_WAIT.
5099 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5100 (__pthread_cond_timedwait): Likewise.
5101 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5102 (FUTEX_CMP_REQUEUE): Define.
5103 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5104 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5105 Pass __futex value from before the unlock and __futex address instead
5106 of address of low 32-bits of __wakeup_seq to futex syscall.
5107 Fallback to FUTEX_WAKE all on any errors.
5108
a9e526e7
RM
51092004-06-08 Jakub Jelinek <jakub@redhat.com>
5110
5111 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5112 comment typo.
5113 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5114 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5115 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5116 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5117 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
5118
f1847a84
RM
51192004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
5120
5121 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5122 Add memory clobber to inline assembly.
5123 (__lll_mutex_trylock): Likewise.
5124 (__lll_mutex_cond_trylock): Likewise.
5125
f7c81e1a
UD
51262004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
5127
5128 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5129 Pass val argument as 6th system call argument in %r7.
5130
75fccede
UD
51312004-05-21 Jakub Jelinek <jakub@redhat.com>
5132
5133 * Makefile (tests): Add tst-cond16.
5134 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5135 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5136 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5137 Add __data.__futex field, reshuffle __data.__clock.
5138 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5139 (__pthread_cond_signal): Increment __futex at the same time as
5140 __wakeup_seq or __total_seq. Pass address of __futex instead of
5141 address of low 32-bits of __wakeup_seq to futex syscall.
5142 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5143 (__pthread_cond_wait): Likewise. Pass __futex value from before
5144 releasing internal lock to FUTEX_WAIT.
5145 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5146 (__pthread_cond_timedwait): Likewise.
5147 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5148 (FUTEX_CMP_REQUEUE): Define.
5149 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5150 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5151 Pass __futex value from before the unlock and __futex address instead
5152 of address of low 32-bits of __wakeup_seq to futex syscall.
5153 Fallback to FUTEX_WAKE all on any errors.
5154 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5155 Define.
5156 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5157 internally. Return non-zero if error, zero if success.
5158 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5159 Add __data.__futex field, reshuffle __data.__clock.
5160 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5161 Define.
5162 (lll_futex_requeue): Add val argument, return 1 unconditionally
5163 for the time being.
5164 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5165 Add __data.__futex field, reshuffle __data.__clock.
5166 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5167 Define.
5168 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5169 internally. Return non-zero if error, zero if success.
5170 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5171 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5172 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5173 Define.
5174 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5175 internally. Return non-zero if error, zero if success.
5176 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5177 Add __data.__futex field, reshuffle __data.__clock.
5178 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5179 Define.
5180 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5181 internally. Return non-zero if error, zero if success.
5182 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5183 Add __data.__futex field, reshuffle __data.__clock.
5184 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5185 Add __data.__futex field, reshuffle __data.__clock.
5186 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5187 Increment __futex at the same time as __wakeup_seq or __total_seq.
5188 Pass address of __futex instead of address of low 32-bits of
5189 __wakeup_seq to futex syscall.
5190 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5191 Pass __futex value from before releasing internal lock
5192 to FUTEX_WAIT.
5193 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5194 Likewise. Avoid unnecessary shadowing of variables.
5195 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5196 Set __futex to 2 * __total_seq. Pass __futex value from before the
5197 unlock and __futex address instead of address of low 32-bits of
5198 __wakeup_seq to futex_requeue macro, adjust for new return value
5199 meaning.
5200 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5201 (__pthread_cond_signal): Increment __futex at the same time as
5202 __wakeup_seq or __total_seq. Pass address of __futex instead of
5203 address of low 32-bits of __wakeup_seq to futex syscall.
5204 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5205 (__pthread_cond_wait): Likewise. Pass __futex value from before
5206 releasing internal lock to FUTEX_WAIT.
5207 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5208 (__pthread_cond_timedwait): Likewise.
5209 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5210 (FUTEX_CMP_REQUEUE): Define.
5211 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5212 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5213 Pass __futex value from before the unlock and __futex address instead
5214 of address of low 32-bits of __wakeup_seq to futex syscall.
5215 Fallback to FUTEX_WAKE all on any errors.
5216
52172004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5218
5219 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5220 Add nop to align the end of critical section.
5221 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5222
fbf86dda
UD
52232004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5224
5225 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5226 Add __broadcast_seq field.
5227 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5228 all waiters as woken with woken_seq and bump broadcast counter.
5229 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5230 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5231 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5232 Comment typo fixes. Avoid returning -ETIMEDOUT.
5233
52342004-06-01 Ulrich Drepper <drepper@redhat.com>
5235
5236 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5237 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5238 Reported by Kaz Kojima.
5239
ffdd5e50
UD
52402004-05-25 Jakub Jelinek <jakub@redhat.com>
5241
5242 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5243
3abc82c8
UD
52442004-05-21 Jakub Jelinek <jakub@redhat.com>
5245
5246 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5247 __broadcast_seq with bc_seq after acquiring internal lock instead of
5248 before it.
5249
893a3511
UD
52502004-05-18 Jakub Jelinek <jakub@redhat.com>
5251
5252 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5253 compilation.
5254 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5255 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5256 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5257 (pthread_cond_t): Add __data.__broadcast_seq field.
5258 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5259 (FRAME_SIZE): Define.
5260 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
5261 Comment typo fixes.
5262 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5263 Define.
5264 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
5265 typo fixes.
5266 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5267 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
5268 fixes.
5269
52702004-05-18 Ulrich Drepper <drepper@redhat.com>
5271
5272 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5273 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5274 Add __broadcast_seq field.
5275 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5276 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5277 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5278 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5279 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5280 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5281 all waiters as woken with woken_seq and bump broadcast counter.
5282 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5283 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5284 __broadcast_seq field.
5285 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5286 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5287 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5288 * pthread_cond_init.c: Initialize __broadcast_seq field.
5289 * Makefile (tests): Add tst-cond17 and tst-cond18.
5290 Add .NOTPARALLEL goal.
5291 * tst-cond16.c: New file. From Jakub.
5292 * tst-cond17.c: New file. From Jakub.
5293 * tst-cond18.c: New file. From Jakub.
5294
4123718e
UD
52952004-05-16 Ulrich Drepper <drepper@redhat.com>
5296
5297 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5298 unwind info.
5299
5300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5301 Parametrize frame size. Correct some unwind info.
5302 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5303
2d7ae210
UD
53042004-05-04 Jakub Jelinek <jakub@redhat.com>
5305
5306 * tst-stack3.c: Note testing functionality beyond POSIX.
5307
50c2b6d7
UD
53082004-05-04 Jakub Jelinek <jakub@redhat.com>
5309
5310 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5311 Change conditional from ifdef to if.
5312
27b02589
UD
53132004-04-23 Jakub Jelinek <jakub@redhat.com>
5314
5315 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5316 SYSDEP_CANCEL_ERROR): Define.
5317 (PSEUDO): Use it.
5318
4bb8fc33
UD
53192004-05-01 Jakub Jelinek <jakub@redhat.com>
5320
5321 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5322
f9a06dc1
UD
53232004-04-20 Jakub Jelinek <jakub@redhat.com>
5324
5325 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5326
d3b52028
UD
53272004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5328
5329 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5330 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5331 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5332 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5333
a5dd0a6c
UD
53342004-04-19 Ulrich Drepper <drepper@redhat.com>
5335
5336 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5337 thread has all signals blocked.
5338
620c3354
AJ
53392004-04-18 Andreas Jaeger <aj@suse.de>
5340
5341 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5342 (SEM_VALUE_MAX): Add missing brace.
5343
1683daeb
UD
53442004-04-17 Jakub Jelinek <jakub@redhat.com>
5345
5346 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5347 in rt subdir.
5348 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5349 * sysdeps/pthread/tst-mqueue8x.c: New test.
5350 * tst-cancel4.c: Update comment about message queues.
5351
5352 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5353 return it_value { 0, 0 }.
5354 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5355 like SIGEV_SIGNAL.
5356 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5357 assertion for SIGEV_NONE.
5358 (thread_attr_compare): Compare all attributes, not just a partial
5359 subset.
5360
53612004-04-17 Jakub Jelinek <jakub@redhat.com>
5362
5363 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5364
f532641d
UD
53652004-04-17 Ulrich Drepper <drepper@redhat.com>
5366
5367 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5368 Just use a plain number.
5369 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5370 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5371 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5372 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5373 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5374 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5375 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5376
7eb7fdda
UD
53772004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5378
53392906
UD
5379 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5380 frame info.
5381 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 5382
d7ba1313
UD
53832004-04-15 Jakub Jelinek <jakub@redhat.com>
5384
5385 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5386 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5387 of calling sigwaitinfo.
5388
5adac0e4
UD
53892004-04-16 Ulrich Drepper <drepper@redhat.com>
5390
5391 * allocatestack.c (allocate_stack): Set reported_guardsize
5392 unconditionally.
5393 * pthread_getattr_np.c (pthread_getattr_np): Use
5394 reported_guardsize instead of guardsize.
5395 * descr.h (struct pthread): Add reported_guardsize field.
5396
f93fa7d4
UD
53972004-04-13 Jakub Jelinek <jakub@redhat.com>
5398
5399 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5400
1b82c6c7
UD
54012004-04-12 Ulrich Drepper <drepper@redhat.com>
5402
5403 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5404
54052004-04-08 Jakub Jelinek <jakub@redhat.com>
5406
5407 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5408 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5409 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5410 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5411 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5412 Define.
5413 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5414 (_POSIX_MESSAGE_PASSING): Define.
5415 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5416 (_POSIX_MESSAGE_PASSING): Define.
5417 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5418 (_POSIX_MESSAGE_PASSING): Define.
5419
e6eb894e
UD
54202004-04-04 Ulrich Drepper <drepper@redhat.com>
5421
5422 * tst-context1.c (fct): Check whether correct stack is used.
5423
1e084487
UD
54242004-04-03 Ulrich Drepper <drepper@redhat.com>
5425
4e73e115
UD
5426 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5427 matching constraints for asm mem parameters.
5428
1e084487
UD
5429 * tst-clock2.c (tf): Don't define unless needed.
5430
feca5e0b
UD
54312004-03-30 H.J. Lu <hongjiu.lu@intel.com>
5432
5433 * Makefile (link-libc-static): Use $(static-gnulib) instead of
5434 $(gnulib).
5435
3fa21fd8
UD
54362004-03-30 Ulrich Drepper <drepper@redhat.com>
5437
5438 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5439 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5440 * pthreadP.h: Declare __nptl_deallocate_tsd.
5441 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5442 Adjust caller.
5443
5444 * Makefile (tests): Add tst-tsd5.
5445 * tst-tsd5.c: New file.
5446
8e32efa6
UD
54472004-03-29 Ulrich Drepper <drepper@redhat.com>
5448
5449 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5450 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5451 is SHLIB_COMPAT check.
5452 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5453 (__pthread_attr_getaffinity_old): Likewise.
5454 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5455 (__pthread_getaffinity_old): Likewise.
5456 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5457 (__pthread_setaffinity_old): Likewise.
5458
eec8b6ca
UD
54592004-03-26 Ulrich Drepper <drepper@redhat.com>
5460
5461 * allocatestack.c (_make_stacks_executable): Call
5462 _dl_make_stack_executable first.
5463
db2f05ba
RM
54642004-03-24 Roland McGrath <roland@redhat.com>
5465
5466 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5467 constraint instead of "0".
5468
6abbc501
UD
54692004-03-24 Ulrich Drepper <drepper@redhat.com>
5470
68dc4dcb
UD
5471 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5472 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5473
6abbc501
UD
5474 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5475 code to avoid warning.
5476
865e14d9
AJ
54772004-03-24 Andreas Jaeger <aj@suse.de>
5478
5479 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5480 (__pthread_attr_setaffinity_old): Remove const.
5481
16b06b70
UD
54822004-03-23 Ulrich Drepper <drepper@redhat.com>
5483
2c0b891a
UD
5484 * sysdeps/unix/sysv/linux/smp.h: New file.
5485 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5486 * init.c: Define __is_smp.
5487 (__pthread_initialize_minimal_internal): Call is_smp_system to
5488 initialize __is_smp.
5489 * pthreadP.h: Declare __is_smp.
5490 Define MAX_ADAPTIVE_COUNT is necessary.
5491 * pthread_mutex_init.c: Add comment regarding __spins field.
5492 * pthread_mutex_lock.c: Implement adaptive mutex type.
5493 * pthread_mutex_timedlock.c: Likewise.
5494 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5495 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5496 Add __spins field.
5497 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5498 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5499 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5500 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5501 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5502 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5503 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5504 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5505 lll_mutex_cond_trylock.
5506 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5507 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5508 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5509 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5510 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5511 Define BUSY_WAIT_NOP.
5512 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5513 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5514
5515 * tst-mutex5.c: Add support for testing adaptive mutexes.
5516 * tst-mutex7.c: Likewise.
5517 * tst-mutex5a.c: New file.
5518 * tst-mutex7a.c: New file.
5519 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5520
565699e4
UD
5521 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5522 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 5523 vgettimeofday call might destroy the content.
565699e4 5524
7fe1586f
UD
5525 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5526 @pause in the loop.
5527
e408880b
UD
5528 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5529 No need to restrict type of ret. Make it int. Add comment.
5530
16b06b70
UD
5531 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5532 Remove unnecessary setne instruction.
5533
61645263
UD
55342004-03-22 Jakub Jelinek <jakub@redhat.com>
5535
5536 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5537 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5538 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5539 If realloc fails, break out of the loop.
5540
e3d4c585
AJ
55412004-03-20 Andreas Jaeger <aj@suse.de>
5542
5543 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5544 (__pthread_setaffinity_old): Fix interface.
5545 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5546 (__pthread_getaffinity_old): Likewise.
5547
5548 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5549 (__pthread_setaffinity_new): Remove duplicate declaration.
5550
3abb1ff7
UD
55512004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5552
5553 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5554 the return value to a safe register.
5555 (CDISABLE): Set the function argument correctly.
5556
07bd2a3f
UD
55572004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5558
5559 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5560 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5561 Rewrite so that only one locked memory operation per round is needed.
5562 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5563 (pthread_barrier_wait): After wakeup, release lock only when the
5564 last thread stopped using the barrier object.
5565 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5566 (__pthread_cond_wait): Don't store mutex address if the current
5567 value is ~0l. Add correct cleanup support and unwind info.
5568 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5569 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5570 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5571 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5572 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5573 Add correct cleanup support and unwind info.
5574 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5575 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5576 information for syscall wrappers.
5577
14c35863
UD
55782004-03-18 Ulrich Drepper <drepper@redhat.com>
5579
5580 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5581 cpusetsize field, remove next.
5582 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5583 parameter for size of the CPU set.
5584 (pthread_setaffinity_np): Likewise.
5585 (pthread_attr_getaffinity_np): Likewise.
5586 (pthread_attr_setaffinity_np): Likewise.
5587 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5588 interface change, keep compatibility code.
5589 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5590 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5591 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5592 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5593 __pthread_getaffinity_np.
5594 * Versions: Add version for changed interfaces.
5595 * tst-attr3.c: Adjust test for interface change.
5596 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5597 increasing buffer sizes.
5598 * pthread_attr_destroy.c: Remove unused list handling.
5599 * pthread_attr_init.c: Likewise.
5600
8e115d80
RM
56012004-03-17 Roland McGrath <roland@redhat.com>
5602
5603 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5604 first argument to clock_getres so we ever enable kernel timers.
5605
e3b22ad3
UD
56062004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5607
5608 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5609
841153fa
RH
56102004-03-12 Richard Henderson <rth@redhat.com>
5611
e3b22ad3
UD
5612 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5613 oldvalue from CENABLE to CDISABLE.
841153fa 5614
932dfea7
UD
56152004-03-12 Ulrich Drepper <drepper@redhat.com>
5616
5617 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5618 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5619 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5620 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5621
9852f6dc
RH
56222004-03-11 Richard Henderson <rth@redhat.com>
5623
5624 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5625 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5626 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5627
43513fb7
UD
56282004-03-11 Jakub Jelinek <jakub@redhat.com>
5629
5630 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5631 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5632 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5633
56342004-03-11 Jakub Jelinek <jakub@redhat.com>
5635
5636 * forward.c (__pthread_cond_broadcast_2_0,
5637 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5638 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5639 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5640
8a3e10e0
UD
56412004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5642
5643 * sysdeps/sh/tcb-offsets.sym: Add PID.
5644 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5645 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5646
6d3a2bec
UD
56472004-03-10 Ulrich Drepper <drepper@redhat.com>
5648
5649 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5650 include <sysdep-cancel.h>, vfork is no cancellation point.
5651 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5652 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5653 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5654
d3a4a571
UD
56552004-03-10 Jakub Jelinek <jakub@redhat.com>
5656
73b4ce64
UD
5657 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5658 libc_hidden_def.
5659 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5660 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5661 Likewise.
5662 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5663 Likewise.
5664 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5665 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5666 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5667 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5668 of DO_CALL_VIA_BREAK. Work around a gas problem.
5669
d682a515
UD
5670 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5671 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5672 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5673 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5674 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5675 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5676
5677 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5678 a local register for saving old PID. Negate PID in parent upon exit.
5679
d3a4a571
UD
5680 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5681 tcb-offsets.h.
5682 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5683 before syscall, set to the old value in the parent afterwards.
5684 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5685 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5686 tcb-offsets.h.
5687 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5688 before syscall, set to the old value in the parent afterwards.
5689 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5690 * sysdeps/s390/tcb-offsets.sym: Add PID.
5691
5692 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5693 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5694 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5695 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5696 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5697 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5698
56992004-03-10 Andreas Schwab <schwab@suse.de>
5700
5701 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5702 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5703 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5704
3f2fb223 57052004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 5706
3f2fb223
UD
5707 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5708 * tst-cancel21.c (do_one_test): Likewise.
5709 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 5710
8b9d6054
UD
57112004-02-09 Jakub Jelinek <jakub@redhat.com>
5712
5713 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5714 if non-zero and set to INT_MIN if zero.
5715 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5716 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5717 (SAVE_PID, RESTORE_PID): Define.
5718 (__vfork): Use it.
5719 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5720 Use relative path to avoid including NPTL i386/vfork.S.
5721 (SAVE_PID, RESTORE_PID): Define.
5722 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5723 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5724 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5725 tst-vfork2x.
5726 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5727 * tst-vfork1.c: New test.
5728 * tst-vfork2.c: New test.
5729 * tst-vfork1x.c: New test.
5730 * tst-vfork2x.c: New test.
5731
02287d05
UD
57322004-03-08 Ulrich Drepper <drepper@redhat.com>
5733
c072ef6d 5734 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 5735 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 5736 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 5737 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 5738
d4acd24b
UD
57392004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5740
5741 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5742
8acb4b81
UD
57432004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5744
5745 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5746 _rtld_global_ro.
5747
4d1a02ef
UD
57482004-03-07 Ulrich Drepper <drepper@redhat.com>
5749
001836c8 5750 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 5751 _rtld_global_ro.
001836c8 5752
4d1a02ef
UD
5753 * tst-once4.c: Remove unnecessary macro definition.
5754
5755 * tst-mutex7.c (do_test): Limit thread stack size.
5756 * tst-once2.c (do_test): Likewise.
5757 * tst-tls3.c (do_test): Likewise.
5758 * tst-tls1.c (do_test): Likewise.
5759 * tst-signal3.c (do_test): Likewise.
5760 * tst-kill6.c (do_test): Likewise.
5761 * tst-key4.c (do_test): Likewise.
5762 * tst-join4.c (do_test): Likewise.
5763 * tst-fork1.c (do_test): Likewise.
5764 * tst-context1.c (do_test): Likewise.
5765 * tst-cond2.c (do_test): Likewise.
5766 * tst-cond10.c (do_test): Likewise.
5767 * tst-clock2.c (do_test): Likewise.
5768 * tst-cancel10.c (do_test): Likewise.
5769 * tst-basic2.c (do_test): Likewise.
5770 * tst-barrier4.c (do_test): Likewise.
5771
aa420660
UD
57722004-03-05 Ulrich Drepper <drepper@redhat.com>
5773
5774 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5775
cff08c81
UD
57762004-03-01 Ulrich Drepper <drepper@redhat.com>
5777
5778 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5779 (__pthread_cond_timedwait): Optimize wakeup test.
5780 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5781 (__pthread_cond_wait): Likewise.
5782 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5783 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5784 Likewise.
5785
b7fe377c
UD
57862004-02-29 Ulrich Drepper <drepper@redhat.com>
5787
5788 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5789 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5790 the atomic instruction needed.
5791 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5792 (__lll_mutex_lock_wait): Likewise.
5793
4c771a3b
UD
57942004-02-28 Ulrich Drepper <drepper@redhat.com>
5795
5796 * Makefile (tests): Add tst-cond14 and tst-cond15.
5797 * tst-cond14.c: New file.
5798 * tst-cond15.c: New file.
5799
a2c33d5a
UD
58002004-02-27 Ulrich Drepper <drepper@redhat.com>
5801
5802 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5803 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5804 needs to be implemented differently to be useful.
5805
261eada2
UD
58062004-02-26 Ulrich Drepper <drepper@redhat.com>
5807
14ffbc83
UD
5808 * pthread_attr_setschedparam.c: Don't test priority against limits
5809 here. Set ATTR_FLAG_SCHED_SET flag.
5810 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5811 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5812 from parent thread to child. If attribute is used and scheduling
5813 parameters are not inherited, copy parameters from attribute or
5814 compute them. Check priority value.
5815 * pthread_getschedparam.c: If the parameters aren't known yet get
5816 them from the kernel.
5817 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5818 ATTR_FLAG_POLICY_SET flag for thread.
5819 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5820 and ATTR_FLAG_POLICY_SET.
5821
5822 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5823
261eada2
UD
5824 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5825 fail if stack address hasn't been set. Just return 0.
5826
701d185c
UD
58272004-02-25 Ulrich Drepper <drepper@redhat.com>
5828
25b8e63c
UD
5829 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5830 libpthread for the files in this list.
5831 (CFLAGS-tst-unload): Removed.
5832 * tst-unload.c (do_test): Don't use complete path for
5833 LIBPHREAD_SO.
5834
701d185c
UD
5835 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5836 tst-_res1mod2.
5837
a8fd5a02
UD
58382004-02-22 Ulrich Drepper <drepper@redhat.com>
5839
5840 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5841 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5842 operation per round is needed.
5843 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5844 (__lll_mutex_lock_wait): Likewise.
5845
dd0b7b19
UD
58462004-02-20 Ulrich Drepper <drepper@redhat.com>
5847
5848 * tst-cancel9.c (cleanup): Don't print to stderr.
5849
5990e1fe
UD
58502004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5851
5852 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5853
33ab3b66
UD
58542004-02-20 Jakub Jelinek <jakub@redhat.com>
5855
1be3130e
UD
5856 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5857 (__syscall_error_handler2): Call CDISABLE.
5858 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5859 (__syscall_error_handler2): Call CDISABLE.
5860
8ba5025a
UD
5861 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5862 Release lock before the loop, don't reacquire it.
8ba5025a 5863
33ab3b66
UD
5864 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5865
11986c68
UD
58662004-02-19 Andreas Schwab <schwab@suse.de>
5867
5868 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5869 Fix last change.
5870
dc391246
UD
58712004-02-18 Ulrich Drepper <drepper@redhat.com>
5872
37c054c7
UD
5873 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5874 (pthread_barrier_wait): After wakeup, release lock only when the
5875 last thread stopped using the barrier object.
5876 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5877 (pthread_barrier_wait): Likewise.
5878 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5879 Likewise.
5880 * Makefile (tests): Add tst-barrier4.
5881 * tst-barrier4.c: New file.
dc391246
UD
5882
5883 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5884 (__pthread_cond_timedwait): Perform timeout test while holding
5885 internal lock to prevent wakeup race.
5886 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5887 * sysdeps/pthread/pthread_cond_timedwait.c
5888 (__pthread_cond_timedwait): Likewise.
5889 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5890 (__pthread_cond_timedwait): Likewise.
5891
4a08113c
UD
58922004-02-18 Jakub Jelinek <jakub@redhat.com>
5893
5894 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5895 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5896 * Makefile (tests): Add tst-rwlock13.
5897 * tst-rwlock13.c: New test.
5898
71b1675e
UD
58992004-02-16 Ulrich Drepper <drepper@redhat.com>
5900
5901 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5902 (__condvar_tw_cleanup): Little optimization.
5903 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5904
cd9fdc72
UD
59052004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5906
5907 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5908 libpthread as "lib" parameter to SHLIB_COMPAT.
5909 (__novmx_siglongjmp): Fix typo in function name.
5910 (__novmx_longjmp): Fix typo in function name.
5911
82038750
UD
59122004-02-13 Ulrich Drepper <drepper@redhat.com>
5913
b078c591
UD
5914 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5915 __builtin_expect.
5916
82038750
UD
5917 * sysdeps/generic/pt-longjmp.c: Moved to...
5918 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5919
e2982bf0
UD
59202004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5921
5922 * Makefile (libpthread-routines): Add pt-cleanup.
5923 * pt-longjmp.c: Removed.
5924 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5925 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5926 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5927 Version longjmp, siglongjmp for GLIBC_2.3.4.
5928 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5929
3730d95c
UD
59302004-02-13 Ulrich Drepper <drepper@redhat.com>
5931
219304ec
UD
5932 * sysdeps/pthread/pthread_cond_timedwait.c
5933 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5934 Reuse code. Add __builtin_expects.
5935
3730d95c
UD
5936 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5937 (__pthread_cond_timedwait): Get internal lock in case timeout has
5938 passed before the futex syscall.
5939 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5940
5673ccc1
UD
59412004-01-20 Ulrich Drepper <drepper@redhat.com>
5942
debddf64
UD
5943 * allocatestack.c: Pretty printing.
5944
5673ccc1
UD
5945 * sysdeps/pthread/createthread.c (create_thread): Don't add
5946 CLONE_DETACHED bit if it is not necessary.
5947
6bae8725
UD
59482004-01-16 Ulrich Drepper <drepper@redhat.com>
5949
5950 * pthread_getattr_np.c: Include ldsodefs.h.
5951
ff151400
RH
59522004-01-16 Richard Henderson <rth@redhat.com>
5953
6bae8725
UD
5954 * allocatestack.c: Don't declare __libc_stack_end.
5955 * init.c (__pthread_initialize_minimal_internal): Likewise.
5956 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 5957
ba683832
RH
59582004-01-15 Richard Henderson <rth@redhat.com>
5959
5960 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5961 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5962 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5963 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5964 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5965 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5966 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5967 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5968
630d93a7
UD
59692004-01-14 Ulrich Drepper <drepper@redhat.com>
5970
219304ec 5971 * init.c (pthread_functions): Make array const.
630d93a7 5972
d1fc817e
UD
59732004-01-13 Ulrich Drepper <drepper@redhat.com>
5974
5975 * allocatestack.c (__make_stacks_executable): Change interface.
5976 Check parameters. Pass parameter on to libc counterpart.
5977 * pthreadP.h: Change declaration.
5978
dc927809
RH
59792004-01-13 Richard Henderson <rth@redhat.com>
5980
10677727
UD
5981 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5982 prototype form.
5983 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5984 Likewise.
5985
d1fc817e
UD
5986 * sysdeps/alpha/Makefile: New file.
5987 * sysdeps/alpha/tcb-offsets.sym: New file.
5988 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5989 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 5990
d1fc817e
UD
5991 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5992 on powerpc version.
dc927809 5993
249a3d0c
UD
59942004-01-08 Jakub Jelinek <jakub@redhat.com>
5995
5996 * Makefile (tests): Add tst-backtrace1.
5997 * tst-backtrace1.c: New test.
5998
763c0490
RM
59992003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6000
6001 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6002 register as second parameter to the REGISTER macro.
6003 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6004 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6005 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6006 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6007 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6008 of thread register as second parameter to REGISTER macro in 64 case.
6009
c7baafd5
UD
60102004-01-03 Ulrich Drepper <drepper@redhat.com>
6011
6012 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6013 (CFLAGS-getpid.o): Defined.
6014 (CFLAGS-getpid.os): Defined.
6015
25ac0258
UD
60162003-12-31 Ulrich Drepper <drepper@redhat.com>
6017
6018 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6019 returned for main thread does not overlap with any other VMA.
6020 Patch by Jakub Jelinek.
6021
795985e4
UD
60222003-12-29 Jakub Jelinek <jakub@redhat.com>
6023
6024 * tst-raise1.c: Include stdio.h.
6025
cb5b9388
UD
60262003-12-23 Jakub Jelinek <jakub@redhat.com>
6027
6028 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6029 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6030 If pid is 0, set it to selftid.
6031 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6032 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6033 != 0, return self->tid without doing a syscall.
6034 * descr.h (struct pthread): Move pid field after tid.
6035
6036 * Makefile (tests): Add tst-raise1.
6037 * tst-raise1.c: New file.
6038
432aaf5b
RM
60392003-12-23 Roland McGrath <roland@redhat.com>
6040
6041 * tst-oddstacklimit.c: New file.
6042 * Makefile (tests): Add it.
6043 (tst-oddstacklimit-ENV): New variable.
6044
6045 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6046 value up to page size for __default_stacksize.
6047
33ebea17
UD
60482003-12-21 Ulrich Drepper <drepper@redhat.com>
6049
6050 * Makefile (tests): Add tst-eintr5.
6051 * tst-eintr5.c: New file.
6052
6053 * eintr.c (eintr_source): Prevent sending signal to self.
6054
6055 * tst-eintr2.c (tf1): Improve error message.
6056
bbe35eb5
UD
60572003-12-20 Ulrich Drepper <drepper@redhat.com>
6058
6059 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6060 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
6061 * pthread_cancel.c: Add comment explaining use of PID field.
6062 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6063 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6064 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6065 temporarily to signal the field must not be relied on and updated
6066 by getpid().
6067 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6068 temporarily negative.
6069 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 6070
4efdd8d3
UD
60712003-12-19 Ulrich Drepper <drepper@redhat.com>
6072
6073 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6074 (eintr_source): If ARG != NULL, use pthread_kill.
6075 * tst-eintr1.c: Adjust for this change.
6076 * tst-eintr2.c: Likewise.
6077 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6078 * tst-eintr3.c: New file.
6079 * tst-eintr4.c: New file.
6080
60812003-12-19 Jakub Jelinek <jakub@redhat.com>
6082
6083 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6084 if CANCELSTATE_BITMASK is set.
6085 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6086 Likewise.
6087
6088 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6089 (tests-reverse): Add tst-cancel23.
6090 * tst-cancel22.c: New test.
6091 * tst-cancel23.c: New test.
6092
675620f7
UD
60932003-12-18 Ulrich Drepper <drepper@redhat.com>
6094
6095 * tst-eintr1.c: Better error messages.
6096
6097 * Makefile (tests): Add tst-eintr2.
6098 * tst-eintr2.c: New file.
6099
61002003-12-18 Jakub Jelinek <jakub@redhat.com>
6101
6102 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6103 (CFLAGS-tst-cancelx21.c): Set.
6104 * tst-cancel21.c: New test.
6105 * tst-cancelx21.c: New test.
6106
6107 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6108 comparison operand.
6109 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6110 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6111 * pt-longjmp.c: Include jmpbuf-unwind.h.
6112 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6113 _JMPBUF_UNWINDS. Adjust compared pointers.
6114 * init.c (__pthread_initialize_minimal_internal): Initialize
6115 pd->stackblock_size.
6116 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6117 * sysdeps/alpha/jmpbuf-unwind.h: New file.
6118 * sysdeps/i386/jmpbuf-unwind.h: New file.
6119 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6120 * sysdeps/s390/jmpbuf-unwind.h: New file.
6121 * sysdeps/sh/jmpbuf-unwind.h: New file.
6122 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6123 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 6124 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
6125 (_JMPBUF_CFA_UNWINDS): Remove.
6126 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6127
61282003-12-12 Jakub Jelinek <jakub@redhat.com>
6129
6130 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6131 (CFLAGS-tst-cancelx20.c): Set.
6132 * tst-cancel20.c: New test.
6133 * tst-cancelx20.c: New test.
6134
2d951ab6
UD
61352003-12-17 Ulrich Drepper <drepper@redhat.com>
6136
6137 * init.c (__pthread_initialize_minimal_internal): Don't treat
6138 architectures with separate register stack special here when
6139 computing default stack size.
6140
f8a3a2e7
RM
61412003-12-17 Roland McGrath <roland@redhat.com>
6142
6143 * Makefile (tst-cancelx7-ARGS): New variable.
6144 Reportd by Greg Schafer <gschafer@zip.com.au>.
6145
e796f92f
UD
61462003-12-17 Jakub Jelinek <jakub@redhat.com>
6147
6148 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
6149 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6150 (tst-stack3-ENV): Set.
6151 ($(objpfx)tst-stack3-mem): New.
6152 * tst-stack3.c: New test.
6153
092eb73c
UD
61542003-12-10 David Mosberger <davidm@hpl.hp.com>
6155
6156 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6157 Add unwind directives. Drop unused .regstk directive.
6158 (_fini_EPILOG_BEGINS): Add unwind directives.
6159
ff48874d
UD
61602003-12-11 Ulrich Drepper <drepper@redhat.com>
6161
6162 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6163 Assume parameter is a pointer.
6164 (lll_futex_wake): Likewise.
20945457
UD
6165 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6166 Likewise.
6167 (lll_futex_wake): Likewise.
ff48874d
UD
6168 Reported by Boris Hu.
6169 * sysdeps/unix/sysv/linux/unregister-atfork.c
6170 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6171
6172 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6173
1d9d0b80
UD
61742003-12-10 Ulrich Drepper <drepper@redhat.com>
6175
6176 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6177 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6178 __rtld_lock_initialize for ld.so lock.
6179 Patch in part by Adam Li <adam.li@intel.com>.
6180
c776b3d7
UD
61812003-12-02 David Mosberger <davidm@hpl.hp.com>
6182
6183 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6184 in $(gnulib). Also, remove stale comment.
6185
61862003-11-12 David Mosberger <davidm@hpl.hp.com>
6187
6188 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6189 advantage of new syscall stub and optimize accordingly.
6190
6191 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6192 from SYS_futex, to match expectations of
6193 sysdep.h:DO_INLINE_SYSCALL.
6194 (lll_futex_clobbers): Remove.
6195 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6196 (lll_futex_wake): Likewise.
6197 (lll_futex_requeue): Likewise.
6198 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6199 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6200 Jelinek).
6201 (__lll_mutex_lock): Likewise.
6202 (__lll_mutex_cond_lock): Likewise.
6203 (__lll_mutex_timed_lock): Likewise.
6204 (__lll_mutex_unlock): Likewise.
6205 (__lll_mutex_unlock_force): Likewise.
6206
6207 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6208 comes before the include of <sysdep.h>.
6209 (THREAD_SELF_SYSINFO): New macro.
6210 (THREAD_SYSINFO): Likewise.
6211 (INIT_SYSINFO): New macro.
6212 (TLS_INIT_TP): Call INIT_SYSINFO.
6213
6214 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6215
6216 * sysdeps/pthread/createthread.c (create_thread): Use
6217 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6218 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6219 THREAD_SELF_SYSINFO instead of open code.
6220 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6221 (THREAD_SYSINFO): Likewise.
6222
6223 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6224
6225 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6226
57d20ee7
UD
62272003-12-06 Ulrich Drepper <drepper@redhat.com>
6228
6229 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6230 instead of .init. Patch by David Mosberger.
6231
67aeab2a
AJ
62322003-11-30 Thorsten Kukuk <kukuk@suse.de>
6233
6234 * sysdeps/pthread/configure.in: Remove broken declaration in C
6235 cleanup handling check.
6236
8ca203e6
AJ
62372003-11-30 Andreas Jaeger <aj@suse.de>
6238
6239 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6240 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6241 Likewise.
6242
46bf9de7
UD
62432003-11-27 Jakub Jelinek <jakub@redhat.com>
6244
6245 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6246 * pthread_attr_destroy.c: Include shlib-compat.h.
6247 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6248 is set in iattr->flags.
6249 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6250
1d9b73ab
UD
62512003-11-21 Jakub Jelinek <jakub@redhat.com>
6252
6253 * Makefile (distribute): Add tst-cleanup4aux.c.
6254
6255 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
6256 include.
6257
53f9084e
UD
62582003-11-21 Ulrich Drepper <drepper@redhat.com>
6259
1d9b73ab
UD
6260 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6261 pthread_cond_signal.
6262
e42a990e
UD
6263 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6264 store mutex address if the current value is ~0l.
6265 * sysdeps/pthread/pthread_cond_timedwait.c
6266 (__pthread_cond_timedwait): Likewise.
6267 * sysdeps/pthread/pthread_cond_broadcast.c
6268 (__pthread_cond_broadcast): Don't use requeue for pshared
6269 condvars.
6270
6271 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6272 (__pthread_cond_wait): Don't store mutex address if the current
6273 value is ~0l.
6274 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6275 (__pthread_cond_timedwait): Likewise.
6276 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6277 (__pthread_cond_broadcast): Don't use requeue for pshared
6278 condvars.
6279
6280 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6281 element with ~0l for pshared condvars, with NULL otherwise.
6282
6283 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6284 (__pthread_cond_wait): Don't store mutex address if the current
6285 value is ~0l.
6286 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6287 (__pthread_cond_timedwait): Likewise.
6288 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6289 (__pthread_cond_broadcast): Don't use requeue for pshared
6290 condvars.
6291
bf68b236 6292 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 6293 * tst-cond12.c: New file.
bf68b236 6294 * tst-cond13.c: New file.
53f9084e 6295
9780c971
UD
62962003-11-17 Ulrich Drepper <drepper@redhat.com>
6297
6298 * sysdeps/pthread/configure.in: Make missing forced unwind support
6299 fatal.
6300
74e12fbc
UD
63012003-11-11 Ulrich Drepper <drepper@redhat.com>
6302
6303 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6304
c685b2b0
UD
63052003-11-06 Ulrich Drepper <drepper@redhat.com>
6306
6307 * Makefile: Add magic to clean up correctly.
6308
44e94149
UD
63092003-11-05 Jakub Jelinek <jakub@redhat.com>
6310
6311 * unwind.c (FRAME_LEFT): Define.
6312 (unwind_stop): Handle old style cleanups here.
6313 (__pthread_unwind): Handle old style cleanups only if
6314 !HAVE_FORCED_UNWIND.
6315 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6316 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6317 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6318 ($(objpfx)tst-cleanupx4): Likewise.
6319 * tst-cleanup4.c: New test.
6320 * tst-cleanup4aux.c: New.
6321 * tst-cleanupx4.c: New test.
6322
c28422b5
UD
63232003-11-04 Ulrich Drepper <drepper@redhat.com>
6324
6325 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6326 lll_mutex_*lock macros to skip atomic operations on some archs.
6327
27176677
UD
63282003-11-03 Ulrich Drepper <drepper@redhat.com>
6329
6330 * sysdeps/pthread/tst-timer.c (main): Initialize
6331 sigev2.sigev_value as well.
6332
026395a2
RM
63332003-10-15 Roland McGrath <roland@redhat.com>
6334
6335 * sysdeps/pthread/configure.in: Barf if visibility attribute support
6336 is missing.
6337 * sysdeps/pthread/configure: Regenerated.
6338
fa3cbe3d
UD
63392003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6340
6341 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6342 locking macros. No distinction between normal and mutex locking
6343 anymore.
6344 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6345 Merge bits from lowlevelmutex.S we still need.
6346 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6347 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6348 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6349 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6350 new mutex implementation.
6351 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6352 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6353 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6354 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6355 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6356 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6357 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6358 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6359 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6360 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6361 symbol for entry point to avoid cancellation.
6362
e700a908
UD
63632003-10-07 Jakub Jelinek <jakub@redhat.com>
6364
6365 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6366 changes.
6367 (SAVE_OLDTYPE_0): Fix a typo.
6368
c70a86b6
UD
63692003-10-03 Ulrich Drepper <drepper@redhat.com>
6370
6371 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6372 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
6373
134abcb5
UD
63742003-10-02 Ulrich Drepper <drepper@redhat.com>
6375
6376 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6377 correct offset.
6378
b77ca0e8
UD
63792003-10-02 Jakub Jelinek <jakub@redhat.com>
6380
6381 * Makefile (tests): Add tst-cancel19.
6382 * tst-cancel19.c: New test.
6383
4d961dc7
UD
63842003-10-02 Ulrich Drepper <drepper@redhat.com>
6385
6386 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6387 restoring of the old cancellation type.
6388
1d5b20ad 63892003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 6390
1d5b20ad
UD
6391 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6392
4106a403
RM
63932003-09-27 Wolfram Gloger <wg@malloc.de>
6394
4d961dc7 6395 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 6396
fca9d8e4
RM
63972003-09-24 Roland McGrath <roland@redhat.com>
6398
6399 * allocatestack.c (__make_stacks_executable): Don't ignore return
6400 value from _dl_make_stack_executable.
6401
c9c60884
UD
64022003-09-24 Ulrich Drepper <drepper@redhat.com>
6403
69c9fa04
UD
6404 * allocatestack.c (__make_stacks_executable): Also change
6405 permission of the currently unused stacks.
6406
279f1143
UD
6407 * allocatestack.c (change_stack_perm): Split out from
6408 __make_stacks_executable.
6409 (allocate_stack): If the required permission changed between the time
6410 we started preparing the stack and queueing it, change the permission.
6411 (__make_stacks_executable): Call change_stack_perm.
6412
c9c60884
UD
6413 * Makefile: Build tst-execstack-mod locally.
6414 * tst-execstack-mod.c: New file.
6415
54ee14b3
UD
64162003-09-23 Jakub Jelinek <jakub@redhat.com>
6417
6418 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6419
64202003-09-23 Roland McGrath <roland@redhat.com>
6421
6422 * tst-execstack.c: New file.
6423 * Makefile (tests): Add it.
6424 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6425 (LDFLAGS-tst-execstack): New variable.
6426
6427 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6428 whether to use PROT_EXEC for stack mmap.
6429 (__make_stacks_executable): New function.
6430 * pthreadP.h: Declare it.
6431 * init.c (__pthread_initialize_minimal_internal): Set
6432 GL(dl_make_stack_executable_hook) to that.
6433
365b1602
UD
64342003-09-22 Ulrich Drepper <drepper@redhat.com>
6435
6436 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6437 recommendation from AMD re avoidance of lock prefix.
6438
39358e8b
UD
64392003-09-22 Jakub Jelinek <jakub@redhat.com>
6440
6441 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6442 lll_futex_timed_wait instead of lll_futex_wait.
6443 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6444 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6445 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6446 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6447 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6448 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6449 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6450 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6451 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6452 Completely revamp the locking macros. No distinction between
6453 normal and mutex locking anymore.
6454 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6455 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6456 __lll_lock_timedwait): Fix prototypes.
6457 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6458 __lll_lock_timedwait): Likewise.
6459 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6460 macros, add __builtin_expect.
6461 (lll_mutex_timedlock): Likewise. Fix return value.
6462 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6463 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6464 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6465 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6466 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6467 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6468 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6469 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6470
9d08fbbb
UD
64712003-09-22 Ulrich Drepper <drepper@redhat.com>
6472
c0df57e1
UD
6473 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6474 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6475 operation if possible.
6476
9d08fbbb
UD
6477 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6478 like jumping over the lock prefix.
6479
71451de2
UD
64802003-09-21 Ulrich Drepper <drepper@redhat.com>
6481
6482 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6483 locking macros. No distinction between normal and mutex locking
6484 anymore.
3a226d33 6485 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
6486 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6487 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
6488 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6489 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 6490 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 6491 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 6492 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 6493 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
6494 * Makefile (routines): Remove libc-lowlevelmutex.
6495 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
6496 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6497 for new mutex implementation.
6498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6499 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6500 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6501 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6502 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6503 Likewise.
6504 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6505 Likewise.
6506 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6507 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6508 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6509 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6510 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6511 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6512 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6513 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6514 Likewise.
6515 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6516 Likewise.
6517 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6518 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6520 Don't use requeue.
6521 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 6522 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 6523
8f31c0ef
UD
65242003-09-20 Ulrich Drepper <drepper@redhat.com>
6525
56a4aa98
UD
6526 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6527 in parameters of asm with output parameters.
6528
8f31c0ef
UD
6529 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6530 type of DECR parameter to int.
6531 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6532
8b8074da
UD
65332003-09-18 Jakub Jelinek <jakub@redhat.com>
6534
6535 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6536 guardsize for each thread.
6537
65af7e61
UD
65382003-09-17 Jakub Jelinek <jakub@redhat.com>
6539
9ba96eda
UD
6540 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6541 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6542 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6543
06f6ca90
UD
6544 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6545 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6546 NULL.
6547 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6548 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6549 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6550 (pthread_getaffinity_np): Add hidden_def.
6551
6552 * Makefile (tests): Add tst-attr3.
6553 * tst-attr3.c: New test.
6554
65af7e61
UD
6555 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6556
3402852c
UD
65572003-09-15 Jakub Jelinek <jakub@redhat.com>
6558
6559 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6560 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6561
a4db3439
UD
65622003-09-17 Jakub Jelinek <jakub@redhat.com>
6563
6564 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6565 * tst-align.c: Include tst-stack-align.h.
6566 (tf, do_test): Use TEST_STACK_ALIGN macro.
6567
65682003-09-17 Ulrich Drepper <drepper@redhat.com>
6569
6570 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6571 variable.
6572
92ce4676
UD
65732003-09-16 Ulrich Drepper <drepper@redhat.com>
6574
6575 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6576 stack-related values for the initial thread.
6577
e07bb02a
UD
65782003-09-15 Jakub Jelinek <jakub@redhat.com>
6579
6580 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6581
d087b5dc
UD
65822003-09-11 Ulrich Drepper <drepper@redhat.com>
6583
6584 * pthread_mutex_lock.c: Minor code rearrangements.
6585
7f08f55a
RM
65862003-09-05 Roland McGrath <roland@redhat.com>
6587
6588 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6589 Instead, include ../nptl_db/db_info.c to do its magic.
6590 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6591 (__pthread_pthread_key_2ndlevel_size): Likewise.
6592 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6593 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6594 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6595 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6596 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6597 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6598 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6599 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6600 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6601 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6602 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6603 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6604 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6605 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6606 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6607 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6608 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6609
806e4a4a
UD
66102003-09-08 Ulrich Drepper <drepper@redhat.com>
6611
6612 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6613 of pthread_t to be compatible with LT.
6614 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6615 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6616 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6617 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6618 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6619 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6620 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6621
17f83e56
UD
66222003-09-04 Ulrich Drepper <drepper@redhat.com>
6623
6624 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6625
58e8ec84
UD
66262003-09-04 Jakub Jelinek <jakub@redhat.com>
6627
6628 * unwind-forcedunwind.c: Move to...
6629 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6630 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6631 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6632 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6633 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6634 * unwind.c: Include jmpbuf-unwind.h.
6635 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6636
abf1cf21
JJ
66372003-09-02 Jakub Jelinek <jakub@redhat.com>
6638
4a244f0d
UD
6639 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6640 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6641 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6642 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6643 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6644 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6645 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6646 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6647 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6648 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6649 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6650 function.
6651 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6652 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6653 * Makefile (tests): Add tst-stack2.
6654 * tst-stack2.c: New test.
6655 * tst-stack1.c: Include limits.h and sys/param.h.
6656 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6657
e29ef647
UD
6658 * pthread_condattr_setpshared.c: Include errno.h.
6659 (pthread_condattr_setpshared): Return EINVAL if pshared
6660 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6661
5777d565
UD
6662 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6663 defined symbol for entry point to avoid cancellation.
6664 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6665 Likewise.
6666 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6667 Likewise.
6668 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6669 Likewise.
6670 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6671 Likewise.
6672 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6673 Likewise.
6674 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6675 __close_nocancel, __read_nocancel, __write_nocancel,
6676 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6677 libpthread.so or librt.so, define to corresponding function
6678 without _nocancel suffix.
6679 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6680 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6681 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6682
abf1cf21
JJ
6683 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6684
8348dcc8
UD
66852003-09-02 Ulrich Drepper <drepper@redhat.com>
6686
6687 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 6688 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
6689
6690 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6691 in subsections has a symbol associated with it.
6692
6693 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6694 defined symbol for entry point to avoid cancellation.
6695 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6696
c874a32e
UD
66972003-09-01 Jakub Jelinek <jakub@redhat.com>
6698
6699 * Makefile (tests): Add tst-tls5.
6700 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6701 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6702 ($(objpfx)tst-tls5): New.
6703 ($(objpfx)tst-tls6.out): Likewise.
6704 (tests): Depend on $(objpfx)tst-tls6.out.
6705 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6706 (do_test): Check pthread_self () return value alignment.
6707 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6708 (tf): Check pthread_self () return value alignment.
6709 * tst-tls5.c: New test.
6710 * tst-tls5.h: New.
6711 * tst-tls5mod.c: New.
6712 * tst-tls5moda.c: New.
6713 * tst-tls5modb.c: New.
6714 * tst-tls5modc.c: New.
6715 * tst-tls5modd.c: New.
6716 * tst-tls5mode.c: New.
6717 * tst-tls5modf.c: New.
6718 * tst-tls6.sh: New test.
6719
c503d3dc
UD
6720 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6721 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6722 * init.c (pthread_functions): Initialize them.
6723 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6724 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6725 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6726 pthread_cond_timedwait@@GLIBC_2.3.2.
6727
48614753
JJ
67282003-09-01 Jakub Jelinek <jakub@redhat.com>
6729
56a1b877
JJ
6730 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6731 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6732 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6733 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6734 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6735 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6736
6737 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6738
48614753
JJ
6739 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6740 _POSIX_THREAD_PRIORITY_SCHEDULING.
6741 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6742
28c97261
UD
67432003-08-31 Ulrich Drepper <drepper@redhat.com>
6744
eef80cf8
UD
6745 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6746 nested function, use static inline function from libio.h.
6747 Code by Richard Henderson.
6748
28c97261
UD
6749 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6750 weak.
6751
cd2fbe58
UD
67522003-08-30 Jakub Jelinek <jakub@redhat.com>
6753
6754 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6755 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6756 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6757 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6758 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6759 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6760 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6761 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6762 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6763 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6764 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6765 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6766 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6767 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6768 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6769 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6770 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6771 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6772 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6773 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6774 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6775 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6776 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6777 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6778 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6779 * sysdeps/sparc/tls.h: New file.
6780 * sysdeps/sparc/tcb-offsets.sym: New file.
6781 * sysdeps/sparc/Makefile: New file.
6782 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6783 * init.c [__sparc__] (__NR_set_tid_address): Define.
6784
feda52c0
UD
67852003-08-29 Jakub Jelinek <jakub@redhat.com>
6786
6787 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6788 _IO_release_lock): Define.
6789
7c868816
JJ
67902003-08-29 Jakub Jelinek <jakuB@redhat.com>
6791
0261d33f 6792 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
6793 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6794
68b9e1ae
UD
67952003-08-27 Ulrich Drepper <drepper@redhat.com>
6796
6797 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6798 (__pthread_cleanup_class): Add missing return types of member
6799 functions.
6800
13b3edfc
UD
68012003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6802
6803 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6804 (lll_mutex_unlock_force): Add memory barrier between store and futex
6805 syscall.
6806
bb606fbe
UD
68072003-08-25 Ulrich Drepper <drepper@redhat.com>
6808
6809 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6810 tempmsg in first loop.
6811
ee4e5a3d
UD
68122003-08-18 Ulrich Drepper <drepper@redhat.com>
6813
6814 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6815 _POSIX_THREAD_PRIORITY_SCHEDULING.
6816 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6817
334fcf2a
UD
68182003-08-07 Jakub Jelinek <jakub@redhat.com>
6819
6820 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6821 (__rtld_lock_default_lock_recursive,
6822 __rtld_lock_default_unlock_recursive): Define.
6823 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6824 __rtld_lock_unlock_recursive): Define using
6825 GL(_dl_rtld_*lock_recursive).
6826 * init.c (__pthread_initialize_minimal_internal): Initialize
6827 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6828 Lock GL(_dl_load_lock) the same number of times as
6829 GL(_dl_load_lock) using non-mt implementation was nested.
6830
6831 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6832 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6833
a30fb2df
UD
68342003-08-06 Jakub Jelinek <jakub@redhat.com>
6835
6836 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6837 PIPE_BUF.
6838
ce0d30a0
JJ
68392003-08-07 Jakub Jelinek <jakub@redhat.com>
6840
6841 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6842
9c988b83
UD
68432003-08-03 Jakub Jelinek <jakub@redhat.com>
6844
6845 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6846 to first syscall error check. Move syscall error check for tkill
6847 into __ASSUME_CLONE_STOPPED #ifdef.
6848
5c5252bd
UD
68492003-08-02 Ulrich Drepper <drepper@redhat.com>
6850
f1205aa7
UD
6851 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6852 is not defined, do explicit synchronization.
6853 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6854 is not defined also unlock pd->lock for non-debugging case in case
6855 it is necessary.
6856 * pthread_create.c (start_thread): Always get and release pd->lock
6857 if __ASSUME_CLONE_STOPPED is not defined.
6858 (start_thread_debug): Removed. Adjust users.
6859 * allocatestack.c (allocate_stack): Always initialize lock if
6860 __ASSUME_CLONE_STOPPED is not defined.
6861 * Makefile (tests): Add tst-sched1.
6862 * tst-sched1.c: New file.
6863
5c5252bd
UD
6864 * sysdeps/pthread/createthread.c (do_clone): Only use
6865 sched_setschduler and pass correct parameters.
6866
973d66e4
UD
68672003-07-31 Jakub Jelinek <jakub@redhat.com>
6868
6869 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6870 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6871 PTHREAD_STACK_MIN in comments.
6872
d347a4ab
UD
68732003-07-31 Jakub Jelinek <jakub@redhat.com>
6874
6875 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6876 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6877 argument.
6878 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6879 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6880 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6881 (__pthread_cleanup_upto): Fix prototype.
6882 (_longjmp_unwind): Adjust caller.
6883 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6884 Change second argument to const struct pointer.
6885 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6886 * tst-sem9.c (main): Likewise.
6887 * unwind.c: Include string.h for strlen prototype.
6888
1b26e9a5
UD
68892003-07-31 Ulrich Drepper <drepper@redhat.com>
6890
6891 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6892 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6893 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6894 Define HAVE_CMOV.
6895 Patch by Nicholas Miell <nmiell@attbi.com>.
6896
adc12574
UD
68972003-07-30 Jakub Jelinek <jakub@redhat.com>
6898
6899 * init.c (__pthread_initialize_minimal_internal): Initialize
6900 GL(dl_init_static_tls).
6901 * pthreadP.h (__pthread_init_static_tls): New prototype.
6902 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6903 New functions.
6904 * Makefile (tests): Add tst-tls4.
6905 (modules-names): Add tst-tls4moda and tst-tls4modb.
6906 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6907 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6908 tst-tls4modb.so.
6909 * tst-tls4.c: New file.
6910 * tst-tls4moda.c: New file.
6911 * tst-tls4modb.c: New file.
6912
a7f6c66e
RM
69132003-06-19 Daniel Jacobowitz <drow@mvista.com>
6914
6915 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6916 before __timer_dealloc.
6917 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6918 Don't call list_unlink.
6919
172ce013
RM
69202003-07-29 Roland McGrath <roland@redhat.com>
6921
6922 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6923
7b787f85
UD
69242003-07-25 Jakub Jelinek <jakub@redhat.com>
6925
6926 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6927 Don't reuse struct aiocb A if it failed.
6928 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6929 not just one byte, as that does not block.
6930
0e9d6240
UD
69312003-07-22 Jakub Jelinek <jakub@redhat.com>
6932
9d79e037
UD
6933 * sysdeps/pthread/unwind-resume.c: New file.
6934 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6935 unwind-resume in csu subdir.
6936 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6937 exceptions.
6938 (librt-sysdep_routines, librt-shared-only-routines): Add
6939 rt-unwind-resume.
6940 * sysdeps/pthread/rt-unwind-resume.c: New file.
6941 * unwind-forcedunwind.c: New file.
6942 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6943 (libpthread-shared-only-routines): Likewise.
6944 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6945 * pthreadP.h (pthread_cancel_init): New prototype.
6946 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6947
6948 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6949 attr argument const struct pthread_attr *.
6950
0e9d6240
UD
6951 * res.c (__res_state): Return __resp.
6952 * descr.h: Include resolv.h.
6953 (struct pthread): Add res field.
6954 * pthread_create.c: Include resolv.h.
6955 (start_thread): Initialize __resp.
6956 * Makefile (tests): Add tst-_res1.
6957 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6958 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6959 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6960 libpthread.
6961 * tst-_res1.c: New file.
6962 * tst-_res1mod1.c: New file.
6963 * tst-_res1mod2.c: New file.
6964
1a379ea0
UD
69652003-07-21 Ulrich Drepper <drepper@redhat.com>
6966
7e939b21
UD
6967 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6968
1a379ea0
UD
6969 * Makefile: Define various *-no-z-defs variables for test DSOs
6970 which has undefined symbols.
6971
ca86a763
UD
69722003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6973
6974 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6975 Retry if the stwcx fails to store once_control.
6976
80f536db
UD
69772003-07-20 Ulrich Drepper <drepper@redhat.com>
6978
6979 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6980 pthread_attr_setaffinity.
6981 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6982 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6983 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6984 * pthread_attr_destroy.c: Free cpuset element if allocated.
6985 * pthread_create.c: Pass iattr as additional parameter to
6986 create_thread.
6987 * sysdeps/pthread/createthread.c: If attribute is provided and
6988 a new thread is created with affinity set or scheduling parameters,
6989 start thread with CLONE_STOPPED.
6990 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6991 pthread_attr_setaffinity.
6992 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6993 cpuset element.
6994
73299943
UD
69952003-07-15 Ulrich Drepper <drepper@redhat.com>
6996
6997 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6998
da35d15e
UD
69992003-07-14 Ulrich Drepper <drepper@redhat.com>
7000
7001 * sysdeps/pthread/configure.in: Require CFI directives also for
7002 ppc and s390.
7003
75540d8a
UD
70042003-07-15 Jakub Jelinek <jakub@redhat.com>
7005
7006 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7007 Add cfi directives.
7008
4a17085f
UD
70092003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7010
7011 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7012 CLEANUP_JMP_BUF.
7013 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7014 registers as variables. Call __pthread_mutex_unlock_usercnt.
7015 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7016 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7017 not self pointer in __writer. Compare with TID to determine
7018 deadlocks.
7019 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7020 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7021 Likewise.
7022 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7023 Likewise.
7024 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7025 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7026 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7027 macros also when compiling librt.
7028
6080ecdf
UD
70292003-07-11 Jakub Jelinek <jakub@redhat.com>
7030
7031 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7032 -fasynchronous-unwind-tables.
7033 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7034 (PSEUDO): Add cfi directives.
7035 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7036 Likewise.
7037 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7038 Likewise.
7039
da0c02ee
UD
70402003-07-08 Jakub Jelinek <jakub@redhat.com>
7041
7042 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7043 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7044 * unwind.c (__pthread_unwind_next): Add hidden_def.
7045 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7046 Likewise.
7047 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7048 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7049 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7050 Likewise.
7051 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7052 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7053 Likewise.
7054 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7055 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7056 __pthread_unregister_cancel and __pthread_unwind_next.
7057
57a5ea02
UD
70582003-07-04 Jakub Jelinek <jakub@redhat.com>
7059
7060 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7061 different symbol for the cancellation syscall wrapper and
7062 non-cancellation syscall wrapper.
7063 (PSEUDO_END): Define.
7064
d810b358
UD
70652003-07-05 Richard Henderson <rth@redhat.com>
7066
7067 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7068 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
7069 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7070 return actual return value from the syscall, not 0.
d810b358 7071
db54f488
UD
70722003-07-07 Ulrich Drepper <drepper@redhat.com>
7073
7074 * descr.h (struct pthread): Add pid field.
7075 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7076 (__reclaim_stacks): Likewise.
7077 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7078 also check for PID of the signal source.
7079 (__pthread_initialize_minimal_internal): Also initialize pid field
7080 of initial thread's descriptor.
7081 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7082 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7083 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7084 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7085 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7086
5e497a41
UD
70872003-07-05 Ulrich Drepper <drepper@redhat.com>
7088
7089 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7090 Fix use of parameter.
7091 (__libc_cleanup_pop): Likewise.
7092
86a0c4fa
UD
70932003-07-04 Ulrich Drepper <drepper@redhat.com>
7094
7095 * init.c (sigcancel_handler): Change parameters to match handler
7096 for SA_SIGACTION. Check signal number and code to recognize
7097 invalid invocations.
7098
bdbecaa3
RM
70992003-07-03 Roland McGrath <roland@redhat.com>
7100
7101 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7102 Apply sizeof (struct pthread) bias to r13 value.
7103
56421b23
UD
71042003-07-03 Ulrich Drepper <drepper@redhat.com>
7105
fbd90f6c
UD
7106 * sysdeps/pthread/configure.in: Require CFI directives.
7107
56421b23
UD
7108 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7109 definition.
7110 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7111 libpthread compilation.
7112 * unwind.c (__pthread_unwind): Add hidden_def.
7113 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7114
ca2b4cd7
UD
71152003-07-01 Ulrich Drepper <drepper@redhat.com>
7116
7117 * libc-cancellation.c (__libc_cleanup_routine): Define.
7118 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7119 (__pthread_cleanup_pop): Define.
7120
f036e569
UD
71212003-07-01 Richard Henderson <rth@redhat.com>
7122
7123 * sysdeps/alpha/elf/pt-initfini.c: New file.
7124 * sysdeps/alpha/pthread_spin_lock.S: New file.
7125 * sysdeps/alpha/pthread_spin_trylock.S: New file.
7126 * sysdeps/alpha/pthreaddef.h: New file.
7127 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7128 * sysdeps/alpha/tls.h: New file.
7129 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7130 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7131 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7132 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7133 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7134 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7135 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7136 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7137 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7138 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7139
3b985826
UD
71402003-07-01 Ulrich Drepper <drepper@redhat.com>
7141
7142 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7143 cleanup support and unwind info.
7144
3a4d1e1e
UD
71452003-06-30 Ulrich Drepper <drepper@redhat.com>
7146
7147 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7148 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
7149 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7150 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
7151 * tst-once3.c: Add cleanup handler and check it is called.
7152 * tst-once4.c: Likewise.
7153 * tst-oncex3.c: New file.
7154 * tst-oncex4.c: New file.
7155 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7156
e479cc8e
UD
71572003-06-29 Ulrich Drepper <drepper@redhat.com>
7158
7159 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7160
7d7ff54c
UD
71612003-06-27 Ulrich Drepper <drepper@redhat.com>
7162
483e95d0
UD
7163 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7164 (tf_msgsnd): Likewise.
7165
7d7ff54c
UD
7166 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7167 premature returns a bit more.
7168
7539c7ec
UD
71692003-06-26 Ulrich Drepper <drepper@redhat.com>
7170
7171 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7172 definition to the front.
7173
7174 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7175 the cleanup functions to make the names unique. Fix dwarf opcode
7176 un unwind table.
7177 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7178 functions to make the names unique. Fix CFA offset for two blocks.
7179
0af6a1d9
UD
71802003-06-25 Ulrich Drepper <drepper@redhat.com>
7181
7182 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7183 missing closing braces.
7184 Patch by Christophe Saout <christophe@saout.de>.
7185
eef4a9f3
RM
71862003-06-24 Roland McGrath <roland@redhat.com>
7187
7188 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7189
4165d44d
UD
71902003-06-24 Ulrich Drepper <drepper@redhat.com>
7191
7f8f7b9d
UD
7192 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7193 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7194
4165d44d
UD
7195 * pthreadP.h: Declare __find_thread_by_id.
7196 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7197 * pthread_clock_gettime.c: Allow using other thread's clock.
7198 * pthread_clock_settime.c: Likewise.
7199 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7200 * Makefile: Add rules to build and run tst-clock2.
7201 * tst-clock2.c: New file.
7202
67b78ef9
UD
72032003-06-23 Ulrich Drepper <drepper@redhat.com>
7204
7205 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7206 to use exception-based cleanup handler.
7207 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7208
7209 * tst-cond8.c (ch): Announce that we are done.
7210
7211 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7212
7213 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7214 Also test aio_suspend with timeout value.
7215
61623643
UD
72162003-06-22 Ulrich Drepper <drepper@redhat.com>
7217
3a4f2043
UD
7218 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7219 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7220 attribute_hidden.
7221
61623643
UD
7222 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7223 (__pthread_mutex_lock_internal): Likewise.
7224 (__pthread_mutex_unlock_internal): Likewise.
7225 (__pthread_mutex_unlock_usercnt): Declare.
7226 * pthread_mutex_destroy.c: Always fail if used in any way.
7227 * pthread_mutex_init.c: Update comment.
7228 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7229 * pthread_mutex_timedlock.c: Adjust __nusers.
7230 * pthread_mutex_trylock.c: Adjust __nusers.
7231 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7232 and public interfaces are wrapper with pass additional parameter.
7233 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7234 parameter zero.
7235 * tst-mutex8.c: New file.
7236 * Makefile (tests): Add tst-mutex8.
7237 * sysdeps/pthread/pthread_cond_timedwait.c: Call
7238 __pthread_mutex_unlock_usercnt.
7239 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7240 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7241 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7242 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7243 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7244 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7245 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7246 Add __nusers.
7247 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7248 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7249 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7250 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7251 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7252
7253 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7254 * pthread_mutex_timedlock.c: Likewise.
7255 * pthread_mutex_trylock.c: Adjust __nusers.
7256 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7257 * tst-mutex9.c: New file.
7258 * Makefile (tests): Add tst-mutex9.
7259 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7260 * sysdeps/ia64/tls.h: Likewise.
7261 * sysdeps/powerpc/tls.h: Likewise.
7262 * sysdeps/s390/tls.h: Likewise.
7263 * sysdeps/sh/tls.h: Likewise.
7264 * sysdeps/x86_64/tls.h: Likewise.
7265 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7266 Change type of __owner.
7267 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7268 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7269 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7270 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7271 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7272
9bdabb94
UD
72732003-06-19 Jakub Jelinek <jakub@redhat.com>
7274
7275 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7276 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7277
7278 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7279 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
7280 instead of nr to lll_futex_wake. Only set errno and return -1
7281 if err < 0.
7282
7283 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7284 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7285 return actual return value from the syscall, not 0.
7286
f6c93bd9
UD
72872003-06-18 Ulrich Drepper <drepper@redhat.com>
7288
ca343e73
UD
7289 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7290 find a random value.
7291 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7292 errno==EIDRM.
7293
50441a98
UD
7294 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7295 compat_timer_settime.
7296 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7297 compat_timer_gettime.
7298 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 7299 compat_timer_getoverrun.
50441a98
UD
7300 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7301 compat_timer_delete.
7302
f6c93bd9
UD
7303 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7304 error-checking mutex detect busy mutexes.
7305
047aec8f
UD
73062003-06-17 Ulrich Drepper <drepper@redhat.com>
7307
1d53508d
UD
7308 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7309 Add ax to clobber list.
7310 (lll_mutex_cond_lock): Likewise.
7311 (lll_mutex_unlock): Likewise.
7312 (lll_lock): Likewise.
7313 (lll_unlock): Likewise.
7314
f23b30e2
UD
7315 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7316 * tst-cancel18.c: New file.
7317 * tst-cancelx18.c: New file.
7318
7319 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7320 and tcdrain.
7321
7322 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7323 * tst-cancel17.c: New file.
7324 * tst-cancelx17.c: New file.
7325
7326 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7327 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7328 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7329
047aec8f
UD
7330 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7331
bbde8527
UD
73322003-06-16 Jakub Jelinek <jakub@redhat.com>
7333
7334 * sysdeps/pthread/createthread.c (create_thread): Set
7335 header.multiple_threads unconditionally.
7336 * allocatestack.c (allocate_stack): Likewise.
7337 * descr.h (struct pthread): Add header.multiple_threads
7338 unconditionally.
7339 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7340 Define for librt. #error if neither libpthread, libc nor librt.
7341 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7342 Likewise.
7343 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7344 CDISABLE): Likewise.
7345 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7346 CDISABLE): Likewise.
7347 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7348 CDISABLE): Likewise.
7349 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7350 CDISABLE): Likewise. Access header.multiple_threads outside of
7351 libc and libpthread.
7352 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7353 Likewise.
7354 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7355 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7356
26676450
UD
73572003-06-17 Ulrich Drepper <drepper@redhat.com>
7358
7359 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7360 Also test early cancellation before the thread reaches the cancellation
7361 point.
7362
7363 * Makefile: Compile forward.c with exceptions.
7364
7365 * sysdeps/unix/sysv/linux/sleep.c: New file.
7366
301a6724
UD
73672003-06-16 Ulrich Drepper <drepper@redhat.com>
7368
0e0deb03
UD
7369 * Makefile: Add CFLAGS definition to compile function wrappers
7370 duplicated from libc with exceptions.
7371 * tst-cancel4.c: Also check cancellation handlers.
7372
301a6724
UD
7373 * Makefile: Add rules to build and run tst-cancel16 and
7374 tst-cancelx16. Add missing CFLAGS definitions.
7375 * tst-cancel16.c: New file.
7376 * tst-cancelx16.c: New file.
7377
7a114794
UD
73782003-06-15 Ulrich Drepper <drepper@redhat.com>
7379
452aea84
UD
7380 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7381 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7382 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7383 (DL_SYSINFO_IMPLEMENTATION): Likewise.
7384
7a114794
UD
7385 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7386 (LIBC_CANCEL_RESET): Likewise.
7387 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7388 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7389 librt-cancellation.
7390 (CFLAGS-libcrt-cancellation.c): Define.
7391 * sysdeps/pthread/librt-cancellation.c: New file.
7392 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7393 macros also when compiling librt.
7394 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7395 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7396 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7397 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7398 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7399 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7400 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7401
7402 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7403 compat_timer_create.
7404
8ba1d429
UD
74052003-06-14 Ulrich Drepper <drepper@redhat.com>
7406
cc8fb6f3
UD
7407 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7408
8ba1d429
UD
7409 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7410 __register_atfork.
7411 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7412 Add libc_hidden_def.
7413
d4f100e2
RM
74142003-06-13 Roland McGrath <roland@redhat.com>
7415
7416 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7417 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7418
dd9423a6
UD
74192003-06-11 Ulrich Drepper <drepper@redhat.com>
7420
7421 * allocatestack.c (queue_stack): Always inline.
7422 * ptreadhP.h (__do_cancel): Likewise.
7423
ed24330d
JJ
74242003-06-10 Jakub Jelinek <jakub@redhat.com>
7425
7426 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7427 a typo.
7428
06120d79
UD
74292003-06-10 Ulrich Drepper <drepper@redhat.com>
7430
7431 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7432 (__pthread_cond_signal): Remove incorrect second addition for
7433 cond_lock!=0.
7434
b1720346
UD
74352003-06-09 Ulrich Drepper <drepper@redhat.com>
7436
5b318f85
UD
7437 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7438 (__pthread_cond_signal): Use correct futex pointer in
7439 __lll_mutex_lock_wait call.
7440
b1720346
UD
7441 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7442 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7443
3e36c37d
UD
74442003-06-08 Ulrich Drepper <drepper@redhat.com>
7445
ecf7955d
UD
7446 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7447 cancelable.
ed24330d 7448 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
7449 Likewise.
7450
3e36c37d
UD
7451 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7452 hand-written CFI generation code. Since ENTRY/END also initiated
7453 CFI frames this caused two CFI sets to be generated.
7454
7726edc2
UD
74552003-06-07 Ulrich Drepper <drepper@redhat.com>
7456
7457 * cleanup_routine.c: New file.
7458 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7459 * sysdeps/pthread/pthread.h: Add support for fully exception-based
7460 cleanup handling.
7461 * Makefile (libpthread-routines): Add cleanup_routine.
7462 Add more CFLAGS variables to compile with exceptions. Add comments
7463 why which file needs unwind tables.
7464 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7465 tests.
7466 * tst-cancelx1.c: New file.
7467 * tst-cancelx2.c: New file.
7468 * tst-cancelx3.c: New file.
7469 * tst-cancelx4.c: New file.
7470 * tst-cancelx5.c: New file.
7471 * tst-cancelx6.c: New file.
7472 * tst-cancelx7.c: New file.
7473 * tst-cancelx8.c: New file.
7474 * tst-cancelx9.c: New file.
7475 * tst-cancelx10.c: New file.
7476 * tst-cancelx11.c: New file.
7477 * tst-cancelx12.c: New file.
7478 * tst-cancelx13.c: New file.
7479 * tst-cancelx14.c: New file.
7480 * tst-cancelx15.c: New file.
7481 * tst-cleanupx0.c: New file.
7482 * tst-cleanupx0.expect: New file.
7483 * tst-cleanupx1.c: New file.
7484 * tst-cleanupx2.c: New file.
7485 * tst-cleanupx3.c: New file.
7486
7487 * tst-cleanup0.c: Make standard compliant.
7488 * tst-cleanup1.c: Likewise.
7489
7490 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7491 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7492 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7493 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7494 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7495 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7496 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7497 CLEANUP_JMP_BUF.
7498 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7499 * tst-cancel12.c: New file.
7500 * tst-cancel13.c: New file.
7501 * tst-cancel14.c: New file.
7502 * tst-cancel15.c: New file.
7503 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7504 and tst-cancel15.
7505
7506 * tst-cancel1.c: Add some comments.
7507
7508 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7509 timeout correctly.
7510
7a8a8e21
UD
75112003-06-06 Ulrich Drepper <drepper@redhat.com>
7512
7513 * Makefile (CFLAGS-pthread_cancel.c): Define.
7514
4ad0bbf4
UD
75152003-06-05 Ulrich Drepper <drepper@redhat.com>
7516
7517 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7518 Change type of __writer element to int.
7519 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7520 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7521 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7522 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7523 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7524 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7525 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7526 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7527 Compare with TID to determine deadlocks.
7528 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7529 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7530 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7531 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7532 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7533 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7534 Likewise.
7535 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7536 Likewise.
7537 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7538 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7539 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7540 Likewise.
7541 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7542 Likewise.
7543 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7544 * Makefile (tests): Add tst-rwlock12.
7545 * tst-rwlock12.c: New file.
7546
332faa96
JJ
75472003-06-05 Jakub Jelinek <jakub@redhat.com>
7548
7549 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7550 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7551 Remove bogus hidden_proto.
7552 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7553 Likewise.
7554 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7555 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7556 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7557 ___lll_mutex_timedlock): Likewise.
7558
29d9e2fd
UD
75592003-06-04 Ulrich Drepper <drepper@redhat.com>
7560
7561 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7562 (__pthread_cond_signal): Add some code to eventually handle
7563 cond_lock!=0.
7564
6f1acb30
UD
75652003-06-01 Ulrich Drepper <drepper@redhat.com>
7566
7567 * Makefile (tests): Add tst-exec4.
7568 (tst-exec4-ARGS): Define.
7569 * tst-exec4.c: New file.
7570
49b65043
UD
75712003-05-31 Ulrich Drepper <drepper@redhat.com>
7572
31195be2
UD
7573 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7574 Also fail if tv_nsec < 0.
7575 (__lll_timedwait_tid): Likewise.
7576 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7577 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7578 Likewise.
7579 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7580 Likewise.
7581 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7582 Likewise.
7583 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7584 Likewise.
80b54217
UD
7585 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7586 Likewise.
7587 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7588 Likewise.
31195be2 7589
dcfc8224
UD
7590 * Makefile (tests): Add tst-sem8 and tst-sem9.
7591 * tst-sem8.c: New file.
7592 * tst-sem9.c: New file.
7593 * sem_open.c: Fix creation of in_use record if the file exists but
7594 no internal record.
7595
49b65043
UD
7596 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7597 definitions.
7598
7599 * sysdeps/pthread/timer_create.c (timer_create): In case
7600 evp==NULL, assign timer ID to sival_ptr.
7601
7602 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7603 struct pthread_unwind_buf *.
7604 (struct pthread): Likewise for cleanup_jmp_buf element.
7605
7606 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7607 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7608 * unwind.c (__pthread_unwind_next): Likewise.
7609
50794a45
UD
76102003-05-30 Ulrich Drepper <drepper@redhat.com>
7611
5d4f57bd
UD
7612 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7613 (lll_futex_timed_wait): Use int for futex value parameter.
7614 (lll_futex_wake): Likewise.
7615 (lll_futex_requeue): Likewise.
7616
7617 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7618 Replace one memory operation with one register operation.
7619
7620 * tst-join4.c (do_test): Fix error message.
7621
7ab7ea33
UD
7622 * tst-rwlock6.c (do_test): Use correct format specifier.
7623
7624 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7625 (__lll_mutex_lock_wait): Replace one memory operation with one
7626 register operation.
7627 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7628 (__lll_mutex_lock_wait): Likewise.
7629
50794a45
UD
7630 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7631 (__lll_mutex_cond_lock): Add one to value parameter of
7632 __lll_lock_wait to reflect reality in the futex syscall.
7633 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7634 (lll_mutex_cond_lock): Likewise.
7635
5a70784e
JJ
76362003-05-30 Jakub Jelinek <jakub@redhat.com>
7637
7638 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7639 New function.
7640 (lll_mutex_cond_lock): Define.
7641
e7c5ac68
UD
76422003-05-29 Ulrich Drepper <drepper@redhat.com>
7643
586d1748
UD
7644 * Makefile (tests): Add tst-signal6.
7645 * tst-signal6.c: New file.
7646
b8ba4a27
UD
7647 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7648 (__lll_mutex_unlock_force): New function
7649 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7650
65d46efe
UD
7651 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7652 (__lll_mutex_unlock_force): New function.
7653 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7654
7655 * tst-rwlock7.c (do_test): Use correct format specifier.
7656
e7c5ac68
UD
7657 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7658 Find break parameter in correct asm argument.
7659
284bdc42
UD
76602003-05-27 Jakub Jelinek <jakub@redhat.com>
7661
7662 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7663 Remove out4.
7664 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7665 error occured.
7666 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7667 Add __mutex.
7668 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7669 lll_futex_requeue, lll_mutex_unlock_force): Define.
7670
e7c5ac68
UD
76712003-05-30 Jakub Jelinek <jakub@redhat.com>
7672
7673 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7674 (pthread_cond_t): Add __mutex.
7675 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7676 lll_futex_requeue, lll_mutex_unlock_force): Define.
7677
ea2630c6
UD
76782003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7679
7680 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7681 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 7682 Add __mutex field.
ea2630c6
UD
7683 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7684 Define.
7685 (lll_futex_wait, lll_futex_wake): Define.
7686 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7687 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7688 FUTEX_REQUEUE instead of FUTEX_WAIT.
7689 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7690 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7691 mutex which was used in condvar structure. Call
7692 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7693 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7694
7695 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7696 include tcb-offsets.h. Read wakeup value in locked region.
7697 Use the value of gbr register as THREAD_ID.
7698 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7699 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7700 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7701
7702 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7703 macros.
7704
5a77f150
UD
77052003-05-28 Ulrich Drepper <drepper@redhat.com>
7706
7707 * sysdeps/pthread/pthread_cond_broadcast.c
7708 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7709
7661d9f7
UD
77102003-05-26 Ulrich Drepper <drepper@redhat.com>
7711
7712 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7713 typo in register name.
7714 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7715 correctly. Actually use requeue. Little optimization.
7716 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7717 mutex address early. Handle cancellation state as 32-bit value.
7718 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7719 Remove unnecessary label.
7720
69431c9a
UD
77212003-05-25 Ulrich Drepper <drepper@redhat.com>
7722
7723 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7724 instead of FUTEX_WAIT.
7725 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7726 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7727 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7728 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7729 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7730 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7731 used in condvar structure. Call __pthread_mutex_cond_lock instead
7732 of __pthread_mutex_lock_internal.
7733 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7734 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7735 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7736 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7737 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7738 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7739 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7740 Add pthread_mutex_cond_lock.
7741 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7742 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7743 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7744 lll_mutex_cond_lock.
7745 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7746 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 7747 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 7748 Add __mutex field.
248a3490 7749 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
7750 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7751
7752 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7753 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7754
7755 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7756 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7757 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7758 macro don't define aliases.
7759
7760 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7761 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7762 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7763 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7764 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7765 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7766 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7767 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7768 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7769
fddfebbd
UD
77702003-05-17 Ulrich Drepper <drepper@redhat.com>
7771
7772 * sem_open.c: Fix one endless loop. Implement correct semantics
7773 wrt opening the same semaphore more then once.
7774 * sem_close.c: Adjust for sem_open change.
7775 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7776 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7777 * Makefile (tests): Add tst-sem7.
7778 * tst-sem7.c: New file.
7779
1eefffb0
RM
77802003-05-16 Roland McGrath <roland@redhat.com>
7781
7782 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7783 uninitialized variable braino.
7784
6e66dc78
UD
77852003-05-16 Ulrich Drepper <drepper@redhat.com>
7786
23ae6451
UD
7787 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7788 test for syscall availability.
7789
7790 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7791 __no_posix_timers to -1 if the syscalls don't exist.
7792
7ac5b8e2
UD
7793 * pthread_join.c (pthread_join): Set tid field of the joined
7794 thread to -1. This isn't necessary but helps to recognize some
7795 error conditions with almost no cost.
7796
7797 * allocatestack.c (FREE_P): Also negative values indicate an
7798 unused stack.
7799
6e66dc78
UD
7800 * unwind.c: Include <unistd.h>.
7801
855dba3c
UD
78022003-05-14 Ulrich Drepper <drepper@redhat.com>
7803
7804 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7805
81f3ac4c
UD
78062003-05-14 Jakub Jelinek <jakub@redhat.com>
7807
7808 * Makefile (crti-objs, crtn-objs): New variables.
7809 (omit-deps, extra-objs): Add crtn.
7810 ($(objpfx)libpthread.so): Depend on both crti and crtn
7811 and links to them in multidir.
7812 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7813
7158eae4
UD
78142003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7815
7816 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7817 (lll_mutex_unlock): Use atomic_exchange_rel.
7818
edf205d5
UD
78192003-05-11 Ulrich Drepper <drepper@redhat.com>
7820
7821 * cond-perf.c (cons): Add missing locking around setting of alldone.
7822
a3f979a7
UD
78232003-05-10 Ulrich Drepper <drepper@redhat.com>
7824
7825 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7826 related macros.
7827 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7828
880867a4
UD
78292003-05-09 Ulrich Drepper <drepper@redhat.com>
7830
949ec764
UD
7831 * tst-sem6.c: New file.
7832 * Makefile (tests): Add tst-sem6.
7833
7834 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7835 Use atomic_exchange_rel instead of atomic_exchange.
7836 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7837 Likewise.
7838
7839 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7840 code for lll_futex_wait and lll_futex_wake in static apps. Use
7841 vsyscall is possible.
7842
7843 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7844 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7845 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7846 pthread_setaffinity_np.
7847 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7848 and pthread_setaffinity_np.
7849 * Makefile (libpthread-routines): Add pthread_getaffinity and
7850 pthread_setaffinity.
7851
880867a4
UD
7852 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7853 use it in case mmap to allocate the stack fails.
7854 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7855 ARCH_MAP_FLAGS here.
7856 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7857 ARCH_RETRY_MMAP.
7858
92d83c72
UD
78592003-05-08 Ulrich Drepper <drepper@redhat.com>
7860
7861 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7862 handler implementation. It is now lockless in fork().
7863 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7864 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7865 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7866 declare the __fork_*_lists.
7867 (struct fork_handler): Include pointers to all three functions.
7868 Add next, refcntr and need_signal elements.
7869 (__fork_handlers): New declaration.
7870 (__register_atfork_malloc): Remove declaration.
7871 (HAVE_register_atfork_malloc): Remove definition.
7872 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7873 __pthread_child_handler variable.
7874 (__libc_pthread_init): Use __register_atfork instead of explicitly
7875 adding to the list.
7876 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7877 and lll_futex_wake.
7878 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7879
7880 * unwind.c (unwind_cleanup): Print error message and then abort. This
7881 function must never be reached.
7882
7883 * cond-perf.c: New file.
7884
be4d8038
UD
78852003-05-05 Ulrich Drepper <drepper@redhat.com>
7886
7887 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7888
c6696b79
RM
78892003-05-04 Roland McGrath <roland@redhat.com>
7890
7891 * Makefile ($(objpfx)../libc.so): New target.
7892
7da168bf
UD
78932003-05-02 Ulrich Drepper <drepper@redhat.com>
7894
7895 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7896 (pthread_condattr_t): Size is only an int, don't use long for
7897 alignment.
7898 (pthread_mutexattr_t): Likewise.
7da168bf
UD
7899 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7900 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7901 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7902
9a7178d6
UD
79032003-05-01 Ulrich Drepper <drepper@redhat.com>
7904
7905 * sysdeps/i386/tls.h: Define THREAD_ID.
7906 * sysdeps/ia64/tls.h: Likewise.
7907 * sysdeps/powerpc/tls.h: Likewise.
7908 * sysdeps/s390/tls.h: Likewise.
7909 * sysdeps/sh/tls.h: Likewise.
7910 * sysdeps/x86_64/tls.h: Likewise.
7911 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7912 record ownership.
7913 * pthread_mutex_timedlock.c: Likewise.
7914 * pthread_mutex_trylock.c: Likewise.
7915 * pthread_mutex_unlock.c: Likewise.
7916 * pthread_rwlock_trywrlock.c: Likewise.
7917 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7918 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7919 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7920 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7921
7922 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7923 flag.
7924
a234e27d
UD
79252003-04-29 Jakub Jelinek <jakub@redhat.com>
7926
7927 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7928 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7929 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7930 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7931 Make __align long long instead of long.
7932 (pthread_rwlock_t): Formatting.
7933 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7934 (pthread_rwlock_t): Formatting.
7935 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7936 (pthread_cond_t): Make __align long long instead of long.
7937 (pthread_rwlock_t): Move __flags field to the same position as in
7938 linuxthreads.
7939
f025c136
UD
79402003-04-30 Ulrich Drepper <drepper@redhat.com>
7941
7942 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7943 * tst-rwlock7.c (do_test): Likewise.
7944
7531ab9e
RM
79452003-04-26 Roland McGrath <roland@redhat.com>
7946
7947 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7948
299601a1
UD
79492003-04-22 Jakub Jelinek <jakub@redhat.com>
7950
299601a1
UD
7951 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7952 sizeof (struct pthread).
7953 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 7954 1 struct pthread.
299601a1
UD
7955 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7956 to 0.
7957 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7958 struct pthread.
7959 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7960 to 32-bit bytes.
7961 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7962 tcbp.
7963 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7964 unneccessarily.
7965 (NO_TLS_OFFSET): Define.
299601a1
UD
7966 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7967 add TLS_TCB_SIZE unnecessarily.
299601a1 7968
950094f8
RM
79692003-04-22 Roland McGrath <roland@redhat.com>
7970
7971 * Makeconfig (shared-thread-library): Reverse link order to work
7972 around linker bug.
7973
dc2f6455
UD
79742003-04-22 Ulrich Drepper <drepper@redhat.com>
7975
7976 * semaphore.h: Fix typo in comment.
7977
e7608d77
UD
79782003-04-21 Ulrich Drepper <drepper@redhat.com>
7979
6a87ee19
UD
7980 * sysdeps/pthread/sigfillset.c: New file.
7981
e7608d77
UD
7982 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7983 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7984 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7985 * sysdeps/pthread/sigaction.c: Likewise.
7986 * sysdeps/pthread/sigprocmask.c: New file.
7987 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7988 __SIGRTMIN+1.
7989 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7990 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7991 in this case.
7992
0b3df49e
UD
79932003-04-19 Ulrich Drepper <drepper@redhat.com>
7994
58a7a325
UD
7995 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7996 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7997
0b3df49e
UD
7998 * sysdeps/unix/sysv/linux/unregister-atfork.c
7999 (__unregister_atfork): Don't free memory not allocated dynamically.
8000
8001 * semaphore.h: Remove __THROW marker from cancellation points.
8002 * nptl/sysdeps/pthread/pthread.h: Likewise.
8003
7d74651e
UD
80042003-04-18 Ulrich Drepper <drepper@redhat.com>
8005
76a67697
UD
8006 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8007 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
8008 __THROW.
8009
dd9d6538
JJ
80102003-04-16 Jakub Jelinek <jakub@redhat.com>
8011
8012 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8013
4ab6f47c
RM
80142003-04-15 Roland McGrath <roland@redhat.com>
8015
8016 * forward.c (__pthread_unwind): Tweak to avoid warning.
8017
162434a6
UD
80182003-04-15 Ulrich Drepper <drepper@redhat.com>
8019
8020 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8021
35909161
UD
80222003-04-14 Ulrich Drepper <drepper@redhat.com>
8023
18ddd3aa 8024 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
8025 overflow CFA advance instructions.
8026 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8027
18a8e730
UD
80282003-04-14 Jakub Jelinek <jakub@redhat.com>
8029
bd4f43b4
UD
8030 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8031 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8032 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8033 defined.
8034
18a8e730
UD
8035 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8036 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8037 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8038 DW_CFA_advance_loc for .Laddl-.Lsubl.
8039
08c765fa
UD
80402003-04-13 Ulrich Drepper <drepper@redhat.com>
8041
18a8e730
UD
8042 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8043 position-independent unwind data for static libraries.
8044 Add missing unwind info. Add comments.
8045
ad2be852
UD
8046 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8047 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8048 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
8049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8050
177d1ad3
UD
80512003-04-12 Ulrich Drepper <drepper@redhat.com>
8052
08c765fa
UD
8053 * Makefile: Make sure all cancellation points are compiled with
8054 exception and asynchronous unwind tables.
8055
177d1ad3
UD
8056 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8057 which mishandles loading of global object addresses in PIC.
8058 (THREAD_SETMEM_NC): Likewise.
8059
09d65ff3
UD
80602003-04-11 Ulrich Drepper <drepper@redhat.com>
8061
8062 * pthread.h: Define new data structure for cleanup buffer. Declare
8063 new cleanup handler interfaces.
8064 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8065 (struct pthread): Add cleanup_jmp_buf pointer. Define
8066 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8067 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8068 it. Declare old cleanup handler installation functions.
8069 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8070 handling.
8071 * cleanup_defer.c: Likewise.
8072 * cleanup_compat.c: New file. Old cleanup code.
8073 * cleanup_def_compat.c: New file. Old cleanup code.
8074 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8075 if own thread descriptor.
8076 * unwind.c: New file.
8077 * forward.c: Add __pthread_unwind.
8078 * init.c (pthread_functions): Add __pthread_unwind.
8079 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8080 Add ptr___pthread_unwind.
8081 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8082 and unwind function.
8083 * Makefile (libpthread-routines): Add cleanup_compat,
8084 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8085 table generation if necessary.
8086 * version.c: Record whether unwind support is compiled in.
8087 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8088 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8089 handler interfaces.
8090 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8091 complication to generate unwind information for syscall wrappers.
68107ec0 8092 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
8093 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8094 __cleanup_fct_attribute.
8095
8096 * Makefile: Add rules to build and run tst-cleanup0.
8097 * tst-cleanup0.c: New file.
8098 * tst-cleanup0.expect: New file.
8099
8100 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8101 caller. Optimize to avoid often unecessary local variable.
8102
0dc44b51
RM
81032003-04-11 Roland McGrath <roland@redhat.com>
8104
8105 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8106 sets variable `multidir'; include that.
8107 (generated): Add it.
8108 ($(objpfx)$(multidir)/crti.o): New target.
8109 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8110
84a80719
UD
81112003-04-11 Ulrich Drepper <drepper@redhat.com>
8112
8113 * tst-attr2.c (do_test): Add cast to avoid warning.
8114 * tst-mutex4.c (do_test): Likewise.
8115
88ff4759
UD
81162003-04-10 Ulrich Drepper <drepper@redhat.com>
8117
8118 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8119 in child.
8120
b2041097
UD
81212003-04-09 Ulrich Drepper <drepper@redhat.com>
8122
8123 * Makefile (tests): Add tst-detach1.
8124 * tst-detach1.c: New file.
8125
f9657e88
UD
81262003-04-08 Ulrich Drepper <drepper@redhat.com>
8127
9afe4964
UD
8128 * sysdeps/pthread/pthread.h: Remove duplicate
8129 pthread_cleanup_{push,pop} definitions.
8130
f9657e88
UD
8131 * tst-barrier2.c: Eliminate warnings.
8132 * tst-cancel4.c: Likewise.
8133 * tst-cond4.c: Likewise.
8134 * tst-cond6.c: Likewise.
8135 * tst-detach1.c: Likewise.
8136 * tst-rwlock4.c: Likewise.
8137 * tst-rwlock6.c: Likewise.
8138 * tst-rwlock7.c: Likewise.
8139 * tst-sem3.c: Likewise.
8140 * tst-spin2.c: Likewise.
8141 * tst-umask1.c: Likewise.
8142
69b35e86
UD
81432003-04-07 Ulrich Drepper <drepper@redhat.com>
8144
8145 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8146
c70ad7d7
UD
81472003-04-06 Ulrich Drepper <drepper@redhat.com>
8148
8149 * descr.h (struct pthread): Move cancelhandling member to the front.
8150
54e0138f
UD
81512003-04-05 Ulrich Drepper <drepper@redhat.com>
8152
8153 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8154 malloc_parent, and malloc_child statically.
8155 (__register_atfork_malloc): New function.
8156 (free_mem): Don't free any of the malloc_* variables on the list.
8157 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8158 Define HAVE_register_atfork_malloc.
8159
b22d701b
UD
81602003-04-04 Ulrich Drepper <drepper@redhat.com>
8161
8162 * sysdeps/pthread/createthread.c (create_thread): Add some more
8163 comments explaining when to set multiple_threads and when not.
8164
8165 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8166 THREAD_ATOMIC_BIT_SET if not already defined.
8167 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8168 THREAD_ATOMIC_BIT_SET:
8169 * sysdeps/x86_64/tls.h: Likewise.
8170 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8171 THREAD_ATOMIC_CMPXCHG_VAL.
8172 (_pthread_cleanup_pop_restore): Likewise.
8173 * cancellation.c (__pthread_enable_asynccancel): Likewise.
8174 (__pthread_enable_asynccancel_2): Likewise.
8175 (__pthread_disable_asynccancel): Likewise.
8176 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8177 (__libc_disable_asynccancel): Likewise.
8178 * init.c (sigcancel_handler): Likewise.
8179 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8180 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8181
86246935
UD
81822003-04-03 Ulrich Drepper <drepper@redhat.com>
8183
8184 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8185 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8186 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8187 * Makefile (tests): Add tst-cancel11.
8188 * tst-cancel11.c: New file.
8189
6b4686a5
UD
81902003-04-01 Ulrich Drepper <drepper@redhat.com>
8191
8192 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8193 round, not the first. Use specific_used flag instead of local
8194 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
8195 (__free_tcb): Don't call deallocate_tsd here.
8196 (start_thread): Call deallocate_tsd here.
8197 * pthread_setspecific.c: Set specific_used flag really only when
8198 needed.
0d73a73b 8199 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 8200 * tst-tsd3.c: New file.
0d73a73b 8201 * tst-tsd4.c: New file.
6b4686a5 8202
42b2395d
UD
82032003-03-31 Ulrich Drepper <drepper@redhat.com>
8204
211d90c5
UD
8205 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8206 Use atomic_exchange_and_add instead of __lll_add.
8207 (__lll_mutex_timedlock): Likewise.
8208 Patch by Ian Wienand.
8209
82102003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8211
8212 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8213 (SINGLE_THREAD_P): Fix typo.
8214 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8215
82162003-03-31 Ulrich Drepper <drepper@redhat.com>
8217
8218 * Makefile (tests): Add tst-align.
8219 * tst-align.c: New file.
8220 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 8221
42b2395d
UD
8222 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8223 function correctly.
8224
211d90c5
UD
8225 * tst-tsd2.c: Add casts to avoid warnings.
8226
163b180f
UD
82272003-03-30 Ulrich Drepper <drepper@redhat.com>
8228
8229 * descr.h (struct pthread): Move most often used elements to the front.
8230
ea473bad
UD
82312003-03-29 Ulrich Drepper <drepper@redhat.com>
8232
8233 * Makefile (libpthread-routines): Add pthread_atfork.
8234 (libpthread-static-only-routines): Add pthread_atfork.
8235
dd731d53
UD
82362003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8237
8238 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8239 of TLS_DTV_AT_TP.
8240 (INSTALL_DTV): Add parens.
8241 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8242 Use passed descr instead of THREAD_SELF.
8243 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8244 (__lll_mutex_timedlock_wait): Correct expected value after
8245 spurious wakeup.
8246 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8247 Release lock before waking up the waiters.
8248 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8249 criteria. Reorderstruct passed to cleanup handler. Fix
8250 handling of cancellation and failung pthread_mutex_unlock call.
8251 Use __pthread_enable_asynccancel_2 instead of
8252 __pthread_enable_asynccancel.
8253 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8254 Return result of lock re-get if it fails.
8255 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8256 for __pthread_cleanup_push.
8257 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8258 completely broken rwlock implementation.
8259 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8260 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8261 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8262 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8263 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8264 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
8265 versioned_symbol macro.
8266 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8267 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8268
c75d02f0
UD
82692003-03-27 Ulrich Drepper <drepper@redhat.com>
8270
5f5004df
UD
8271 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8272 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
8273 and __helper_tid.
8274 (struct timer): Remove th and bar field.
8275 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8276 debugging code. Create only one helper thread.
8277 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8278 helper thread.
8279 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8280 Renamed. Define statically. Use thread info from siginfo.
8281 (__helper_once): New variable.
8282 (__helper_tid): New variable.
8283 (__reset_helper_control): New function.
8284 (__start_helper_thread): New function.
8285
18d009ca
UD
8286 * pthread_create.c (start_thread): Don't use setjmp inside
8287 __builtin_expect to work around gcc bug.
8288
c75d02f0
UD
8289 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8290 timer_delete syscall fails, but not with ENOSYS, set
8291 __no_posix_timers.
8292
8293 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8294 (timer_settime): Fix typo.
28cf3058
UD
8295 * sysdeps/unix/sysv/linux/timer_getoverr.c
8296 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 8297
049ac259
JJ
82982003-03-27 Jakub Jelinek <jakub@redhat.com>
8299
8300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8301 offset of cleanupbuf.__prev.
8302
f93d39dd
JJ
83032003-03-26 Jakub Jelinek <jakub@redhat.com>
8304
8305 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8306 of included file.
8307
f064e4c5
UD
83082003-03-26 Ulrich Drepper <drepper@redhat.com>
8309
8310 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8311 NULL provide default definition to syscall.
8312
83e886a3
RM
83132003-03-25 Roland McGrath <roland@redhat.com>
8314
8315 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8316 (timer_id2ptr): Fix typo.
8317
09402f5b
UD
83182003-03-25 Ulrich Drepper <drepper@redhat.com>
8319
8320 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8321 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8322 * sysdeps/ia64/pthreaddef.h: Likewise.
8323 * sysdeps/powerpc/pthreaddef.h: Likewise.
8324 * sysdeps/s390/pthreaddef.h: Likewise.
8325 * sysdeps/sh/pthreaddef.h: Likewise.
8326 * sysdeps/x86_64/pthreaddef.h: Likewise.
8327 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8328 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8329 being changed.
8330 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8331 SIGTIMER is not unblocked.
8332 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8333 RT signal taken.
8334 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8335 be send.
8336 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8337 pass pointer through as ID.
8338 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8339 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8340 * sysdeps/unix/sysv/linux/timer_create.c: New file.
8341 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8342 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8343 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8344 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8345 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8346 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8347 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8348 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8349 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8350 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8351 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8352 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8353 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8354 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8355 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8356 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8357 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8358 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8359 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8360 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8361 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8362 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8363 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8364 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8365 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8366 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8367 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8368 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8369 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8370 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8371
8372 * pthreadP.h: Remove FRAME_LEFT definition.
8373 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8374 already left frame. Programs which have this problem are not POSIX
8375 compliant.
8376 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8377
5e826ab5
UD
83782003-03-24 Ulrich Drepper <drepper@redhat.com>
8379
8380 * sysdeps/pthread/tst-timer.c: Check return values of the
8381 functions we test.
8382
b910f788
RM
83832003-03-23 Roland McGrath <roland@redhat.com>
8384
3045a1fe
RM
8385 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8386 * tst-tls3mod.c: Likewise.
8387 * tst-tls1.c: Likewise.
8388 * tst-tls2.c: Likewise.
8389
85047fe3
RM
8390 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8391 undefined behavior.
8392
b910f788
RM
8393 * tst-join5.c (tf1, tf2): Add a cast.
8394
8395 * Makeconfig (includes): Append -I$(..)nptl to this variable.
8396
8397 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8398 Don't test anything.
8399 * tst-cond4.c: Likewise.
8400 * tst-cond6.c: Likewise.
8401 * tst-flock2.c: Likewise.
8402 * tst-mutex4.c: Likewise.
8403 * tst-rwlock4.c: Likewise.
8404 * tst-signal1.c: Likewise.
8405 * tst-spin2.c: Likewise.
8406 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8407
8408 * tst-mutex4.c: Use test-skeleton.c.
8409 * tst-spin2.c: Likewise.
8410 * tst-sysconf.c: Likewise.
8411 * tst-barrier2.c: Likewise.
8412 * tst-cond4.c: Likewise.
8413 * tst-cond6.c: Likewise.
8414 * tst-rwlock4.c: Likewise.
8415 * tst-unload.c: Likewise.
8416 * tst-flock2.c (do_test): Use return instead of exit.
8417
4baa087a
RM
84182003-03-22 Jakub Jelinek <jakub@redhat.com>
8419
8420 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8421
5a3ab2fc
UD
84222003-03-21 Ulrich Drepper <drepper@redhat.com>
8423
9f07eae2
UD
8424 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8425 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8426 instead of __lll_compare_and_swap.
8427 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8428 Likewise.
8429 Removed definition if __lll_compare_and_swap.
8430
5a3ab2fc
UD
8431 * cancellation.c: Adjust for new form of compare&exchange macros.
8432 * cleanup_defer.c: Likewise.
8433 * init.c: Likewise.
8434 * libc-cancellation.c: Likewise.
8435 * old_pthread_cond_broadcast.c: Likewise.
8436 * old_pthread_cond_signal.c: Likewise.
8437 * old_pthread_cond_timedwait.c: Likewise.
8438 * old_pthread_cond_wait.c: Likewise.
8439 * pthread_cancel.c: Likewise.
8440 * pthread_create.c: Likewise.
8441 * pthread_detach.c: Likewise.
8442 * pthread_join.c: Likewise.
8443 * pthread_key_delete.c: Likewise.
8444 * pthread_setcancelstate.c: Likewise.
8445 * pthread_setcanceltype.c: Likewise.
8446 * pthread_timedjoin.c: Likewise.
8447 * pthread_tryjoin.c: Likewise.
8448 * sysdeps/pthread/createthread.c: Likewise.
8449
b1aea098
UD
84502003-03-20 Ulrich Drepper <drepper@redhat.com>
8451
8452 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 8453 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
8454 definitions. Replace uses with calls to atomic_* functions.
8455 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8456 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8457 __lll_test_and_set calls with atomic_exchange_and_add and
8458 atomic_exchange calls respectively.
8459 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8460 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8461 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8462 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8463 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8464 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8465 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8466
8467 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8468 returns the old value.
8469
100a7100
RM
84702003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
8471
8472 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8473 int for variable OLDVAL and correct inline assembler contraint.
8474 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8475 type int for variable OLD.
8476
8477 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8478 only for s390-32.
8479 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8480 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8481 instead of multiple_threads field in the TCB.
8482
95767b36
UD
84832003-03-19 Ulrich Drepper <drepper@redhat.com>
8484
4009bf40
UD
8485 * sysdeps/i386/i686/bits/atomic.h: Removed.
8486 * sysdeps/i386/i586/bits/atomic.h: Removed.
8487 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
8488 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
8489 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
8490 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
8491 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
8492 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
8493 * atomic.h: Removed. Moved to glibc.
8494
560a784f
UD
8495 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8496 support for clock selection.
8497
95767b36
UD
8498 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8499 signalling waiters.
8500
043ad426
RM
85012003-03-18 Roland McGrath <roland@redhat.com>
8502
94659495
RM
8503 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8504 Add __lll_rel_instr first. Add memory clobber.
8505 (lll_mutex_unlock): Use __lll_test_and_set.
8506 From Paul Mackerras <paulus@samba.org>.
8507
8508 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8509 unconditionally.
8510 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8511 (SINGLE_THREAD_P): Add `header.' prefix.
8512 From Paul Mackerras <paulus@samba.org>.
8513
043ad426
RM
8514 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8515 pthread_timedjoin_np to ...
8516 (libpthread: GLIBC_2.3.3): ... here.
8517 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8518
8519 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8520 Avoid shadowing VAL variable.
8521
8522 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8523 New macro.
8524
86a9ee5e
UD
85252003-03-18 Ulrich Drepper <drepper@redhat.com>
8526
ac9e0aa1
UD
8527 * Makefile (tests): Add tst-cond11.
8528 * tst-cond11.c: New file.
8529
a14b373c
UD
8530 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8531 struct passed to cleanup handler to eliminate one more
8532 instruction.
8533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8534
24a49f38
UD
8535 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8536 (pthrad_cond_t): Replace __unused field with __clock.
8537
8538 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8539 waken all waiters in cleanup handler.
8540 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8542
86a9ee5e
UD
8543 * pthread_condattr_getclock.c: New file.
8544 * pthread_condattr_setclock.c: New file.
8545 * sysdeps/pthread/pthread.h: Declare these new functions.
8546 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8547 * Makefile (libpthread-routines): Add the new functions.
8548 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8549 Renamed field to value. Document use of the bits.
8550 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8551 change.
8552 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 8553 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
8554 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8555 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8556 Add __clock field.
8557 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8558 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8559 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8560 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8561 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8562 Implement clock selection.
8563 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8564 * pthread-errnos.sym: Add ENOSYS.
8565 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8566 _POSIX_CLOCK_SELECTION.
8567 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8568
8569 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8570 invalid .size directive.
8571
98054a05
RM
85722003-03-17 Roland McGrath <roland@redhat.com>
8573
8574 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8575 Formatting tweaks.
8576
001bea71
UD
85772003-03-17 Ulrich Drepper <drepper@redhat.com>
8578
4773086e
UD
8579 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8580 Use __lll_add instead of spelling it out. Use protected symbol names.
8581 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8582 Use __lll_add.
8583 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8584 Renamed from lll_compare_and_swap. Use new name where necessary.
8585 (__lll_add): Defined.
8586 (__lll_dec_if_positive): Defined.
8587 (__lll_test_and_set): Defined.
8588 * sysdeps/ia64/pthread_spin_init.c: Removed.
8589 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8590 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8591 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8592 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8593 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8594 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8595 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
8596 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8597 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8598 __sync_lock_release_si.
8599 Patch by Jakub Jelinek.
8600
8601 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8602 Fix timeout handling.
8603 (__lll_timedwait_tid): Likewise.
8604 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8605 Patch by Jakub Jelinek.
8606
8607 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8608
de4471dd
RM
86092003-03-17 Roland McGrath <roland@redhat.com>
8610
8611 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8612 * sysdeps/pthread/pthread_spin_init.c: New file.
8613 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8614 * sysdeps/powerpc/Makefile: New file.
8615 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8616 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8617 * sysdeps/powerpc/pthreaddef.h: New file.
8618 * sysdeps/powerpc/tcb-offsets.sym: New file.
8619 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8620 * sysdeps/powerpc/tls.h: New file.
8621 * sysdeps/powerpc/bits/atomic.h: New file.
8622 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8623 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8624 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 8625
de4471dd
RM
8626 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8627 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8628 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8629 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8630 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8631 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8632 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8633 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8634 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8635 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8636 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8637 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8638 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8639 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8640 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8641
8642 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8643 not gettimeofday.
8644 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8645 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8646 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8647 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8648 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8649
5778033f
UD
86502003-03-17 Ulrich Drepper <drepper@redhat.com>
8651
8652 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8653 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8654 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8655 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8656 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8657
796038f8
RM
86582003-03-16 Roland McGrath <roland@redhat.com>
8659
8660 * tst-fork4.c: Include <string.h>.
8661 * tst-signal2.c: Likewise.
8662 * tst-mutex5.c (do_test): exit -> return.
8663 * tst-mutex2.c: Include <stdlib.h>.
8664
51d0678c
UD
86652003-03-16 Ulrich Drepper <drepper@redhat.com>
8666
5778033f
UD
8667 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8668 (__lll_mutex_timedlock_wait): Correct expected value after
8669 spurious wakeup. Otherwise we would never wait again.
8670
b6e2f87a
UD
8671 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8672 zone versus inline asm stupidity. Use correct instructions.
8673
51d0678c
UD
8674 * tst-rwlock6.c: Add some more status output.
8675
8112cc70
RM
86762003-03-15 Roland McGrath <roland@redhat.com>
8677
8678 * sysdeps/pthread/configure.in: New file.
8679 * sysdeps/pthread/configure: New file (generated).
8680
49773c19
UD
86812003-03-15 Ulrich Drepper <drepper@redhat.com>
8682
8683 * allocatestack.c (allocate_stack): Store the exact stack size of
8684 user allocated stacks.
8685
eec0ca9f
JJ
86862003-03-15 Jakub Jelinek <jakub@redhat.com>
8687
8688 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8689 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8690 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8691 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8692 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8693 Use `header.' prefix.
8694 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8695
a87731e2
UD
86962003-03-15 Ulrich Drepper <drepper@redhat.com>
8697
8698 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8699 __builtin_frame_address, use stack pointer.
8700
8701 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8702 instead of __builtin_frame_pointer.
8703
e22a221d
UD
87042003-03-14 Ulrich Drepper <drepper@redhat.com>
8705
92ed3daf
UD
8706 * tst-basic1.c (do_test): Add cast to avoid warning.
8707 * tst-basic2.c (do_test): Likewise.
8708
9b89567d
UD
8709 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8710 amount of stack correction.
8711
e22a221d
UD
8712 * tst-fork4.c: Use test-skeleton.c.
8713
2e49caba
RM
87142003-03-14 Roland McGrath <roland@redhat.com>
8715
8716 * init.c: Fix typo "#eli" for "#else".
8717
415ef7d8
RM
87182003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8719
8720 * allocatestack.c (__stack_user): Use hidden_data_def.
8721 * pthread_create.c (__pthread_keys): Likewise.
8722
8723 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8724
52287505
RM
87252003-03-14 Roland McGrath <roland@redhat.com>
8726
415ef7d8
RM
8727 * tst-fork4.c: New file.
8728 * Makefile (tests): Add it.
8729
52287505
RM
8730 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8731 we always define the padding space.
8732 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8733 stopped supporting its own extensions fully.
8734 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8735 struct also called `header', so `header.multiple_threads' is the field
8736 name to use on all machines.
8737 * allocatestack.c (allocate_stack): Use `header.' prefix.
8738 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8739 * pthread_create.c (__pthread_create_2_1): Likewise.
8740 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8741 (THREAD_SELF): Likewise.
8742 * sysdeps/x86_64/tls.h: Likewise.
8743 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8744 (SINGLE_THREAD_P): Likewise.
8745 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8746 (SINGLE_THREAD_P): Likewise.
8747 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8748 (SINGLE_THREAD_P): Likewise.
8749
8750 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8751 value directly.
8752
c44bf9aa
UD
87532003-03-14 Ulrich Drepper <drepper@redhat.com>
8754
e22a221d
UD
8755 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8756 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8757
0eb18281
UD
8758 * pthread_create.c (start_thread): setjmp is expected to return 0.
8759
c44bf9aa
UD
8760 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8761 (THREAD_GETMEM_NC): Likewise.
8762
564cd8b6
UD
87632003-03-13 Ulrich Drepper <drepper@redhat.com>
8764
8765 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8766 and the size of the stack which must be allocated is a multiple,
8767 allocate one more page.
8768 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8769 MULTI_PAGE_ALIASING.
8770
6461e577
RM
87712003-03-13 Roland McGrath <roland@redhat.com>
8772
8773 * pthread_create.c (start_thread): Set EXITING_BIT after the
8774 event-reporting (and destructors), not before.
8775
b5ec5617
UD
87762003-03-13 Jakub Jelinek <jakub@redhat.com>
8777
6461e577
RM
8778 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8779 lll_futex_wake): Declare register variables as long int instead of
8780 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8781 Make syscall arguments clobbered by the syscall.
8782 (lll_futex_wait): Define using lll_futex_timed_wait.
8783
8784 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8785 to void *.
8786
8787 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8788 PPID if [! NDEBUG].
8789
8790 * allocatestack.c (nptl_ncreated): Only declare if
8791 COLORING_INCREMENT != 0.
8792
8793 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8794 (__libc_enable_asynccancel_2): Remove prototype.
8795
b5ec5617
UD
8796 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8797 ctid to match kernel.
8798
d0369fb8
UD
87992003-03-12 Ulrich Drepper <drepper@redhat.com>
8800
7588880f
UD
8801 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8802 libc_multiple_threads.
8803 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8804 __libc_multiple_threads to...
8805 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8806
8807 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8808 versioning.
8809 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8810 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8811
8812 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8813 (__pthread_once_internal): Define.
8814
8815 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8816 macros instead of .symver directly.
8817 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8818 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8819
d0369fb8
UD
8820 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8821 * sysdeps/x86_64/tcb-offsets.sym: New file.
8822 * sysdeps/x86_64/Makefile: New file.
8823
8824 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8825 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8826 to access own pthread_t in TCB.
8827 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8828 Likewise.
8829 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8830 Likewise.
8831 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8832
0bb2ac85
RM
88332003-03-12 Roland McGrath <roland@redhat.com>
8834
8835 * pthread-errnos.sym: New file.
8836 * Makefile (gen-as-const-headers): New variable, list that file.
8837 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8838 header <pthread-errnos.h> instead of defining errno values here.
8839 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8840 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8841 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8842 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8843 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8844 Likewise.
8845 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8846 Likewise.
8847 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8848 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8849 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8850 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8851 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8852 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8853 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8854 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8855 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8856 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8857 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8858 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8859 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8860 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8861 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8862 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8863 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8864 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8865 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8866 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8867 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8868 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8869 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8870 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8871 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8872 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8873 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8874
8875 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8876 CLONE_CHILD_SETTID worked.
8877
35e148cb
UD
88782003-03-12 Ulrich Drepper <drepper@redhat.com>
8879
d0369fb8
UD
8880 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8881 file.
8882 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8883 file.
8884
8885 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8886 (pthread_cond_t): Add padding.
8887
da49194d
UD
8888 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8889 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8890 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8891
35e148cb
UD
8892 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8893 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8894 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8895 (__pthread_rwlock_timedrdlock): Likewise.
8896 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8897 (__pthread_rwlock_wrlock): Likewise.
8898 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8899 (__pthread_rwlock_rdlock): Likewise.
8900
8901 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8902
8903 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8904 result of lock re-get if it fails.
8905
3e976b96
UD
89062003-03-11 Ulrich Drepper <drepper@redhat.com>
8907
5a03acfe
UD
8908 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8909 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8910 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8911 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8912 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8913 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8914 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8915 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8916 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8917 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8918
8919 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8920 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8921
8922 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8923 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8924 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8925 (create_thread): Likewise.
8926 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8927 * init.c (__pthread_initialize_minimal_internal): Initialize
8928 __libc_multiple_threads_ptr if necessary.
8929 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8930 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8931 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8932 __libc_multiple_threads.
8933 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8934 necessary.
8935
8936 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8937 (THREAD_SETMEM_NC): Likewise.
8938
8939 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8940 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8941 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8942 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8943
8944 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8945 Eliminate one entire instruction.
8946
32a589b1
UD
8947 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8948 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8949 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8950 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8951 instead of __pthread_enable_asynccancel.
8952 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8953 (__pthread_cond_wait): Likewise.
8954 * sysdeps/pthread/pthread_cond_timedwait.c
8955 (__pthread_cond_timedwait): Likewise.
8956 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8957
3e976b96
UD
8958 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8959 (__condvar_cleanup): Wake up all waiters in case we got signaled
8960 after being woken up but before disabling asynchronous
8961 cancellation.
8962 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8964 (__condvar_cleanup): Likewise.
8965
8966 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8967 Make it an error if architecture has no #if case. Add x86-64.
8968
8969 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8970 pt-initfini.s generation.
8971
8972 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8973 (TLS_INIT_TP): Fix typo.
8974
6c477888
UD
89752003-03-11 Jakub Jelinek <jakub@redhat.com>
8976
8977 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8978 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8979
8980 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8981 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8982 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8983 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8984 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8985 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8986 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8987 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8988
ea694823
UD
89892003-03-11 Ulrich Drepper <drepper@redhat.com>
8990
6c477888
UD
8991 * sysdeps/pthread/pthread_cond_timedwait.c
8992 (__pthread_cond_timedwait): Return the result of the final
8993 locking. If it succeeds, the regular function return value.
8994
8995 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8996 Return result of the final locking.
8997 * version.c (__nptl_main): Work around problems with the strange
8998 INTERNAL_SYSCALL macro on ppc32.
8999 * init.c (__pthread_initialize_minimal_internal): Unblock
9000 SIGCANCEL in case the parent blocked it.
9001 Reported by Paul Mackerras <paulus@samba.org>.
9002
ea694823
UD
9003 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9004 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9005 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9006
b33e6163
RM
90072003-03-11 Jakub Jelinek <jakub@redhat.com>
9008
9009 * sysdeps/pthread/pthread_cond_timedwait.c
9010 (__pthread_cond_timedwait): Unlock and fail if
9011 __pthread_mutex_unlock_internal failed.
9012
9013 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9014 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9015 Use ARCH_CLONE.
9016 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9017 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9018 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9019 ALLOCATE_STACK): New macros.
9020 (TLS_TPADJ): New macro.
9021 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9022 (allocate_stack): Handle TLS_DTV_AT_TP and
9023 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9024 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9025 Don't set PD->self.
9026 * init.c [__ia64__] (__NR_set_tid_address): Define.
9027
9028 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9029 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9030 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9031 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9032 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9033 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9034 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9035 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9036 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9037 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9038 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9039 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9040 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9041 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9042 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9043 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9044 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9045 * sysdeps/ia64/bits/atomic.h: New file.
9046 * sysdeps/ia64/Makefile: New file.
9047 * sysdeps/ia64/pthread_spin_init.c: New file.
9048 * sysdeps/ia64/pthread_spin_lock.c: New file.
9049 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9050 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9051 * sysdeps/ia64/pthreaddef.h: New file.
9052 * sysdeps/ia64/tcb-offsets.sym: New file.
9053 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9054 * sysdeps/ia64/tls.h: New file.
9055
9056 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9057 to syscall instead of no arguments.
9058
2b30b2e5
UD
90592003-03-10 Ulrich Drepper <drepper@redhat.com>
9060
db5f2fc9
UD
9061 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9062 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9063 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9064 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9065
9066 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9067 unused code.
9068
6a4263e3
UD
9069 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9070
3de7c2a9
UD
9071 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9072 lowlevelbarrier.sym.
9073 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9074 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9075 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 9076 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 9077
2a544d82
UD
9078 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9079 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9080 (__lll_mutex_timedlock_wait): Likewise.
9081 (lll_mutex_lock): Adjust asm for that.
9082 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9083 (lll_lock): Adjust asm for operand order change.
9084 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9085 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9086
ec06436c
UD
9087 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9088 Reverse order of parameters.
9089 (__lll_timedwait_tid): Remove regparms attribute.
9090 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9091 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9092
3273832c
UD
9093 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9094 (__lll_timedwait_tid): Remove one unnecessary instruction.
9095
51f32ab8
UD
9096 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9097 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9098 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9099 lowlevelmutex.S.
9100
9101 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9102 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9103 for NOT_IN_libc.
9104 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9105 lowlevellock.S.
9106
fad48d9e
UD
9107 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9108 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9109 for libc.so.
9110 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9111 define LOCK here (if UP is not defined). The actual code is in
9112 lowlevelmutex.S.
9113
9356d063
UD
9114 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9115 LOCK is already defined. Don't define lll_unlock_wake_cb and
9116 __lll_timedwait_tid for libc.so.
9117 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9118 define LOCK here (if UP is not defined). The actual code is in
9119 lowlevellock.S.
9120
ebf0cbc5 9121 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
9122 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9123 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9124 instead of lowlevelsem.h.
9125 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9126 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9127 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 9128
c915e5ad
UD
9129 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9130 lowlevelrwlock.sym.
9131 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9132 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 9133 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 9134
4c3c2e8a
UD
9135 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9136 register loading.
9137 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9138 last changed. D'oh.
9139
2b30b2e5
UD
9140 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9141
9142 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9143 of __libc_locking_needed.
9144 (lll_trylock): Initialize %eax to zero.
9145
2b30b2e5
UD
9146 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9147 pthread_cond_t definition.
9148
e48f9638
RM
91492003-03-10 Roland McGrath <roland@redhat.com>
9150
9151 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9152 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9153 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9154 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9155 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9156
9157 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9158 Instead of setting PD->multiple_threads, set globals
9159 __pthread_multiple_threads and __libc_multiple_threads.
9160 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9161 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9162 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9163
9164 * descr.h (struct pthread): Conditionalize first member on
9165 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
9166 containing an anonymous tcbhead_t. Move `list' member out.
9167 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9168 * allocatestack.c: Remove use of `header.data.' prefix.
9169 * pthread_create.c: Likewise.
9170 * init.c (__pthread_initialize_minimal_internal): Likewise.
9171 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9172 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9173 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9174 * sysdeps/x86_64/tls.h: Likewise.
9175 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9176 (SINGLE_THREAD_P): Likewise.
9177 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9178 (SINGLE_THREAD_P): Likewise.
9179 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9180 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9181
c37cae9e
UD
91822003-03-09 Ulrich Drepper <drepper@redhat.com>
9183
d38c777e
RM
9184 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9185
7b44a5e0 9186 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 9187 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 9188
c2e5e085
UD
9189 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9190 leftovers from the ia32 code.
9191
9192 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9193 memory load.
9194 (clear_once_control): Don't load %esi.
9195
9196 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9197 handling.
9198
9199 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9200
cd4b2a55
UD
9201 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9202 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9203
c37cae9e
UD
9204 * Makefile (tests): Add tst-cond10.
9205 * tst-cond10.c: New file.
9206
d130a341
UD
92072003-03-08 Ulrich Drepper <drepper@redhat.com>
9208
ccf1d573
UD
9209 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9210 * tst-signal3.c (do_test): Likewise.
9211 * tst-sem5.c (do_test): Likewise.
9212 * tst-kill6.c (do_test): Likewise.
9213 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9214
9215 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9216 of inc/dec.
9217 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9218 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9219 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9220 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9221 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9222 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9223 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9224 Likewise.
9225 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9226 Likewise.
9227 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9228 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9229 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9230 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9231 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9232 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9233 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9234 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9235
d130a341
UD
9236 * allocatestack.c (allocate_stack): If mprotect() fails free the
9237 TLS memory.
9238
bc6389ad
UD
92392003-03-07 Ulrich Drepper <drepper@redhat.com>
9240
41d4d223
UD
9241 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9242
9243 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9244 lll_wake_tid. This was used only to work around kernel limits in
9245 the early days.
9246 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9247 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9248 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9249 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9250
bc6389ad
UD
9251 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9252 (__pthread_initialize_minimal_internal): Change initialization of
9253 __static_tls_align_m1 appropriately.
9254 * pthreadP.h (__static_tls_align_m1): Renamed from
9255 __static_tls_align.
9256 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9257 instead of __static_tls_align-1.
9258
cc775edf
UD
92592003-03-04 Ulrich Drepper <drepper@redhat.com>
9260
0de28d5c 9261 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 9262
518b5308
UD
9263 * pthread_create.c: Define __pthread_keys using nocommon
9264 attribute, not by placing it explicitly in bss.
9265 Remove DEFINE_DEALLOC definition. Not needed anymore.
9266
9267 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9268 Use it in mmap call to allocate stacks.
9269
9270 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9271
cc775edf
UD
9272 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9273 result of the thread function.
9274
4f6f0a8f
UD
92752003-03-03 Ulrich Drepper <drepper@redhat.com>
9276
f04a2721
UD
9277 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
9278 version is just fine.
9279
4f6f0a8f
UD
9280 * sysdeps/unix/sysv/linux/libc_pthread_init.c
9281 (__pthread_child_handler): Renamed from pthread_child_handler,
9282 exported, and marked hidden. Change all users.
9283 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9284 free __pthread_child_handler from child list.
9285
7ce5c164
UD
92862003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
9287
9288 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9289
9290 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9291 Fix handling of cancellation and failing pthread_mutex_unlock call.
9292 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9293 (__pthread_cond_wait): Likewise.
9294
9295 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9296 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9297 lll_futex_timed_wait call.
9298 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9299 (pthread_rwlock_timedwrlock): Likewise.
9300
9301 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9302 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9303 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9304
9305 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9306 check of lll_futex_wake return value.
9307
ea6a015b
RM
93082003-03-03 Roland McGrath <roland@redhat.com>
9309
9310 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9311
9312 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9313 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9314 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9315
4adacf57
UD
93162003-03-02 Ulrich Drepper <drepper@redhat.com>
9317
1be3d664
UD
9318 * sysdeps/pthread/timer_create.c (timer_create): Return correct
9319 error for CPU clocks.
9320
885bafa1
UD
9321 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9322 _POSIX_MONOTONIC_CLOCK.
9323 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9324
4adacf57
UD
9325 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9326 recent kernels.
9327
86bfff4d
UD
93282003-03-01 Ulrich Drepper <drepper@redhat.com>
9329
9330 * descr.h (struct pthread): Move cleanup field to the front.
9331
d1149385
RM
93322003-03-01 Roland McGrath <roland@redhat.com>
9333
9334 * sem_open.c (sem_open): Braino fix.
9335
bd8bb78b
UD
93362003-03-01 Ulrich Drepper <drepper@redhat.com>
9337
748bec08
UD
9338 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9339 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9340 __pthread_cleanup_pop functionality.
9341 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9342
bd8bb78b
UD
9343 * descr.h (struct pthread): Move tid field to the front now that
9344 it is often used.
9345
9346 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9347 (__lll_mutex_timedlock_wait): Remove.
9348 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9349 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9350 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9351 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9352 (lll_unlock_wake_cb): Don't save and restore %esi.
9353 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9354 %esi.
9355 (__lll_timedwait_tid): Add alignment.
9356 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9357 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9358 %esi.
9359 (__lll_timedwait_tid): Removed.
9360 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9361 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9362 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9363 (pthread_barrier_wait): Don't save, load, and restore %esi for
9364 last thread.
9365 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9366 (__pthread_cond_signal): Don't save, load, and restore %esi.
9367 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9368 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9369 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9370 Don't save, load, and restore %esi.
9371
d2637c70
UD
93722003-02-27 Ulrich Drepper <drepper@redhat.com>
9373
567fb22a
UD
9374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9375 Release lock before waking up the waiters.
9376
427f5fa1
UD
9377 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9378
a2d83cfb
UD
9379 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9380 (reader_thread): Likewise.
9381
d2637c70
UD
9382 * sysdeps/pthread/pthread_rwlock_unlock.c
9383 (__pthread_rwlock_unlock): Release internal lock early. Don't try
9384 to wake up readers if there are none.
9385
9386 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9387 Release internal lock before wake threads.
9388
b1531183
UD
93892003-02-26 Ulrich Drepper <drepper@redhat.com>
9390
dbf6131c
UD
9391 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9392 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
9393 predefined.
9394 * tst-rwlock9.c: Likewise.
9395 * tst-rwlock10.c: New file.
9396 * tst-rwlock11.c: New file.
9397
695799fe
UD
9398 * Makefile (tests): Add tst-dlsym1.
9399 * tst-dlsym1.c: New file.
9400
b1531183
UD
9401 * init.c (__pthread_initialize_minimal_internal): Set
9402 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9403 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9404
3724f268
UD
94052003-02-24 Ulrich Drepper <drepper@redhat.com>
9406
3857ca78
UD
9407 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9408
80d80779
UD
9409 * tst-cond2.c: Fix sychronization with child.
9410
86371308
UD
9411 * tst-rwlock8.c (reader_thread): Remove unused variable.
9412
ffeb4481
UD
9413 * Makefile: Add rules to build and run tst-tls3.
9414 * tst-tls3.c: New file.
9415 * tst-tls3mod.c: New file.
9416
3724f268
UD
9417 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9418 * tst-rwlock8.c: New file.
9419 * tst-rwlock9.c: New file.
9420 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9421 complete broken rwlock implementation.
9422 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9423 Likewise.
9424 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9425 Likewise.
9426 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9427 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
9428 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9429 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9430 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9431 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9432 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 9433
8915cc40
RM
94342003-02-23 Roland McGrath <roland@redhat.com>
9435
9436 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9437
fd1a0d0c
UD
94382003-02-23 Ulrich Drepper <drepper@redhat.com>
9439
ecf28959
UD
9440 * Makefile (tests): Add tst-context1.
9441 * tst-context1.c: New file.
9442
5e47b76b
UD
9443 * Makefile (tests): Add tst-tls1 and tst-tls2.
9444 * tst-tls1.c: New file.
9445 * tst-tls2.c: New file.
9446
5a6bbb41
UD
9447 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9448 for failed cmpxchg.
9449
fd1a0d0c
UD
9450 * pthread_create.c (start_thread): Set EXITING_BIT early.
9451
9452 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9453 (THREAD_GETMEM_NC): Likewise.
9454
757f9fcb
UD
94552003-02-22 Ulrich Drepper <drepper@redhat.com>
9456
b1b8e747
UD
9457 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9458 off 3 more bytes by using offset-less instructions when possible.
9459
c780aa21 9460 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
9461
9462 * eintr.c (eintr_source): Add unnecessary return but the compiler
9463 insists.
9464
9465 * tst-kill3.c: Include <unistd.h>.
9466
5148559c
RM
94672003-02-21 Roland McGrath <roland@redhat.com>
9468
9469 * pthread_create.c (start_thread): Call __libc_thread_freeres.
9470
ab2d98e3
UD
94712003-02-21 Ulrich Drepper <drepper@redhat.com>
9472
71028edd
UD
9473 * Makefile (tests): Add tst-eintr1.
9474 (distribute): Add eintr.c.
9475 * tst-eintr1.c: New file.
9476 * eintr.c: New file.
9477
e814f748
UD
9478 * pthread_cancel.c (pthread_cancel): Use tkill directly.
9479
9480 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9481 Disallow sending SIGCANCEL.
9482
ab2d98e3 9483 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 9484 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
9485 * tst-kill1.c: New file.
9486 * tst-kill2.c: New file.
9487 * tst-kill3.c: New file.
9488 * tst-kill5.c: New file.
9c03686d 9489 * tst-kill6.c: New file.
e814f748
UD
9490 * tst-basic7.c: Renamed to...
9491 * tst-kill4.c: ...this.
ab2d98e3 9492
59fed0e2
RM
94932003-02-21 Roland McGrath <roland@redhat.com>
9494
9495 * Makefile (install-lib-ldscripts): New variable.
9496
49dc759f
UD
94972003-02-21 Ulrich Drepper <drepper@redhat.com>
9498
8c2e9a29
UD
9499 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9500 * pthread_cancel.c: Use INVALID_TD_P.
9501 * pthread_detach.c: Likewise.
9502 * pthread_getschedparam.c: Likewise.
9503 * pthread_setschedparam.c: Likewise.
9504 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9505 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9506 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9507 * pthread_timedjoin.c: Likewise.
9508
9509 * tst-basic7.c: Include <signal.h>.
9510
49dc759f
UD
9511 * pthread_join.c (pthread_join): Limited checking for invalid
9512 descriptors.
9513 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9514
df5803bf
UD
95152003-02-20 Ulrich Drepper <drepper@redhat.com>
9516
c5acd3d7
UD
9517 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9518 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
9519 * Makefile (tests): Add tst-key4.
9520 * tst-key4.c: New file.
9521
729924a0
UD
95222003-02-18 Ulrich Drepper <drepper@redhat.com>
9523
2f7dc594
UD
9524 * Makefile (tests): Add tst-basic7.
9525 * tst-basic7.c: New file.
9526
ba25bb0f
UD
9527 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9528 Add some more __builtin_expect.
9529
12fd3c5f 9530 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 9531
5430d926
UD
95322003-02-17 Ulrich Drepper <drepper@redhat.com>
9533
b0db7fbe
UD
9534 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9535 _POSIX_THREAD_PRIORITY_SCHEDULING.
9536 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9537 _XOPEN_REALTIME_THREADS.
9538 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9539
9540 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9541 kernel returns EINVAL for PID <= 0, work around it.
9542
ecfda9bd
UD
9543 * Makefile (tests): Add tst-signal5.
9544 * tst-signal5.c: New file.
9545
7d78ab99
UD
9546 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9547 and LOGIN_NAME_MAX.
9548
371a2972
UD
9549 * tst-cancel1.c (tf): Block all signals.
9550
5430d926
UD
9551 * Makefile (tests): Add tst-basic6.
9552 * tst-basic6.c: New file.
9553
9554 * tst-basic1.c: Add test for process ID.
9555
9556 * Makefile (tests): Add tst-cancel10.
9557 * tst-cancel10.c: New file.
9558
9559 * Makefile (tests): Add tst-signal4.
9560 * tst-signal4.c: New file.
9561
9562 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9563 __sigismember instead of sigismember. Add __builtin_expect.
9564
1564916a
UD
95652003-02-16 Ulrich Drepper <drepper@redhat.com>
9566
179ff175
UD
9567 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9568 pthread_setcancelstate, and pthread_rwlock_setpshared.
9569
e4335f9a
UD
9570 * tst-cancel7.c (do_test): Make sure the pid file exists before
9571 canceling the thread.
9572
0a37669a
UD
9573 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9574 pthread_rwlock_timedrdlock tests.
9575 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9576 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9577 Check for invalid tv_nsec field.
9578 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9579 Likewise.
9580
9581 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9582 recursive mutex of overflow.
9583
9584 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9585
e4335f9a 9586 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
9587 going into an endless loop.
9588 * Makefile (tests): Add tst-cancel9.
9589 * tst-cancel9.c: New file.
9590
9591 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9592
b270b548
UD
95932003-02-15 Ulrich Drepper <drepper@redhat.com>
9594
1c82b97f
UD
9595 * tst-mutex5.c (do_test): Add more timedlock tests.
9596
b2f05465 9597 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
9598 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9599
e798b60f
UD
9600 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9601 use INLINE_SYSCALL. Error number is returned, not -1.
9602
90491dc4
UD
9603 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9604 and __deallocate_stack with internal_function.
9605 * pthread_create.c: Adjust definitions appropriately.
9606 * allocatestack.c: Likewise.
9607
9608 * pthread_join.c: Add one more __builtin_expect.
9609 * pthread_timedjoin.c: Likewise.
9610
9611 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9612 not data of sequence number does not match.
9613 Add one __builtin_expect.
9614
c6247c9d
UD
9615 * Makefile (tests): Add tst-clock1.
9616 * tst-clock1.c: New file.
9617
b270b548
UD
9618 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9619 negative arguments.
9620 * Makefile (tests): Add tst-basic5.
9621 * tst-basic5.c: New file.
9622
700bf7af
UD
96232003-02-14 Ulrich Drepper <drepper@redhat.com>
9624
757de559
UD
9625 * Makefile (tests): Add tst-basic4.
9626 * tst-basic4.c: New file.
9627
47202270
UD
9628 * pthreadP.h: Add declaraction for __nptl_nthreads.
9629 * pthread_create.c: Define __nptl_nthreads
9630 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 9631 after thread is done. If then zero, call exit(0).
47202270
UD
9632 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9633 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9634 * init.c (pthread_functions): Initialize ptr_nthreads.
9635 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9636 (__reclaim_stacks): Decrement __nptl_nthreads.
9637 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9638 Define.
9639 * Makefile (tests): Add tst-basic3.
9640 * tst-basic3.c: New file.
9641
e320ef46
UD
9642 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9643 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9644 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9645 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9646 if asynchronous canceling is enabled.
9647 * pthread_join.c (pthread_join): When recognizing circular joins,
9648 take into account the other thread might be already canceled.
9649 * Makefile (tests): Add tst-join5.
9650 * tst-join5.c: New file.
9651
700bf7af
UD
9652 * Makefile (tests): Add tst-join4.
9653 * tst-join4.c: New file.
9654
96552003-02-13 Ulrich Drepper <drepper@redhat.com>
9656
9657 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9658
dac0f772
UD
96592003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9660
9661 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9662 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9663 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9664 warning.
9665 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9666 to avoid warning.
9667 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9668 error if lll_futex_wake failed.
9669
e8cda341
UD
96702003-02-13 Ulrich Drepper <drepper@redhat.com>
9671
a7720b5e
UD
9672 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9673 handling of cancellation and failung pthread_mutex_unlock call.
9674 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9675 * Makefile (tests): Add tst-cond8 and tst-cond9.
9676 * tst-cond8.c: New file.
9677 * tst-cond9.c: New file.
9678
a1ea4c06
UD
9679 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9680
9681 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9682 non-standard initializers with __USE_GNU.
9683
e8cda341
UD
9684 * Makefile (tests): Add tst-cleanup3.
9685 * tst-cleanup3.c: New file.
9686
2067577c
UD
96872003-02-12 Ulrich Drepper <drepper@redhat.com>
9688
89e78a95
UD
9689 * Makefile (tests): Add tst-attr1 and tst-attr2.
9690 * tst-attr1.c: New file.
9691 * tst-attr2.c: New file.
9692
dfdd294a
UD
9693 * Makefile: Add rules to build and run tst-atfork2 test.
9694 * tst-atfork2.c: New file.
9695 * tst-atfork2mod.c: New file.
9696
9697 * sysdeps/unix/sysv/linux/unregister-atfork.c
9698 (__unregister_atfork): Free the memory allocated for the handlers
9699 after removing them from the lists.
9700
9701 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9702 cleanup function.
9703
9704 * tst-atfork1.c (do_test): Wait for the child we forked.
9705 Report error in child.
9706
9707 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9708
2067577c
UD
9709 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9710
2a8a8a84
UD
97112003-02-10 Ulrich Drepper <drepper@redhat.com>
9712
d9dd121e
UD
9713 * Makefile (tests): Add tst-cancel8.
9714 * tst-cancel8.c: New file.
9715
2a8a8a84
UD
9716 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9717 clearing of control variable.
defd1870 9718 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 9719 * tst-once3.c: New file.
defd1870 9720 * tst-once4.c: New file.
2a8a8a84 9721
a54e8d33
UD
97222003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9723
9724 * sysdeps/sh/Makefile: New file.
9725 * sysdeps/sh/bits/atomic.h: New file.
9726 * sysdeps/sh/pthread_spin_init.c: New file.
9727 * sysdeps/sh/pthread_spin_lock.c: New file.
9728 * sysdeps/sh/pthread_spin_trylock.S: New file.
9729 * sysdeps/sh/pthread_spin_unlock.S: New file.
9730 * sysdeps/sh/pthreaddef.h: New file.
9731 * sysdeps/sh/tcb-offsets.sym: New file.
9732 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9733 * sysdeps/sh/tls.h: New file.
9734 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9735 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9736 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9737 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9738 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9739 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9740 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9741 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9742 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9743 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9744 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9745 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9746 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9747 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9748 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9749 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9750 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9751 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9752 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9753 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9754 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9755 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9756 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9757 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9758 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9759 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9760 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9761 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9762 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9763 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9764
696e556e
UD
97652003-02-08 Ulrich Drepper <drepper@redhat.com>
9766
9767 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9768 according to POSIX.
9769
9770 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9771
fef710d6
UD
97722003-02-07 Ulrich Drepper <drepper@redhat.com>
9773
c6180643
UD
9774 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9775 (TLS_GET_FS): New #define.
9776 (TLS_SET_FS): New #define.
9777 Correct value of __NR_set_thread_area.
9778
fef710d6
UD
9779 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9780
11090a99
UD
97812003-02-06 Ulrich Drepper <drepper@redhat.com>
9782
65c68990
UD
9783 * Makefile (tests): Add tst-popen1.
9784 * tst-popen1.c: New file.
9785
11090a99
UD
9786 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9787 but inactive generalization.
9788 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9789 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9790 Minor optimization, remove one instruction.
9791 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9792
a88c9263
UD
97932003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9794
9795 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9796
97972003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9798
9799 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9800 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9801 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9802 * sysdeps/pthread/pthread_cond_signal.c: New file.
9803 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9804 * sysdeps/pthread/pthread_cond_wait.c: New file.
9805 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9806 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9807 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9808 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9809 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9810 * sysdeps/s390/Makefile: New file.
9811 * sysdeps/s390/bits/atomic.h: New file.
9812 * sysdeps/s390/pthread_spin_init.c: New file.
9813 * sysdeps/s390/pthread_spin_lock.c: New file.
9814 * sysdeps/s390/pthread_spin_trylock.c: New file.
9815 * sysdeps/s390/pthread_spin_unlock.c: New file.
9816 * sysdeps/s390/pthreaddef.h: New file.
9817 * sysdeps/s390/tcb-offsets.sym: New file.
9818 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9819 * sysdeps/s390/tls.h: New file.
9820 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9821 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9822 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9823 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9824 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9825 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9826 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9827 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9828 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9829 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9830 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9831 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9832 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9833 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9834 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9835 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9836 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9837 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9838 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9839 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9840 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9841 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9842 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9843
6f1cff95
UD
98442003-02-04 Ulrich Drepper <drepper@redhat.com>
9845
ec609a8e
UD
9846 * atomic.h: Add a couple more default implementations.
9847 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
9848 __arch_compare_and_exchange_32_acq in return value definition. It
9849 always exists.
9850 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 9851 Add missing atomic_ prefixes.
e3ec8904 9852
6f1cff95
UD
9853 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9854 thread library is available, use correct value to mark initialized
9855 once variable.
9856
4f088329
UD
98572003-02-03 Ulrich Drepper <drepper@redhat.com>
9858
6f1cff95
UD
9859 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9860 __sysconf to determine pagesize.
9861
3e4fc359 9862 * pthread_create.c: Include <atomic.h>.
4f088329
UD
9863 * allocatestack.c (allocate_stack): Implement coloring of the
9864 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9865 size minus one. Adjust users.
3e4fc359 9866 * sysdeps/i386/i686/Makefile: New file.
4f088329 9867
2f42e8be
UD
98682003-02-02 Ulrich Drepper <drepper@redhat.com>
9869
4301f7e2
UD
9870 * allocatestack.c: Improve comment throughout the file.
9871
2f42e8be 9872 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 9873 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
9874 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9875 (__lll_lock_wait): Likewise.
9876 (lll_unlock_wake_cb): Removed.
9877
4a7d6545
UD
98782003-01-31 Ulrich Drepper <drepper@redhat.com>
9879
9880 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9881 _POSIX_THREAD_PRIORITY_SCHEDULING.
9882
886d5973
UD
98832003-01-30 Jakub Jelinek <jakub@redhat.com>
9884
9885 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9886 Fix return type of ptr___pthread_getspecific.
9887
e474ca78
UD
98882003-01-29 Ulrich Drepper <drepper@redhat.com>
9889
9890 * Makefile (tests): Add tst-umask1.
9891 (tst-umask1-ARGS): Define.
9892 * tst-umask1.c: New file.
9893
e6ebd2e4
UD
98942003-01-28 Ulrich Drepper <drepper@redhat.com>
9895
6cf26f41
UD
9896 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9897 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9898 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9899 pthread_rwlock_unlock.
9900 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9901 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9902 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9903 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9904 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9905 New file.
9906 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9907 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9908 New file.
9909 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9910 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9911 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9912 New file.
9913 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9914 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9915 New file.
9916 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9917 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9918 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9919 New file.
9920 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9921 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9922 New file.
9923 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9924
1d087a7e
UD
9925 * Makefile (libpthread-routines): Remove lowlevelcond and
9926 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9927 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9928 and pthread_cond_broadcast.
4a99d160
UD
9929 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9930 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9931 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9932 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9933 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9934 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9935 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9936 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9937 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9938 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9939 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9940 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9941 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9942 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9943 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9944 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9945 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9946 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9947 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9948 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9949 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9950 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9951 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9952 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9953 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9954 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9955 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9956 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9957 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9958 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9959 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 9960
e6ebd2e4
UD
9961 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9962 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9963 of the code is moved to ...
9964 * sysdeps/pthread/createthread.c: ...here. New file.
9965
a15698cb
UD
99662003-01-27 Ulrich Drepper <drepper@redhat.com>
9967
0566b130
UD
9968 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9969 (__new_sem_post): Clear %eax before returning.
9970 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9971
e6fb8846
UD
9972 * Makefile (tests): Add tst-cleanup2.
9973 * tst-cleanup2.c: New file.
9974
a15698cb
UD
9975 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9976 Interpret first parameter correctly.
9977
8824b0a1
UD
99782003-01-17 Ulrich Drepper <drepper@redhat.com>
9979
9980 * Makefile (headers): Add bits/semaphore.h.
9981
850dcfca
UD
99822003-01-16 Jakub Jelinek <jakub@redhat.com>
9983
9984 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9985 if not SHARED.
9986
574b892e
UD
99872003-01-14 Ulrich Drepper <drepper@redhat.com>
9988
a8d87c92
UD
9989 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9990 must be used and mapping failed.
9991 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9992
574b892e
UD
9993 * Makefile (CFLAGS-pthread_self.os): Define this, not
9994 CFLAGS-pthread_self.c.
9995
fb48047a
UD
99962003-01-13 Ulrich Drepper <drepper@redhat.com>
9997
47805511
UD
9998 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9999 lll_unlock_wake_cb.
10000
fb48047a
UD
10001 * Makefile (libpthread-routines): Add version. Add rules to build
10002 version.os and banner.h.
10003 * version.c: New file.
10004
115bb61d
UD
100052003-01-13 Jakub Jelinek <jakub@redhat.com>
10006
10007 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10008 the alias unconditional.
10009 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10010
100112003-01-13 Ulrich Drepper <drepper@redhat.com>
10012
10013 * Makefile (CFLAGS-pthread_self.c): New definition.
10014
6aca81bb
UD
100152003-01-06 Jakub Jelinek <jakub@redhat.com>
10016
10017 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10018 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10019 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10020 * init.c (__pthread_initialize_minimal_internal): Likewise.
10021
e9c7764e
UD
100222003-01-07 Jakub Jelinek <jakub@redhat.com>
10023
b5facfda
UD
10024 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10025
e9c7764e
UD
10026 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10027 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10028 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10029 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10030 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10031 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10032
bef1e42f
UD
100332003-01-06 Jakub Jelinek <jakub@redhat.com>
10034
10035 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10036 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10037 * tst-cancel-wrappers.sh: Remove all exceptions.
10038
bbd17455
UD
100392003-01-05 Ulrich Drepper <drepper@redhat.com>
10040
a73ab6df
UD
10041 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10042 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10043
bbd17455
UD
10044 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10045 Use __libc_pthread_functions array if SHARED.
10046
10047 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10048 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10049
10050 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10051 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10052 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10053 __libc_ptf_call instead of __libc_maybe_call.
10054 (PTF): New #define.
10055 (__libc_cleanup_region_start): Wrap function name with PTF call.
10056 (__libc_cleanup_region_end): Likewise.
10057 (__libc_cleanup_end): Likewise.
10058
10059 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10060 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10061 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10062 * pthreadP.h: Add prototypes.
10063
10064 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10065 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10066 __pthread_rwlock_unlock aliases.
10067 * pthreadP.h: Add prototypes for new aliases.
10068
10069 * pthreadP.h (struct pthead_functions): Moved to...
10070 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10071 * init.c (pthread_functions): Add initializers for new elements.
10072
10073 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10074 __pthread_cleanup_pop_restore aliases.
10075 * pthreadP.h: Add prototypes.
10076
10077 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10078 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10079 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10080 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10081 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10082 * pthreadP.h: Adjust prototypes and callers.
10083
d27a78be
UD
100842003-01-04 Ulrich Drepper <drepper@redhat.com>
10085
b74121ae
UD
10086 * Makefile (tests): Add tst-cancel7.
10087 (tst-cancel7-ARGS): New variable.
bbd17455 10088 * tst-cancel7.c: New file.
b74121ae 10089
29bc410c
UD
10090 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10091 around gcc defficiencies.
10092 * old_pthread_cond_signal.c: Likewise.
10093 * old_pthread_cond_timedwait.c: Likewise.
10094 * old_pthread_cond_wait.c: Likewise.
10095
d27a78be
UD
10096 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10097
733f25e6
UD
100982003-01-03 Ulrich Drepper <drepper@redhat.com>
10099
7edb2ae3
UD
10100 * Makefile (tests): Add tst-cond7.
10101 * tst-cond7.c: New file.
10102
b1151300
UD
10103 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10104 (condvar_cleanup): Get condvar address from the right place.
10105
733f25e6
UD
10106 * atomic.h: Correct definitions of atomic_full_barrier,
10107 atomic_read_barrier, atomic_write_barrier.
10108
10109 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10110 race-free.
10111 * old_pthread_cond_signal.c: Likewise.
10112 * old_pthread_cond_timedwait.c: Likewise.
10113 * old_pthread_cond_wait.c: Likewise.
10114
686b7223
UD
101152003-01-03 Jakub Jelinek <jakub@redhat.com>
10116
10117 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10118
0e07706e
UD
101192003-01-03 Ulrich Drepper <drepper@redhat.com>
10120
997256dd
UD
10121 * pthreadP.h (pthread_cond_2_0_t): New type.
10122 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10123 Use new type for the 2.0 condvar function prototypes.
10124 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10125 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10126 parameter.
10127 * old_pthread_cond_destroy.c: Likewise.
10128 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
10129 * old_pthread_cond_signal.c: Likewise.
10130 * old_pthread_cond_timedwait.c: Likewise.
10131 * old_pthread_cond_wait.c: Likewise.
10132
842d2817
UD
10133 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10134 (__pthread_cond_wait): Don't save cancellation mode and seq value
10135 in same location.
10136
0e07706e
UD
10137 * herrno.c (__h_errno_location): Don't define as weak.
10138
bf293afe
UD
101392003-01-02 Jakub Jelinek <jakub@redhat.com>
10140
10141 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10142 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10143 and pthread_cond_wait.
10144 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10145 Renamed to...
10146 (__pthread_cond_broadcast_2_0): ... this.
10147 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10148 Renamed to...
10149 (__pthread_cond_destroy_2_0): ... this.
10150 * old_pthread_cond_init.c (__old_pthread_cond_init):
10151 Renamed to...
10152 (__pthread_cond_init_2_0): ... this.
10153 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10154 Renamed to...
10155 (__pthread_cond_signal_2_0): ... this.
10156 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10157 Renamed to...
10158 (__pthread_cond_wait_2_0): ... this.
10159 * pthread_cond_destroy.c: Include shlib-compat.h.
10160 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10161 * pthread_cond_init.c: Include shlib-compat.h.
10162 (pthread_cond_init): Change strong_alias into versioned_symbol.
10163 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10164 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10165 fields.
10166 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10167 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10168 __pthread_cond_wait_2_0): New prototypes.
10169 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10170 __old_pthread_cond_init, __old_pthread_cond_signal,
10171 __old_pthread_cond_wait): Removed.
10172 * init.c: Include shlib-compat.h.
10173 (pthread_functions): Guard ptr___pthread_attr_init_2_0
10174 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10175 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10176 ptr___pthread_cond_*_2_0 fields.
10177 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10178 pthread_cond_*@GLIBC_2.0 compatibility symbols.
10179
10180 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10181 LIBC_SIGACTION was not yet defined.
10182 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10183 [!defined LIBC_SIGACTION] (__sigaction): New function and
10184 libc_hidden_weak.
10185 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10186 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10187
101882003-01-02 Jakub Jelinek <jakub@redhat.com>
10189
10190 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10191
05df18c3
UD
101922003-01-02 Ulrich Drepper <drepper@redhat.com>
10193
10194 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10195 New, larger type definition.
10196 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10197 implementation.
10198 * Versions [libpthread]: Add definitions for new pthread_cond_*
10199 interfaces for version GLIBC_2.3.2.
10200 * pthread_cond_init.c: Update initialization for new type definition.
10201 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10202 pthread_cond_timedwait, pthread_cond_signal, and
10203 pthread_cond_broadcast. Add old_pthread_cond_init,
10204 old_pthread_cond_destroy, old_pthread_cond_wait,
10205 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10206 old_pthread_cond_broadcast.
10207 * old_pthread_cond_broadcast.c: New file.
10208 * old_pthread_cond_destroy.c: New file.
10209 * old_pthread_cond_init.c: New file.
10210 * old_pthread_cond_signal.c: New file.
10211 * old_pthread_cond_timedwait.c: New file.
10212 * old_pthread_cond_wait.c: New file.
10213 * pthreadP.h: Add prototypes for the compatibility interfaces.
10214
10215 * pthread_cond_destroy.c: Don't include <errno.h>.
10216
fd8979e4
UD
102172003-01-01 Ulrich Drepper <drepper@redhat.com>
10218
10219 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10220 unnecessary zero offset when addressing MUTEX.
10221
6d6ee629
UD
102222002-12-31 Ulrich Drepper <drepper@redhat.com>
10223
10224 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10225 __register_atfork.
10226 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10227 for __register_atfork.
10228
a4baf360
UD
102292002-12-31 Jakub Jelinek <jakub@redhat.com>
10230
10231 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10232 instead of ASSEMBLER test macro.
10233
10234 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10235 __libc_current_sigrtmax): Add libc_hidden_def.
10236
10237 * sysdeps/pthread/list.h: Remove assert.h include.
10238
e9395a94
UD
102392002-12-31 Ulrich Drepper <drepper@redhat.com>
10240
10241 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10242 __pthread_initialize_minimal_internal not
10243 __pthread_initialize_minimal.
10244
89d6e444
UD
102452002-12-30 Ulrich Drepper <drepper@redhat.com>
10246
416d2de6
UD
10247 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10248 __pthread_initialize_minimal as hidden.
10249
89d6e444
UD
10250 * init.c (__pthread_initialize_minimal_internal): Don't mark as
10251 constructor.
10252
102532002-12-31 Jakub Jelinek <jakub@redhat.com>
10254
10255 * Makefile ($(inst_libdir)/libpthread.so): Depend on
10256 $(common-objpfx)format.lds, include that into the output script.
10257 Fix comment.
10258 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10259
8cac677c
UD
102602002-12-28 Andreas Jaeger <aj@suse.de>
10261
10262 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10263 nsec resolution changes.
10264 (xstat64_conv): Likewise.
10265 (xstat32_conv): Likewise.
10266 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10267 struct kernel_stat.
10268 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10269 structs stat and stat64.
10270 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 10271 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 10272
49e9f864
UD
102732002-12-30 Jakub Jelinek <jakub@redhat.com>
10274
10275 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
10276 argument.
10277 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10278 (pthread_exit): Use strong_alias to avoid warnings.
10279 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10280 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10281 ptr___pthread_attr_init_2_*.
10282 * init.c (pthread_functions): Adjust.
10283
bab09b26
UD
102842002-12-29 Ulrich Drepper <drepper@redhat.com>
10285
598d7a42
UD
10286 * forward.c: Make all functions available by default again. It
10287 caused too much trouble.
10288
bab09b26
UD
10289 * pt-siglongjmp.c: Removed.
10290
3b7ed871
UD
102912002-12-28 Jakub Jelinek <jakub@redhat.com>
10292
10293 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10294 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10295 * sysdeps/i386/Makefile: New file.
10296 * sysdeps/i386/tcb-offsets.sym: New file.
10297 * sysdeps/pthread/tcb-offsets.h: New file.
10298 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10299 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10300
10301 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10302 __register_atfork...
10303 (GLIBC_2.3.2): ...here.
10304
103052002-12-28 Ulrich Drepper <drepper@redhat.com>
10306
10307 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10308 pthread_attr_setstackaddr with __attribute_deprecated__.
10309
270d9d47
UD
103102002-12-27 Jakub Jelinek <jakub@redhat.com>
10311
10312 * pt-system.c (system): Remove cancellation handling.
10313 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10314 cancellation routines.
10315
131fd126
UD
103162002-12-28 Ulrich Drepper <drepper@redhat.com>
10317
afb2e954
UD
10318 * descr.h: Include <dl-sysdep.h>.
10319 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
10320 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10321 (MULTIPLE_THREADS_OFFSET): Adjust offset.
10322 (SYSINFO_OFFSEET): Likewise.
10323
103242002-12-27 Jakub Jelinek <jakub@redhat.com>
10325
10326 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10327 Define.
10328 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10329 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10330 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10331 (USE_DL_SYSINFO): Undef.
10332
103332002-12-22 Jakub Jelinek <jakub@redhat.com>
10334
10335 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10336 $(common-objpfx)libc.so.
10337 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10338 it is bigger than pipe buffer size even on arches with bigger
10339 page size.
10340 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10341
a218c9cf
UD
103422002-12-25 Ulrich Drepper <drepper@redhat.com>
10343
10344 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10345 correct errno access for case that USE___THREAD is not defined.
10346
015a2dc9
UD
103472002-12-24 Ulrich Drepper <drepper@redhat.com>
10348
10349 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10350 Patch by Marijn Ros <marijn@mad.scientist.com>.
10351
5220f9ac
RM
103522002-12-22 Roland McGrath <roland@redhat.com>
10353
10354 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10355
1561bf63
UD
103562002-12-20 Ulrich Drepper <drepper@redhat.com>
10357
10358 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10359
3325198e
UD
103602002-12-19 Ulrich Drepper <drepper@redhat.com>
10361
057c823f
UD
10362 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10363 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10364 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10365
097eca29
UD
10366 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10367 of int $0x80.
10368 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10369 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10370 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10371 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10372 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10373 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10374 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10375 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10376
10377 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10378 sysenter.
10379 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10380
10381 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10382
5f5843e3
UD
10383 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10384 in new TCB.
10385 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10386 that sysinfo is properly initialized.
10387 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10388 to 1 only for ld.so.
10389
3325198e
UD
10390 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10391 RTLD_CORRECT_DYNAMIC_WEAK.
10392
74e8f2dc
UD
103932002-12-19 Jakub Jelinek <jakub@redhat.com>
10394
10395 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10396 Use return 0 as 6th argument to FORWARD4.
10397 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10398
df45b31e
UD
103992002-12-18 Ulrich Drepper <drepper@redhat.com>
10400
10401 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10402 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10403 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10404 (INIT_SYSINFO): New #define.
10405 (TLS_TP_INIT): Use INIT_SYSINFO.
10406 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10407 At test to make sure SYSINFO_OFFSET value is correct.
10408 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10409
3d539579
UD
104102002-12-18 Jakub Jelinek <jakub@redhat.com>
10411
10412 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10413 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10414 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10415 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10416 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10417 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10418 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10419
d7913e0e
UD
104202002-12-18 Ulrich Drepper <drepper@redhat.com>
10421
f051627f
UD
10422 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10423 macro instead of using int $0x80 directly.
10424
d7913e0e
UD
10425 * sysdeps/pthread/bits/stdio-lock.h: New file.
10426 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10427 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10428 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10429 * Makefile (routines): Add libc-lowlevelmutex.
10430
10431 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10432 __i686.get_pc_thunk.dx.
10433
f077a4a9
UD
104342002-12-17 Jakub Jelinek <jakub@redhat.com>
10435
10436 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10437 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10438 ($(objpfx)tst-cancel-wrappers.out): New rule.
10439 * tst-cancel-wrappers.sh: New test.
10440 * tst-locale1.c: Include signal.h.
10441 (uselocale): Test static linking of __libc_current_sigrt*.
10442
104432002-12-17 Ulrich Drepper <drepper@redhat.com>
10444
10445 * Makefile (tests): Add tst-cancel6.
10446 * tst-cancel6.c: New file
10447
bd499a3b
UD
104482002-12-17 Jakub Jelinek <jakub@redhat.com>
10449
10450 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10451 Define meaningfully for assembler as well.
10452 * pthreadP.h (struct pthread_functions): Remove
10453 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
10454 and ptr_pthread_attr_init_2_1 fields.
10455 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10456 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10457 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10458 (FORWARD3): Define using FORWARD4.
10459 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10460 versions.
10461 * pt-system.c: Remove duplicate stdlib.h include.
10462
0a1063f4
UD
104632002-12-16 Ulrich Drepper <drepper@redhat.com>
10464
87d60668
UD
10465 * sem_init.c: Define sem_init@GLIBC_2.0.
10466 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10467 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10468
0a1063f4
UD
10469 * flockfile.c: Moved to...
10470 * sysdeps/pthread/flockfile.c: ...here. New file.
10471 * funlockfile.c: Moved to...
10472 * sysdeps/pthread/funlockfile.c: ...here. New file.
10473 * ftrylockfile.c: Moved to...
10474 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
10475
9634cf9d
UD
104762002-12-16 Jakub Jelinek <jakub@redhat.com>
10477
10478 * libc-cancellation.c: Guard both function with
10479 #if !defined NOT_IN_libc.
10480 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10481 automatically provided pthread wrappers.
10482 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10483 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10484 nor in libpthread.
10485 * pt-open.c: Removed.
10486 * pt-fcntl.c: Removed.
10487 * pt-fsync.c: Removed.
10488 * pt-lseek.c: Removed.
10489 * pt-msgrcv.c: Removed.
10490 * pt-msgsnd.c: Removed.
10491 * pt-msync.c: Removed.
10492 * pt-nanosleep.c: Removed.
10493 * pt-open64.c: Removed.
10494 * pt-pause.c: Removed.
10495 * pt-pread.c: Removed.
10496 * pt-pread64.c: Removed.
10497 * pt-pwrite.c: Removed.
10498 * pt-pwrite64.c: Removed.
10499 * pt-read.c: Removed.
10500 * pt-recv.c: Removed.
10501 * pt-recvfrom.c: Removed.
10502 * pt-recvmsg.c: Removed.
10503 * pt-send.c: Removed.
10504 * pt-sendto.c: Removed.
10505 * pt-sigtimedwait.c: Removed.
10506 * pt-sigwait.c: Removed.
10507 * pt-wait.c: Removed.
10508 * pt-waitpid.c: Removed.
10509 * pt-write.c: Removed.
10510 * pt-accept.c: Removed.
10511 * pt-close.c: Removed.
10512 * pt-connect.c: Removed.
10513 * pt-lseek64.c: Removed.
10514 * pt-sendmsg.c: Removed.
10515 * pt-tcdrain.c: Removed.
10516
6ee8d334
UD
105172002-12-15 Ulrich Drepper <drepper@redhat.com>
10518
81fa9371
UD
10519 * init.c (__pthread_initialize_minimal_internal): Renamed from
10520 __pthread_initialize_minimal. Make old name an alias. This
10521 converts a normal relocation into a relative relocation.
10522
f3015aa5
UD
10523 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10524
4cbc1950
UD
10525 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10526 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10527 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10528 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10529 pt-sigwaitinfo, pt-waitid, and pt-writev.
10530 * pt-creat.c: Removed.
10531 * pt-poll.c: Removed.
10532 * pt-pselect.c: Removed.
10533 * pt-readv.c: Removed.
10534 * pt-select.c: Removed.
10535 * pt-sigpause.c: Removed.
10536 * pt-sigsuspend.c: Removed.
10537 * pt-sigwaitinfo.c: Removed.
10538 * pt-waitid.c: Removed.
10539 * pt-writev.c: Removed.
10540
8454830b
UD
10541 * init.c (pthread_functions): New variable.
10542 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10543 (or NULL) to __libc_pthread_init.
10544 * forward.c: Rewrite to use __libc:pthread_functions array to get
10545 function addresses.
10546 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10547 prototype.
10548 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10549 Take new parameter. Copy content of variable pointed to by it
10550 to __libc_pthread_init.
10551
10552 * pthreadP.h (struct pthread_functions): New type.
10553 (__libc_pthread_init): Declare.
10554
10555 * pthread_attr_destroy.c: Add namespace protected alias.
10556 * pthread_attr_getdetachstate.c: Likewise.
10557 * pthread_attr_getinheritsched.c: Likewise.
10558 * pthread_attr_getschedparam.c: Likewise.
10559 * pthread_attr_getschedpolicy.c: Likewise.
10560 * pthread_attr_getscope.c: Likewise.
10561 * pthread_attr_setdetachstate.c: Likewise.
10562 * pthread_attr_setinheritsched.c: Likewise.
10563 * pthread_attr_setschedparam.c: Likewise.
10564 * pthread_attr_setschedpolicy.c: Likewise.
10565 * pthread_attr_setscope.c: Likewise.
10566 * pthread_cond_broadcast.c: Likewise.
10567 * pthread_cond_destroy.c: Likewise.
10568 * pthread_cond_init.c: Likewise.
10569 * pthread_cond_signal.c: Likewise.
10570 * pthread_cond_wait.c: Likewise.
10571 * pthread_condattr_destroy.c: Likewise.
10572 * pthread_condattr_init.c: Likewise.
10573 * pthread_equal.c: Likewise.
10574 * pthread_exit.c: Likewise.
10575 * pthread_getschedparam.c: Likewise.
10576 * pthread_self.c: Likewise.
10577 * pthread_setcancelstate.c: Likewise.
10578 * pthread_setschedparam.c: Likewise.
10579 * pthread_mutex_destroy.c: Likewise.
10580 * pthread_mutex_init.c: Likewise.
10581 * pthreadP.h: Add prototypes for the aliases.
10582
0d5f4929
UD
10583 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10584 multiple_threads member in correct TCB to 1.
10585
6ee8d334
UD
10586 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10587 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10588 member of thread decriptor, otherwise return unconditionally 1.
10589
2fb6444d
UD
105902002-12-14 Ulrich Drepper <drepper@redhat.com>
10591
10592 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10593 regular Linux version. Remove file.
10594 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10595 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10596 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10597 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10598 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10599 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10600 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10601 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10602 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10603 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10604 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10605 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10606 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10607 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10608 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10609 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10610 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10611 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10612 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10613 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10614 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10615 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10616 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10617 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10618 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10619 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10620 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10621 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10622 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10623 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10624
86b2dc40
UD
106252002-12-14 Jakub Jelinek <jakub@redhat.com>
10626
10627 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10628 * sysdeps/unix/sysv/linux/open.c: Removed.
10629 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10630 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10631 * sysdeps/unix/sysv/linux/msync.c: Removed.
10632 * sysdeps/unix/sysv/linux/read.c: Removed.
10633 * sysdeps/unix/sysv/linux/close.c: Removed.
10634 * sysdeps/unix/sysv/linux/creat.c: Removed.
10635 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10636 * sysdeps/unix/sysv/linux/pause.c: Removed.
10637 * sysdeps/unix/sysv/linux/select.c: Removed.
10638 * sysdeps/unix/sysv/linux/write.c: Removed.
10639
9d263d72
UD
106402002-12-14 Ulrich Drepper <drepper@redhat.com>
10641
10642 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10643 element in TCB to see whether locking is needed.
10644
10645 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10646 MULTIPLE_THREADS_OFFSET value is correct.
10647
10648 * sysdeps/unix/sysv/linux/close.c: New file.
10649 * sysdeps/unix/sysv/linux/connect.S: New file.
10650 * sysdeps/unix/sysv/linux/creat.c: New file.
10651 * sysdeps/unix/sysv/linux/fsync.c: New file.
10652 * sysdeps/unix/sysv/linux/llseek.c: New file.
10653 * sysdeps/unix/sysv/linux/lseek.c: New file.
10654 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10655 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10656 * sysdeps/unix/sysv/linux/msync.c: New file.
10657 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10658 * sysdeps/unix/sysv/linux/open.c: New file.
10659 * sysdeps/unix/sysv/linux/open64.c: New file.
10660 * sysdeps/unix/sysv/linux/pause.c: New file.
10661 * sysdeps/unix/sysv/linux/poll.c: New file.
10662 * sysdeps/unix/sysv/linux/pread.c: New file.
10663 * sysdeps/unix/sysv/linux/pread64.c: New file.
10664 * sysdeps/unix/sysv/linux/pselect.c: New file.
10665 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10666 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10667 * sysdeps/unix/sysv/linux/readv.c: New file.
10668 * sysdeps/unix/sysv/linux/recv.S: New file.
10669 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10670 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10671 * sysdeps/unix/sysv/linux/select.c: New file.
10672 * sysdeps/unix/sysv/linux/send.S: New file.
10673 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10674 * sysdeps/unix/sysv/linux/sendto.S: New file.
10675 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10676 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10677 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10678 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10679 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10680 * sysdeps/unix/sysv/linux/system.c: New file.
10681 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10682 * sysdeps/unix/sysv/linux/wait.c: New file.
10683 * sysdeps/unix/sysv/linux/waitid.c: New file.
10684 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10685 * sysdeps/unix/sysv/linux/writev.c: New file.
10686 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10687
10688 * pt-readv.c: Fix comment.
10689
106902002-12-14 Jakub Jelinek <jakub@redhat.com>
10691
10692 * tst-cleanup1.c: Include stdlib.h.
10693
10694 * tst-cancel5.c: New test.
10695 * Makefile (tests): Add tst-cancel5.
10696 (tst-cancel5): Link against libc.so libpthread.so in that order.
10697
9ae0909b
UD
106982002-12-13 Ulrich Drepper <drepper@redhat.com>
10699
b7bdd9c4
UD
10700 * forward.c (test_loaded): Prevent recursive calls.
10701
9ae0909b
UD
10702 * Makefile (routines): Add libc-cancellation.
10703 * libc-cancellation.c: New file.
10704 * descr.h (struct pthread): Add multiple_threads field.
10705 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10706 new thread descriptor to 1.
10707 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10708 Initialize multiple_thread field after successful thread creation.
10709 * cancellation.c (__do_cancel): Move to pthreadP.h.
10710 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10711 (__pthread_disable_asynccancel): Add internal_function attribute.
10712 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10713 * pthread_setcancelstate.c: Likewise.
10714 * pthread_setcanceltype.c: Likewise.
10715 * pthread_exit.c: Likewise.
10716 * pthreadP.h (CANCELLATION_P): Likewise.
10717 (__do_cancel): Define as static inline.
10718 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10719 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10720 declarations.
10721 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10722 fields. Define MULTIPLE_THREADS_OFFSET.
10723 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10724 declaration.
10725 * sysdeps/unix/sysv/linux/accept.S: New file.
10726 * sysdeps/unix/sysv/linux/read.c: New file.
10727 * sysdeps/unix/sysv/linux/write.c: New file.
10728 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10729 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10730 initialization of __libc_locking_needed.
10731 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10732 __libc_locking_needed, use multiple_threads field in TCB.
10733 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10734
22f20674
UD
107352002-12-12 Ulrich Drepper <drepper@redhat.com>
10736
2ad2e1e7
UD
10737 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10738 version.
10739 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10740
22f20674
UD
10741 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10742 access to __libc_locking_needed for PIC.
10743
aa80bf86
UD
107442002-12-12 Jakub Jelinek <jakub@redhat.com>
10745
10746 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10747 declare for libc.so.
10748 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10749 expression.
10750 (__libc_lock_lock): Put into statement expression.
10751 (__libc_lock_unlock): Remove trailing semicolon.
10752 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10753
24021373
RM
107542002-12-12 Roland McGrath <roland@redhat.com>
10755
10756 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10757 "m" constraint to refer to __libc_locking_needed. Declare it here.
10758
14e7aece
UD
107592002-12-12 Ulrich Drepper <drepper@redhat.com>
10760
10761 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10762 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10763 Initialize __libc_locking_needed.
10764 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10765 instead of __register_pthread_fork_handler.
10766 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10767 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10768 fork-gen with libc_pthread_init.
10769 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10770 of __register_pthread_fork_handler.
10771 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10772 of __register_pthread_fork_handler.
10773 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10774 __libc_locking_needed to determine whether lock prefix can be avoided.
10775 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10776
85631c8e
UD
107772002-12-11 Ulrich Drepper <drepper@redhat.com>
10778
da63009e
UD
10779 * Makefile (tests): Add tst-cleanup1.
10780 * tst-cleanup1.c: New file.
10781 * cancellation.c (__cleanup_thread): Removed.
10782 (__do_cancel): Remove call to __cleanup_thread.
10783 * pthreadP.h: Remove __cleanup_thread prorotype.
10784
000160a2
UD
10785 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10786 Remember function and argument even if cancellation handler
10787 function is not available.
10788 (__libc_cleanup_region_end): Execute registered function directly if
10789 pthread functions are not available.
10790 (__libc_cleanup_end): Likewise.
10791
85631c8e
UD
10792 * init.c (__pthread_initialize_minimal): Fix initialization in
10793 static lib by preventing gcc from being too clever.
10794
dce8f2b6
UD
107952002-12-10 Ulrich Drepper <drepper@redhat.com>
10796
34a075be
UD
10797 * init.c (__pthread_initialize_minimal): Remove unneccesary
10798 sigaddset call.
10799
dce8f2b6
UD
10800 * Makefile (tests): We can run tst-locale2 now.
10801
e5e45b53
UD
108022002-12-09 Ulrich Drepper <drepper@redhat.com>
10803
10804 * Versions: Remove duplicated sigwait entry.
10805
bdb04f92
UD
108062002-12-08 Ulrich Drepper <drepper@redhat.com>
10807
1e506629
UD
10808 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10809 inside libpthread.
10810
a3957dd5
UD
10811 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10812
bdb04f92
UD
10813 * pthreadP.h: Declare __pthread_enable_asynccancel and
10814 __pthread_disable_asynccancel.
10815 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10816 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10817 * cancellation.c (__pthread_enable_asynccancel): New function.
10818 (__pthread_disable_asynccancel): New function.
10819 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10820 * pt-close.c: Likewise.
10821 * pt-connect.c: Likewise.
10822 * pt-creat.c: Likewise.
10823 * pt-fcntl.c: Likewise.
10824 * pt-fsync.c: Likewise.
10825 * pt-lseek.c: Likewise.
10826 * pt-lseek64.c: Likewise.
10827 * pt-msgrcv.c: Likewise.
10828 * pt-msgsnd.c: Likewise.
10829 * pt-msync.c: Likewise.
10830 * pt-nanosleep.c: Likewise.
10831 * pt-open.c: Likewise.
10832 * pt-open64.c: Likewise.
10833 * pt-pause.c: Likewise.
10834 * pt-poll.c: Likewise.
10835 * pt-pread.c: Likewise.
10836 * pt-pread64.c: Likewise.
10837 * pt-pselect.c: Likewise.
10838 * pt-pwrite.c: Likewise.
10839 * pt-pwrite64.c: Likewise.
10840 * pt-read.c: Likewise.
10841 * pt-readv.c: Likewise.
10842 * pt-recv.c: Likewise.
10843 * pt-recvfrom.c: Likewise.
10844 * pt-recvmsg.c: Likewise.
10845 * pt-select.c: Likewise.
10846 * pt-send.c: Likewise.
10847 * pt-sendmsg.c: Likewise.
10848 * pt-sendto.c: Likewise.
10849 * pt-sigpause.c: Likewise.
10850 * pt-sigsuspend.c: Likewise.
10851 * pt-sigtimedwait.c: Likewise.
10852 * pt-sigwait.c: Likewise.
10853 * pt-sigwaitinfo.c: Likewise.
10854 * pt-system.c: Likewise.
10855 * pt-tcdrain.c: Likewise.
10856 * pt-wait.c: Likewise.
10857 * pt-waitid.c: Likewise.
10858 * pt-waitpid.c: Likewise.
10859 * pt-write.c: Likewise.
10860 * pt-writev.c: Likewise.
a3957dd5
UD
10861 * pthread_join.c: Likewise.
10862 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
10863
10864 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10865 (__xpg_sigpause): New function.
10866 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10867
6ccb3834
UD
108682002-12-07 Ulrich Drepper <drepper@redhat.com>
10869
09efc3ba
UD
10870 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10871
10872 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10873 _GI_pthread_cleanup_pop to pthreadP.h.
10874
10875 * ftrylockfile.c: Use _IO_lock_trylock instead of
10876 pthread_mutex_trylock.
10877
10878 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10879 (CANCEL_RESET): Likewise.
10880 (__pthread_setcanceltype_): Declare.
10881 (__pthread_mutex_lock_internal): Declare.
10882 (__pthread_mutex_unlock_internal): Declare.
10883 (__pthread_once_internal): Declare.
10884 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10885 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10886
10887 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10888 and pthread_mutex_unlock.
10889 * pthread_cond_wait.c: Likewise.
10890 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10891 * pthread_mutex_unlock.c: Likewise.
10892
10893 * pthread_setcanceltype.c: Add additional alias
10894 __pthread_setcanceltype.
10895
10896 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10897 * sem_open.c (sem_open): Likewise.
10898 Use __libc_open, __libc_write, and __libc_close instead of
10899 open, write, and close respectively.
10900
10901 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10902 Rewrite as statement expression since it must return a value.
10903
10904 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10905 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10906 __pthread_kill.
10907
10908 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10909 alias __pthread_once_internal.
10910
6ccb3834
UD
10911 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10912
d3c9f895
UD
109132002-12-06 Ulrich Drepper <drepper@redhat.com>
10914
4614167a
UD
10915 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10916 * tst-stdio1.c: New file.
10917 * tst-stdio2.c: New file.
10918
a4548cea
UD
10919 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10920
d3c9f895
UD
10921 * Makefile (tests): Comment out tst-locale2 for now.
10922 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10923
10924 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10925 -D_IO_MTSAFE_IO.
10926 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10927 Use _IO_lock_init instead of explicit assignment.
10928
10929 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10930 Define __libc_lock_* and __libc_lock_recursive macros with
10931 lowlevellock macros, not pthread mutexes.
10932
10933 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10934 of pthread_mutex_lock.
10935 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10936 instead of pthread_mutex_unlock.
10937
fde89ad0
RM
109382002-12-06 Roland McGrath <roland@redhat.com>
10939
10940 * allocatestack.c (__stack_user): Use uninitialized defn.
10941 * init.c (__pthread_initialize_minimal): Initialize it here.
10942
11767d47
RM
109432002-12-05 Roland McGrath <roland@redhat.com>
10944
fde89ad0
RM
10945 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10946 string.
10947 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10948
11767d47
RM
10949 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10950 missing & here too.
10951
440d8bc2
UD
109522002-12-05 Ulrich Drepper <drepper@redhat.com>
10953
10954 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10955 lowlevellock.
10956 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10957 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10958 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10959 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10960 for __libc_lock_* macros.
10961 * Makefile (routines): Add libc-lowlevellock.
10962
109632002-10-09 Roland McGrath <roland@redhat.com>
10964
10965 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10966 Under [__PIC__], call the function via the pointer fetched for
10967 comparison rather than a call by name that uses the PLT.
10968 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10969 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10970 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10971 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10972 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10973
d5ed0118
RM
109742002-12-04 Roland McGrath <roland@redhat.com>
10975
10976 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10977
10978 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10979 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10980
10981 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10982
eaa4099f
UD
109832002-12-04 Ulrich Drepper <drepper@redhat.com>
10984
10985 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10986 a completely opaque, non-integer type.
10987 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10988
33b5d0cc
UD
109892002-12-05 Jakub Jelinek <jakub@redhat.com>
10990
10991 * sysdeps/i386/tls.h: Include stdlib.h.
10992 * sysdeps/x86_64/tls.h: Likewise.
10993
7a5cdb30
UD
109942002-12-04 Ulrich Drepper <drepper@redhat.com>
10995
c4a6d859
UD
10996 * Makefile (tests): Add tst-locale2.
10997 (tests-static): Likewise.
10998 * tst-locale2.c: New file.
10999
7a5cdb30
UD
11000 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11001 volatile and add memory clobbers to lock operations.
11002
d82d5d12
UD
110032002-12-03 Ulrich Drepper <drepper@redhat.com>
11004
69cae3cf
UD
11005 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11006 * sysdeps/i386/i486/bits/atomic.h: New file.
11007 * sysdeps/i386/i586/bits/atomic.h: New file.
11008 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11009 include i486 version.
11010 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11011 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 11012 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 11013
e4044c01
UD
11014 * allocatestack.c (get_cached_stack): Don't crash if we first
11015 found a stack with a larger size then needed.
11016 Reported by Hui Huang <hui.huang@sun.com>.
11017
d82d5d12
UD
11018 * Makefile (tests): Add tst-sysconf.
11019 * tst-sysconf.c: New file.
11020
11021 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11022 PTHREAD_THREADS_MAX.
11023
fa9a4ff0
RM
110242002-12-02 Roland McGrath <roland@redhat.com>
11025
11026 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11027 Declare using hidden_proto instead of attribute_hidden, so there are
11028 non-.hidden static symbols for gdb to find.
11029 (__pthread_keys): Likewise.
11030 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11031 * allocatestack.c (__stack_user): Likewise.
11032 * pthread_create.c (__pthread_keys): Likewise.
11033 (__nptl_threads_events, __nptl_last_event): Make these static instead
11034 of hidden.
11035 * pthread_key_create.c (__pthread_pthread_keys_max,
11036 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11037
91949a33
UD
110382002-12-02 Ulrich Drepper <drepper@redhat.com>
11039
c22b52fa
UD
11040 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11041 statically.
11042 * tst-locale1.c: New file.
11043
beb6aa41
UD
11044 * pthread_cond_timedwait.c: Include <stdlib.h>.
11045
91949a33
UD
11046 * Makefile (tests): Add tst-fork2 and tst-fork3.
11047 * tst-fork2.c: New file.
11048 * tst-fork3.c: New file.
11049
654dff90
UD
110502002-11-28 Ulrich Drepper <drepper@redhat.com>
11051
cb0e76b4
UD
11052 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11053
11054 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11055 require it to 200112L.
11056
11057 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11058 instruction only if HAVE_CMOV is defined.
11059 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11060
975aa229
UD
11061 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11062
654dff90
UD
11063 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11064
11065 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11066
11067 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11068
a3931336
UD
110692002-11-27 Ulrich Drepper <drepper@redhat.com>
11070
c10c099c
UD
11071 * sysdeps/x86_64/bits/atomic.h: New file.
11072
11073 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11074 16-bit operations.
11075
dca99d27
UD
11076 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11077 possible since gettid cannot fail.
11078
f78deea6
UD
11079 * sysdeps/x86_64/pthreaddef.h: New file.
11080
11081 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11082
11083 * sysdeps/x86_64/pthread_spin_init.c: New file.
11084 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11085 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11086 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11087
11088 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11089 Add missing lock prefix. Minute optimization.
11090
11091 * tst-spin2.c (main): Also check successful trylock call.
11092
11093 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11094 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11095
11096 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11097 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11098
11099 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11100 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11101 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
11102
11103 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11104 value in case of an error.
11105
a3931336
UD
11106 * sysdeps/x86_64/tls.h: New file.
11107
76a50749
UD
111082002-11-26 Ulrich Drepper <drepper@redhat.com>
11109
117c452c
UD
11110 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11111 takes the array member name and the index as parameters.
11112 (THREAD_SETMEM_NC): Likewise.
11113 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11114 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11115 interfaces.
11116
11117 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11118 to decide which code to use.
11119 (THREAD_SETMEM_NC): Likewise.
11120
76a50749
UD
11121 * allocatestack.c (queue_stack): Don't remove stack from list here.
11122 Do it in the caller. Correct condition to prematurely terminate
11123 loop to free stacks.
11124 (__deallocate_stack): Remove stack from list here.
11125
111262002-11-26 Ulrich Drepper <drepper@redhat.com>
11127
11128 * Makefile (tests): Add tst-stack1.
11129 * tst-stack1.c: New file.
11130
11131 * allocatestack.c (allocate_stack): Initialize the TCB on a user
11132 provided stack.
11133
11134 * pthread_attr_getstack.c: Return bottom of the thread area.
11135
111362002-11-25 Ulrich Drepper <drepper@redhat.com>
11137
11138 * Makefile (libpthread-routines): Add pt-allocrtsig and
11139 pthread_kill_other_threads.
11140 * pt-allocrtsig.c: New file.
11141 * pthread_kill_other_threads.c: New file.
11142 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11143 all three functions.
11144 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11145 allocrtsig.
11146 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11147 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11148 and __libc_allocate_rtsig_private.
11149 * Versions (libpthread): Export pthread_kill_other_threads_np,
11150 __libc_current_sigrtmin, and __libc_current_sigrtmax.
11151
111522002-11-24 Ulrich Drepper <drepper@redhat.com>
11153
11154 * allocatestack.c (allocate_stack): stackaddr in attribute points to
11155 the end of the stack. Adjust computations.
11156 When mprotect call fails dequeue stack and free it.
11157 * pthread_attr_setstack.c: Store top of the stack in stackaddr
11158 attribute.
11159 * pthread_getattr_np.c: Likewise.
11160
11161 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11162 surprises.
11163
111642002-11-23 Ulrich Drepper <drepper@redhat.com>
11165
11166 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11167 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11168
111692002-11-22 Ulrich Drepper <drepper@redhat.com>
11170
11171 * pthread_getspecific.c: Optimize access to first 2nd-level array.
11172 * pthread_setspecific.c: Likewise.
11173
111742002-11-21 Ulrich Drepper <drepper@redhat.com>
11175
11176 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11177 definitions. Get them from the official place.
11178 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11179
11180 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11181 Use new CLONE_ flags in clone() calls.
11182
11183 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11184 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11185
11186 * Versions: Add pthread_* functions for libc.
11187 * forward.c: New file.
11188
11189 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11190 errno-loc.
11191 * herrno.c: New file.
11192 * res.c: New file.
11193
11194 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11195 sem_trywait, and sem_timedwait. Add herrno and res.
11196 * sem_init.c: Don't initialize lock and waiters members.
11197 * sem_open.c: Likewise.
11198 * sem_post.c: Removed.
11199 * sem_wait.c: Removed.
11200 * sem_trywait.c: Removed.
11201 * sem_timedwait.c: Removed.
11202 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11203 Includes full implementations of sem_post, sem_wait, sem_trywait,
11204 and sem_timedwait.
11205 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11206 for new implementation.
11207 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11208 and waiters fields.
11209
11210 * tst-sem3.c: Improve error message.
11211 * tst-signal3.c: Likewise.
11212
11213 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11214 to tell the kernel about the termination futex and to initialize tid
11215 member. Don't initialize main_thread.
11216 * descr.h (struct pthread): Remove main_thread member.
11217 * cancelllation.c (__do_cancel): Remove code handling main thread.
11218 The main thread is not special anymore.
11219
11220 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11221 size of the stacks to stack_cache_actsize.
11222
11223 * pt-readv.c: Add missing "defined".
11224 * pt-sigwait.c: Likewise.
11225 * pt-writev.c: Likewise.
11226
112272002-11-09 Ulrich Drepper <drepper@redhat.com>
11228
11229 * Versions: Export __connect from libpthread.
11230 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11231
11232 * Makefile (libpthread-routines): Add pt-raise.
11233 * sysdeps/unix/sysv/linux/raise.c: New file.
11234 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11235 * sysdeps/generic/pt-raise.c: New file.
11236
11237 * pthread_cond_init.c: Initialize all data elements of the condvar
11238 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11239
11240 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11241 * pthread_create.c: Likewise.
11242
11243 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11244 * tst-key1.c: New file.
11245 * tst-key2.c: New file.
11246 * tst-key3.c: New file.
11247
11248 * Versions: Export pthread_detach for version GLIBC_2.0.
11249 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11250
112512002-11-08 Ulrich Drepper <drepper@redhat.com>
11252
11253 * pthread_key_create.c: Terminate search after an unused key was found.
11254 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11255
11256 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11257 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11258
112592002-10-10 Ulrich Drepper <drepper@redhat.com>
11260
11261 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11262 dynamic lookup for errno in PIC.
11263
11264 * allocatestack.c (get_cached_stack): Rearrange code slightly to
11265 release the stack lock as soon as possible.
11266 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11267 the static TLS block.
11268 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11269
11270 * cancellation.c: Renamed from cancelation.c.
11271 * Makefile: Adjust accordingly.
11272 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11273 * cleanup_defer.c: Use CANCELLATION_P.
11274 * pthread_testcancel.c: Likewise.
11275 * descr.h: Fix spelling in comments.
11276 * init.c: Likewise.
11277 * pthread_getattr_np.c: Likewise.
11278 * pthread_getschedparam.c: Likewise.
11279 * pthread_setschedparam.c: Likewise.
11280 * Versions: Likewise.
11281
11282 * pt-pselect.c: New file.
11283 * Makefile (libpthread-routines): Add pt-pselect.
11284 * Versions: Add pselect.
11285
11286 * tst-cancel4.c: New file.
11287 * Makefile (tests): Add tst-cancel4.
11288
112892002-10-09 Ulrich Drepper <drepper@redhat.com>
11290
11291 * pthread_mutex_lock.c: Always record lock ownership.
11292 * pthread_mutex_timedlock.c: Likewise.
11293 * pthread_mutex_trylock.c: Likewise.
11294
11295 * pt-readv.c: New file.
11296 * pt-writev.c: New file.
11297 * pt-creat.c: New file.
11298 * pt-msgrcv.c: New file.
11299 * pt-msgsnd.c: New file.
11300 * pt-poll.c: New file.
11301 * pt-select.c: New file.
11302 * pt-sigpause.c: New file.
11303 * pt-sigsuspend.c: New file.
11304 * pt-sigwait.c: New file.
11305 * pt-sigwaitinfo.c: New file.
11306 * pt-waitid.c: New file.
11307 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11308 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11309 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11310 * Versions: Add all the new functions.
11311
11312 * tst-exit1.c: New file.
11313 * Makefile (tests): Add tst-exit1.
11314
11315 * sem_timedwait.c: Minor optimization for more optimal fastpath.
11316
113172002-10-08 Ulrich Drepper <drepper@redhat.com>
11318
11319 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11320
11321 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11322 call. pthread_join is an official cancellation point.
11323 * pthread_timedjoin.c: Likewise.
11324
11325 * pthread_cond_wait.c: Revert order in which internal lock are dropped
11326 and the condvar's mutex are retrieved.
11327 * pthread_cond_timedwait.c: Likewise.
11328 Reported by dice@saros.East.Sun.COM.
11329
113302002-10-07 Ulrich Drepper <drepper@redhat.com>
11331
11332 * pthreadP.h: Cut out all type definitions and move them...
11333 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
11334 * pthreadP.h: Include <internaltypes.h>.
11335
11336 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11337 performance tweaks.
11338
11339 * sem_trywait.c: Shuffle #includes around to get right order.
11340 * sem_timedwait.c: Likewise.
11341 * sem_post.c: Likewise.
11342 * sem_wait.c: Likewise.
11343
11344 * nptl 0.3 released.
11345
11346 * Makefile (tests): Add tst-signal3.
11347 * tst-signal3.c: New file.
11348
113492002-10-05 Ulrich Drepper <drepper@redhat.com>
11350
11351 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11352 the asms modify the sem object.
11353 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11354
11355 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11356 the actual members.
11357 * pthreadP.h (struct sem): New type. Actual semaphore type.
11358 * semaphoreP.h: Include pthreadP.h.
11359 * sem_getvalue.c: Adjust to sem_t change.
11360 * sem_init.c: Likewise.
11361 * sem_open.c: Likewise.
11362 * sem_post.c: Likewise.
11363 * sem_timedwait.c: Likewise.
11364 * sem_trywait.c: Likewise.
11365 * sem_wait.c: Likewise.
11366
113672002-10-04 Ulrich Drepper <drepper@redhat.com>
11368
11369 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11370 * tst-basic2.c: New file.
11371 * tst-exec1.c: New file.
11372 * tst-exec2.c: New file.
11373 * tst-exec3.c: New file.
11374
11375 * tst-fork1.c: Remove extra */.
11376
11377 * nptl 0.2 released. The API for IA-32 is complete.